MyGUI 3.4.3
MyGUI::WidgetInput Class Reference

#include <MyGUI_WidgetInput.h>

Inheritance diagram for MyGUI::WidgetInput:

Public Member Functions

virtual ~WidgetInput ()=default
 
void setNeedToolTip (bool _value)
 
bool getNeedToolTip () const
 
void setPointer (std::string_view _value)
 
const std::string & getPointer () const
 
void setNeedKeyFocus (bool _value)
 
bool getNeedKeyFocus () const
 
void setNeedMouseFocus (bool _value)
 
bool getNeedMouseFocus () const
 
void setInheritsPick (bool _value)
 
bool getInheritsPick () const
 
void setMaskPick (const std::string &_filename)
 
void setMaskPick (const MaskPickInfo &_info)
 
bool isMaskPickInside (const IntPoint &_point, const IntCoord &_coord) const
 
bool getRootMouseFocus () const
 
bool getRootKeyFocus () const
 
void _riseMouseLostFocus (Widget *_new)
 
void _riseMouseSetFocus (Widget *_old)
 
void _riseMouseDrag (int _left, int _top, MouseButton _id)
 
void _riseMouseMove (int _left, int _top)
 
void _riseMouseWheel (int _rel)
 
void _riseMouseButtonPressed (int _left, int _top, MouseButton _id)
 
void _riseMouseButtonReleased (int _left, int _top, MouseButton _id)
 
void _riseMouseButtonClick ()
 
void _riseMouseButtonDoubleClick ()
 
void _riseKeyLostFocus (Widget *_new)
 
void _riseKeySetFocus (Widget *_old)
 
void _riseKeyButtonPressed (KeyCode _key, Char _char)
 
void _riseKeyButtonReleased (KeyCode _key)
 
void _riseMouseChangeRootFocus (bool _focus)
 
void _riseKeyChangeRootFocus (bool _focus)
 
void _setRootMouseFocus (bool _value)
 
void _setRootKeyFocus (bool _value)
 

Data Fields

EventHandle_WidgetWidget eventMouseLostFocus
 
EventHandle_WidgetWidget eventMouseSetFocus
 
EventPairAddParameter< EventHandle_WidgetIntInt, EventHandle_WidgetIntIntButtoneventMouseDrag
 
EventHandle_WidgetIntInt eventMouseMove
 
EventHandle_WidgetInt eventMouseWheel
 
EventHandle_WidgetIntIntButton eventMouseButtonPressed
 
EventHandle_WidgetIntIntButton eventMouseButtonReleased
 
EventHandle_WidgetVoid eventMouseButtonClick
 
EventHandle_WidgetVoid eventMouseButtonDoubleClick
 
EventHandle_WidgetWidget eventKeyLostFocus
 
EventHandle_WidgetWidget eventKeySetFocus
 
EventHandle_WidgetKeyCodeChar eventKeyButtonPressed
 
EventHandle_WidgetKeyCode eventKeyButtonReleased
 
EventHandle_WidgetBool eventRootMouseChangeFocus
 
EventHandle_WidgetBool eventRootKeyChangeFocus
 
EventHandle_WidgetToolTip eventToolTip
 

Protected Member Functions

virtual void onMouseLostFocus (Widget *_new)
 
virtual void onMouseSetFocus (Widget *_old)
 
virtual void onMouseDrag (int _left, int _top, MouseButton _id)
 
virtual void onMouseMove (int _left, int _top)
 
virtual void onMouseWheel (int _rel)
 
virtual void onMouseButtonPressed (int _left, int _top, MouseButton _id)
 
virtual void onMouseButtonReleased (int _left, int _top, MouseButton _id)
 
virtual void onMouseButtonClick ()
 
virtual void onMouseButtonDoubleClick ()
 
virtual void onKeyLostFocus (Widget *_new)
 
virtual void onKeySetFocus (Widget *_old)
 
virtual void onKeyButtonPressed (KeyCode _key, Char _char)
 
virtual void onKeyButtonReleased (KeyCode _key)
 
virtual void onMouseChangeRootFocus (bool _focus)
 
virtual void onKeyChangeRootFocus (bool _focus)
 

Detailed Description

Definition at line 59 of file MyGUI_WidgetInput.h.

