Crazy Eddies GUI System
0.6.2
|
MultiLineEditbox class for the FalagardBase module. More...
Public Member Functions | |
FalagardMultiLineEditbox (const String &type) | |
Constructor. | |
Rect | getTextRenderArea (void) const |
Return a Rect object describing, in un-clipped pixels, the window relative area that the text should be rendered in to. More... | |
void | render () |
Populate render cache. More... | |
![]() | |
MultiLineEditboxWindowRenderer (const String &name) | |
Constructor. | |
![]() | |
WindowRenderer (const String &name, const String &class_name="Window") | |
Constructor. More... | |
virtual | ~WindowRenderer () |
Destructor. | |
const String & | getName () const |
Returns the factory type name of this window renderer. | |
Window * | getWindow () const |
Get the window this windowrenderer is attached to. | |
const String & | getClass () const |
Get the "minimum" Window class this renderer requires. | |
const WidgetLookFeel & | getLookNFeel () const |
Get the Look'N'Feel assigned to our window. | |
virtual Rect | getUnclippedInnerRect () const |
Get unclipped inner rectangle that our window should return from its member function with the same name. | |
virtual Rect | getPixelRect () const |
Get actual pixel rectangle our window is to return from its member function with the same name. | |
virtual void | performChildWindowLayout () |
Method called to perform extended laying out of the window's attached child windows. | |
Static Public Attributes | |
static const utf8 | TypeName [] = "Falagard/MultiLineEditbox" |
static const String | UnselectedTextColourPropertyName |
Name of property to use to obtain unselected text rendering colour. More... | |
static const String | SelectedTextColourPropertyName |
Name of property to use to obtain selected text rendering colour. | |
static const String | ActiveSelectionColourPropertyName |
Name of property to use to obtain active selection rendering colour. | |
static const String | InactiveSelectionColourPropertyName |
Name of property to use to obtain inactive selection rendering colour. | |
Protected Member Functions | |
void | cacheEditboxBaseImagery () |
Perform rendering of the widget control frame and other 'static' areas. This method should not render the actual text. Note that the text will be rendered to layer 4 and the selection brush to layer 3, other layers can be used for rendering imagery behind and infront of the text & selection.. More... | |
void | cacheCaratImagery (const Rect &textArea) |
Render the carat. More... | |
void | cacheTextLines (const Rect &dest_area) |
Render text lines. | |
colour | getUnselectedTextColour () const |
return the colour to be used for rendering Editbox text oustside of the selected region. More... | |
colour | getActiveSelectionColour () const |
return the colour to be used for rendering the selection highlight when the editbox is active. More... | |
colour | getInactiveSelectionColour () const |
return the colour to be used for rendering the selection highlight when the editbox is inactive. More... | |
colour | getSelectedTextColour () const |
return the colour to be used for rendering Editbox text falling within the selected region. More... | |
colour | getOptionalPropertyColour (const String &propertyName) const |
Return a colour object fetched from the named property if it exists, else a default colour (black). More... | |
Additional Inherited Members | |
![]() | |
typedef std::vector< Property * > | PropertyList |
![]() | |
Window * | d_window |
Pointer to the window this windowrenderer is assigned to. | |
const String | d_name |
Name of the factory type used to create this window renderer. | |
const String | d_class |
Name of the widget class that is the "minimum" requirement. | |
PropertyList | d_properties |
The list of properties that this windowrenderer will be handling. | |
MultiLineEditbox class for the FalagardBase module.
This class requires LookNFeel to be assigned. The LookNFeel should provide the following:
States:
NamedAreas: TextArea - area where text, selection, and carat imagery will appear. TextAreaHScroll - TextArea when only horizontal scrollbar is visible. TextAreaVScroll - TextArea when only vertical scrollbar is visible. TextAreaHVScroll - TextArea when both horizontal and vertical scrollbar is visible.
PropertyDefinitions (optional, defaults will be black):
Imagery Sections:
Child Widgets: Scrollbar based widget with name suffix "__auto_vscrollbar__" Scrollbar based widget with name suffix "__auto_hscrollbar__"
|
protected |
Render the carat.
References CEGUI::WindowRenderer::d_window, CEGUI::ImagerySection::getBoundingRect(), CEGUI::MultiLineEditbox::getCaratIndex(), CEGUI::Renderer::getCurrentZ(), CEGUI::Window::getFont(), CEGUI::MultiLineEditbox::getHorzScrollbar(), CEGUI::WidgetLookFeel::getImagerySection(), CEGUI::MultiLineEditbox::getLineNumberFromIndex(), CEGUI::Font::getLineSpacing(), CEGUI::WindowRenderer::getLookNFeel(), CEGUI::System::getRenderer(), CEGUI::Scrollbar::getScrollPosition(), CEGUI::System::getSingleton(), CEGUI::Rect::getSize(), CEGUI::Window::getText(), CEGUI::Font::getTextExtent(), CEGUI::MultiLineEditbox::getVertScrollbar(), CEGUI::Renderer::getZLayer(), CEGUI::Rect::offset(), CEGUI::ImagerySection::render(), CEGUI::Rect::setHeight(), CEGUI::Rect::setWidth(), and CEGUI::String::substr().
Referenced by render().
|
protected |
Perform rendering of the widget control frame and other 'static' areas. This method should not render the actual text. Note that the text will be rendered to layer 4 and the selection brush to layer 3, other layers can be used for rendering imagery behind and infront of the text & selection..
References CEGUI::WindowRenderer::d_window, CEGUI::WindowRenderer::getLookNFeel(), CEGUI::WidgetLookFeel::getStateImagery(), CEGUI::Window::isDisabled(), CEGUI::MultiLineEditbox::isReadOnly(), and CEGUI::StateImagery::render().
Referenced by render().
|
protected |
return the colour to be used for rendering the selection highlight when the editbox is active.
References ActiveSelectionColourPropertyName, and getOptionalPropertyColour().
Referenced by cacheTextLines().
|
protected |
return the colour to be used for rendering the selection highlight when the editbox is inactive.
References getOptionalPropertyColour(), and InactiveSelectionColourPropertyName.
Referenced by cacheTextLines().
|
protected |
Return a colour object fetched from the named property if it exists, else a default colour (black).
propertyName | String object holding the name of the property to be accessed if it exists. |
References CEGUI::WindowRenderer::d_window, CEGUI::PropertySet::getProperty(), and CEGUI::PropertySet::isPropertyPresent().
Referenced by getActiveSelectionColour(), getInactiveSelectionColour(), getSelectedTextColour(), and getUnselectedTextColour().
|
protected |
return the colour to be used for rendering Editbox text falling within the selected region.
References getOptionalPropertyColour(), and SelectedTextColourPropertyName.
Referenced by cacheTextLines().
|
virtual |
Return a Rect object describing, in un-clipped pixels, the window relative area that the text should be rendered in to.
Implements CEGUI::MultiLineEditboxWindowRenderer.
References CEGUI::WindowRenderer::d_window, CEGUI::NamedArea::getArea(), CEGUI::MultiLineEditbox::getHorzScrollbar(), CEGUI::WindowRenderer::getLookNFeel(), CEGUI::WidgetLookFeel::getNamedArea(), CEGUI::ComponentArea::getPixelRect(), CEGUI::MultiLineEditbox::getVertScrollbar(), CEGUI::WidgetLookFeel::isNamedAreaDefined(), and CEGUI::Window::isVisible().
Referenced by render().
|
protected |
return the colour to be used for rendering Editbox text oustside of the selected region.
References getOptionalPropertyColour(), and UnselectedTextColourPropertyName.
Referenced by cacheTextLines().
|
virtual |
Populate render cache.
This method must be implemented by all window renderers and should perform the rendering operations needed for this widget. Normally using the Falagard API...
Implements CEGUI::WindowRenderer.
References cacheCaratImagery(), cacheEditboxBaseImagery(), cacheTextLines(), CEGUI::WindowRenderer::d_window, getTextRenderArea(), CEGUI::MultiLineEditbox::hasInputFocus(), and CEGUI::MultiLineEditbox::isReadOnly().
|
static |
Name of property to use to obtain unselected text rendering colour.
type name for this widget.
Referenced by getUnselectedTextColour().