|
psychic-ui 0.0.0
|
#include <psychic-ui.hpp>
Public Attributes | |
| float | x {0} |
| float | y {0} |
| float | windowX {0} |
| float | windowY {0} |
| MouseButton | button {MouseButton::NONE} |
| bool | down {false} |
| unsigned | buttons {0} |
| Mod | modifiers {} |
| unsigned | clickCount {0} |
| InputMode | source {InputMode::Pointer} |
| bool | fromKeyboard {false} |
| double | scrollX {0} |
| double | scrollY {0} |
What every mouse signal passes (mousePressed, clicked, mouseScrolled, contextMenuRequested...), also made of touches (source is Touch), pens and keys (a keyboard click or context menu, clickCount 0). Each div gets it in its own coordinates: the window fills it in window coordinates and every div on the way moves x and y into its own.
| MouseButton psychic_ui::MouseEvent::button {MouseButton::NONE} |
The button that changed (press, release, button change, click, context menu); NONE for moves and scrolls
| unsigned psychic_ui::MouseEvent::buttons {0} |
Every button held (MouseButton bits), after this change
| unsigned psychic_ui::MouseEvent::clickCount {0} |
Presses in a row of this button at this spot: 1, 2 for a double click, 3... Kept from the press for its release and click; 0 when no press made it (moves, scrolls, keyboard clicks and context menus)
| bool psychic_ui::MouseEvent::down {false} |
Whether button went down, for mouseButtonChanged (true for presses, false for releases and clicks)
| bool psychic_ui::MouseEvent::fromKeyboard {false} |
Made by a key in place of the mouse (Div::mouseEventAtCenter: a click by Enter or Space, a context menu by the Menu key or Shift+F10), so that what it opens can start at its first item, as from the keyboard
| double psychic_ui::MouseEvent::scrollX {0} |
How far the wheel turned, for mouseScrolled, in steps as SDL and GLFW report them (a positive scrollY is away from the user, scrolling up)
| InputMode psychic_ui::MouseEvent::source {InputMode::Pointer} |
What made it: the mouse, a finger (the window's touch gestures) or a pen
| float psychic_ui::MouseEvent::windowX {0} |
Where, in window coordinates, whichever div receives it
| float psychic_ui::MouseEvent::x {0} |
Where, in the receiving div's content coordinates (those its children's x() and y() are in): from its top-left corner, plus how far it is scrolled