Constructor & Destructor Documentation

◆ ~WidgetInput()

virtual MyGUI::WidgetInput::~WidgetInput ( )
virtualdefault

Member Function Documentation

◆ _riseKeyButtonPressed()

void MyGUI::WidgetInput::_riseKeyButtonPressed ( KeyCode _key,
Char _char )

Definition at line 98 of file MyGUI_WidgetInput.cpp.

◆ _riseKeyButtonReleased()

void MyGUI::WidgetInput::_riseKeyButtonReleased ( KeyCode _key)

Definition at line 104 of file MyGUI_WidgetInput.cpp.

◆ _riseKeyChangeRootFocus()

void MyGUI::WidgetInput::_riseKeyChangeRootFocus ( bool _focus)

Definition at line 116 of file MyGUI_WidgetInput.cpp.

◆ _riseKeyLostFocus()

void MyGUI::WidgetInput::_riseKeyLostFocus ( Widget * _new)

Definition at line 86 of file MyGUI_WidgetInput.cpp.

◆ _riseKeySetFocus()

void MyGUI::WidgetInput::_riseKeySetFocus ( Widget * _old)

Definition at line 92 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseButtonClick()

void MyGUI::WidgetInput::_riseMouseButtonClick ( )

Definition at line 74 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseButtonDoubleClick()

void MyGUI::WidgetInput::_riseMouseButtonDoubleClick ( )

Definition at line 80 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseButtonPressed()

void MyGUI::WidgetInput::_riseMouseButtonPressed ( int _left,
int _top,
MouseButton _id )

Definition at line 62 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseButtonReleased()

void MyGUI::WidgetInput::_riseMouseButtonReleased ( int _left,
int _top,
MouseButton _id )

Definition at line 68 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseChangeRootFocus()

void MyGUI::WidgetInput::_riseMouseChangeRootFocus ( bool _focus)

Definition at line 110 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseDrag()

void MyGUI::WidgetInput::_riseMouseDrag ( int _left,
int _top,
MouseButton _id )

Definition at line 44 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseLostFocus()

void MyGUI::WidgetInput::_riseMouseLostFocus ( Widget * _new)

Definition at line 32 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseMove()

void MyGUI::WidgetInput::_riseMouseMove ( int _left,
int _top )

Definition at line 50 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseSetFocus()

void MyGUI::WidgetInput::_riseMouseSetFocus ( Widget * _old)

Definition at line 38 of file MyGUI_WidgetInput.cpp.

◆ _riseMouseWheel()

void MyGUI::WidgetInput::_riseMouseWheel ( int _rel)

Definition at line 56 of file MyGUI_WidgetInput.cpp.

◆ _setRootKeyFocus()

void MyGUI::WidgetInput::_setRootKeyFocus ( bool _value)

Definition at line 187 of file MyGUI_WidgetInput.cpp.

◆ _setRootMouseFocus()

void MyGUI::WidgetInput::_setRootMouseFocus ( bool _value)

Definition at line 182 of file MyGUI_WidgetInput.cpp.

◆ getInheritsPick()

bool MyGUI::WidgetInput::getInheritsPick ( ) const

Get inherits mode flag

Definition at line 167 of file MyGUI_WidgetInput.cpp.

◆ getNeedKeyFocus()

bool MyGUI::WidgetInput::getNeedKeyFocus ( ) const

Is need key focus If disable this widget won't be reacting on keyboard at all.
Enabled (true) by default.

Definition at line 147 of file MyGUI_WidgetInput.cpp.

◆ getNeedMouseFocus()

bool MyGUI::WidgetInput::getNeedMouseFocus ( ) const

Is need mouse focus If disable this widget won't be reacting on mouse at all.
Enabled (true) by default.

Definition at line 157 of file MyGUI_WidgetInput.cpp.

◆ getNeedToolTip()

bool MyGUI::WidgetInput::getNeedToolTip ( ) const

Get need tool tip mode flag

Definition at line 127 of file MyGUI_WidgetInput.cpp.

◆ getPointer()

const std::string & MyGUI::WidgetInput::getPointer ( ) const

Get mouse pointer name for this widget

Definition at line 137 of file MyGUI_WidgetInput.cpp.

