#include <fastgl.h>
Inheritance diagram for fgl::FGControl:


This family of graphics controls contains the class FGPushButton, FGCheckBox, FGEditBox and Base menu. It is child objects of class Controls, which is a child object of base class FGBaseGui. There is a more information. NOTE: All of the FGControl class objects and its parents are on the create time automatically attached with its FGWindow. When a FGWindow is destroyed, Controls are destroyed either automatically. Don't delete it explicitly!
void call_back_procedure(CallBack cb) { ... // your code }
bgroup.cpp, buttons.cpp, calc.cpp, connect.cpp, fgv.cpp, pane.cpp, radio.cpp, and timer.cpp.
Public Member Functions | |
| virtual void | draw (void) |
| virtual void | SetName (const char *s) |
| virtual void | OnActivate (void) |
| void | SetKey (int k) |
| int | GetKey (void) const |
| void | Enable (void) |
| void | Disable (void) |
| virtual void | ClickUp (int a) |
| void | SetTrigger (int a) |
| int | GetTrigger (void) const |
| FGWindow * | GetOwner (void) const |
| int | GetLocalId () const |
| void | SetInk (FGPixel i) |
| void | SetPaper (FGPixel p) |
| void | SetFont (unsigned f) |
| void | SetHandler (ControlCall w) |
| void | AttachSignalName (const char *val) |
| const char * | GetSignalName () |
| virtual const double | ToDouble () const |
| virtual const int | ToInteger () const |
| virtual const char * | ToString () const |
Static Public Member Functions | |
| static void | Close (CallBack cb) |
| static void | Quit (CallBack cb) |
Protected Member Functions | |
| FGControl (int xs, int ys, int ws, int hs, const char *nm, ObjectType typ, int key, FGWindow *, ControlCall f, FGPixel p, FGPixel i, void *user_data) | |
| int | GetXr (void) |
| int | GetYr (void) |
| void | Underscore (int xo, int yo, int c) |
| void | update_owner (void) |
| virtual void | ClickDown (void) |
| virtual void | WheelSpin (int) |
| virtual void | GetHints (int &xx, int &yy, int &ww, int &hh) |
| virtual void | DrawAsSelected (void) |
| bool | IsYourTabPage (void) |
| bool | IsSelected (void) |
| virtual FGPixel | GetColorOfFrame (void) const |
Protected Attributes | |
| int | local_id |
| int | key |
| ControlCall | fnc |
| FGWindow * | owner |
| FGButtonGroup * | grp |
| char * | closure_name |
|
|
Set event name.
|
|
|
Change the state of the object to state "active" (as you as click with mouse at one). It is a good choice if you want input to the FGEditBox immediately without clicking at one. Reimplemented in fgl::FGEditBox.
|
|
|
You can use this static method as predefined callback when you can close the parent FGWindow. my_window->AddBaseMenu("Close the window", 'C', FGControl::Close); |
|
|
Changes the state of the object (draws it as grayed and don't allows activate one). Reimplemented in fgl::FGEditBox.
|
|
|
Redraws whole the object. Reimplemented in fgl::FGImage, fgl::FGPushButton, fgl::FGCheckBox, fgl::FGRadioButton, and fgl::FGEditBox. |
|
|
Changes the state of the object (draws it as normal and allows activate one).
|
|
|
Returns current 'hotkey'.
|
|
|
Each FGControl in the FGWindow has local ID. You can use this ID with handling ACCELEVENT by example. The all controls have local id. This value goes from 0 to .., for each window and its control items. For example: when window contains 5 buttons, then these buttons have local id values from 0 to 4,according to the order of its creating. This is useful for fast and easy testing which button (when you use one call-back procedure for more buttons i.e.).
|
|
|
Returns the parent Widget, i.e. window that contains this FGControl.
|
|
|
Get event name.
|
|
|
Returns the state of the FGControl (TRUE or FALSE). |
|
|
Callback on the FGControl activation by user by click or hotkey pressing. You can override this in child object. |
|
|
You can use this static method as predefined callback when you can close the parent FGWindow. my_window->AddBaseMenu("Quit the Application", 'C', Quit::Close); |
|
|
Set new background color and redraws object. |
|
|
Set a new handler for object.
|
|
|
Set new foreground color and redraws object. |
|
|
Change the 'hotkey' of the object.
|
|
|
Change the name of the object and redraws one. Reimplemented from fgl::FGDrawBuffer.
|
|
|
Set new background color and redraws object. |
|
|
With this procedure you can change the state of the two-state (ON/OFF) switches.
|
|
|
Dynamic cast.
Reimplemented in fgl::FGEditBox. |
|
|
Dynamic cast.
Reimplemented in fgl::FGEditBox. |
|
|
Dynamic cast.
Reimplemented in fgl::FGEditBox. |
|
1.4.0