8#include "IGUIEditBox.h"
9#include "IOSOperator.h"
19 GUIEditBox(IGUIEnvironment *environment, IGUIElement *parent, s32
id,
20 core::rect<s32> rectangle,
bool border,
bool writable) :
21 IGUIEditBox(environment, parent, id, rectangle),
89 virtual void setPasswordBox(
bool passwordBox,
wchar_t passwordChar = L
'*');
95 virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical);
98 virtual void setText(
const wchar_t *text);
103 virtual void setMax(u32 max);
116 virtual bool OnEvent(
const SEvent &event);
138 virtual void inputString(
const core::stringw &str);
193 bool onKeyUp(
const SEvent &event, s32 &mark_begin, s32 &mark_end);
194 bool onKeyDown(
const SEvent &event, s32 &mark_begin, s32 &mark_end);
196 bool onKeyControlX(
const SEvent &event, s32 &mark_begin, s32 &mark_end);
197 bool onKeyControlV(
const SEvent &event, s32 &mark_begin, s32 &mark_end);
198 bool onKeyBack(
const SEvent &event, s32 &mark_begin, s32 &mark_end);
199 bool onKeyDelete(
const SEvent &event, s32 &mark_begin, s32 &mark_end);
Definition guiEditBox.h:17
bool m_passwordbox
Definition guiEditBox.h:156
virtual void setText(const wchar_t *text)
Sets the new caption of this element.
Definition guiEditBox.cpp:110
virtual void calculateScrollPos()=0
calculates the current scroll position
virtual u32 getMax() const
Returns maximum amount of characters, previously set by setMax();.
Definition guiEditBox.h:106
IOSOperator * m_operator
Definition guiEditBox.h:183
bool onKeyDelete(const SEvent &event, s32 &mark_begin, s32 &mark_end)
Definition guiEditBox.cpp:626
virtual void setMultiLine(bool enable)
Enables or disables newlines.
Definition guiEditBox.cpp:79
s32 m_hscroll_pos
Definition guiEditBox.h:167
s32 m_vscroll_pos
Definition guiEditBox.h:168
core::rect< s32 > m_current_text_rect
Definition guiEditBox.h:173
bool m_border
Definition guiEditBox.h:154
virtual void setOverrideFont(IGUIFont *font=0)
Sets another skin independent font.
Definition guiEditBox.cpp:26
virtual ~GUIEditBox()
Definition guiEditBox.cpp:14
bool onKeyUp(const SEvent &event, s32 &mark_begin, s32 &mark_end)
Definition guiEditBox.cpp:439
virtual bool isMultiLineEnabled() const
Checks if multi line editing is enabled.
Definition guiEditBox.h:74
bool m_mouse_marking
Definition guiEditBox.h:177
u32 m_scrollbar_width
Definition guiEditBox.h:187
bool m_multiline
Definition guiEditBox.h:151
video::SColor m_override_color
Definition guiEditBox.h:171
virtual void setMax(u32 max)
Sets the maximum amount of characters which may be entered in the box.
Definition guiEditBox.cpp:122
wchar_t m_passwordchar
Definition guiEditBox.h:157
virtual void enableOverrideColor(bool enable)
Sets if the text should use the overide color or the color in the gui skin.
Definition guiEditBox.cpp:66
gui::IGUIFont * m_last_break_font
Definition guiEditBox.h:182
bool onKeyControlX(const SEvent &event, s32 &mark_begin, s32 &mark_end)
Definition guiEditBox.cpp:512
bool m_writable
Definition guiEditBox.h:175
virtual void setWordWrap(bool enable)
Enables or disables word wrap for using the edit box as multiline text editor.
Definition guiEditBox.cpp:72
virtual void inputChar(wchar_t c)
Definition guiEditBox.cpp:662
bool processKey(const SEvent &event)
Definition guiEditBox.cpp:225
virtual s32 getCursorPos(s32 x, s32 y)=0
void setTextMarkers(s32 begin, s32 end)
set text markers
Definition guiEditBox.cpp:160
core::rect< s32 > m_frame_rect
Definition guiEditBox.h:185
virtual bool isDrawBorderEnabled() const
Definition guiEditBox.h:65
virtual bool isAutoScrollEnabled() const
Checks to see if automatic scrolling is enabled.
Definition guiEditBox.h:83
bool processMouse(const SEvent &event)
Definition guiEditBox.cpp:707
std::vector< core::stringw > m_broken_text
Definition guiEditBox.h:159
u32 m_max
Definition guiEditBox.h:169
virtual bool isPasswordBox() const
Returns true if the edit box is currently a password box.
Definition guiEditBox.h:92
virtual bool OnEvent(const SEvent &event)
called if an event happened.
Definition guiEditBox.cpp:194
bool m_autoscroll
Definition guiEditBox.h:152
virtual core::dimension2du getTextDimension()
Gets the size area of the text in the edit box.
Definition guiEditBox.cpp:132
virtual void setDrawBorder(bool border)
Turns the border on or off.
Definition guiEditBox.cpp:149
u32 m_blink_start_time
Definition guiEditBox.h:165
virtual void setWritable(bool can_write_text)
set true if this EditBox is writable
Definition guiEditBox.cpp:154
virtual void setAutoScroll(bool enable)
Enables or disables automatic scrolling with cursor position.
Definition guiEditBox.cpp:86
virtual IGUIFont * getActiveFont() const
Get the font which is used right now for drawing.
Definition guiEditBox.cpp:43
virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar=L' *')
Sets whether the edit box is a password box. Setting this to true will.
Definition guiEditBox.cpp:91
s32 getLineFromPos(s32 pos)
returns the line number that the cursor is on
Definition guiEditBox.cpp:801
virtual void breakText()=0
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)
Sets text justification.
Definition guiEditBox.cpp:103
virtual void inputString(const core::stringw &str)
Definition guiEditBox.cpp:670
bool onKeyControlV(const SEvent &event, s32 &mark_begin, s32 &mark_end)
Definition guiEditBox.cpp:543
s32 m_mark_end
Definition guiEditBox.h:180
EGUI_ALIGNMENT m_valign
Definition guiEditBox.h:163
virtual bool acceptsIME()
Definition guiEditBox.h:118
GUIEditBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle, bool border, bool writable)
Definition guiEditBox.h:19
bool onKeyDown(const SEvent &event, s32 &mark_begin, s32 &mark_end)
Definition guiEditBox.cpp:469
s32 m_cursor_pos
Definition guiEditBox.h:166
GUIScrollBar * m_vscrollbar
Definition guiEditBox.h:188
gui::IGUIFont * m_override_font
Definition guiEditBox.h:147
virtual bool isWordWrapEnabled() const
Checks if word wrap is enabled.
Definition guiEditBox.h:60
void updateVScrollBar()
update the vertical scrollBar (visibilty & position)
Definition guiEditBox.cpp:815
virtual void setOverrideColor(video::SColor color)
Sets another color for the text.
Definition guiEditBox.cpp:54
s32 m_mark_begin
Definition guiEditBox.h:179
bool m_override_color_enabled
Definition guiEditBox.h:149
void onKeyControlC(const SEvent &event)
Definition guiEditBox.cpp:499
bool m_word_wrap
Definition guiEditBox.h:150
virtual video::SColor getOverrideColor() const
Gets the override color.
Definition guiEditBox.cpp:60
std::vector< s32 > m_broken_text_positions
Definition guiEditBox.h:160
void sendGuiEvent(EGUI_EVENT_TYPE type)
send some gui event to parent
Definition guiEditBox.cpp:180
virtual bool isOverrideColorEnabled(void) const
Checks if an override color is enabled.
Definition guiEditBox.h:50
bool onKeyBack(const SEvent &event, s32 &mark_begin, s32 &mark_end)
Definition guiEditBox.cpp:588
virtual IGUIFont * getOverrideFont() const
Definition guiEditBox.h:31
virtual void setTextRect(s32 line)=0
sets the area of the given line
EGUI_ALIGNMENT m_halign
Definition guiEditBox.h:162
Definition fontengine.h:14
Definition clientmap.h:30