GUIComboBox Class Reference

#include <glwx.h>

Inheritance diagram for GUIComboBox:

Inheritance graph
[legend]
Collaboration diagram for GUIComboBox:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GUIComboBox (const std::string &cbs="")
virtual ~GUIComboBox ()
virtual
GUIEventListener * 
getEventsListener ()
virtual const void computeWindowBounds ()
virtual bool loadXMLSettings (const TiXmlElement *node)
virtual void render (float clockTick)
virtual void checkMouseEvents (MouseEvent &evt, int extraInfo, bool reservedBits=false)
virtual void actionPerformed (GUIEvent &evt)
void setFontScales (float w, float h)
void setFontScales (const Tuple2f &scales)
const Tuple2f & getFontScales ()
void addItem (const std::string &item)
const vector
< std::string > & 
getItems () const
const char * getSelectedItem () const
const char * getItem (size_t index) const
int getItemIndex (const std::string &item)
void setScrollingColor (float r, float g, float b, float alpha)
void setScrollingColor (const Tuple4f &rgba)
const Tuple4f & getScrollingColor () const
void enableScrollingRectangle (bool)
bool scrollingRectangleEnabled ()
bool isDeployed ()

Private Member Functions

void finalizeSize ()

Private Attributes

vector< std::string > items
GUIButton * dropMenuButton
GUIPanel * upperPanel
GUIPanel * lowerPanel
GUILabel * currentSelection
Tuple4i scrollingRectangle
Tuple4f scrollingColor
Tuple2f fontScales
bool displayScrollingRectangle
bool lockItems
bool deployed
int selectionIndex
int fontIndex


Detailed Description

Definition at line 936 of file glwx.h.


Constructor & Destructor Documentation

GUIComboBox::GUIComboBox ( const std::string &  cbs = ""  ) 

Definition at line 3 of file GUIComboBox.cpp.

References GUIPanel::addWidget(), AT_CORNERLU, currentSelection, deployed, displayScrollingRectangle, dropMenuButton, GUIClippedRectangle::enableBGColor(), fontIndex, lockItems, lowerPanel, PL_XAXIS_LAYOUT, PL_YAXIS_LAYOUT, selectionIndex, GUIRectangle::setAnchorPoint(), GUIClippedRectangle::setClipSize(), setFontScales(), GUIPanel::setInterval(), GUIPanel::setLayout(), GUIRectangle::setPosition(), setScrollingColor(), GUIRectangle::setVisible(), GUIClippedRectangle::setVisibleBounds(), upperPanel, GUIRectangle::widgetType, and WT_COMBO_BOX.

GUIComboBox::~GUIComboBox (  )  [virtual]

Definition at line 39 of file GUIComboBox.cpp.

References deleteObject, lowerPanel, and upperPanel.


Member Function Documentation

GUIEventListener * GUIComboBox::getEventsListener (  )  [virtual]

Reimplemented from GUIRectangle.

Definition at line 45 of file GUIComboBox.cpp.

const void GUIComboBox::computeWindowBounds (  )  [virtual]

Reimplemented from GUIRectangle.

Definition at line 267 of file GUIComboBox.cpp.

References GUIRectangle::computeWindowBounds(), finalizeSize(), GUIPanel::forceUpdate(), GUIRectangle::getAnchorPoint(), GUIRectangle::getHeight(), GUIRectangle::getPosition(), GUIRectangle::getWindowBounds(), lowerPanel, GUIRectangle::parent, GUIRectangle::setAnchorPoint(), GUIRectangle::setParent(), GUIRectangle::setPosition(), GUIRectangle::update, upperPanel, and GUIRectangle::windowBounds.

Referenced by render().

bool GUIComboBox::loadXMLSettings ( const TiXmlElement *  node  )  [virtual]

Reimplemented from GUIRectangle.

Definition at line 66 of file GUIComboBox.cpp.

