SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
MyCGUIEditBox Class Reference
Inheritance diagram for MyCGUIEditBox:
Inheritance graph
[legend]

Public Member Functions

 MyCGUIEditBox (const wchar_t *text, bool border, gui::IGUIEnvironment *environment, gui::IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)
 
void addListener (GUIEngine::ITextBoxWidgetListener *listener)
 
void clearListeners ()
 
void handleTextUpdated ()
 
bool handleEnterPressed ()
 
virtual void inputChar (char32_t c)
 adds a letter to the edit box
 
virtual bool OnEvent (const SEvent &event)
 called if an event happened.
 
- Public Member Functions inherited from CGUIEditBox
 CGUIEditBox (const wchar_t *text, bool border, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)
 constructor
 
virtual ~CGUIEditBox ()
 destructor
 
virtual void setOverrideFont (IGUIFont *font=0)
 Sets another skin independent font.
 
virtual void setOverrideColor (video::SColor color)
 Sets another color for the text.
 
virtual video::SColor getOverrideColor () const
 Gets the override color.
 
virtual void enableOverrideColor (bool enable)
 Sets if the text should use the overide color or the color in the gui skin.
 
virtual bool isOverrideColorEnabled (void) const
 Checks if an override color is enabled.
 
virtual void setDrawBorder (bool border)
 Turns the border on or off.
 
virtual void setWordWrap (bool enable)
 Enables or disables word wrap for using the edit box as multiline text editor.
 
virtual bool isWordWrapEnabled () const
 Checks if word wrap is enabled.
 
virtual void setMultiLine (bool enable)
 Enables or disables newlines.
 
virtual bool isMultiLineEnabled () const
 Checks if multi line editing is enabled.
 
virtual void setAutoScroll (bool enable)
 Enables or disables automatic scrolling with cursor position.
 
virtual bool isAutoScrollEnabled () const
 Checks to see if automatic scrolling is enabled.
 
virtual core::dimension2du getTextDimension ()
 Gets the size area of the text in the edit box.
 
virtual void setTextAlignment (EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)
 Sets text justification.
 
virtual bool OnEvent (const SEvent &event)
 called if an event happened.
 
virtual void draw ()
 draws the element and its children
 
virtual void setText (const core::stringw &text)
 Sets the new caption of this element.
 
virtual void setMax (u32 max)
 Sets the maximum amount of characters which may be entered in the box.
 
virtual u32 getMax () const
 Returns maximum amount of characters, previously set by setMax();.
 
virtual void setPasswordBox (bool passwordBox, wchar_t passwordChar=L' *')
 Sets whether the edit box is a password box. Setting this to true will.
 
virtual bool isPasswordBox () const
 Returns true if the edit box is currently a password box.
 
virtual void updateAbsolutePosition ()
 Updates the absolute position, splits text if required.
 
virtual void serializeAttributes (io::IAttributes *out, io::SAttributeReadWriteOptions *options) const
 Writes attributes of the element.
 
virtual void deserializeAttributes (io::IAttributes *in, io::SAttributeReadWriteOptions *options)
 Reads attributes of the element.
 
virtual irr::gui::IGUIFont * getOverrideFont () const
 
virtual irr::gui::IGUIFont * getActiveFont () const
 
virtual void setDrawBackground (bool)
 
void fromAndroidEditText (const std::u32string &text, int start, int end, int composing_start, int composing_end)
 
void openScreenKeyboard ()
 
s32 getCursorPosInBox () const
 
s32 getTextCount () const
 
void setTextBoxType (GUIEngine::TextBoxType t)
 
virtual void setComposingText (const std::u32string &ct)
 
virtual void clearComposingText ()
 
virtual const core::position2di & getICPos () const
 
void sendGuiEvent (EGUI_EVENT_TYPE type)
 send some gui event to parent
 

Private Attributes

PtrVector< GUIEngine::ITextBoxWidgetListener, REF > m_listeners
 

Additional Inherited Members

- Protected Member Functions inherited from CGUIEditBox
void setTextRect (s32 line)
 sets the area of the given line
 
virtual void inputChar (char32_t c)
 adds a letter to the edit box
 
void calculateScrollPos ()
 calculates the current scroll position
 
void setTextMarkers (s32 begin, s32 end)
 send some gui event to parent set text markers
 
void updateCursorDistance ()
 
bool processKey (const SEvent &event)
 
bool processMouse (const SEvent &event)
 
s32 getCursorPos (s32 x, s32 y)
 
void updateGlyphLayouts ()
 
void correctCursor (s32 &cursor_pos, bool left)
 
void updateSurrogatePairText ()
 
- Protected Attributes inherited from CGUIEditBox
bool MouseMarking
 
bool Border
 
bool OverrideColorEnabled
 
s32 m_mark_begin
 
s32 m_mark_end
 
GUIEngine::TextBoxType m_type
 
video::SColor OverrideColor
 
gui::IGUIFont * OverrideFont
 
gui::IGUIFont * LastBreakFont
 
IOSOperator * Operator
 
uint64_t m_force_show_cursor_time
 
s32 m_cursor_pos
 
s32 m_scroll_pos
 
s32 m_cursor_distance
 
u32 m_max_chars
 
bool AutoScroll
 
bool PasswordBox
 
char32_t PasswordChar
 
EGUI_ALIGNMENT HAlign
 
EGUI_ALIGNMENT VAlign
 
core::rect< s32 > CurrentTextRect
 
core::rect< s32 > FrameRect
 
s32 m_composing_start
 
s32 m_composing_end
 
std::u32string m_edit_text
 
std::u32string m_composing_text
 
std::vector< GlyphLayout > m_glyph_layouts
 
std::vector< wchar_t > m_surrogate_chars
 
core::position2di m_ic_pos
 

Member Function Documentation

◆ inputChar()

virtual void MyCGUIEditBox::inputChar ( char32_t  c)
inlinevirtual

adds a letter to the edit box

Reimplemented from CGUIEditBox.

◆ OnEvent()

virtual bool MyCGUIEditBox::OnEvent ( const SEvent &  event)
inlinevirtual

called if an event happened.

Reimplemented from CGUIEditBox.


The documentation for this class was generated from the following file: