Back to index

nux  3.0.0
Classes | Namespaces | Defines | Typedefs | Enumerations | Functions | Variables
Events.h File Reference
#include "GLResource.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nux::EventToNameStruct
class  nux::Event
 Nux event class. More...

Namespaces

namespace  nux
 The Writer singleton is responsible for controlling where the logging message go.

Defines

#define NUX_BackSpace   NUX_VK_BACK
#define NUX_Tab   NUX_VK_TAB
#define NUX_Clear   NUX_VK_CLEAR
#define NUX_Enter   NUX_VK_ENTER
#define NUX_Shift_L   NUX_VK_SHIFT
#define NUX_Control_L   NUX_VK_CONTROL
#define NUX_Alt_L   NUX_VK_MENU
#define NUX_Pause   NUX_VK_PAUSE
#define NUX_Caps_Lock   NUX_VK_CAPITAL
#define NUX_Escape   NUX_VK_ESCAPE
#define NUX_SpaceBar   NUX_VK_SPACE
#define NUX_Page_Up   NUX_VK_PAGE_UP
#define NUX_Page_Down   NUX_VK_PAGE_DOWN
#define NUX_End   NUX_VK_END
#define NUX_Home   NUX_VK_HOME
#define NUX_Left   NUX_VK_LEFT
#define NUX_Up   NUX_VK_UP
#define NUX_Right   NUX_VK_RIGHT
#define NUX_Down   NUX_VK_DOWN
#define NUX_Print   NUX_VK_SNAPSHOT
#define NUX_Insert   NUX_VK_INSERT
#define NUX_Delete   NUX_VK_DELETE
#define NUX_LWin   NUX_VK_LWIN
#define NUX_RWin   NUX_VK_RWIN
#define NUX_APPS   NUX_VK_APPS
#define NUX_Multiply   NUX_VK_MULTIPLY
#define NUX_Add   NUX_VK_ADD
#define NUX_Subtract   NUX_VK_SUBTRACT
#define NUX_Decimal   NUX_VK_DECIMAL
#define NUX_Divide   NUX_VK_DIVIDE
#define NUX_Numlock   NUX_VK_NUMLOCK
#define NUX_Scroll   NUX_VK_SCROLL
#define NUX_EXT_Shift_R   (0xff00 | NUX_VK_SHIFT)
#define NUX_EXT_Control_R   (0xff00 | NUX_VK_CONTROL)
#define NUX_EXT_Alt_R   (0xff00 | NUX_VK_MENU)
#define NUX_KP_DOWN   0xFF99
#define NUX_KP_UP   0xFF97
#define NUX_KP_LEFT   0xFF96
#define NUX_KP_RIGHT   0xFF98
#define NUX_F1   NUX_VK_F1
#define NUX_F2   NUX_VK_F2
#define NUX_F3   NUX_VK_F3
#define NUX_F4   NUX_VK_F4
#define NUX_F5   NUX_VK_F5
#define NUX_F6   NUX_VK_F6
#define NUX_F7   NUX_VK_F7
#define NUX_F8   NUX_VK_F8
#define NUX_F9   NUX_VK_F9
#define NUX_F10   NUX_VK_F10
#define NUX_F11   NUX_VK_F11
#define NUX_F12   NUX_VK_F12
#define NUX_F13   NUX_VK_F13
#define NUX_F14   NUX_VK_F14
#define NUX_F15   NUX_VK_F15
#define NUX_F16   NUX_VK_F16
#define NUX_F17   NUX_VK_F17
#define NUX_F18   NUX_VK_F18
#define NUX_F19   NUX_VK_F19
#define NUX_F20   NUX_VK_F20
#define NUX_F21   NUX_VK_F21
#define NUX_F22   NUX_VK_F22
#define NUX_F23   NUX_VK_F23
#define NUX_F24   NUX_VK_F24
#define NUX_EVENT_BUTTON1_UP   0x00001000
#define NUX_EVENT_BUTTON2_UP   0x00002000
#define NUX_EVENT_BUTTON3_UP   0x00004000
#define NUX_EVENT_BUTTON4_UP   0x00008000
#define NUX_EVENT_BUTTON1_DOWN   0x00010000
#define NUX_EVENT_BUTTON2_DOWN   0x00020000
#define NUX_EVENT_BUTTON3_DOWN   0x00040000
#define NUX_EVENT_BUTTON4_DOWN   0x00080000
#define NUX_EVENT_BUTTON1   0x00010000
#define NUX_EVENT_BUTTON2   0x00020000
#define NUX_EVENT_BUTTON3   0x00040000
#define NUX_EVENT_BUTTON4   0x00080000
#define NUX_EVENT_MOUSEWHEEL   0x00100000
#define NUX_STATE_BUTTON1_DOWN   0x01000000
#define NUX_STATE_BUTTON2_DOWN   0x02000000
#define NUX_STATE_BUTTON3_DOWN   0x04000000
#define NUX_STATE_BUTTON4_DOWN   0x08000000
#define NUX_EVENT_BUTTON1_DBLCLICK   0x10000000
#define NUX_EVENT_BUTTON2_DBLCLICK   0x20000000
#define NUX_EVENT_BUTTON3_DBLCLICK   0x40000000
#define NUX_MOUSEWHEEL_DELTA   120
#define NUX_EVENT_TEXT_BUFFER_SIZE   16

