GUIRectangle Class Reference

#include <glwx.h>

Inheritance diagram for GUIRectangle:

Inheritance graph
[legend]
Collaboration diagram for GUIRectangle:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GUIRectangle (const std::string &callback="")
virtual ~GUIRectangle ()
void setCallbackString (const std::string &callback)
const std::string & getCallbackString ()
bool loadXMLSettings (const TiXmlElement *node)
void setDimensions (float width, float height)
void setDimensions (const Tuple2f &dimensions)
const Tuple2f & getDimensions ()
void setPosition (float xScaleOrPosition, float yScaleOrPosition)
void setPosition (const Tuple2f &scalesOrPosition)
const Tuple2f & getPosition ()
virtual Tuple2i getCenter ()
int getWidth ()
int getHeight ()
void setActive (bool active)
bool isActive ()
void setAnchorPoint (const std::string &anchor)
void setAnchorPoint (int anchor)
int getAnchorPoint ()
virtual void forceUpdate (bool update)
void setVisible (bool active)
bool isVisible ()
bool isAttached ()
int getWidgetType ()
virtual void checkMouseEvents (MouseEvent &evt, int extraInfo, bool reservedBits=false)
virtual void checkKeyboardEvents (KeyEvent &evt, int extraInfo)
virtual void render (float)=0
virtual void setParent (GUIRectangle *parent)
virtual GUIRectanglegetParent ()
virtual
GUITexCoordDescriptor
getTexCoordsInfo (int type)
virtual
GUIEventListener
getEventsListener ()
virtual void enableGUITexture ()
virtual void disableGUITexture ()
virtual void setZCoordinate (int z)
virtual int getZCoordinate ()
virtual const void computeWindowBounds ()
virtual const Tuple4i & getWindowBounds ()
bool eventDetected ()
bool isMouseOver ()
bool isReleased ()
bool isFocused ()
bool isDragged ()
bool isClicked ()
bool isPressed ()

Protected Attributes

GUIRectangleparent
std::string callbackString
Tuple4i windowBounds
Tuple2f position
Tuple2f dimensions
bool mouseOver
bool released
bool focused
bool pressed
bool clicked
bool visible
bool active
bool update
int lastAction
int widgetType
int anchor
int z


Detailed Description

Definition at line 449 of file glwx.h.


Constructor & Destructor Documentation

GUIRectangle::GUIRectangle ( const std::string &  callback = ""  ) 

Definition at line 3 of file GUIRectangle.cpp.

References active, anchor, AT_CENTER, clicked, focused, lastAction, mouseOver, parent, pressed, released, setCallbackString(), setDimensions(), setPosition(), update, visible, widgetType, WT_UNKNOWN, and z.

virtual GUIRectangle::~GUIRectangle (  )  [inline, virtual]

Definition at line 476 of file glwx.h.


Member Function Documentation

void GUIRectangle::setCallbackString ( const std::string &  callback  ) 

Definition at line 97 of file GUIRectangle.cpp.

References callbackString.

Referenced by GUIRectangle(), loadXMLSettings(), and GUIComboBox::loadXMLSettings().

const std::string & GUIRectangle::getCallbackString (  ) 

Definition at line 102 of file GUIRectangle.cpp.

References callbackString.

Referenced by GUITabbedPanel::actionPerformed(), GUITabbedPanel::addPanel(), GUIPanel::addWidget(), GUIPanel::getWidgetByCallbackString(), and GUIEvent::GUIEvent().

bool GUIRectangle::loadXMLSettings ( const TiXmlElement *  node  ) 

Reimplemented in GUISeparator, GUIAlphaElement, GUILabel, GUITextBox, GUIButton, GUICheckBox, GUISlider, GUIPanel, GUIFrame, GUIComboBox, and GUITabbedPanel.

Definition at line 46 of file GUIRectangle.cpp.

References dimensions, position, setActive(), setAnchorPoint(), setCallbackString(), setDimensions(), setPosition(), setVisible(), and Logger::writeErrorLog().

Referenced by GUITabbedPanel::loadXMLSettings(), GUIPanel::loadXMLSettings(), GUIComboBox::loadXMLSettings(), and GUIAlphaElement::loadXMLSettings().

