(Up to GView)

GToolButton

This class is the default button that a GToolBar uses.

It can be a push, toggle or radio button, or a vertical or horizontal separator or a break.

Push buttons act like normal dialog buttons. You click them, they send a message. Toggle buttons change flip state every time they are clicked. Each time sending a message. Radio buttons only allow one button to be down between separators.


class GToolButton :
    public GView
{
public:
    // _Constructor
    GToolButton(int Bx, int By)

    // Data
    int GetType()
    int Image()
    int Value()
    void Image(int I)
    void SetType(int Type)
    void Value(int I)

    // Impl
    virtual bool GetDimension(int &x, int &y)
};

GToolButton::GToolButton

GToolButton(int Bx, int By)

Argument Description
int Bx Width of the button
int By Height of the button

Constructs the control


GToolButton::GetType

int GetType()

Gets this button's type, can be:


GToolButton::Image

int Image()

Returns this control's icon index


GToolButton::Value

int Value()

Returns the state of the control, true if pressed / down.


GToolButton::Image

void Image(int I)

Argument Description
int I

Sets this controls icon index


GToolButton::SetType

void SetType(int Type)

Argument Description
int Type The new type.

Sets this button's type, can be:


GToolButton::Value

void Value(int I)

Argument Description
int I New state

Sets the control's down state.


GToolButton::GetDimension

virtual bool GetDimension(int &x, int &y)

Argument Description
int &x Return the desired width.
int &y Return the desired height.

Override this to return a custom calculated dimension during the GToolBar's pour.


Built: 13/9/2001 2:28:30 PM
© 2001 Matthew Allen
Lgi HomePage