Typedefs

typedef unsigned char nux::uchar
typedef unsigned long nux::ulong
typedef EventType nux::NuxEventType

Enumerations

enum  nux::MouseButton {
  nux::MOUSE_BUTTON_INVALID = 0, nux::MOUSE_BUTTON1 = 1, nux::MOUSE_BUTTON2 = 2, nux::MOUSE_BUTTON3 = 3,
  nux::MOUSE_BUTTON4 = 4, nux::MOUSE_BUTTON5 = 5, nux::MOUSE_BUTTON6 = 6, nux::MOUSE_BUTTON7 = 7,
  nux::NUX_INVALID_MOUSE_BUTTON = MOUSE_BUTTON_INVALID, nux::NUX_MOUSE_BUTTON1 = MOUSE_BUTTON1, nux::NUX_MOUSE_BUTTON2 = MOUSE_BUTTON2, nux::NUX_MOUSE_BUTTON3 = MOUSE_BUTTON3,
  nux::NUX_MOUSE_BUTTON4 = MOUSE_BUTTON4, nux::NUX_MOUSE_BUTTON5 = MOUSE_BUTTON5, nux::NUX_MOUSE_BUTTON6 = MOUSE_BUTTON6, nux::NUX_LEFT_MOUSE = NUX_MOUSE_BUTTON1,
  nux::NUX_MIDDLE_MOUSE = NUX_MOUSE_BUTTON2, nux::NUX_RIGHT_MOUSE = NUX_MOUSE_BUTTON3
}
enum  nux::KeyModifier {
  nux::KEY_MODIFIER_SHIFT = 0x00010000, nux::KEY_MODIFIER_CAPS_LOCK = 0x00020000, nux::KEY_MODIFIER_CTRL = 0x00040000, nux::KEY_MODIFIER_ALT = 0x00080000,
  nux::KEY_MODIFIER_NUMLOCK = 0x00100000, nux::KEY_MODIFIER_SUPER = 0x00200000, nux::KEY_MODIFIER_SCROLLLOCK = 0x00400000, nux::NUX_STATE_SHIFT = KEY_MODIFIER_SHIFT,
  nux::NUX_STATE_CAPS_LOCK = KEY_MODIFIER_CAPS_LOCK, nux::NUX_STATE_CTRL = KEY_MODIFIER_CTRL, nux::NUX_STATE_ALT = KEY_MODIFIER_ALT, nux::NUX_STATE_NUMLOCK = KEY_MODIFIER_NUMLOCK,
  nux::NUX_STATE_SUPER = KEY_MODIFIER_SUPER, nux::NUX_STATE_SCROLLLOCK = KEY_MODIFIER_SCROLLLOCK
}
enum  nux::EventType {
  nux::EVENT_NONE = 0, nux::EVENT_MOUSE_DOWN, nux::EVENT_MOUSE_UP, nux::EVENT_MOUSE_MOVE,
  nux::EVENT_MOUSE_DOUBLECLICK, nux::EVENT_MOUSE_WHEEL, nux::EVENT_KEY_DOWN, nux::EVENT_KEY_UP,
  nux::EVENT_WINDOW_SIZE_CONFIGURATION, nux::EVENT_WINDOW_MAP, nux::EVENT_WINDOW_UNMAP, nux::EVENT_NC_WINDOW_CONFIGURATION,
  nux::EVENT_WINDOW_ENTER_FOCUS, nux::EVENT_WINDOW_EXIT_FOCUS, nux::EVENT_WINDOW_DIRTY, nux::EVENT_WINDOW_MOUSELEAVE,
  nux::EVENT_DESTROY_WINDOW, nux::EVENT_TERMINATE_APP, nux::EVENT_TAKE_FOCUS, nux::EVENT_DND_MOVE,
  nux::EVENT_DND_DROP, nux::EVENT_DND_ENTER, nux::EVENT_DND_LEAVE, nux::EVENT_DND_ENTER_WINDOW,
  nux::EVENT_DND_LEAVE_WINDOW, nux::NUX_NO_EVENT = EVENT_NONE, nux::NUX_MOUSE_PRESSED = EVENT_MOUSE_DOWN, nux::NUX_MOUSE_RELEASED = EVENT_MOUSE_UP,
  nux::NUX_MOUSE_MOVE = EVENT_MOUSE_MOVE, nux::NUX_MOUSE_DOUBLECLICK = EVENT_MOUSE_DOUBLECLICK, nux::NUX_MOUSE_WHEEL = EVENT_MOUSE_WHEEL, nux::NUX_MOUSEWHEEL = EVENT_MOUSE_WHEEL,
  nux::NUX_KEYDOWN = EVENT_KEY_DOWN, nux::NUX_KEYUP = EVENT_KEY_UP, nux::NUX_SIZE_CONFIGURATION = EVENT_WINDOW_SIZE_CONFIGURATION, nux::NUX_WINDOW_MAP = EVENT_WINDOW_MAP,
  nux::NUX_WINDOW_UNMAP = EVENT_WINDOW_UNMAP, nux::NUX_NC_WINDOW_CONFIGURATION = EVENT_NC_WINDOW_CONFIGURATION, nux::NUX_WINDOW_ENTER_FOCUS = EVENT_WINDOW_ENTER_FOCUS, nux::NUX_WINDOW_EXIT_FOCUS = EVENT_WINDOW_EXIT_FOCUS,
  nux::NUX_WINDOW_DIRTY = EVENT_WINDOW_DIRTY, nux::NUX_WINDOW_MOUSELEAVE = EVENT_WINDOW_MOUSELEAVE, nux::NUX_DESTROY_WINDOW = EVENT_DESTROY_WINDOW, nux::NUX_TERMINATE_APP = EVENT_TERMINATE_APP,
  nux::NUX_TAKE_FOCUS = EVENT_TAKE_FOCUS, nux::NUX_DND_MOVE = EVENT_DND_MOVE, nux::NUX_DND_DROP = EVENT_DND_DROP, nux::NUX_DND_ENTER = EVENT_DND_ENTER,
  nux::NUX_DND_LEAVE = EVENT_DND_LEAVE, nux::NUX_DND_ENTER_WINDOW = EVENT_DND_ENTER_WINDOW, nux::NUX_DND_LEAVE_WINDOW = EVENT_DND_LEAVE_WINDOW
}

