#include <glwx.h>
Public Member Functions | |
GUIPanel (const std::string &callback="") | |
virtual | ~GUIPanel () |
GUIRectangle * | getWidgetByCallbackString (const std::string &name) |
void | setInterval (int width, int height) |
void | setInterval (const Tuple2i &dimensions) |
const Tuple2i & | getInterval () |
void | setLayout (int layout) |
int | getLayout () |
int | getTreeHeight () |
virtual bool | loadXMLSettings (const char *stackPath) |
virtual bool | loadXMLSettings (const TiXmlElement *element) |
virtual void | notify (GUIRectangle *element) |
virtual void | checkMouseEvents (MouseEvent &evt, int extraInfo, bool bitInfo=false) |
virtual void | checkKeyboardEvents (KeyEvent &evt, int extraInfo) |
virtual void | render (float tick) |
virtual void | collectZWidgets (ZWidgets &container) |
virtual void | forceUpdate (bool) |
virtual bool | addWidget (GUIRectangle *widget) |
virtual void | pack () |
virtual void | clear () |
int | getWidgetCountByType (int type) |
Widgets & | getWidgets () |
Protected Attributes | |
Widgets | elements |
Tuple2i | interval |
int | layout |
Private Member Functions | |
void | packFreeLayout () |
void | packYAxisLayout () |
void | packXAxisLayout () |
void | correctPosition () |
Definition at line 847 of file glwx.h.
GUIPanel::GUIPanel | ( | const std::string & | callback = "" |
) |
Definition at line 3 of file GUIPanel.cpp.
References layout, PL_FREE_LAYOUT, setInterval(), GUIRectangle::widgetType, and WT_PANEL.
Referenced by loadXMLSettings().
GUIPanel::~GUIPanel | ( | ) | [virtual] |
void GUIPanel::packFreeLayout | ( | ) | [private] |
Definition at line 390 of file GUIPanel.cpp.
References GUIClippedRectangle::clipSize, GUIClippedRectangle::computeClippedBounds(), GUIRectangle::computeWindowBounds(), correctPosition(), elements, GUIRectangle::getWindowBounds(), GUIRectangle::parent, GUIRectangle::update, and GUIRectangle::windowBounds.
Referenced by pack().
void GUIPanel::packYAxisLayout | ( | ) | [private] |
Definition at line 301 of file GUIPanel.cpp.
References AT_CORNERLU, GUIClippedRectangle::computeClippedBounds(), GUIRectangle::computeWindowBounds(), correctPosition(), GUIRectangle::dimensions, elements, GUIRectangle::getWidth(), interval, layout, PL_YAXIS_CEN_LAYOUT, GUIRectangle::update, and GUIRectangle::windowBounds.
Referenced by pack().
void GUIPanel::packXAxisLayout | ( | ) | [private] |
Definition at line 345 of file GUIPanel.cpp.
References AT_CORNERLU, GUIClippedRectangle::computeClippedBounds(), GUIRectangle::computeWindowBounds(), correctPosition(), GUIRectangle::dimensions, elements, interval, GUIRectangle::update, and GUIRectangle::windowBounds.
Referenced by pack().
void GUIPanel::correctPosition | ( | ) | [private] |
Definition at line 425 of file GUIPanel.cpp.
References elements, GUIRectangle::getWindowBounds(), GUIRectangle::parent, GUIRectangle::position, GUIRectangle::update, and GUIRectangle::windowBounds.
Referenced by pack(), packFreeLayout(), packXAxisLayout(), and packYAxisLayout().
GUIRectangle * GUIPanel::getWidgetByCallbackString | ( | const std::string & | name | ) |
Definition at line 160 of file GUIPanel.cpp.
References elements, GUIRectangle::getCallbackString(), GUIRectangle::getWidgetType(), WT_PANEL, and WT_TABBED_PANEL.
Referenced by GuiWrapper::Init().
void GUIPanel::setInterval | ( | int | width, | |
int | height | |||
) |
Definition at line 537 of file GUIPanel.cpp.
References interval.
Referenced by GUIComboBox::GUIComboBox(), GUIPanel(), GUITabbedPanel::GUITabbedPanel(), loadXMLSettings(), and setInterval().
void GUIPanel::setInterval | ( | const Tuple2i & | dimensions | ) |
const Tuple2i & GUIPanel::getInterval | ( | ) |
void GUIPanel::setLayout | ( | int | layout | ) |
Definition at line 548 of file GUIPanel.cpp.
References layout, PL_FREE_LAYOUT, PL_GRID_LAYOUT, PL_XAXIS_LAYOUT, PL_YAXIS_CEN_LAYOUT, and PL_YAXIS_LAYOUT.
Referenced by GUIComboBox::GUIComboBox(), and GUITabbedPanel::GUITabbedPanel().
int GUIPanel::getLayout | ( | ) |
int GUIPanel::getTreeHeight | ( | ) |
Definition at line 522 of file GUIPanel.cpp.
References elements, GUIRectangle::getWidgetType(), and WT_PANEL.
Referenced by GUIFrame::forceUpdate().
bool GUIPanel::loadXMLSettings | ( | const char * | stackPath | ) | [virtual] |
Definition at line 10 of file GUIPanel.cpp.
References forceUpdate(), MediaPathManager::lookUpMediaPath(), and Logger::writeErrorLog().
Referenced by GUITabbedPanel::loadXMLSettings(), loadXMLSettings(), and GUIFrame::loadXMLSettings().
bool GUIPanel::loadXMLSettings | ( | const TiXmlElement * | element | ) | [virtual] |
Reimplemented from GUIRectangle.
Reimplemented in GUIFrame.
Definition at line 28 of file GUIPanel.cpp.
References addWidget(), deleteObject, elements, GUIPanel(), interval, GUICheckBox::isChecked(), layout, GUIClippedRectangle::loadXMLClippedRectangleInfo(), GUIRectangle::loadXMLSettings(), GUILabel::loadXMLSettings(), GUIButton::loadXMLSettings(), GUISeparator::loadXMLSettings(), GUISlider::loadXMLSettings(), GUITextBox::loadXMLSettings(), GUIComboBox::loadXMLSettings(), GUITabbedPanel::loadXMLSettings(), GUICheckBox::loadXMLSettings(), loadXMLSettings(), notify(), PL_FREE_LAYOUT, PL_GRID_LAYOUT, PL_XAXIS_LAYOUT, PL_YAXIS_CEN_LAYOUT, PL_YAXIS_LAYOUT, setInterval(), GUISeparator::setOrientation(), GUIRectangle::setParent(), and Logger::writeErrorLog().
void GUIPanel::notify | ( | GUIRectangle * | element | ) | [virtual] |
Definition at line 492 of file GUIPanel.cpp.
References elements, GUIRectangle::getWidgetType(), GUICheckBox::setChecked(), and WT_RADIO_BUTTON.
Referenced by loadXMLSettings().
void GUIPanel::checkMouseEvents | ( | MouseEvent & | evt, | |
int | extraInfo, | |||
bool | bitInfo = false | |||
) | [virtual] |
Reimplemented from GUIRectangle.
Definition at line 189 of file GUIPanel.cpp.
References GUIRectangle::active, GUIRectangle::checkMouseEvents(), elements, GUIRectangle::isActive(), and GUIRectangle::visible.
Referenced by GUITabbedPanel::checkMouseEvents(), GUIComboBox::checkMouseEvents(), GuiWrapper::MouseClicked(), and GuiWrapper::MouseMoved().
void GUIPanel::checkKeyboardEvents | ( | KeyEvent & | evt, | |
int | extraInfo | |||
) | [virtual] |
Reimplemented from GUIRectangle.
Definition at line 201 of file GUIPanel.cpp.
References GUIRectangle::active, GUIRectangle::checkKeyboardEvents(), elements, GUIRectangle::isActive(), and GUIRectangle::visible.
Referenced by GuiWrapper::AsciiKeyDown(), and GUITabbedPanel::checkKeyboardEvents().
void GUIPanel::render | ( | float | tick | ) | [virtual] |
Implements GUIRectangle.
Reimplemented in GUIFrame.
Definition at line 212 of file GUIPanel.cpp.
References elements, GUIRectangle::getWidgetType(), GUIRectangle::isAttached(), GUIComboBox::isDeployed(), GUIRectangle::parent, GUIComboBox::render(), GUIClippedRectangle::renderClippedBounds(), GUIRectangle::visible, and WT_COMBO_BOX.
Referenced by GUITabbedPanel::render(), and GUIComboBox::render().
void GUIPanel::collectZWidgets | ( | ZWidgets & | container | ) | [virtual] |
Definition at line 240 of file GUIPanel.cpp.
References elements, GUIRectangle::getWidgetType(), GUIRectangle::getZCoordinate(), GUIRectangle::visible, and WT_PANEL.
void GUIPanel::forceUpdate | ( | bool | updateArg | ) | [virtual] |
Reimplemented from GUIRectangle.
Reimplemented in GUIFrame.
Definition at line 295 of file GUIPanel.cpp.
References pack(), and GUIRectangle::update.
Referenced by GUITabbedPanel::computeWindowBounds(), GUIComboBox::computeWindowBounds(), loadXMLSettings(), and pack().
bool GUIPanel::addWidget | ( | GUIRectangle * | widget | ) | [virtual] |
Definition at line 467 of file GUIPanel.cpp.
References elements, GUIRectangle::getCallbackString(), GUIRectangle::setParent(), and Logger::writeErrorLog().
Referenced by GUITabbedPanel::addPanel(), GUIComboBox::finalizeSize(), GUIComboBox::GUIComboBox(), GUITabbedPanel::GUITabbedPanel(), and loadXMLSettings().
void GUIPanel::pack | ( | ) | [virtual] |
Definition at line 263 of file GUIPanel.cpp.
References correctPosition(), elements, forceUpdate(), layout, packFreeLayout(), packXAxisLayout(), packYAxisLayout(), PL_XAXIS_LAYOUT, PL_YAXIS_CEN_LAYOUT, PL_YAXIS_LAYOUT, and GUIRectangle::update.
Referenced by forceUpdate().
void GUIPanel::clear | ( | ) | [virtual] |
Reimplemented in GUIFrame.
Definition at line 482 of file GUIPanel.cpp.
References deleteObject, elements, and GUIRectangle::parent.
Referenced by GUIFrame::clear(), and ~GUIPanel().
int GUIPanel::getWidgetCountByType | ( | int | type | ) |
Definition at line 511 of file GUIPanel.cpp.
References elements, and GUIRectangle::getWidgetType().
Widgets & GUIPanel::getWidgets | ( | ) |
Definition at line 567 of file GUIPanel.cpp.
References elements.
Referenced by GUITabbedPanel::actionPerformed(), GUITabbedPanel::addPanel(), GUITabbedPanel::computeWindowBounds(), GUITabbedPanel::getCurrentPanel(), GUITabbedPanel::getCurrentPanelIndex(), GUITabbedPanel::getTabButton(), and GUITabbedPanel::loadXMLSettings().
Widgets GUIPanel::elements [protected] |
Definition at line 851 of file glwx.h.
Referenced by addWidget(), checkKeyboardEvents(), checkMouseEvents(), clear(), collectZWidgets(), correctPosition(), getTreeHeight(), getWidgetByCallbackString(), getWidgetCountByType(), getWidgets(), loadXMLSettings(), notify(), pack(), packFreeLayout(), packXAxisLayout(), packYAxisLayout(), render(), and GUIFrame::render().
Tuple2i GUIPanel::interval [protected] |
Definition at line 852 of file glwx.h.
Referenced by getInterval(), loadXMLSettings(), packXAxisLayout(), packYAxisLayout(), and setInterval().
int GUIPanel::layout [protected] |
Definition at line 853 of file glwx.h.
Referenced by getLayout(), GUIPanel(), loadXMLSettings(), pack(), packYAxisLayout(), and setLayout().