void GUIRectangle::setDimensions ( float  width,
float  height 
)

Definition at line 150 of file GUIRectangle.cpp.

References dimensions, and update.

Referenced by GUITabbedPanel::computeWindowBounds(), GUIComboBox::finalizeSize(), GUIButton::GUIButton(), GUICheckBox::GUICheckBox(), GUILabel::GUILabel(), GUIRectangle(), GUISlider::GUISlider(), GUITextBox::GUITextBox(), GUISlider::loadXMLSettings(), loadXMLSettings(), setDimensions(), GuiWrapper::SetDimensions(), and GUISlider::setDiscDimensions().

void GUIRectangle::setDimensions ( const Tuple2f &  dimensions  ) 

Definition at line 145 of file GUIRectangle.cpp.

References setDimensions().

const Tuple2f & GUIRectangle::getDimensions (  ) 

Definition at line 157 of file GUIRectangle.cpp.

References dimensions.

void GUIRectangle::setPosition ( float  xScaleOrPosition,
float  yScaleOrPosition 
)

Definition at line 167 of file GUIRectangle.cpp.

References position, and update.

Referenced by GUITabbedPanel::computeWindowBounds(), GUIComboBox::computeWindowBounds(), GUIButton::GUIButton(), GUIComboBox::GUIComboBox(), GUIRectangle(), GUITabbedPanel::GUITabbedPanel(), loadXMLSettings(), and setPosition().

void GUIRectangle::setPosition ( const Tuple2f &  scalesOrPosition  ) 

Definition at line 162 of file GUIRectangle.cpp.

References setPosition().

const Tuple2f & GUIRectangle::getPosition (  ) 

Definition at line 173 of file GUIRectangle.cpp.

References position.

Referenced by GUITabbedPanel::computeWindowBounds(), and GUIComboBox::computeWindowBounds().

Tuple2i GUIRectangle::getCenter (  )  [virtual]

Definition at line 373 of file GUIRectangle.cpp.

References getWindowBounds(), and windowBounds.

Referenced by GUISlider::render(), GUILabel::render(), GUICheckBox::render(), and GUISlider::renderVertical().

int GUIRectangle::getWidth (  ) 

Definition at line 203 of file GUIRectangle.cpp.

References windowBounds.

Referenced by GUISeparator::computeWindowBounds(), GUISlider::getWindowBounds(), GUILabel::getWindowBounds(), GUIPanel::packYAxisLayout(), GuiWrapper::RenderScene(), and GUITextBox::setupText().

int GUIRectangle::getHeight (  ) 

Definition at line 208 of file GUIRectangle.cpp.

References windowBounds.

Referenced by GUITabbedPanel::computeWindowBounds(), GUISeparator::computeWindowBounds(), GUIComboBox::computeWindowBounds(), GUILabel::getWindowBounds(), GuiWrapper::MouseClicked(), GuiWrapper::MouseMoved(), GuiWrapper::RenderScene(), and GUISlider::renderVertical().

void GUIRectangle::setActive ( bool  active  ) 

Definition at line 178 of file GUIRectangle.cpp.

References active.

Referenced by loadXMLSettings(), and GUIComboBox::loadXMLSettings().

bool GUIRectangle::isActive (  ) 

Definition at line 183 of file GUIRectangle.cpp.

References active.

Referenced by GUIPanel::checkKeyboardEvents(), and GUIPanel::checkMouseEvents().

void GUIRectangle::setAnchorPoint ( const std::string &  anchor  ) 

Definition at line 107 of file GUIRectangle.cpp.

References anchor, AT_CENTER, AT_CORNERLD, AT_CORNERLU, AT_CORNERRD, and AT_CORNERRU.

Referenced by GUITabbedPanel::computeWindowBounds(), GUIComboBox::computeWindowBounds(), GUIComboBox::GUIComboBox(), and loadXMLSettings().

void GUIRectangle::setAnchorPoint ( int  anchor  ) 

Definition at line 119 of file GUIRectangle.cpp.

References anchor, AT_CENTER, AT_CORNERLD, AT_CORNERLU, AT_CORNERRD, AT_CORNERRU, and update.