Functions

MouseButton nux::GetEventButton (unsigned long button_state)
 Returns index of the mouse button that triggered an event.
bool nux::GetButtonState (unsigned long button_state, MouseButton button)
 Returns the state of a mouse button: pressed or released.
bool nux::GetKeyModifierState (unsigned long key_modifiers_states, KeyModifier key_modifier)
 Returns the state of a special key: CTRL, Shift, Alt, NumLock...

Variables

const long nux::I_ExposureMask = (1L << 15)
const long nux::I_StructureNotifyMask = (1L << 17)
const long nux::I_SubstructureNotifyMask = (1L << 19)

Class Documentation

struct nux::EventToNameStruct

Definition at line 156 of file Events.h.

Class Members
int event
const char * EventName

Define Documentation

#define NUX_Add   NUX_VK_ADD

Definition at line 69 of file Events.h.

#define NUX_Alt_L   NUX_VK_MENU

Definition at line 49 of file Events.h.

#define NUX_APPS   NUX_VK_APPS

Definition at line 67 of file Events.h.

#define NUX_BackSpace   NUX_VK_BACK

Definition at line 43 of file Events.h.

Definition at line 51 of file Events.h.

#define NUX_Clear   NUX_VK_CLEAR

Definition at line 45 of file Events.h.

