ADTF_DISPLAY_TOOLBOX  3.8.0 (ADTF 3.14.3)
IUIEventHandlerabstract

User interface event handler for all displays within the adtf. More...

Public Types

enum  tControlEventCode {
  EC_MouseLDown = 1 , EC_MouseLUp = 2 , EC_MouseLDblClk = 3 , EC_MouseRDown = 4 ,
  EC_MouseRUp = 5 , EC_MouseRDblClk = 6 , EC_MouseMDown = 7 , EC_MouseMUp = 8 ,
  EC_MouseMDblClk = 9 , EC_MouseMove = 10 , EC_MouseWheel = 11 , EC_KeyDown = 12 ,
  EC_KeyUp = 13 , EC_KeyInput = 14
}
 The Control Event Code Enumeration for the IUIEventHandler::OnControlEvent method. More...
 
enum  tMouseState { MS_LeftButtonDown = 0x1 , MS_RightButtonDown = 0x2 , MS_MiddleButtonDown = 0x4 , MS_CtrlKeyDown = 0x8 }
 The MouseStates for the tControlEventCode with Mouse.
 
enum  tKeyState { KS_CtrlKeyDown = 0x1 , KS_AltKeyDown = 0x2 , KS_ShiftKeyDown = 0x4 }
 The KeyStates for the tControlEventCode with Key.
 
enum  tKey {
  KEY_ESCAPE = 0x01000000 , KEY_TAB = 0x01000001 , KEY_BACKSPACE = 0x01000003 , KEY_RETURN = 0x01000004 ,
  KEY_INSERT = 0x01000006 , KEY_DELETE = 0x01000007 , KEY_PRINT = 0x01000009 , KEY_HOME = 0x01000010 ,
  KEY_END = 0x01000011 , KEY_LEFT = 0x01000012 , KEY_UP = 0x01000013 , KEY_RIGHT = 0x01000014 ,
  KEY_DOWN = 0x01000015 , KEY_PAGEUP = 0x01000016 , KEY_PAGEDOWN = 0x01000017 , KEY_SPACE = 0x20 ,
  KEY_NUMLOCK = 0x01000025 , KEY_F1 = 0x01000030 , KEY_F2 = 0x01000031 , KEY_F3 = 0x01000032 ,
  KEY_F4 = 0x01000033 , KEY_F5 = 0x01000034 , KEY_F6 = 0x01000035 , KEY_F7 = 0x01000036 ,
  KEY_F8 = 0x01000037 , KEY_F9 = 0x01000038 , KEY_F10 = 0x01000039 , KEY_F11 = 0x0100003a ,
  KEY_F12 = 0x0100003b , KEY_PLUS = 0x2b , KEY_COMMA = 0x2c , KEY_MINUS = 0x2d ,
  KEY_PERIOD = 0x2e , KEY_0 = 0x30 , KEY_1 = 0x31 , KEY_2 = 0x32 ,
  KEY_3 = 0x33 , KEY_4 = 0x34 , KEY_5 = 0x35 , KEY_6 = 0x36 ,
  KEY_7 = 0x37 , KEY_8 = 0x38 , KEY_9 = 0x39 , KEY_A = 0x41 ,
  KEY_B = 0x42 , KEY_C = 0x43 , KEY_D = 0x44 , KEY_E = 0x45 ,
  KEY_F = 0x46 , KEY_G = 0x47 , KEY_H = 0x48 , KEY_I = 0x49 ,
  KEY_J = 0x4a , KEY_K = 0x4b , KEY_L = 0x4c , KEY_M = 0x4d ,
  KEY_N = 0x4e , KEY_O = 0x4f , KEY_P = 0x50 , KEY_Q = 0x51 ,
  KEY_R = 0x52 , KEY_S = 0x53 , KEY_T = 0x54 , KEY_U = 0x55 ,
  KEY_V = 0x56 , KEY_W = 0x57 , KEY_X = 0x58 , KEY_Y = 0x59 ,
  KEY_Z = 0x5a , KEY_SHIFT = 0x01000020 , KEY_CTRL = 0x01000021 , KEY_ALT = 0x01000023
}
 These are the standard adtf_graphics keys. More...
 

Public Member Functions