int GUIRectangle::getAnchorPoint (  ) 

Definition at line 135 of file GUIRectangle.cpp.

References anchor.

Referenced by GUITabbedPanel::computeWindowBounds(), and GUIComboBox::computeWindowBounds().

void GUIRectangle::forceUpdate ( bool  update  )  [virtual]

Reimplemented in GUIPanel, and GUIFrame.

Definition at line 41 of file GUIRectangle.cpp.

References update.

Referenced by GUILabel::render().

void GUIRectangle::setVisible ( bool  active  ) 

Definition at line 188 of file GUIRectangle.cpp.

References visible.

Referenced by DemoEventHandler::actionPerformed(), GUITabbedPanel::addPanel(), GUIComboBox::checkMouseEvents(), GUIComboBox::GUIComboBox(), loadXMLSettings(), and GUIComboBox::loadXMLSettings().

bool GUIRectangle::isVisible (  ) 

Definition at line 193 of file GUIRectangle.cpp.

References visible.

Referenced by GUIComboBox::checkMouseEvents(), GUITabbedPanel::getCurrentPanel(), GUITabbedPanel::getCurrentPanelIndex(), GUIComboBox::isDeployed(), and GUIComboBox::render().

bool GUIRectangle::isAttached (  ) 

Definition at line 198 of file GUIRectangle.cpp.

References parent.

Referenced by GUIPanel::render().

int GUIRectangle::getWidgetType (  ) 

Definition at line 36 of file GUIRectangle.cpp.

References widgetType.

Referenced by GUITabbedPanel::actionPerformed(), GUIComboBox::actionPerformed(), DemoEventHandler::actionPerformed(), GUIPanel::collectZWidgets(), GUIPanel::getTreeHeight(), GUIPanel::getWidgetByCallbackString(), GUIPanel::getWidgetCountByType(), GUIPanel::notify(), and GUIPanel::render().

void GUIRectangle::checkMouseEvents ( MouseEvent evt,
int  extraInfo,
bool  reservedBits = false 
) [virtual]

Reimplemented in GUITextBox, GUICheckBox, GUIRadioButton, GUISlider, GUIPanel, GUIComboBox, and GUITabbedPanel.

Definition at line 293 of file GUIRectangle.cpp.

References GUIEventListener::actionPerformed(), clicked, eventDetected(), focused, getEventsListener(), MouseEvent::getX(), MouseEvent::getY(), lastAction, ME_CLICKED, ME_PRESSED, ME_RELEASED, mouseOver, pressed, released, MouseEvent::setUsed(), windowBounds, and WT_PANEL.

Referenced by GUITextBox::checkMouseEvents(), GUISlider::checkMouseEvents(), GUIRadioButton::checkMouseEvents(), GUIPanel::checkMouseEvents(), and GUICheckBox::checkMouseEvents().

void GUIRectangle::checkKeyboardEvents ( KeyEvent evt,
int  extraInfo 
) [virtual]

Reimplemented in GUISeparator, GUITextBox, GUIPanel, and GUITabbedPanel.

Definition at line 292 of file GUIRectangle.cpp.

Referenced by GUIPanel::checkKeyboardEvents().

virtual void GUIRectangle::render ( float   )  [pure virtual]

Implemented in GUISeparator, GUIAlphaElement, GUILabel, GUITextBox, GUIButton, GUICheckBox, GUISlider, GUIPanel, GUIFrame, GUIComboBox, and GUITabbedPanel.

void GUIRectangle::setParent ( GUIRectangle parent  )  [virtual]

Definition at line 25 of file GUIRectangle.cpp.

References parent, and update.

Referenced by GUIPanel::addWidget(), GUITabbedPanel::computeWindowBounds(), GUIComboBox::computeWindowBounds(), and GUIPanel::loadXMLSettings().

GUIRectangle * GUIRectangle::getParent (  )  [virtual]

Definition at line 31 of file GUIRectangle.cpp.

References parent.

Referenced by GUIComboBox::actionPerformed(), and DemoEventHandler::actionPerformed().