Definition at line 48 of file Events.h.

#define NUX_Decimal   NUX_VK_DECIMAL

Definition at line 71 of file Events.h.

#define NUX_Delete   NUX_VK_DELETE

Definition at line 64 of file Events.h.

#define NUX_Divide   NUX_VK_DIVIDE

Definition at line 72 of file Events.h.

#define NUX_Down   NUX_VK_DOWN

Definition at line 61 of file Events.h.

#define NUX_End   NUX_VK_END

Definition at line 56 of file Events.h.

#define NUX_Enter   NUX_VK_ENTER

Definition at line 46 of file Events.h.

#define NUX_Escape   NUX_VK_ESCAPE

Definition at line 52 of file Events.h.

#define NUX_EVENT_BUTTON1   0x00010000

Definition at line 130 of file Events.h.

#define NUX_EVENT_BUTTON1_DBLCLICK   0x10000000

Definition at line 147 of file Events.h.

#define NUX_EVENT_BUTTON1_DOWN   0x00010000

Definition at line 125 of file Events.h.

#define NUX_EVENT_BUTTON1_UP   0x00001000

Definition at line 120 of file Events.h.

#define NUX_EVENT_BUTTON2   0x00020000

Definition at line 131 of file Events.h.

#define NUX_EVENT_BUTTON2_DBLCLICK   0x20000000

Definition at line 148 of file Events.h.

#define NUX_EVENT_BUTTON2_DOWN   0x00020000

Definition at line 126 of file Events.h.

#define NUX_EVENT_BUTTON2_UP   0x00002000

Definition at line 121 of file Events.h.

#define NUX_EVENT_BUTTON3   0x00040000

Definition at line 132 of file Events.h.

#define NUX_EVENT_BUTTON3_DBLCLICK   0x40000000

Definition at line 149 of file Events.h.

#define NUX_EVENT_BUTTON3_DOWN   0x00040000

Definition at line 127 of file Events.h.

#define NUX_EVENT_BUTTON3_UP   0x00004000

Definition at line 122 of file Events.h.

#define NUX_EVENT_BUTTON4   0x00080000

Definition at line 133 of file Events.h.

#define NUX_EVENT_BUTTON4_DOWN   0x00080000

Definition at line 128 of file Events.h.

#define NUX_EVENT_BUTTON4_UP   0x00008000

Definition at line 123 of file Events.h.

#define NUX_EVENT_MOUSEWHEEL   0x00100000

Definition at line 135 of file Events.h.

#define NUX_EVENT_TEXT_BUFFER_SIZE   16

Definition at line 299 of file Events.h.

#define NUX_EXT_Alt_R   (0xff00 | NUX_VK_MENU)

Definition at line 78 of file Events.h.

#define NUX_EXT_Control_R   (0xff00 | NUX_VK_CONTROL)

Definition at line 77 of file Events.h.

#define NUX_EXT_Shift_R   (0xff00 | NUX_VK_SHIFT)

Definition at line 76 of file Events.h.

#define NUX_F1   NUX_VK_F1

Definition at line 92 of file Events.h.

#define NUX_F10   NUX_VK_F10

Definition at line 101 of file Events.h.

#define NUX_F11   NUX_VK_F11

Definition at line 102 of file Events.h.

#define NUX_F12   NUX_VK_F12

Definition at line 103 of file Events.h.

#define NUX_F13   NUX_VK_F13

Definition at line 104 of file Events.h.

#define NUX_F14   NUX_VK_F14