virtual tResult OnCreate (tHandle hCanvas, tInt nLeft, tInt nTop, tInt nRight, tInt nBottom)=0
 On Create display Event Call. More...
 
virtual tResult OnPaint (tHandle hCanvas, tInt nLeft, tInt nTop, tInt nRight, tInt nBottom)=0
 On Redraw display event. More...
 
virtual tResult OnSize (tHandle hCanvas, tInt nLeft, tInt nTop, tInt nRight, tInt nBottom)=0
 On Resize display Event. More...
 
virtual tResult OnIconify (tHandle hCanvas, tBool bIconified)=0
 On Change window iconic state Event. More...
 
virtual tResult OnTimer (tHandle hCanvas)=0
 On Gui timer callback. More...
 
virtual tResult OnIdle (tHandle hCanvas)=0
 Gui idle callback. More...
 
virtual tResult OnDestroy ()=0
 Destroy display. More...
 
virtual tResult OnControlEvent (tControlEventCode eCode, tInt nParam1=0, tInt nParam2=0, tInt nFlags=0, tVoid *pEventData=nullptr)=0
 Control Event by Key or Mouse Events. More...
 

Detailed Description

User interface event handler for all displays within the adtf.

Use this interface to implement a GUI event handler.

Definition at line 1220 of file gfxlibinterfaces.h.

Member Enumeration Documentation

◆ tControlEventCode

The Control Event Code Enumeration for the IUIEventHandler::OnControlEvent method.

Enumerator
EC_MouseLDown 

left button down event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseLUp 

left button up event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseLDblClk 

left button double click event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseRDown 

right button down event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseRUp 

right button up event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseRDblClk 

right button double click event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseMDown 

middle button down event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseMUp 

middle button up event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseMDblClk 

middle button double click event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseMove 

mouse move event
nParam1 = x position of mouse event
nParam2 = y position of mouse event
nFlags = see tMouseState

EC_MouseWheel 

mouse wheel event
nParam1 = number of steps the wheel is rotated
nParam2 = 0
nFlags = see tMouseState

EC_KeyDown 

key down event
nParam1 = see tKey
nParam2 = see tKeyState

EC_KeyUp 

key up event
nParam1 = see tKey
nParam2 = see tKeyState

EC_KeyInput 

key input event
nParam1 = see tKey
nParam2 = see tKeyState

Definition at line 1226 of file gfxlibinterfaces.h.

◆ tKey

enum tKey

These are the standard adtf_graphics keys.

If you use a different X-WindowManager then a Qt-Application you always need to map to these Keys when supporting the IUIEventHandler !!!!

Enumerator
KEY_ESCAPE 

the escape key.

KEY_TAB 

the tab key.

KEY_BACKSPACE 

the backspace key.

KEY_RETURN 

the return key.

KEY_INSERT 

the insert key.

KEY_DELETE 

the delete key.

KEY_PRINT 

the print key.

KEY_HOME 

the home key.

KEY_END 

the end key.

KEY_LEFT 

the left key.

KEY_UP 

the up key.

KEY_RIGHT 

the right key.

KEY_DOWN 

the down key.

KEY_PAGEUP 

the page-up key.

KEY_PAGEDOWN 

the page-down key.

KEY_SPACE 

the space key.

KEY_NUMLOCK 

the numlock key.

KEY_F1 

the f1 key.

KEY_F2 

the f2 key.

KEY_F3 

the f3 key.

KEY_F4 

the f4 key.

KEY_F5 

the f5 key.

KEY_F6 

the f6 key.

KEY_F7 

the f7 key.

KEY_F8 

the f8 key.

KEY_F9 

the f9 key.

KEY_F10 

the f10 key.

KEY_F11 

the f11 key.

KEY_F12 

the f12 key.

KEY_PLUS 

the + key.

KEY_COMMA 

the , key.

KEY_MINUS 

the - key.

Definition at line 1357 of file gfxlibinterfaces.h.

Member Function Documentation

◆ OnControlEvent()

virtual tResult OnControlEvent ( tControlEventCode  eCode,
tInt  nParam1 = 0,
tInt  nParam2 = 0,
tInt  nFlags = 0,
tVoid *  pEventData = nullptr 
)
pure virtual

Control Event by Key or Mouse Events.