GUITexCoordDescriptor * GUIRectangle::getTexCoordsInfo ( int  type  )  [virtual]

Reimplemented in GUIFrame.

Definition at line 140 of file GUIRectangle.cpp.

References getTexCoordsInfo(), and parent.

Referenced by getTexCoordsInfo(), GUISlider::render(), GUICheckBox::render(), and GUISlider::renderVertical().

GUIEventListener * GUIRectangle::getEventsListener (  )  [virtual]

Reimplemented in GUIFrame, GUIComboBox, and GUITabbedPanel.

Definition at line 287 of file GUIRectangle.cpp.

References getEventsListener(), and parent.

Referenced by GUIComboBox::actionPerformed(), GUISlider::checkMouseEvents(), checkMouseEvents(), GUICheckBox::checkMouseEvents(), and getEventsListener().

void GUIRectangle::enableGUITexture (  )  [virtual]

Reimplemented in GUIFrame.

Definition at line 85 of file GUIRectangle.cpp.

References enableGUITexture(), and parent.

Referenced by enableGUITexture(), GUISlider::render(), GUICheckBox::render(), and GUISlider::renderVertical().

void GUIRectangle::disableGUITexture (  )  [virtual]

Reimplemented in GUIFrame.

Definition at line 91 of file GUIRectangle.cpp.

References disableGUITexture(), and parent.

Referenced by disableGUITexture(), GUISlider::render(), GUICheckBox::render(), and GUISlider::renderVertical().

void GUIRectangle::setZCoordinate ( int  z  )  [virtual]

Definition at line 363 of file GUIRectangle.cpp.

References z.

int GUIRectangle::getZCoordinate (  )  [virtual]

Definition at line 368 of file GUIRectangle.cpp.

References z.

Referenced by GUIPanel::collectZWidgets(), and computeWindowBounds().

const void GUIRectangle::computeWindowBounds (  )  [virtual]

Reimplemented in GUISeparator, GUIButton, GUIComboBox, and GUITabbedPanel.

Definition at line 219 of file GUIRectangle.cpp.

References anchor, AT_CENTER, AT_CORNERLD, AT_CORNERRD, AT_CORNERRU, dimensions, getWindowBounds(), getZCoordinate(), parent, position, update, windowBounds, and z.

Referenced by GUIComboBox::computeWindowBounds(), GUIButton::computeWindowBounds(), GUITextBox::getWindowBounds(), GUISlider::getWindowBounds(), getWindowBounds(), GUILabel::getWindowBounds(), GUICheckBox::getWindowBounds(), GUIPanel::packFreeLayout(), GUIPanel::packXAxisLayout(), and GUIPanel::packYAxisLayout().

const Tuple4i & GUIRectangle::getWindowBounds (  )  [virtual]

Reimplemented in GUISeparator, GUILabel, GUITextBox, GUICheckBox, GUISlider, and GUIFrame.

Definition at line 213 of file GUIRectangle.cpp.

References computeWindowBounds(), and windowBounds.

Referenced by GUITabbedPanel::computeWindowBounds(), GUISeparator::computeWindowBounds(), computeWindowBounds(), GUIComboBox::computeWindowBounds(), GUIPanel::correctPosition(), getCenter(), GUIPanel::packFreeLayout(), and GUIComboBox::render().

bool GUIRectangle::eventDetected (  ) 

Definition at line 351 of file GUIRectangle.cpp.

References clicked, focused, mouseOver, pressed, and released.

Referenced by checkMouseEvents().

bool GUIRectangle::isMouseOver (  ) 

Definition at line 357 of file GUIRectangle.cpp.

References mouseOver.

Referenced by GUIComboBox::actionPerformed().

bool GUIRectangle::isReleased (  ) 

Definition at line 358 of file GUIRectangle.cpp.

References released.

bool GUIRectangle::isFocused (  ) 

Definition at line 359 of file GUIRectangle.cpp.

References focused.

Referenced by GUIComboBox::checkMouseEvents().

bool GUIRectangle::isDragged (  ) 

bool GUIRectangle::isClicked (  ) 

Definition at line 361 of file GUIRectangle.cpp.

References clicked.

