
Public Member Functions | |
| SectionSpecification (const String &owner, const String §ionName, const String &controlPropertySource) | |
| Constructor. | |
| SectionSpecification (const String &owner, const String §ionName, const String &controlPropertySource, const ColourRect &cols) | |
| Constructor. | |
| void | render (Window &srcWindow, float base_z, const ColourRect *modcols=0, const Rect *clipper=0, bool clipToDisplay=false) const |
| Render the section specified by this SectionSpecification. | |
| void | render (Window &srcWindow, const Rect &baseRect, float base_z, const ColourRect *modcols=0, const Rect *clipper=0, bool clipToDisplay=false) const |
| Render the section specified by this SectionSpecification. | |
| const String & | getOwnerWidgetLookFeel () const |
| Return the name of the WidgetLookFeel object containing the target section. | |
| const String & | getSectionName () const |
| Return the name of the target ImagerySection. | |
| const ColourRect & | getOverrideColours () const |
| Return the current override colours. | |
| void | setOverrideColours (const ColourRect &cols) |
| Set the override colours to be used by this SectionSpecification. | |
| bool | isUsingOverrideColours () const |
| return whether the use of override colours is enabled on this SectionSpecification. | |
| void | setUsingOverrideColours (bool setting=true) |
| Enable or disable the use of override colours for this section. | |
| void | setOverrideColoursPropertySource (const String &property) |
| Set the name of the property where override colour values can be obtained. | |
| void | setOverrideColoursPropertyIsColourRect (bool setting=true) |
| Set whether the override colours property source represents a full ColourRect. | |
| void | setRenderControlPropertySource (const String &property) |
| Set the name of the property that controls whether to actually render this section. | |
| void | writeXMLToStream (XMLSerializer &xml_stream) const |
| Writes an xml representation of this SectionSpecification to out_stream. | |
Protected Member Functions | |
| void | initColourRectForOverride (const Window &wnd, ColourRect &cr) const |
| Helper method to initialise a ColourRect with appropriate values according to the way the section sepcification is set up. | |
This class enables sections to be easily re-used, by different states and/or layers, by allowing sections to be specified by name rather than having mutiple copies of the same thing all over the place.
| CEGUI::SectionSpecification::SectionSpecification | ( | const String & | owner, | |
| const String & | sectionName, | |||
| const String & | controlPropertySource | |||
| ) |
Constructor.
| owner | String holding the name of the WidgetLookFeel object that contains the target section. | |
| sectionName | String holding the name of the target section. | |
| controlPropertySource | String holding the name of a boolean property that will control if the rendering for this secion will actually occur or not. |
| CEGUI::SectionSpecification::SectionSpecification | ( | const String & | owner, | |
| const String & | sectionName, | |||
| const String & | controlPropertySource, | |||
| const ColourRect & | cols | |||
| ) |
Constructor.
| owner | String holding the name of the WidgetLookFeel object that contains the target section. | |
| sectionName | String holding the name of the target section. | |
| controlPropertySource | String holding the name of a boolean property that will control if the rendering for this secion will actually occur or not. | |
| cols | Override colours to be used (modulates sections master colours). |
| const ColourRect & CEGUI::SectionSpecification::getOverrideColours | ( | ) | const |
Return the current override colours.
| const String & CEGUI::SectionSpecification::getOwnerWidgetLookFeel | ( | ) | const |
Return the name of the WidgetLookFeel object containing the target section.
| const String & CEGUI::SectionSpecification::getSectionName | ( | ) | const |
Return the name of the target ImagerySection.
| void CEGUI::SectionSpecification::initColourRectForOverride | ( | const Window & | wnd, | |
| ColourRect & | cr | |||
| ) | const [protected] |
Helper method to initialise a ColourRect with appropriate values according to the way the section sepcification is set up.
This will try and get values from multiple places:
References CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, CEGUI::ColourRect::d_top_left, CEGUI::ColourRect::d_top_right, CEGUI::String::empty(), and CEGUI::PropertySet::getProperty().
Referenced by render().
| bool CEGUI::SectionSpecification::isUsingOverrideColours | ( | ) | const |
return whether the use of override colours is enabled on this SectionSpecification.
| void CEGUI::SectionSpecification::render | ( | Window & | srcWindow, | |
| const Rect & | baseRect, | |||
| float | base_z, | |||
| const ColourRect * | modcols = 0, |
|||
| const Rect * | clipper = 0, |
|||
| bool | clipToDisplay = false | |||
| ) | const |
Render the section specified by this SectionSpecification.
| srcWindow | Window object to be used when calculating pixel values from BaseDim values. | |
| baseRect | Rect object to be used when calculating pixel values from BaseDim values. | |
| base_z | base z co-ordinate to use for all imagery in the linked section. |
References CEGUI::Window::getEffectiveAlpha(), CEGUI::WidgetLookFeel::getImagerySection(), CEGUI::WidgetLookManager::getSingleton(), CEGUI::WidgetLookManager::getWidgetLook(), initColourRectForOverride(), CEGUI::ColourRect::modulateAlpha(), and CEGUI::ImagerySection::render().
| void CEGUI::SectionSpecification::render | ( | Window & | srcWindow, | |
| float | base_z, | |||
| const ColourRect * | modcols = 0, |
|||
| const Rect * | clipper = 0, |
|||
| bool | clipToDisplay = false | |||
| ) | const |
Render the section specified by this SectionSpecification.
| srcWindow | Window object to be used when calculating pixel values from BaseDim values. | |
| base_z | base z co-ordinate to use for all imagery in the linked section. |
References CEGUI::String::empty(), CEGUI::Window::getEffectiveAlpha(), CEGUI::WidgetLookFeel::getImagerySection(), CEGUI::PropertySet::getProperty(), CEGUI::WidgetLookManager::getSingleton(), CEGUI::WidgetLookManager::getWidgetLook(), initColourRectForOverride(), CEGUI::ColourRect::modulateAlpha(), and CEGUI::ImagerySection::render().
| void CEGUI::SectionSpecification::setOverrideColours | ( | const ColourRect & | cols | ) |
Set the override colours to be used by this SectionSpecification.
| cols | ColourRect describing the override colours to set for this SectionSpecification. |
| void CEGUI::SectionSpecification::setOverrideColoursPropertyIsColourRect | ( | bool | setting = true |
) |
Set whether the override colours property source represents a full ColourRect.
| setting |
|
| void CEGUI::SectionSpecification::setOverrideColoursPropertySource | ( | const String & | property | ) |
| void CEGUI::SectionSpecification::setRenderControlPropertySource | ( | const String & | property | ) |
Set the name of the property that controls whether to actually render this section.
| property | String containing the name of the property. |
| void CEGUI::SectionSpecification::setUsingOverrideColours | ( | bool | setting = true |
) |
Enable or disable the use of override colours for this section.
| setting |
|
| void CEGUI::SectionSpecification::writeXMLToStream | ( | XMLSerializer & | xml_stream | ) | const |
Writes an xml representation of this SectionSpecification to out_stream.
| xml_stream | Stream where xml data should be output. |
References CEGUI::XMLSerializer::attribute(), CEGUI::XMLSerializer::closeTag(), CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, CEGUI::ColourRect::d_top_left, CEGUI::ColourRect::d_top_right, CEGUI::String::empty(), CEGUI::ColourRect::isMonochromatic(), and CEGUI::XMLSerializer::openTag().
1.5.7.1