◆ getRootKeyFocus()

bool MyGUI::WidgetInput::getRootKeyFocus ( ) const

Definition at line 177 of file MyGUI_WidgetInput.cpp.

◆ getRootMouseFocus()

bool MyGUI::WidgetInput::getRootMouseFocus ( ) const

Definition at line 172 of file MyGUI_WidgetInput.cpp.

◆ isMaskPickInside()

bool MyGUI::WidgetInput::isMaskPickInside ( const IntPoint & _point,
const IntCoord & _coord ) const

Definition at line 27 of file MyGUI_WidgetInput.cpp.

◆ onKeyButtonPressed()

void MyGUI::WidgetInput::onKeyButtonPressed ( KeyCode _key,
Char _char )
protectedvirtual

Reimplemented in MyGUI::ComboBox, MyGUI::EditBox, MyGUI::ItemBox, and MyGUI::ListBox.

Definition at line 236 of file MyGUI_WidgetInput.cpp.

◆ onKeyButtonReleased()

void MyGUI::WidgetInput::onKeyButtonReleased ( KeyCode _key)
protectedvirtual

Reimplemented in MyGUI::ItemBox, and MyGUI::ListBox.

Definition at line 240 of file MyGUI_WidgetInput.cpp.

◆ onKeyChangeRootFocus()

void MyGUI::WidgetInput::onKeyChangeRootFocus ( bool _focus)
protectedvirtual

Reimplemented in MyGUI::MenuControl, and MyGUI::Window.

Definition at line 248 of file MyGUI_WidgetInput.cpp.

◆ onKeyLostFocus()

void MyGUI::WidgetInput::onKeyLostFocus ( Widget * _new)
protectedvirtual

Reimplemented in MyGUI::Button, MyGUI::EditBox, and MyGUI::ItemBox.

Definition at line 228 of file MyGUI_WidgetInput.cpp.

◆ onKeySetFocus()

void MyGUI::WidgetInput::onKeySetFocus ( Widget * _old)
protectedvirtual

Reimplemented in MyGUI::Button, MyGUI::EditBox, and MyGUI::ItemBox.

Definition at line 232 of file MyGUI_WidgetInput.cpp.

◆ onMouseButtonClick()

void MyGUI::WidgetInput::onMouseButtonClick ( )
protectedvirtual

Definition at line 220 of file MyGUI_WidgetInput.cpp.

◆ onMouseButtonDoubleClick()

void MyGUI::WidgetInput::onMouseButtonDoubleClick ( )
protectedvirtual

Definition at line 224 of file MyGUI_WidgetInput.cpp.

◆ onMouseButtonPressed()

void MyGUI::WidgetInput::onMouseButtonPressed ( int _left,
int _top,
MouseButton _id )
protectedvirtual

Reimplemented in MyGUI::Button, MyGUI::DDContainer, MyGUI::ItemBox, and MyGUI::Window.

Definition at line 212 of file MyGUI_WidgetInput.cpp.

◆ onMouseButtonReleased()

void MyGUI::WidgetInput::onMouseButtonReleased ( int _left,
int _top,
MouseButton _id )
protectedvirtual

Reimplemented in MyGUI::Button, MyGUI::DDContainer, MyGUI::ItemBox, and MyGUI::Window.

Definition at line 216 of file MyGUI_WidgetInput.cpp.

◆ onMouseChangeRootFocus()

void MyGUI::WidgetInput::onMouseChangeRootFocus ( bool _focus)
protectedvirtual

Reimplemented in MyGUI::Window.

Definition at line 244 of file MyGUI_WidgetInput.cpp.

◆ onMouseDrag()

void MyGUI::WidgetInput::onMouseDrag ( int _left,
int _top,
MouseButton _id )
protectedvirtual

Reimplemented in MyGUI::DDContainer, MyGUI::EditBox, MyGUI::ItemBox, and MyGUI::Window.

Definition at line 200 of file MyGUI_WidgetInput.cpp.

◆ onMouseLostFocus()

void MyGUI::WidgetInput::onMouseLostFocus ( Widget * _new)
protectedvirtual

Reimplemented in MyGUI::Button.

Definition at line 192 of file MyGUI_WidgetInput.cpp.