Parameters
[in]eCodeThe Event Code tControlEventCode.
[in]nParam1The Parameter 1 which depends on the eCode.
[in]nParam2The Parameter 2 which depends on the eCode.
[in]nFlagsThe Flags which depends on the eCode.
[in]pEventDataAdditional event data which depends on the eCode.
Returns
Returns a standard result code

◆ OnCreate()

virtual tResult OnCreate ( tHandle  hCanvas,
tInt  nLeft,
tInt  nTop,
tInt  nRight,
tInt  nBottom 
)
pure virtual

On Create display Event Call.

The framework calls this member function when the display filter is initialized and ready to create the graphics device context.

Parameters
hCanvas[in] Handle to graphics device context. The handle is implementation specific and may not be used for general purpose tasks.
nLeft[in] Specifies the x-coordinate of the upper left corner of the display.
nTop[in] Specifies the y-coordinate of the upper left corner of the display.
nRight[in] Specifies the x-coordinate of the lower right corner of the display.
nBottom[in] Specifies the y-coordinate of the lower right corner of the display.
Returns
Returns a standard result code.

◆ OnDestroy()

virtual tResult OnDestroy ( )
pure virtual

Destroy display.

The framework calls this member function when the display is up to be destroyed.

Returns
Returns a standard result code.

◆ OnIconify()

virtual tResult OnIconify ( tHandle  hCanvas,
tBool  bIconified 
)
pure virtual

On Change window iconic state Event.

The framework calls this member function when the display window was minimized or restored after being minimized.

Parameters
hCanvas[in] Handle to graphics device context. The handle is implementation specific and may not be used for general purpose tasks.
bIconified[in] Specifies if the window is iconified or not.
Returns
Returns a standard result code.

◆ OnIdle()

virtual tResult OnIdle ( tHandle  hCanvas)
pure virtual

Gui idle callback.

The framework calls this member function periodically. You can use this idle thread to trigger user interface related functionality within the gui thread context.

Parameters
hCanvas[in] Handle to graphics device context. The handle is implementation specific and may not be used for general purpose tasks.
Returns
Standard result code, only ERR_IDLE_NOWAIT has a meaning
Return values
ERR_IDLE_NOWAITmeans the idle process will called immediately after returning the OnIdle callback and the will called again without waiting for idle time!
Warning
be very careful with returning code ERR_IDLE_NOWAIT

◆ OnPaint()

virtual tResult OnPaint ( tHandle  hCanvas,
tInt  nLeft,
tInt  nTop,
tInt  nRight,
tInt  nBottom 
)
pure virtual

On Redraw display event.

The framework calls this member function when the display filter needs to redraw the window contents.

Parameters
hCanvas[in] Handle to graphics device context. The handle is implementation specific and may not be used for general purpose tasks.
nLeft[in] Specifies the x-coordinate of the upper left corner of the display.
nTop[in] Specifies the y-coordinate of the upper left corner of the display.
nRight[in] Specifies the x-coordinate of the lower right corner of the display.
nBottom[in] Specifies the y-coordinate of the lower right corner of the display.
Returns
Returns a standard result code.

◆ OnSize()

virtual tResult OnSize ( tHandle  hCanvas,
tInt  nLeft,
tInt  nTop,
tInt  nRight,
tInt  nBottom 
)
pure virtual

On Resize display Event.

The framework calls this member function when the display window was resized by the user.

Parameters
hCanvas[in] Handle to graphics device context. The handle is implementation specific and may not be used for general purpose tasks.
nLeft[in] Specifies the x-coordinate of the upper left corner of the display.
nTop[in] Specifies the y-coordinate of the upper left corner of the display.
nRight[in] Specifies the x-coordinate of the lower right corner of the display.
nBottom[in] Specifies the y-coordinate of the lower right corner of the display.
Returns
Returns a standard result code.

◆ OnTimer()

virtual tResult OnTimer ( tHandle  hCanvas)
pure virtual

On Gui timer callback.

The framework calls this member function periodically. You can use this timer to trigger user interface related functionality within the gui thread context.

Parameters
hCanvas[in] Handle to graphics device context. The handle is implementation specific and may not be used for general purpose tasks.
Returns
Returns a standard result code.