Definition at line 105 of file Events.h.

#define NUX_F15   NUX_VK_F15

Definition at line 106 of file Events.h.

#define NUX_F16   NUX_VK_F16

Definition at line 107 of file Events.h.

#define NUX_F17   NUX_VK_F17

Definition at line 108 of file Events.h.

#define NUX_F18   NUX_VK_F18

Definition at line 109 of file Events.h.

#define NUX_F19   NUX_VK_F19

Definition at line 110 of file Events.h.

#define NUX_F2   NUX_VK_F2

Definition at line 93 of file Events.h.

#define NUX_F20   NUX_VK_F20

Definition at line 111 of file Events.h.

#define NUX_F21   NUX_VK_F21

Definition at line 112 of file Events.h.

#define NUX_F22   NUX_VK_F22

Definition at line 113 of file Events.h.

#define NUX_F23   NUX_VK_F23

Definition at line 114 of file Events.h.

#define NUX_F24   NUX_VK_F24

Definition at line 115 of file Events.h.

#define NUX_F3   NUX_VK_F3

Definition at line 94 of file Events.h.

#define NUX_F4   NUX_VK_F4

Definition at line 95 of file Events.h.

#define NUX_F5   NUX_VK_F5

Definition at line 96 of file Events.h.

#define NUX_F6   NUX_VK_F6

Definition at line 97 of file Events.h.

#define NUX_F7   NUX_VK_F7

Definition at line 98 of file Events.h.

#define NUX_F8   NUX_VK_F8

Definition at line 99 of file Events.h.

#define NUX_F9   NUX_VK_F9

Definition at line 100 of file Events.h.

#define NUX_Home   NUX_VK_HOME

Definition at line 57 of file Events.h.

#define NUX_Insert   NUX_VK_INSERT

Definition at line 63 of file Events.h.

#define NUX_KP_DOWN   0xFF99

Definition at line 80 of file Events.h.

#define NUX_KP_LEFT   0xFF96

Definition at line 82 of file Events.h.

#define NUX_KP_RIGHT   0xFF98

Definition at line 83 of file Events.h.

#define NUX_KP_UP   0xFF97

Definition at line 81 of file Events.h.

#define NUX_Left   NUX_VK_LEFT

Definition at line 58 of file Events.h.

#define NUX_LWin   NUX_VK_LWIN

Definition at line 65 of file Events.h.

#define NUX_MOUSEWHEEL_DELTA   120

Definition at line 151 of file Events.h.

#define NUX_Multiply   NUX_VK_MULTIPLY

Definition at line 68 of file Events.h.

Definition at line 73 of file Events.h.

Definition at line 55 of file Events.h.

Definition at line 54 of file Events.h.

#define NUX_Pause   NUX_VK_PAUSE

Definition at line 50 of file Events.h.

#define NUX_Print   NUX_VK_SNAPSHOT

Definition at line 62 of file Events.h.

#define NUX_Right   NUX_VK_RIGHT

Definition at line 60 of file Events.h.

#define NUX_RWin   NUX_VK_RWIN

Definition at line 66 of file Events.h.

#define NUX_Scroll   NUX_VK_SCROLL

Definition at line 74 of file Events.h.

#define NUX_Shift_L   NUX_VK_SHIFT

Definition at line 47 of file Events.h.

#define NUX_SpaceBar   NUX_VK_SPACE

Definition at line 53 of file Events.h.

#define NUX_STATE_BUTTON1_DOWN   0x01000000

Definition at line 139 of file Events.h.

#define NUX_STATE_BUTTON2_DOWN   0x02000000

Definition at line 140 of file Events.h.

#define NUX_STATE_BUTTON3_DOWN   0x04000000

Definition at line 141 of file Events.h.

#define NUX_STATE_BUTTON4_DOWN   0x08000000

Definition at line 142 of file Events.h.

#define NUX_Subtract   NUX_VK_SUBTRACT

Definition at line 70 of file Events.h.

#define NUX_Tab   NUX_VK_TAB

Definition at line 44 of file Events.h.

#define NUX_Up   NUX_VK_UP

Definition at line 59 of file Events.h.