References addItem(), displayScrollingRectangle, dropMenuButton, fontIndex, fontScales, GUIClippedRectangle::getBGColor(), GUIClippedRectangle::getBordersColor(), items, GUIClippedRectangle::loadXMLClippedRectangleInfo(), GUIRectangle::loadXMLSettings(), GUIButton::loadXMLSettings(), lowerPanel, scrollingColor, GUIRectangle::setActive(), GUIClippedRectangle::setBGColor(), GUIClippedRectangle::setBordersColor(), GUIRectangle::setCallbackString(), setFontScales(), GUIAlphaElement::setLabelString(), setScrollingColor(), GUIRectangle::setVisible(), upperPanel, and Logger::writeErrorLog().

Referenced by GUIPanel::loadXMLSettings().

void GUIComboBox::render ( float  clockTick  )  [virtual]

Implements GUIRectangle.

Definition at line 177 of file GUIComboBox.cpp.

References computeWindowBounds(), displayScrollingRectangle, GUIClippedRectangle::enableBGColor(), GUIRectangle::getWindowBounds(), GUIRectangle::isVisible(), lowerPanel, GUIRectangle::parent, GUIPanel::render(), GUIClippedRectangle::renderClippedBounds(), scrollingColor, scrollingRectangle, GUIClippedRectangle::setVisibleBounds(), upperPanel, and GUIRectangle::visible.

Referenced by GUIPanel::render().

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

Reimplemented from GUIRectangle.

Definition at line 127 of file GUIComboBox.cpp.

References GUIPanel::checkMouseEvents(), MouseEvent::consume(), currentSelection, deployed, dropMenuButton, GUIRectangle::isFocused(), GUIRectangle::isVisible(), lowerPanel, scrollingRectangle, GUIRectangle::setVisible(), and upperPanel.

void GUIComboBox::actionPerformed ( GUIEvent &  evt  )  [virtual]

Implements GUIEventListener.

Definition at line 147 of file GUIComboBox.cpp.

References GUIEventListener::actionPerformed(), currentSelection, deployed, dropMenuButton, GUIEvent::getCallbackString(), GUIRectangle::getEventsListener(), GUIEvent::getEventSource(), getItemIndex(), GUIAlphaElement::getLabelString(), GUIRectangle::getParent(), GUIRectangle::getWidgetType(), GUILabel::getWindowBounds(), GUIRectangle::isClicked(), GUIRectangle::isMouseOver(), lowerPanel, GUIRectangle::parent, scrollingRectangle, selectionIndex, GUIAlphaElement::setLabelString(), GUIRectangle::update, GUIRectangle::widgetType, and WT_LABEL.

void GUIComboBox::setFontScales ( float  w,
float  h 
)

Definition at line 55 of file GUIComboBox.cpp.

References fontScales.

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

void GUIComboBox::setFontScales ( const Tuple2f &  scales  ) 

Definition at line 50 of file GUIComboBox.cpp.

References setFontScales().

const Tuple2f & GUIComboBox::getFontScales (  ) 

Definition at line 61 of file GUIComboBox.cpp.

References fontScales.

void GUIComboBox::addItem ( const std::string &  item  ) 

Definition at line 291 of file GUIComboBox.cpp.

References items, and lockItems.

Referenced by loadXMLSettings().

const std::vector< std::string > & GUIComboBox::getItems (  )  const

Definition at line 312 of file GUIComboBox.cpp.

References items.

const char * GUIComboBox::getSelectedItem (  )  const

Definition at line 317 of file GUIComboBox.cpp.

References items, and selectionIndex.

Referenced by DemoEventHandler::actionPerformed().

const char * GUIComboBox::getItem ( size_t  index  )  const

Definition at line 322 of file GUIComboBox.cpp.

References items.

int GUIComboBox::getItemIndex ( const std::string &  item  ) 

Definition at line 303 of file GUIComboBox.cpp.

References items.

Referenced by actionPerformed().

void GUIComboBox::setScrollingColor ( float  r,
float  g,
float  b,
float  alpha 
)

Definition at line 327 of file GUIComboBox.cpp.

References scrollingColor.

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

void GUIComboBox::setScrollingColor ( const Tuple4f &  rgba  ) 

