0.44.0
|
#include <iWidgetLineTextEdit.h>
Inherits igor::iWidget.
Public Member Functions | |
iWidgetLineTextEdit (const iWidgetPtr parent=nullptr) | |
virtual | ~iWidgetLineTextEdit ()=default |
void | setHorizontalTextAlignment (iHorizontalAlignment align) |
iHorizontalAlignment | getHorizontalTextAlignment () const |
void | setVerticalTextAlignment (iVerticalAlignment valign) |
iVerticalAlignment | getVerticalTextAlignment () const |
void | setMaxTextLength (int32 chars) |
int32 | getMaxTextLength () |
void | setWriteProtected (bool writeProtected) |
bool | isWriteProtected () |
void | setChangeEventAtOnce () |
void | setChangeEventOnEnterAndLostFocus () |
void | setText (const iaString &text) |
const iaString & | getText () const |
void | setCursorPos (uint64 cursorPos) |
uint64 | getCursorPos () const |
void | incCursorPos () |
void | decCursorPos () |
Public Member Functions inherited from igor::iWidget | |
iWidgetType | getWidgetType () const |
iWidgetKind | getWidgetKind () const |
void | setZValue (uint32 zvalue) |
uint32 | getZValue () const |
void | setBackground (const iaColor4f &color) |
const iaColor4f & | getBackground () const |
void | setForeground (const iaColor4f &color) |
const iaColor4f & | getForeground () const |
bool | isBlocked () const |
bool | hasKeyboardFocus () const |
iWidgetState | getState () const |
void | registerOnClickEvent (iClickDelegate clickDelegate) |
void | registerOnMouseOffClickEvent (iMouseOffClickDelegate clickDelegate) |
void | registerOnDoubleClickEvent (iDoubleClickDelegate doubleClickDelegate) |
void | registerOnMouseOverEvent (iMouseOverDelegate mouseOverDelegate) |
void | registerOnMouseOffEvent (iMouseOffDelegate mouseOffDelegate) |
void | registerOnChangeEvent (iChangeDelegate changeDelegate) |
void | registerOnFocusEvent (iFocusDelegate focusDelegate) |
void | registerOnWheelUpEvent (iWheelUpDelegate wheelUpDelegate) |
void | unregisterOnWheelUpEvent (iWheelUpDelegate wheelUpDelegate) |
void | registerOnWheelDownEvent (iWheelDownDelegate wheelDownDelegate) |
void | unregisterOnWheelDownEvent (iWheelDownDelegate wheelDownDelegate) |
void | unregisterOnClickEvent (iClickDelegate clickDelegate) |
void | unregisterOnMouseOffClickEvent (iMouseOffClickDelegate clickDelegate) |
void | unregisterOnDoubleClickEvent (iDoubleClickDelegate doubleClickDelegate) |
void | unregisterOnMouseOverEvent (iMouseOverDelegate mouseOverDelegate) |
void | unregisterOnMouseOffEvent (iMouseOffDelegate mouseOffDelegate) |
void | unregisterOnChangeEvent (iChangeDelegate changeDelegate) |
void | unregisterOnFocusEvent (iFocusDelegate focusDelegate) |
void | registerOnContextMenuEvent (iContextMenuDelegate contextMenuDelegate) |
void | unregisterOnContextMenuEvent (iContextMenuDelegate contextMenuDelegate) |
void | registerOnSelectionChangedEvent (iSelectionChangedDelegate delegate) |
void | unregisterOnSelectionChangedEvent (iSelectionChangedDelegate delegate) |
iaVector2f | getActualPos () const |
int32 | getActualPosX () const |
int32 | getActualPosY () const |
int32 | getActualWidth () const |
int32 | getActualHeight () const |
iaRectanglef | getActualRect () const |
int32 | getRelativePosX () const |
int32 | getRelativePosY () const |
int32 | getMinWidth () const |
int32 | getMinHeight () const |
int32 | getConfiguredMinWidth () const |
int32 | getConfiguredMinHeight () const |
void | setMinWidth (int32 width) |
void | setMinHeight (int32 height) |
void | setMinSize (int32 width, int32 height) |
void | setAcceptOutOfBoundsClicks (bool acceptOutOfBoundsClick=true) |
bool | getAcceptOutOfBoundsClicks () const |
iHorizontalAlignment | getHorizontalAlignment () const |
iVerticalAlignment | getVerticalAlignment () const |
void | setHorizontalAlignment (iHorizontalAlignment horizontalAlignment) |
void | setVerticalAlignment (iVerticalAlignment verticalAlignment) |
bool | isVisible () const |
bool | isEnabled () const |
void | setVisible (bool visible=true) |
void | setEnabled (bool enabled=true) |
iWidgetID | getID () const |
iWidgetID | getParentID () const |
iWidgetPtr | getParent () const |
bool | isMouseOver () |
void | setAcceptDrag (bool acceptDrag) |
bool | isAcceptingDrag () |
void | setAcceptDrop (bool acceptDrop) |
bool | isAcceptingDrop () |
bool | hasParent () const |
void | setGrowingByContent (bool grow=true) |
bool | isGrowingByContent () const |
iaString | getInfo () const |
void | setTooltip (const iaString &text) |
iaString | getTooltip () const |
const std::vector< iWidgetPtr > & | getChildren () const |
virtual void | clear () |
void | setIgnoreChildEventConsumption (bool value=true) |
bool | isIgnoringChildEventConsumption () const |
iWidgetPtr | getRoot () |
virtual void | blockEvents () |
virtual void | unblockEvents () |
void | setOverlayEnabled (bool overlay) |
bool | isOverlayEnabled () const |
virtual void | draw () |
virtual void | drawOverlay () |
virtual void | addWidget (iWidgetPtr widget) |
virtual void | removeWidget (iWidgetPtr widget) |
void | setCursor (iMouseCursorType cursorType) |
void | setUserData (const std::any &userData) |
std::any | getUserData () const |
void | setSelectable (bool selectable) |
bool | isSelectable () const |
void | setMultiSelection (bool enabled) |
bool | isMultiSelectionEnabled () const |
void | select () |
void | unselect () |
bool | isSelected () const |
void | clearSelection () |
const std::vector< iWidgetPtr > | getSelection () const |
void | setSelection (const std::vector< iWidgetPtr > &selection) |
Protected Member Functions | |
bool | onASCII (iEventKeyASCII &event) override |
virtual bool | onKeyDown (iEventKeyDown &event) override |
virtual bool | onKeyUp (iEventKeyUp &event) override |
virtual void | onGainedKeyboardFocus () override |
virtual void | onLostKeyboardFocus () override |
void | handleChanges () |
Protected Member Functions inherited from igor::iWidget | |
void | clearChildren () |
void | updateMinSize (int32 width, int32 height) |
void | setParent (iWidgetPtr parent) |
void | setKeyboardFocus () |
void | resetKeyboardFocus () |
void | setClientArea (int32 left, int32 right, int32 top, int32 bottom) |
const iaVector2f & | getLastMousePos () const |
iWidget (iWidgetType type, iWidgetKind kind, const iWidgetPtr parent=nullptr) | |
virtual | ~iWidget () |
virtual bool | onEvent (iEvent &event) |
virtual bool | onMouseWheel (iEventMouseWheel &event) |
virtual bool | onMouseKeyDown (iEventMouseKeyDown &event) |
virtual bool | onMouseDoubleClick (iEventMouseKeyDoubleClick &event) |
virtual bool | onMouseKeyUp (iEventMouseKeyUp &event) |
virtual void | onMouseMove (iEventMouseMove &event) |
virtual bool | onASCII (iEventKeyASCII &event) |
virtual bool | onKeyDown (iEventKeyDown &event) |
virtual bool | onKeyUp (iEventKeyUp &event) |
virtual void | onLostKeyboardFocus () |
virtual void | onGainedKeyboardFocus () |
virtual void | calcMinSize () |
virtual void | updateAlignment (int32 clientWidth, int32 clientHeight) |
virtual void | calcChildOffsets (std::vector< iaRectanglef > &offsets) |
virtual void | onDragEnter (iDrag &drag) |
virtual void | onDragMove (iDrag &drag, const iaVector2f &mousePos) |
virtual void | onDragLeave (iDrag &drag) |
virtual void | onDrop (const iDrag &drag) |
virtual void | onDrag () |
Additional Inherited Members | |
Static Public Member Functions inherited from igor::iWidget | |
static iWidgetPtr | getKeyboardFocusWidget () |
Static Public Attributes inherited from igor::iWidget | |
static const iWidgetID | INVALID_WIDGET_ID = 0 |
single line text edit widget
igor::iWidgetLineTextEdit::iWidgetLineTextEdit | ( | const iWidgetPtr | parent = nullptr | ) |
initializes member variables
parent | optional parent |
|
virtualdefault |
deinitializes member variables
void igor::iWidgetLineTextEdit::decCursorPos | ( | ) |
decrease cursor pos by one
uint64 igor::iWidgetLineTextEdit::getCursorPos | ( | ) | const |
iHorizontalAlignment igor::iWidgetLineTextEdit::getHorizontalTextAlignment | ( | ) | const |
int32 igor::iWidgetLineTextEdit::getMaxTextLength | ( | ) |
const iaString & igor::iWidgetLineTextEdit::getText | ( | ) | const |
iVerticalAlignment igor::iWidgetLineTextEdit::getVerticalTextAlignment | ( | ) | const |
|
protected |
triggers a change event if the content has changed
void igor::iWidgetLineTextEdit::incCursorPos | ( | ) |
increase cursor pos by one
bool igor::iWidgetLineTextEdit::isWriteProtected | ( | ) |
\retruns if text edit is write protected
|
overrideprotectedvirtual |
handles incoming acsii codes from keyboard
event | the key ascii event |
Reimplemented from igor::iWidget.
|
overrideprotectedvirtual |
handles gained kayboard focus
Reimplemented from igor::iWidget.
|
overrideprotectedvirtual |
handles incoming released key events
event | the key down event |
Reimplemented from igor::iWidget.
|
overrideprotectedvirtual |
handles incoming released key events
event | the key up event |
Reimplemented from igor::iWidget.
|
overrideprotectedvirtual |
handles lost keyboard focus
Reimplemented from igor::iWidget.
void igor::iWidgetLineTextEdit::setChangeEventAtOnce | ( | ) |
set up that the change event will only triggered if you press enter
void igor::iWidgetLineTextEdit::setChangeEventOnEnterAndLostFocus | ( | ) |
set up that the change event will be triggered for every change in the text field
void igor::iWidgetLineTextEdit::setCursorPos | ( | uint64 | cursorPos | ) |
sets cursor pos
cursor pos will be clamped by current text size
cursorPos | the new cursor pos |
void igor::iWidgetLineTextEdit::setHorizontalTextAlignment | ( | iHorizontalAlignment | align | ) |
sets horrizotnal text aligment
align | the horizontal allignment of the text |
void igor::iWidgetLineTextEdit::setMaxTextLength | ( | int32 | chars | ) |
sets the text max length in characters
chars | number of characters |
void igor::iWidgetLineTextEdit::setText | ( | const iaString & | text | ) |
sets the text
text | the text to be set |
void igor::iWidgetLineTextEdit::setVerticalTextAlignment | ( | iVerticalAlignment | valign | ) |
sets vertical text aligment
valign | the vertical allignment of the text |
void igor::iWidgetLineTextEdit::setWriteProtected | ( | bool | writeProtected | ) |
sets text edit write protected
writeProtected | true: text edit will be write protected |
|
protected |
the horizontal alignment
|
protected |
the text
|
protected |
backup text
|
protected |
flat to handle change event trigger behaviour
|
protected |
the vertical alignment