◆ onMouseMove()

void MyGUI::WidgetInput::onMouseMove ( int _left,
int _top )
protectedvirtual

Definition at line 204 of file MyGUI_WidgetInput.cpp.

◆ onMouseSetFocus()

void MyGUI::WidgetInput::onMouseSetFocus ( Widget * _old)
protectedvirtual

Reimplemented in MyGUI::Button.

Definition at line 196 of file MyGUI_WidgetInput.cpp.

◆ onMouseWheel()

void MyGUI::WidgetInput::onMouseWheel ( int _rel)
protectedvirtual

Reimplemented in MyGUI::ItemBox, MyGUI::ListBox, and MyGUI::ScrollBar.

Definition at line 208 of file MyGUI_WidgetInput.cpp.

◆ setInheritsPick()

void MyGUI::WidgetInput::setInheritsPick ( bool _value)

Set inherits mode flag This mode makes all child widgets pickable even if widget don't need mouse focus (was set setNeedMouseFocus(false) ).
Disabled (false) by default.

Definition at line 162 of file MyGUI_WidgetInput.cpp.

◆ setMaskPick() [1/2]

void MyGUI::WidgetInput::setMaskPick ( const MaskPickInfo & _info)

Set picking mask for widget

Definition at line 22 of file MyGUI_WidgetInput.cpp.

◆ setMaskPick() [2/2]

void MyGUI::WidgetInput::setMaskPick ( const std::string & _filename)

Set picking mask for widget

Definition at line 14 of file MyGUI_WidgetInput.cpp.

◆ setNeedKeyFocus()

void MyGUI::WidgetInput::setNeedKeyFocus ( bool _value)

Set need key focus flag

Definition at line 142 of file MyGUI_WidgetInput.cpp.

◆ setNeedMouseFocus()

void MyGUI::WidgetInput::setNeedMouseFocus ( bool _value)

Set need mouse focus flag

Definition at line 152 of file MyGUI_WidgetInput.cpp.

◆ setNeedToolTip()

void MyGUI::WidgetInput::setNeedToolTip ( bool _value)

Set need tool tip mode flag. Enable this if you need tool tip events for widget

Definition at line 122 of file MyGUI_WidgetInput.cpp.

◆ setPointer()

void MyGUI::WidgetInput::setPointer ( std::string_view _value)

Set mouse pointer for this widget

Definition at line 132 of file MyGUI_WidgetInput.cpp.

Field Documentation

◆ eventKeyButtonPressed

EventHandle_WidgetKeyCodeChar MyGUI::WidgetInput::eventKeyButtonPressed

Event : Key pressed.
signature : void method(MyGUI::Widget* _sender, MyGUI::KeyCode _key, MyGUI::Char _char)

Parameters
_senderwidget that called this event
_keycode
_charof pressed symbol (for multilanguage applications)

Definition at line 196 of file MyGUI_WidgetInput.h.

◆ eventKeyButtonReleased

EventHandle_WidgetKeyCode MyGUI::WidgetInput::eventKeyButtonReleased

Event : Key released.
signature : void method(MyGUI::Widget* _sender, MyGUI::KeyCode _key)

Parameters
_senderwidget that called this event
_keycode

Definition at line 203 of file MyGUI_WidgetInput.h.

◆ eventKeyLostFocus

EventHandle_WidgetWidget MyGUI::WidgetInput::eventKeyLostFocus

Event : Widget lost keyboard focus.
signature : void method(MyGUI::Widget* _sender, MyGUI::Widget* _new)

Parameters
_senderwidget that called this event
_newwidget with keyboard focus or nullptr

Definition at line 181 of file MyGUI_WidgetInput.h.

◆ eventKeySetFocus

EventHandle_WidgetWidget MyGUI::WidgetInput::eventKeySetFocus

Event : Widget got keyboard focus.
signature : void method(MyGUI::Widget* _sender, MyGUI::Widget* _old)

Parameters
_senderwidget that called this event
_oldwidget with keyboard focus or nullptr

Definition at line 188 of file MyGUI_WidgetInput.h.

◆ eventMouseButtonClick

EventHandle_WidgetVoid MyGUI::WidgetInput::eventMouseButtonClick