Definition at line 340 of file GUIComboBox.cpp.

References setScrollingColor().

const Tuple4f & GUIComboBox::getScrollingColor (  )  const

Definition at line 345 of file GUIComboBox.cpp.

References scrollingColor.

void GUIComboBox::enableScrollingRectangle ( bool  on  ) 

Definition at line 350 of file GUIComboBox.cpp.

References displayScrollingRectangle.

bool GUIComboBox::scrollingRectangleEnabled (  ) 

Definition at line 355 of file GUIComboBox.cpp.

References displayScrollingRectangle.

bool GUIComboBox::isDeployed (  ) 

Definition at line 360 of file GUIComboBox.cpp.

References GUIRectangle::isVisible(), and lowerPanel.

Referenced by GUIPanel::render().

void GUIComboBox::finalizeSize (  )  [private]

Definition at line 214 of file GUIComboBox.cpp.

References GUIPanel::addWidget(), currentSelection, deleteObject, dropMenuButton, fontIndex, fontScales, GUIFontManager::getFont(), GUIFont::getFontObject(), GUIAlphaElement::getLabel(), items, lockItems, lowerPanel, selectionIndex, GUIRectangle::setDimensions(), GUIText::setFontIndex(), GUIAlphaElement::setLabelString(), and GUIText::setScales().

Referenced by computeWindowBounds().


Member Data Documentation

vector<std::string> GUIComboBox::items [private]

Definition at line 973 of file glwx.h.

Referenced by addItem(), finalizeSize(), getItem(), getItemIndex(), getItems(), getSelectedItem(), and loadXMLSettings().

GUIButton* GUIComboBox::dropMenuButton [private]

Definition at line 974 of file glwx.h.

Referenced by actionPerformed(), checkMouseEvents(), finalizeSize(), GUIComboBox(), and loadXMLSettings().

GUIPanel* GUIComboBox::upperPanel [private]

Definition at line 975 of file glwx.h.

Referenced by checkMouseEvents(), computeWindowBounds(), GUIComboBox(), loadXMLSettings(), render(), and ~GUIComboBox().

GUIPanel * GUIComboBox::lowerPanel [private]

Definition at line 975 of file glwx.h.

Referenced by actionPerformed(), checkMouseEvents(), computeWindowBounds(), finalizeSize(), GUIComboBox(), isDeployed(), loadXMLSettings(), render(), and ~GUIComboBox().

GUILabel* GUIComboBox::currentSelection [private]

Definition at line 977 of file glwx.h.

Referenced by actionPerformed(), checkMouseEvents(), finalizeSize(), and GUIComboBox().

Tuple4i GUIComboBox::scrollingRectangle [private]

Definition at line 979 of file glwx.h.

Referenced by actionPerformed(), checkMouseEvents(), and render().

Tuple4f GUIComboBox::scrollingColor [private]

Definition at line 980 of file glwx.h.

Referenced by getScrollingColor(), loadXMLSettings(), render(), and setScrollingColor().

Tuple2f GUIComboBox::fontScales [private]

Definition at line 981 of file glwx.h.

Referenced by finalizeSize(), getFontScales(), loadXMLSettings(), and setFontScales().

bool GUIComboBox::displayScrollingRectangle [private]

Definition at line 983 of file glwx.h.

Referenced by enableScrollingRectangle(), GUIComboBox(), loadXMLSettings(), render(), and scrollingRectangleEnabled().

bool GUIComboBox::lockItems [private]

Definition at line 983 of file glwx.h.

Referenced by addItem(), finalizeSize(), and GUIComboBox().

bool GUIComboBox::deployed [private]

Definition at line 983 of file glwx.h.

Referenced by actionPerformed(), checkMouseEvents(), and GUIComboBox().

int GUIComboBox::selectionIndex [private]

Definition at line 987 of file glwx.h.

Referenced by actionPerformed(), finalizeSize(), getSelectedItem(), and GUIComboBox().

int GUIComboBox::fontIndex [private]

Definition at line 987 of file glwx.h.

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


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