Crazy Eddie's GUI System
${CEGUI_VERSION}
|
Class the encapsulates imagery for a given widget state. More...
Public Types | |
typedef std::vector< LayerSpecification *CEGUI_VECTOR_ALLOC(LayerSpecification *)> | LayerSpecificationPointerList |
Container type for LayerSpecification pointers. | |
typedef ConstVectorIterator< LayersList > | LayerIterator |
typedef std::vector< LayerSpecification *CEGUI_VECTOR_ALLOC(LayerSpecification *)> | LayerSpecificationPointerList |
Container type for LayerSpecification pointers. | |
typedef ConstVectorIterator< LayersList > | LayerIterator |
Public Member Functions | |
StateImagery () | |
Constructor. | |
StateImagery (const String &name) | |
Constructor. More... | |
void | render (Window &srcWindow, const ColourRect *modcols=0, const Rectf *clipper=0) const |
Render imagery for this state. More... | |
void | render (Window &srcWindow, const Rectf &baseRect, const ColourRect *modcols=0, const Rectf *clipper=0) const |
Render imagery for this state. More... | |
void | addLayer (const LayerSpecification &layer) |
Add an imagery LayerSpecification to this state. More... | |
void | sort () |
Sorts the LayerSpecifications after their priority. Whenever a LayerSpecification, which has been added to this StateImagery, is changed, this sort function should be called. More... | |
void | clearLayers () |
Removed all LayerSpecifications from this state. More... | |
const String & | getName () const |
Return the name of this state. More... | |
void | setName (const String &name) |
Set the name of this state. More... | |
bool | isClippedToDisplay () const |
Return whether this state imagery should be clipped to the display rather than the target window. More... | |
void | setClippedToDisplay (bool setting) |
Set whether this state imagery should be clipped to the display rather than the target window. More... | |
void | writeXMLToStream (XMLSerializer &xml_stream) const |
Writes an xml representation of this StateImagery to out_stream. More... | |
LayerSpecificationPointerList | getLayerSpecificationPointers () |
Returns a vector of pointers to the LayerSpecifications that are currently added to this StateImagery. If a LayerSpecification is added or removed from this StateImagery, then the pointers in this vector are not valid anymore. The function should then be called again to retrieve valid pointers. More... | |
LayerIterator | getLayerIterator () const |
StateImagery () | |
Constructor. | |
StateImagery (const String &name) | |
Constructor. More... | |
void | render (Window &srcWindow, const ColourRect *modcols=0, const Rectf *clipper=0) const |
Render imagery for this state. More... | |
void | render (Window &srcWindow, const Rectf &baseRect, const ColourRect *modcols=0, const Rectf *clipper=0) const |
Render imagery for this state. More... | |
void | addLayer (const LayerSpecification &layer) |
Add an imagery LayerSpecification to this state. More... | |
void | sort () |
Sorts the LayerSpecifications after their priority. Whenever a LayerSpecification, which has been added to this StateImagery, is changed, this sort function should be called. | |
void | clearLayers () |
Removed all LayerSpecifications from this state. More... | |
const String & | getName () const |
Return the name of this state. More... | |
void | setName (const String &name) |
Set the name of this state. More... | |
bool | isClippedToDisplay () const |
Return whether this state imagery should be clipped to the display rather than the target window. More... | |
void | setClippedToDisplay (bool setting) |
Set whether this state imagery should be clipped to the display rather than the target window. More... | |
void | writeXMLToStream (XMLSerializer &xml_stream) const |
Writes an xml representation of this StateImagery to out_stream. More... | |
LayerSpecificationPointerList | getLayerSpecificationPointers () |
Returns a vector of pointers to the LayerSpecifications that are currently added to this StateImagery. If a LayerSpecification is added or removed from this StateImagery, then the pointers in this vector are not valid anymore. The function should then be called again to retrieve valid pointers. More... | |
LayerIterator | getLayerIterator () const |
Class the encapsulates imagery for a given widget state.
typedef ConstVectorIterator<LayersList> CEGUI::StateImagery::LayerIterator |
typedef ConstVectorIterator<LayersList> CEGUI::StateImagery::LayerIterator |
CEGUI::StateImagery::StateImagery | ( | const String & | name | ) |
Constructor.
name | Name of the state |
CEGUI::StateImagery::StateImagery | ( | const String & | name | ) |
Constructor.
name | Name of the state |
void CEGUI::StateImagery::addLayer | ( | const LayerSpecification & | layer | ) |
Add an imagery LayerSpecification to this state.
layer | LayerSpecification to be added to this state (will be copied) |
Referenced by CEGUI::Falagard_xmlHandler::elementEndLocal(), and sort().
void CEGUI::StateImagery::addLayer | ( | const LayerSpecification & | layer | ) |
Add an imagery LayerSpecification to this state.
layer | LayerSpecification to be added to this state (will be copied) |
void CEGUI::StateImagery::clearLayers | ( | ) |
void CEGUI::StateImagery::clearLayers | ( | ) |
Removed all LayerSpecifications from this state.
LayerIterator CEGUI::StateImagery::getLayerIterator | ( | ) | const |
StateImagery::LayerIterator CEGUI::StateImagery::getLayerIterator | ( | ) | const |
StateImagery::LayerSpecificationPointerList CEGUI::StateImagery::getLayerSpecificationPointers | ( | ) |
Returns a vector of pointers to the LayerSpecifications that are currently added to this StateImagery. If a LayerSpecification is added or removed from this StateImagery, then the pointers in this vector are not valid anymore. The function should then be called again to retrieve valid pointers.
This hack is necessary because in newer C++ versions the multiset and sets return only const iterators.
LayerSpecificationPointerList CEGUI::StateImagery::getLayerSpecificationPointers | ( | ) |
Returns a vector of pointers to the LayerSpecifications that are currently added to this StateImagery. If a LayerSpecification is added or removed from this StateImagery, then the pointers in this vector are not valid anymore. The function should then be called again to retrieve valid pointers.
const String& CEGUI::StateImagery::getName | ( | ) | const |
Return the name of this state.
const String & CEGUI::StateImagery::getName | ( | void | ) | const |
Return the name of this state.
Referenced by CEGUI::WidgetLookFeel::addStateSpecification(), and CEGUI::Falagard_xmlHandler::elementEndLocal().
bool CEGUI::StateImagery::isClippedToDisplay | ( | ) | const |
Return whether this state imagery should be clipped to the display rather than the target window.
Clipping to the display effectively implies that the imagery should be rendered unclipped.
/return
bool CEGUI::StateImagery::isClippedToDisplay | ( | ) | const |
Return whether this state imagery should be clipped to the display rather than the target window.
Clipping to the display effectively implies that the imagery should be rendered unclipped.
/return
void CEGUI::StateImagery::render | ( | Window & | srcWindow, |
const ColourRect * | modcols = 0 , |
||
const Rectf * | clipper = 0 |
||
) | const |
Render imagery for this state.
References CEGUI::Window::getGeometryBuffer(), and CEGUI::GeometryBuffer::setClippingActive().
Referenced by CEGUI::FalagardMultiLineEditbox::cacheEditboxBaseImagery(), CEGUI::FalagardMultiColumnList::cacheListboxBaseImagery(), CEGUI::FalagardListbox::cacheListboxBaseImagery(), CEGUI::InventoryItemRenderer::render(), CEGUI::FalagardTitlebar::render(), CEGUI::FalagardTabButton::render(), CEGUI::FalagardButton::render(), CEGUI::FalagardMenubar::render(), CEGUI::FalagardTooltip::render(), CEGUI::FalagardPopupMenu::render(), CEGUI::FalagardListHeaderSegment::render(), CEGUI::FalagardScrollablePane::render(), CEGUI::FalagardItemEntry::render(), CEGUI::FalagardItemListbox::render(), CEGUI::FalagardListHeader::render(), CEGUI::FalagardFrameWindow::render(), CEGUI::FalagardMenuItem::render(), CEGUI::FalagardTree::render(), CEGUI::FalagardScrollbar::render(), CEGUI::FalagardTabControl::render(), CEGUI::FalagardSlider::render(), CEGUI::FalagardProgressBar::render(), CEGUI::FalagardStaticImage::render(), CEGUI::FalagardStatic::render(), and CEGUI::FalagardEditbox::renderBaseImagery().
void CEGUI::StateImagery::render | ( | Window & | srcWindow, |
const ColourRect * | modcols = 0 , |
||
const Rectf * | clipper = 0 |
||
) | const |
void CEGUI::StateImagery::render | ( | Window & | srcWindow, |
const Rectf & | baseRect, | ||
const ColourRect * | modcols = 0 , |
||
const Rectf * | clipper = 0 |
||
) | const |
Render imagery for this state.
srcWindow | Window to use when convering BaseDim values to pixels. |
baseRect | Rect to use when convering BaseDim values to pixels. |
References CEGUI::Window::getGeometryBuffer(), and CEGUI::GeometryBuffer::setClippingActive().
void CEGUI::StateImagery::render | ( | Window & | srcWindow, |
const Rectf & | baseRect, | ||
const ColourRect * | modcols = 0 , |
||
const Rectf * | clipper = 0 |
||
) | const |
void CEGUI::StateImagery::setClippedToDisplay | ( | bool | setting | ) |
Set whether this state imagery should be clipped to the display rather than the target window.
Clipping to the display effectively implies that the imagery should be rendered unclipped.
setting |
|
Referenced by CEGUI::Falagard_xmlHandler::elementEndLocal().
void CEGUI::StateImagery::setClippedToDisplay | ( | bool | setting | ) |
Set whether this state imagery should be clipped to the display rather than the target window.
Clipping to the display effectively implies that the imagery should be rendered unclipped.
setting |
|
void CEGUI::StateImagery::setName | ( | const String & | name | ) |
Set the name of this state.
void CEGUI::StateImagery::setName | ( | const String & | name | ) |
Set the name of this state.
void CEGUI::StateImagery::sort | ( | ) |
Sorts the LayerSpecifications after their priority. Whenever a LayerSpecification, which has been added to this StateImagery, is changed, this sort function should be called.
References addLayer(), and clearLayers().
void CEGUI::StateImagery::writeXMLToStream | ( | XMLSerializer & | xml_stream | ) | const |
Writes an xml representation of this StateImagery to out_stream.
xml_stream | Stream where xml data should be output. |
void CEGUI::StateImagery::writeXMLToStream | ( | XMLSerializer & | xml_stream | ) | const |
Writes an xml representation of this StateImagery to out_stream.
xml_stream | Stream where xml data should be output. |
References CEGUI::XMLSerializer::attribute(), CEGUI::Falagard_xmlHandler::ClippedAttribute, CEGUI::XMLSerializer::closeTag(), CEGUI::Falagard_xmlHandler::NameAttribute, CEGUI::XMLSerializer::openTag(), and CEGUI::Falagard_xmlHandler::StateImageryElement.