Event : Mouse button pressed and released.
signature : void method(MyGUI::Widget* _sender)

Parameters
_senderwidget that called this event

Definition at line 168 of file MyGUI_WidgetInput.h.

◆ eventMouseButtonDoubleClick

EventHandle_WidgetVoid MyGUI::WidgetInput::eventMouseButtonDoubleClick

Event : Mouse button double click.
signature : void method(MyGUI::Widget* _sender)

Parameters
_senderwidget that called this event

Definition at line 174 of file MyGUI_WidgetInput.h.

◆ eventMouseButtonPressed

EventHandle_WidgetIntIntButton MyGUI::WidgetInput::eventMouseButtonPressed

Event : Mouse button pressed.
signature : void method(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)

Parameters
_senderwidget that called this event
_left- pointer position
_top- pointer position
_idMouse button id

Definition at line 153 of file MyGUI_WidgetInput.h.

◆ eventMouseButtonReleased

EventHandle_WidgetIntIntButton MyGUI::WidgetInput::eventMouseButtonReleased

Event : Mouse button released.
signature : void method(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)

Parameters
_senderwidget that called this event
_left- pointer position
_top- pointer position
_idMouse button id

Definition at line 162 of file MyGUI_WidgetInput.h.

◆ eventMouseDrag

Event : Widget mouse move with captured widget.
signature : void method(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)

Parameters
_senderwidget that called this event
_left- pointer position
_top- pointer position

Definition at line 129 of file MyGUI_WidgetInput.h.

◆ eventMouseLostFocus

EventHandle_WidgetWidget MyGUI::WidgetInput::eventMouseLostFocus

Event : Widget lost mouse focus.
signature : void method(MyGUI::Widget* _sender, MyGUI::Widget* _new)

Parameters
_senderwidget that called this event
_newwidget with mouse focus or nullptr

Definition at line 114 of file MyGUI_WidgetInput.h.

◆ eventMouseMove

EventHandle_WidgetIntInt MyGUI::WidgetInput::eventMouseMove

Event : Mouse move over widget.
signature : void method(MyGUI::Widget* _sender, int _left, int _top)

Parameters
_senderwidget that called this event
_left- pointer position
_top- pointer position

Definition at line 137 of file MyGUI_WidgetInput.h.

◆ eventMouseSetFocus

EventHandle_WidgetWidget MyGUI::WidgetInput::eventMouseSetFocus

Event : Widget got mouse focus.
signature : void method(MyGUI::Widget* _sender, MyGUI::Widget* _old)

Parameters
_senderwidget that called this event
_oldwidget with mouse focus or nullptr

Definition at line 121 of file MyGUI_WidgetInput.h.

◆ eventMouseWheel

EventHandle_WidgetInt MyGUI::WidgetInput::eventMouseWheel

Event : Mouse wheel over widget.
signature : void method(MyGUI::Widget* _sender, int _rel)

Parameters
_senderwidget that called this event
_relrelative wheel position

Definition at line 144 of file MyGUI_WidgetInput.h.

◆ eventRootKeyChangeFocus

EventHandle_WidgetBool MyGUI::WidgetInput::eventRootKeyChangeFocus

Event : Root widget changed keyboard focus.
info : this event sends only to root widget
signature : void method(MyGUI::Widget* _sender, bool _focus);

Parameters
_senderwidget that called this event
_focusIs widget got keyboard focus.

Definition at line 219 of file MyGUI_WidgetInput.h.

◆ eventRootMouseChangeFocus

EventHandle_WidgetBool MyGUI::WidgetInput::eventRootMouseChangeFocus

Event : Root widget changed mouse focus.
info : this event sends only to root widget
signature : void method(MyGUI::Widget* _sender, bool _focus);

Parameters
_senderwidget that called this event
_focusIs widget got mouse focus.

Definition at line 211 of file MyGUI_WidgetInput.h.

◆ eventToolTip

EventHandle_WidgetToolTip MyGUI::WidgetInput::eventToolTip

Event : Event about changing tooltip state.
signature : void method(MyGUI::Widget* _sender, const MyGUI::ToolTipInfo& _info);

Parameters
_senderwidget that called this event
_infoabout tooltip

Definition at line 226 of file MyGUI_WidgetInput.h.


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