Referenced by GUITabbedPanel::actionPerformed(), GUIComboBox::actionPerformed(), and DemoEventHandler::actionPerformed().

bool GUIRectangle::isPressed (  ) 

Definition at line 360 of file GUIRectangle.cpp.

References pressed.

Referenced by DemoEventHandler::actionPerformed().


Member Data Documentation

GUIRectangle* GUIRectangle::parent [protected]

Definition at line 452 of file glwx.h.

Referenced by GUIComboBox::actionPerformed(), GUIRadioButton::checkMouseEvents(), GUIPanel::clear(), GUITabbedPanel::computeWindowBounds(), GUISeparator::computeWindowBounds(), computeWindowBounds(), GUIComboBox::computeWindowBounds(), GUIButton::computeWindowBounds(), GUIPanel::correctPosition(), disableGUITexture(), enableGUITexture(), getEventsListener(), getParent(), getTexCoordsInfo(), GUITextBox::getWindowBounds(), GUISlider::getWindowBounds(), GUILabel::getWindowBounds(), GUICheckBox::getWindowBounds(), GUIRectangle(), isAttached(), GUIPanel::packFreeLayout(), GUITextBox::render(), GUITabbedPanel::render(), GUISlider::render(), GUISeparator::render(), GUIPanel::render(), GUILabel::render(), GUIComboBox::render(), GUICheckBox::render(), GUIButton::render(), GUISlider::renderVertical(), and setParent().

std::string GUIRectangle::callbackString [protected]

Definition at line 454 of file glwx.h.

Referenced by getCallbackString(), and setCallbackString().

Tuple4i GUIRectangle::windowBounds [protected]

Definition at line 456 of file glwx.h.

Referenced by GUISlider::checkMouseEvents(), checkMouseEvents(), GUITabbedPanel::computeWindowBounds(), GUISeparator::computeWindowBounds(), computeWindowBounds(), GUIComboBox::computeWindowBounds(), GUIButton::computeWindowBounds(), GUIPanel::correctPosition(), getCenter(), getHeight(), getWidth(), GUITextBox::getWindowBounds(), GUISlider::getWindowBounds(), GUISeparator::getWindowBounds(), getWindowBounds(), GUILabel::getWindowBounds(), GUIFrame::getWindowBounds(), GUICheckBox::getWindowBounds(), GUIPanel::packFreeLayout(), GUIPanel::packXAxisLayout(), GUIPanel::packYAxisLayout(), GUITextBox::render(), GUISlider::render(), GUISeparator::render(), GUILabel::render(), GUICheckBox::render(), GUIButton::render(), GUISlider::renderVertical(), and GUITextBox::setupText().

Tuple2f GUIRectangle::position [protected]

Definition at line 457 of file glwx.h.

Referenced by GUISeparator::computeWindowBounds(), computeWindowBounds(), GUIPanel::correctPosition(), getPosition(), loadXMLSettings(), and setPosition().

Tuple2f GUIRectangle::dimensions [protected]

Definition at line 457 of file glwx.h.

Referenced by computeWindowBounds(), getDimensions(), GUITextBox::getWindowBounds(), GUILabel::getWindowBounds(), GUIFrame::getWindowBounds(), GUICheckBox::getWindowBounds(), GUITextBox::GUITextBox(), loadXMLSettings(), GUIPanel::packXAxisLayout(), GUIPanel::packYAxisLayout(), setDimensions(), and GUISlider::setDiscDimensions().

bool GUIRectangle::mouseOver [protected]

Definition at line 460 of file glwx.h.

Referenced by GUITextBox::checkMouseEvents(), checkMouseEvents(), eventDetected(), GUIRectangle(), isMouseOver(), and GUIAlphaElement::modifyCurrentAlpha().

bool GUIRectangle::released [protected]

Definition at line 460 of file glwx.h.

Referenced by GUITextBox::checkMouseEvents(), GUISlider::checkMouseEvents(), checkMouseEvents(), GUIRadioButton::checkMouseEvents(), GUICheckBox::checkMouseEvents(), eventDetected(), GUIRectangle(), and isReleased().

bool GUIRectangle::focused [protected]

Definition at line 460 of file glwx.h.

