| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405 |
- // Copyright (c) 2008-2023 the Urho3D project
- // License: MIT
- #pragma once
- #include "../Core/Object.h"
- namespace Urho3D
- {
- /// Global mouse click in the UI. Sent by the UI subsystem.
- URHO3D_EVENT(E_UIMOUSECLICK, UIMouseClick)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_BUTTON, Button); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_QUALIFIERS, Qualifiers); // int
- }
- /// Global mouse click end in the UI. Sent by the UI subsystem.
- URHO3D_EVENT(E_UIMOUSECLICKEND, UIMouseClickEnd)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_BEGINELEMENT, BeginElement); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_BUTTON, Button); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_QUALIFIERS, Qualifiers); // int
- }
- /// Global mouse double click in the UI. Sent by the UI subsystem.
- URHO3D_EVENT(E_UIMOUSEDOUBLECLICK, UIMouseDoubleClick)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_XBEGIN, XBegin); // int
- URHO3D_PARAM(P_YBEGIN, YBegin); // int
- URHO3D_PARAM(P_BUTTON, Button); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_QUALIFIERS, Qualifiers); // int
- }
- /// Mouse click on a UI element. Parameters are same as in UIMouseClick event, but is sent by the element.
- URHO3D_EVENT(E_CLICK, Click)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_BUTTON, Button); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_QUALIFIERS, Qualifiers); // int
- }
- /// Mouse click end on a UI element. Parameters are same as in UIMouseClickEnd event, but is sent by the element.
- URHO3D_EVENT(E_CLICKEND, ClickEnd)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_BEGINELEMENT, BeginElement); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_BUTTON, Button); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_QUALIFIERS, Qualifiers); // int
- }
- /// Mouse double click on a UI element. Parameters are same as in UIMouseDoubleClick event, but is sent by the element.
- URHO3D_EVENT(E_DOUBLECLICK, DoubleClick)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_XBEGIN, XBegin); // int
- URHO3D_PARAM(P_YBEGIN, YBegin); // int
- URHO3D_PARAM(P_BUTTON, Button); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_QUALIFIERS, Qualifiers); // int
- }
- /// Drag and drop test.
- URHO3D_EVENT(E_DRAGDROPTEST, DragDropTest)
- {
- URHO3D_PARAM(P_SOURCE, Source); // UIElement pointer
- URHO3D_PARAM(P_TARGET, Target); // UIElement pointer
- URHO3D_PARAM(P_ACCEPT, Accept); // bool
- }
- /// Drag and drop finish.
- URHO3D_EVENT(E_DRAGDROPFINISH, DragDropFinish)
- {
- URHO3D_PARAM(P_SOURCE, Source); // UIElement pointer
- URHO3D_PARAM(P_TARGET, Target); // UIElement pointer
- URHO3D_PARAM(P_ACCEPT, Accept); // bool
- }
- /// Focus element changed.
- URHO3D_EVENT(E_FOCUSCHANGED, FocusChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_CLICKEDELEMENT, ClickedElement); // UIElement pointer
- }
- /// UI element name changed.
- URHO3D_EVENT(E_NAMECHANGED, NameChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// UI element resized.
- URHO3D_EVENT(E_RESIZED, Resized)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_WIDTH, Width); // int
- URHO3D_PARAM(P_HEIGHT, Height); // int
- URHO3D_PARAM(P_DX, DX); // int
- URHO3D_PARAM(P_DY, DY); // int
- }
- /// UI element positioned.
- URHO3D_EVENT(E_POSITIONED, Positioned)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- }
- /// UI element visibility changed.
- URHO3D_EVENT(E_VISIBLECHANGED, VisibleChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_VISIBLE, Visible); // bool
- }
- /// UI element focused.
- URHO3D_EVENT(E_FOCUSED, Focused)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_BYKEY, ByKey); // bool
- }
- /// UI element defocused.
- URHO3D_EVENT(E_DEFOCUSED, Defocused)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// UI element layout updated.
- URHO3D_EVENT(E_LAYOUTUPDATED, LayoutUpdated)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// UI button pressed.
- URHO3D_EVENT(E_PRESSED, Pressed)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// UI button was pressed, then released.
- URHO3D_EVENT(E_RELEASED, Released)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// UI checkbox toggled.
- URHO3D_EVENT(E_TOGGLED, Toggled)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_STATE, State); // bool
- }
- /// UI slider value changed.
- URHO3D_EVENT(E_SLIDERCHANGED, SliderChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_VALUE, Value); // float
- }
- /// UI slider being paged.
- URHO3D_EVENT(E_SLIDERPAGED, SliderPaged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_OFFSET, Offset); // int
- URHO3D_PARAM(P_PRESSED, Pressed); // bool
- }
- /// UI progressbar value changed.
- URHO3D_EVENT(E_PROGRESSBARCHANGED, ProgressBarChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_VALUE, Value); // float
- }
- /// UI scrollbar value changed.
- URHO3D_EVENT(E_SCROLLBARCHANGED, ScrollBarChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_VALUE, Value); // float
- }
- /// UI scrollview position changed.
- URHO3D_EVENT(E_VIEWCHANGED, ViewChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- }
- /// UI modal changed (currently only Window has modal flag).
- URHO3D_EVENT(E_MODALCHANGED, ModalChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_MODAL, Modal); // bool
- }
- /// Text entry into a LineEdit. The text can be modified in the event data.
- URHO3D_EVENT(E_TEXTENTRY, TextEntry)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_TEXT, Text); // String [in/out]
- }
- /// Editable text changed.
- URHO3D_EVENT(E_TEXTCHANGED, TextChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_TEXT, Text); // String
- }
- /// Text editing finished (enter pressed on a LineEdit).
- URHO3D_EVENT(E_TEXTFINISHED, TextFinished)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_TEXT, Text); // String
- URHO3D_PARAM(P_VALUE, Value); // Float
- }
- /// Menu selected.
- URHO3D_EVENT(E_MENUSELECTED, MenuSelected)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// Listview or DropDownList item selected.
- URHO3D_EVENT(E_ITEMSELECTED, ItemSelected)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_SELECTION, Selection); // int
- }
- /// Listview item deselected.
- URHO3D_EVENT(E_ITEMDESELECTED, ItemDeselected)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_SELECTION, Selection); // int
- }
- /// Listview selection change finished.
- URHO3D_EVENT(E_SELECTIONCHANGED, SelectionChanged)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// Listview item clicked. If this is a left-click, also ItemSelected event will be sent. If this is a right-click, only this event is sent.
- URHO3D_EVENT(E_ITEMCLICKED, ItemClicked)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_ITEM, Item); // UIElement pointer
- URHO3D_PARAM(P_SELECTION, Selection); // int
- URHO3D_PARAM(P_BUTTON, Button); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_QUALIFIERS, Qualifiers); // int
- }
- /// Listview item double clicked.
- URHO3D_EVENT(E_ITEMDOUBLECLICKED, ItemDoubleClicked)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_ITEM, Item); // UIElement pointer
- URHO3D_PARAM(P_SELECTION, Selection); // int
- URHO3D_PARAM(P_BUTTON, Button); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_QUALIFIERS, Qualifiers); // int
- }
- /// LineEdit or ListView unhandled key pressed.
- URHO3D_EVENT(E_UNHANDLEDKEY, UnhandledKey)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_KEY, Key); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_QUALIFIERS, Qualifiers); // int
- }
- /// Fileselector choice.
- URHO3D_EVENT(E_FILESELECTED, FileSelected)
- {
- URHO3D_PARAM(P_FILENAME, FileName); // String
- URHO3D_PARAM(P_FILTER, Filter); // String
- URHO3D_PARAM(P_OK, OK); // bool
- }
- /// MessageBox acknowlegement.
- URHO3D_EVENT(E_MESSAGEACK, MessageACK)
- {
- URHO3D_PARAM(P_OK, OK); // bool
- }
- /// A child element has been added to an element. Sent by the UI root element, or element-event-sender if set.
- URHO3D_EVENT(E_ELEMENTADDED, ElementAdded)
- {
- URHO3D_PARAM(P_ROOT, Root); // UIElement pointer
- URHO3D_PARAM(P_PARENT, Parent); // UIElement pointer
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// A child element is about to be removed from an element. Sent by the UI root element, or element-event-sender if set.
- URHO3D_EVENT(E_ELEMENTREMOVED, ElementRemoved)
- {
- URHO3D_PARAM(P_ROOT, Root); // UIElement pointer
- URHO3D_PARAM(P_PARENT, Parent); // UIElement pointer
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// Hovering on an UI element has started.
- URHO3D_EVENT(E_HOVERBEGIN, HoverBegin)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_ELEMENTX, ElementX); // int
- URHO3D_PARAM(P_ELEMENTY, ElementY); // int
- }
- /// Hovering on an UI element has ended.
- URHO3D_EVENT(E_HOVEREND, HoverEnd)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- }
- /// Drag behavior of a UI Element has started.
- URHO3D_EVENT(E_DRAGBEGIN, DragBegin)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_ELEMENTX, ElementX); // int
- URHO3D_PARAM(P_ELEMENTY, ElementY); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_NUMBUTTONS, NumButtons); // int
- }
- /// Drag behavior of a UI Element when the input device has moved.
- URHO3D_EVENT(E_DRAGMOVE, DragMove)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_DX, DX); // int
- URHO3D_PARAM(P_DY, DY); // int
- URHO3D_PARAM(P_ELEMENTX, ElementX); // int
- URHO3D_PARAM(P_ELEMENTY, ElementY); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_NUMBUTTONS, NumButtons); // int
- }
- /// Drag behavior of a UI Element has finished.
- URHO3D_EVENT(E_DRAGEND, DragEnd)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_ELEMENTX, ElementX); // int
- URHO3D_PARAM(P_ELEMENTY, ElementY); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_NUMBUTTONS, NumButtons); // int
- }
- /// Drag of a UI Element was canceled by pressing ESC.
- URHO3D_EVENT(E_DRAGCANCEL, DragCancel)
- {
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_ELEMENTX, ElementX); // int
- URHO3D_PARAM(P_ELEMENTY, ElementY); // int
- URHO3D_PARAM(P_BUTTONS, Buttons); // int
- URHO3D_PARAM(P_NUMBUTTONS, NumButtons); // int
- }
- /// A file was drag-dropped into the application window. Includes also coordinates and UI element if applicable.
- URHO3D_EVENT(E_UIDROPFILE, UIDropFile)
- {
- URHO3D_PARAM(P_FILENAME, FileName); // String
- URHO3D_PARAM(P_ELEMENT, Element); // UIElement pointer
- URHO3D_PARAM(P_X, X); // int
- URHO3D_PARAM(P_Y, Y); // int
- URHO3D_PARAM(P_ELEMENTX, ElementX); // int (only if element is non-null)
- URHO3D_PARAM(P_ELEMENTY, ElementY); // int (only if element is non-null)
- }
- }
|