#include <gui.hpp>
Contains a special widget called the top widget. If you want to be able to have more then one Widget in your Gui, the top widget should be a Container.
NOTE: For the Gui to function properly you need to set a Graphics object to use and an Input object to use.
Definition at line 84 of file gui.hpp.
Public Member Functions | |
| Gui () | |
| Constructor. | |
| virtual | ~Gui () |
| Destructor. | |
| virtual void | setTop (Widget *top) |
| Sets the top Widget. | |
| virtual Widget * | getTop () const |
| Gets the top Widget. | |
| virtual void | setGraphics (Graphics *graphics) |
| Sets the Graphics object to use for drawing. | |
| virtual Graphics * | getGraphics () const |
| Gets the Graphics object used for drawing. | |
| virtual void | setInput (Input *input) |
| Sets the Input object to use for input handling. | |
| virtual Input * | getInput () const |
| Gets the Input object being used for input handling. | |
| virtual void | logic () |
| Performs the Gui logic. | |
| virtual void | draw () |
| Draws the Gui. | |
| virtual void | focusNone () |
| Focus none of the Widgets in the Gui. | |
| virtual void | setTabbingEnabled (bool tabbing) |
| Toggles the use of the tab key to focus Widgets. | |
| virtual bool | isTabbingEnabled () |
| Checks if tabbing is enabled. | |
Protected Attributes | |
| bool | mTopHasMouse |
| bool | mTabbing |
| Widget * | mTop |
| Graphics * | mGraphics |
| Input * | mInput |
| FocusHandler * | mFocusHandler |
|
|
Draws the Gui. By calling this funcion all draw functions down in the Gui hierarchy will be called. Definition at line 236 of file gui.cpp. References gcn::Graphics::_beginDraw(), gcn::Graphics::_endDraw(), gcn::Widget::draw(), gcn::Widget::drawBorder(), gcn::Widget::getBorderSize(), gcn::Widget::getDimension(), gcn::Rectangle::height, gcn::Graphics::popClipArea(), gcn::Graphics::pushClipArea(), gcn::Rectangle::width, gcn::Rectangle::x, and gcn::Rectangle::y. |
|
|
Gets the Graphics object used for drawing.
|
|
|
Gets the Input object being used for input handling.
|
|
|
Gets the top Widget.
|
|
|
Checks if tabbing is enabled.
|
|
|
|
Sets the Graphics object to use for drawing.
|
|
|
Sets the Input object to use for input handling.
|
|
|
Toggles the use of the tab key to focus Widgets. By default, tabbing is enabled.
|
|
|
Sets the top Widget.
Definition at line 86 of file gui.cpp. References gcn::Widget::_setFocusHandler(). Referenced by ~Gui(). |
1.4.1