Referenced by GUITextBox::checkKeyboardEvents(), GUITextBox::checkMouseEvents(), checkMouseEvents(), eventDetected(), GUIRectangle(), isFocused(), and GUITextBox::setupBlinker().

bool GUIRectangle::pressed [protected]

Definition at line 460 of file glwx.h.

Referenced by GUITextBox::checkMouseEvents(), GUISlider::checkMouseEvents(), checkMouseEvents(), eventDetected(), GUIRectangle(), isPressed(), GUIAlphaElement::modifyCurrentAlpha(), GUIButton::render(), and GUISlider::setProgress().

bool GUIRectangle::clicked [protected]

Definition at line 460 of file glwx.h.

Referenced by GUITextBox::checkMouseEvents(), checkMouseEvents(), GUIRadioButton::checkMouseEvents(), GUICheckBox::checkMouseEvents(), eventDetected(), GUIRectangle(), isClicked(), and GUIButton::render().

bool GUIRectangle::visible [protected]

Definition at line 460 of file glwx.h.

Referenced by GUIPanel::checkKeyboardEvents(), GUIPanel::checkMouseEvents(), GUIPanel::collectZWidgets(), GUIRectangle(), isVisible(), GUITextBox::render(), GUITabbedPanel::render(), GUISlider::render(), GUIPanel::render(), GUILabel::render(), GUIFrame::render(), GUIComboBox::render(), GUICheckBox::render(), GUIButton::render(), and setVisible().

bool GUIRectangle::active [protected]

Definition at line 460 of file glwx.h.

Referenced by GUITextBox::checkKeyboardEvents(), GUIPanel::checkKeyboardEvents(), GUIPanel::checkMouseEvents(), GUIRectangle(), isActive(), setActive(), GUICheckBox::setChecked(), and GUITextBox::setupBlinker().

bool GUIRectangle::update [protected]

Definition at line 460 of file glwx.h.

Referenced by GUIComboBox::actionPerformed(), GUITextBox::checkKeyboardEvents(), GUITabbedPanel::computeWindowBounds(), computeWindowBounds(), GUIComboBox::computeWindowBounds(), GUIButton::computeWindowBounds(), GUIPanel::correctPosition(), forceUpdate(), GUIPanel::forceUpdate(), GUITextBox::getWindowBounds(), GUISlider::getWindowBounds(), GUILabel::getWindowBounds(), GUICheckBox::getWindowBounds(), GUIFrame::GUIFrame(), GUIRectangle(), GUIPanel::pack(), GUIPanel::packFreeLayout(), GUIPanel::packXAxisLayout(), GUIPanel::packYAxisLayout(), setAnchorPoint(), setDimensions(), setParent(), and setPosition().

int GUIRectangle::lastAction [protected]

Definition at line 469 of file glwx.h.

Referenced by checkMouseEvents(), and GUIRectangle().

int GUIRectangle::widgetType [protected]

Definition at line 469 of file glwx.h.

Referenced by GUITabbedPanel::actionPerformed(), GUIComboBox::actionPerformed(), getWidgetType(), GUIButton::GUIButton(), GUICheckBox::GUICheckBox(), GUIComboBox::GUIComboBox(), GUILabel::GUILabel(), GUIPanel::GUIPanel(), GUIRadioButton::GUIRadioButton(), GUIRectangle(), GUISeparator::GUISeparator(), GUISlider::GUISlider(), GUITabbedPanel::GUITabbedPanel(), GUITextBox::GUITextBox(), and GUICheckBox::loadXMLSettings().

int GUIRectangle::anchor [protected]

Definition at line 469 of file glwx.h.

Referenced by computeWindowBounds(), GUIButton::computeWindowBounds(), getAnchorPoint(), GUIRectangle(), GUILabel::render(), and setAnchorPoint().

int GUIRectangle::z [protected]

Definition at line 469 of file glwx.h.

Referenced by computeWindowBounds(), getZCoordinate(), GUIRectangle(), and setZCoordinate().


The documentation for this class was generated from the following files:
Generated on Wed Dec 5 20:32:03 2007 for GLWX by  doxygen 1.5.3