30#include "CEGUI/WindowRendererSets/Core/Module.h"
31#include "CEGUI/widgets/Editbox.h"
35# pragma warning(disable : 4251)
163 size_t getCaretIndex(
const String& visual_text)
const;
171 const float caret_width)
const;
173 float calculateTextOffset(
const Rectf& text_area,
174 const float text_extent,
175 const float caret_width,
176 const float extent_to_caret);
187 const Rectf& text_area,
191 const Rectf& text_area,
193 bool editboxIsFocussed()
const;
194 bool editboxIsReadOnly()
const;
196 const Rectf& text_area,
197 const float text_offset,
198 const float extent_to_caret)
const;
Class that holds details of colours for the four corners of a rectangle.
Definition: ColourRect.h:45
Base class for the EditboxWindowRenderer class.
Definition: widgets/Editbox.h:46
Editbox class for the FalagardBase module.
Definition: WindowRendererSets/Core/Editbox.h:76
static const String ActiveSelectionColourPropertyName
Name of the optional property to access to obtain active selection rendering colour.
Definition: WindowRendererSets/Core/Editbox.h:86
bool d_blinkCaret
true if the caret imagery should blink.
Definition: WindowRendererSets/Core/Editbox.h:205
HorizontalTextFormatting d_textFormatting
horizontal formatting. Only supports left, right, and centred.
Definition: WindowRendererSets/Core/Editbox.h:213
void render()
Populate render cache.
void setCaretBlinkEnabled(bool enable)
set whether the blinking caret is enabled.
static const String TypeName
type name for this widget.
Definition: WindowRendererSets/Core/Editbox.h:79
float getCaretBlinkTimeout() const
return the caret blink timeout period (only used if blink is enabled).
void setColourRectToUnselectedTextColour(ColourRect &colour_rect) const
Set the given ColourRect to the colour to be used for rendering Editbox text oustside of the selected...
static const String SelectedTextColourPropertyName
Name of the optional property to access for the selected text colour.
Definition: WindowRendererSets/Core/Editbox.h:84
FalagardEditbox(const String &type)
Constructor.
void setTextFormatting(const HorizontalTextFormatting format)
Sets the horizontal text formatting to be used from now onwards.
static const float DefaultCaretBlinkTimeout
The default timeout (in seconds) used when blinking the caret.
Definition: WindowRendererSets/Core/Editbox.h:90
static const String InactiveSelectionColourPropertyName
Name of the optional property to access to obtain inactive selection rendering colour.
Definition: WindowRendererSets/Core/Editbox.h:88
float d_caretBlinkTimeout
time-out in seconds used for blinking the caret.
Definition: WindowRendererSets/Core/Editbox.h:207
float d_caretBlinkElapsed
current time elapsed since last caret blink state change.
Definition: WindowRendererSets/Core/Editbox.h:209
void setCaretBlinkTimeout(float seconds)
set the caret blink timeout period (only used if blink is enabled).
float extentToCarretLogical(const float extent_to_caret_visual, const float text_extent, const float caret_width) const
"Logical" here means that if the text is e.g. right aligned, then it's measured from the right end of...
float textOffsetVisual(const Rectf &text_area, const float text_extent) const
"Visual" here means that it's always measured from the right end of the text area rect,...
bool handleFontRenderSizeChange(const Font *const font)
Perform any updates needed because the given font's render size has changed.
bool d_showCaret
true if caret should be shown.
Definition: WindowRendererSets/Core/Editbox.h:211
void setupVisualString(String &visual) const
helper to set 'visual' to the string we will render (part of)
void setColourRectToOptionalPropertyColour(const String &propertyName, ColourRect &colour_rect) const
Set the given ColourRect to the colour(s) fetched from the named property if it exists,...
void renderBaseImagery(const WidgetLookFeel &wlf) const
helper to draw the base imagery (container and what have you)
static const String UnselectedTextColourPropertyName
Name of the optional property to access for the unselected text colour.
Definition: WindowRendererSets/Core/Editbox.h:82
void setColourRectToSelectedTextColour(ColourRect &colour_rect) const
Set the given ColourRect to the colour to be used for rendering Editbox text falling within the selec...
bool isCaretBlinkEnabled() const
return whether the blinking caret is enabled.
size_t getTextIndexFromPosition(const Vector2f &pt) const
Return the text code point index that is rendered closest to screen position pt.
void update(float elapsed)
perform any time based updates for this WindowRenderer.
float d_lastTextOffset
x rendering offset used last time we drew the widget.
Definition: WindowRendererSets/Core/Editbox.h:203
Class that encapsulates a typeface.
Definition: Font.h:62
Class that encapsulates a re-usable collection of imagery specifications.
Definition: ImagerySection.h:49
String class used within the GUI system.
Definition: String.h:64
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
HorizontalTextFormatting
Enumeration of possible values to indicate the horizontal formatting to be used for a text component.
Definition: Enums.h:96