nux-0.9.46
|
#include <Nux/InputArea.h>
Public Member Functions | |
NUX_DECLARE_OBJECT_TYPE (InputArea, Area) | |
InputArea (NUX_FILE_LINE_PROTO) | |
virtual | ~InputArea () |
bool | ForceStartFocus (int x, int y) |
Simulate a mouse down state on an area. | |
void | ForceStopFocus (int x, int y) |
virtual long | OnEvent (Event &ievent, long TraverseInfo, long ProcessEventInfo) |
virtual void | OnDraw (GraphicsEngine &GfxContext, bool force_draw) |
Draw InputArea. | |
virtual void | OverlayDrawing (GraphicsEngine &GfxContext) |
bool | HasKeyboardFocus () |
void | SetKeyboardFocus (bool b) |
int | GetMouseX () |
int | GetMouseY () |
bool | IsMouseInside () |
bool | HasMouseFocus () |
bool | MouseFocusOnOtherArea () |
void | CaptureMouseDownAnyWhereElse (bool b) |
bool | IsCaptureMouseDownAnyWhereElse () const |
void | EnableEventDebugTrace (bool enable) |
bool | GetEventDebugTrace () const |
void | EnableKeyboardFocusOnMouseDown (bool enable) |
Enable keyboard focus on mouse down. | |
bool | GetKeyboardFocusOnMouseDown () const |
Return the status of keyboard focus on mouse down. | |
virtual void | SetBaseString (const TCHAR *Caption) |
void | EnableDoubleClick (bool b) |
Enable the double click signal on this InputArea. | |
bool | IsDoubleClickEnabled () |
Return True if the double click signal is enable for this InputArea. | |
void | EnableUserKeyboardProcessing (bool b) |
bool | IsUserKeyboardProcessingEnabled () |
virtual bool | IsArea () const |
unsigned short | getKeyState (int nVirtKey) |
void | SetAreaMousePosition (int x, int y) |
void | GrabPointer () |
void | GrabKeyboard () |
void | UnGrabPointer () |
void | UnGrabKeyboard () |
bool | OwnsPointerGrab () |
bool | OwnsKeyboardGrab () |
void | DoSetFocused (bool focus) |
Data Fields | |
sigc::signal< void, int, int, int, int, unsigned long, unsigned long > | OnMouseMove |
Signal emitted when the Mouse moves over the InputArea surface. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | OnMouseDown |
Signal emitted when the InputArea receives a mouse down event. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | OnMouseUp |
Signal emitted when the InputArea receives a mouse up event. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | OnMouseEnter |
Signal emitted when the InputArea receives a mouse enter event. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | OnMouseLeave |
Signal emitted when the InputArea receives a mouse leave event. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | OnMouseClick |
Signal emitted when the InputArea receives a mouse down followed later by a mouse release over its surface. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | OnMouseDoubleClick |
Signal emitted when the InputArea receives a double click event. | |
sigc::signal< void, int, int, int, int, unsigned long, unsigned long > | OnMouseDrag |
Signal emitted when the InputArea receives a mouse down event, followed later by a mouse move event (while the mouse is still pressed). | |
sigc::signal< void, int, int, int, unsigned long, unsigned long > | OnMouseWheel |
Signal emitted when the InputArea receives a mouse wheel event. | |
sigc::signal< void, unsigned int, unsigned long, unsigned long > | OnKeyPressed |
Signal emitted when the InputArea receives a key pressed event. | |
sigc::signal< void, unsigned int, unsigned long, unsigned long > | OnKeyReleased |
Signal emitted when the InputArea receives a key release event. | |
sigc::signal< void > | OnStartMouseFocus |
Signal emitted when the area gets the mouse focus. This is the result of a mouse down event. | |
sigc::signal< void > | OnEndMouseFocus |
Signal emitted when the mouse is released. | |
sigc::signal< void > | OnStartFocus |
Signal emitted when the area gets the keyboard focus. The is a result of a mouse down event or a call to ForceStartFocus. | |
sigc::signal< void > | OnEndFocus |
Signal emitted when the area looses the keyboard focus. | |
sigc::signal< void, GraphicsEngine &, unsigned long, unsigned long, unsigned long, const TCHAR *, unsigned short > | OnKeyEvent |
Signal emitted when the area receives an WM_TAKE_FOCUS ClientMessage. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | OnMouseDownOutsideArea |
Signal emitted when a mouse down event occurs outside of this area. | |
Protected Attributes | |
AreaEventProcessor | _event_processor |
bool | _has_keyboard_focus |
bool | _capture_mouse_down_any_where_else |
bool | _double_click |
If True, this InputArea can emit the signal OnMouseDoubleClick. Default is false. | |
bool | _print_event_debug_trace |
bool | _enable_keyboard_focus_on_mouse_down |
Get the keyboard focus when a mouse down occurs. |
nux::InputArea::InputArea | ( | NUX_FILE_LINE_PROTO | ) |
virtual nux::InputArea::~InputArea | ( | ) | [virtual] |
void nux::InputArea::CaptureMouseDownAnyWhereElse | ( | bool | b | ) |
Referenced by nux::MenuPage::SetActive().
void nux::InputArea::DoSetFocused | ( | bool | focus | ) | [virtual] |
Reimplemented from nux::Area.
Reimplemented in nux::ComboBoxSimple, nux::TextEntry, and nux::View.
void nux::InputArea::EnableDoubleClick | ( | bool | b | ) |
Enable the double click signal on this InputArea.
void nux::InputArea::EnableEventDebugTrace | ( | bool | enable | ) |
In debug mode, print the processing steps of events for this widget. On linux, this works only if nux has been compiled with --enable-debug
enable | If True, print the event processing deug info to the console. |
void nux::InputArea::EnableKeyboardFocusOnMouseDown | ( | bool | enable | ) |
Enable keyboard focus on mouse down.
Widgets such as TextEntry enable the keyboard focus on mouse down.
enable | If true, the area gets the keyboard focus when a mouse down occurs. |
void nux::InputArea::EnableUserKeyboardProcessing | ( | bool | b | ) |
bool nux::InputArea::ForceStartFocus | ( | int | x, |
int | y | ||
) |
Simulate a mouse down state on an area.
Simulate a mouse down event on an area at the provided relative coordinates. If the provided coordinates do not fall inside the geometry of the area, return false.
x | Coordinates of the mouse down event relative to the top left corner of the area. |
y | Coordinates of the mouse down event relative to the top left corner of the area. |
void nux::InputArea::ForceStopFocus | ( | int | x, |
int | y | ||
) |
bool nux::InputArea::GetEventDebugTrace | ( | ) | const |
Return True if event processing debuigh information as been activated for this widget.
bool nux::InputArea::GetKeyboardFocusOnMouseDown | ( | ) | const |
Return the status of keyboard focus on mouse down.
unsigned short nux::InputArea::getKeyState | ( | int | nVirtKey | ) |
int nux::InputArea::GetMouseX | ( | ) |
int nux::InputArea::GetMouseY | ( | ) |
void nux::InputArea::GrabKeyboard | ( | ) |
void nux::InputArea::GrabPointer | ( | ) |
bool nux::InputArea::HasKeyboardFocus | ( | ) |
bool nux::InputArea::HasMouseFocus | ( | ) |
virtual bool nux::InputArea::IsArea | ( | ) | const [inline, virtual] |
bool nux::InputArea::IsCaptureMouseDownAnyWhereElse | ( | ) | const |
bool nux::InputArea::IsDoubleClickEnabled | ( | ) |
Return True if the double click signal is enable for this InputArea.
bool nux::InputArea::IsMouseInside | ( | ) |
bool nux::InputArea::IsUserKeyboardProcessingEnabled | ( | ) |
bool nux::InputArea::MouseFocusOnOtherArea | ( | ) |
virtual void nux::InputArea::OnDraw | ( | GraphicsEngine & | GfxContext, |
bool | force_draw | ||
) | [virtual] |
Draw InputArea.
Draw a colored quad using m_AreaColor. Override this function to define a custom drawing function. If force_draw is true then the system requests that all objects redraw themselves completely.
force_draw. |
virtual long nux::InputArea::OnEvent | ( | Event & | ievent, |
long | TraverseInfo, | ||
long | ProcessEventInfo | ||
) | [virtual] |
virtual void nux::InputArea::OverlayDrawing | ( | GraphicsEngine & | GfxContext | ) | [inline, virtual] |
Reimplemented in nux::HSplitter, nux::TableCtrl, nux::View, and nux::VSplitter.
bool nux::InputArea::OwnsKeyboardGrab | ( | ) |
bool nux::InputArea::OwnsPointerGrab | ( | ) |
void nux::InputArea::SetAreaMousePosition | ( | int | x, |
int | y | ||
) |
virtual void nux::InputArea::SetBaseString | ( | const TCHAR * | Caption | ) | [virtual] |
Reimplemented from nux::Area.
void nux::InputArea::SetKeyboardFocus | ( | bool | b | ) |
void nux::InputArea::UnGrabKeyboard | ( | ) |
void nux::InputArea::UnGrabPointer | ( | ) |
bool nux::InputArea::_capture_mouse_down_any_where_else [protected] |
bool nux::InputArea::_double_click [protected] |
If True, this InputArea can emit the signal OnMouseDoubleClick. Default is false.
bool nux::InputArea::_enable_keyboard_focus_on_mouse_down [protected] |
Get the keyboard focus when a mouse down occurs.
AreaEventProcessor nux::InputArea::_event_processor [protected] |
bool nux::InputArea::_has_keyboard_focus [protected] |
bool nux::InputArea::_print_event_debug_trace [protected] |
sigc::signal<void> nux::InputArea::OnEndFocus |
Signal emitted when the area looses the keyboard focus.
sigc::signal<void> nux::InputArea::OnEndMouseFocus |
Signal emitted when the mouse is released.
The area that had the mouse focus receives this signal. Note that the area may still have the keyboard focus after OnEndMouseFocus is emitted.
sigc::signal< void, GraphicsEngine & , unsigned long , unsigned long , unsigned long , const TCHAR* , unsigned short > nux::InputArea::OnKeyEvent |
Signal emitted when the area receives an WM_TAKE_FOCUS ClientMessage.
sigc::signal<void, unsigned int, unsigned long, unsigned long> nux::InputArea::OnKeyPressed |
Signal emitted when the InputArea receives a key pressed event.
sigc::signal<void, unsigned int, unsigned long, unsigned long> nux::InputArea::OnKeyReleased |
Signal emitted when the InputArea receives a key release event.
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseClick |
Signal emitted when the InputArea receives a mouse down followed later by a mouse release over its surface.
void | Return type of the callback hooked to this signal. |
int | Mouse X position (1st parameter of the callback). |
int | Mouse Y position (2nd parameter of the callback). |
unsigned | long Mouse button states (3rd parameter of the callback). |
unsigned | long Keyboard special keys states (4th parameter of the callback). |
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseDoubleClick |
Signal emitted when the InputArea receives a double click event.
void | Return type of the callback hooked to this signal. |
int | Mouse X position (1st parameter of the callback). |
int | Mouse Y position (2nd parameter of the callback). |
unsigned | long Mouse button states (3rd parameter of the callback). |
unsigned | long Keyboard special keys states (4th parameter of the callback). |
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseDown |
Signal emitted when the InputArea receives a mouse down event.
void | Return type of the callback hooked to this signal. |
int | Mouse X position (1st parameter of the callback). |
int | Mouse Y position (2nd parameter of the callback). |
unsigned | long Mouse button states (3rd parameter of the callback). |
unsigned | long Keyboard special keys states (4th parameter of the callback). |
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseDownOutsideArea |
Signal emitted when a mouse down event occurs outside of this area.
If this area is inside the main layout, then the position is relative to the top left corner of the window. If this area is a BaseWindow, then the position is relative to the top left corner of the window. If this area is inside a BaseWindow, then the position is relative to the top left corner of the BaseWIndow.
int | Position of the mouse down event. |
int | Position of the mouse down event. |
ulong | Mouse button states. |
ulong | Keyboard modifiers states. |
sigc::signal<void, int, int, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseDrag |
Signal emitted when the InputArea receives a mouse down event, followed later by a mouse move event (while the mouse is still pressed).
void | Return type of the callback hooked to this signal. |
int | Mouse X position (1st parameter of the callback). |
int | Mouse Y position (2nd parameter of the callback). |
int | Mouse X delta (3thr parameter of the callback). |
int | Mouse Y delta (4th parameter of the callback). |
unsigned | long Mouse button states (5th parameter of the callback). |
unsigned | long Keyboard special keys states (6th parameter of the callback). |
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseEnter |
Signal emitted when the InputArea receives a mouse enter event.
void | Return type of the callback hooked to this signal. |
int | Mouse X position (1st parameter of the callback). |
int | Mouse Y position (2nd parameter of the callback). |
unsigned | long Mouse button states (3rd parameter of the callback). |
unsigned | long Keyboard special keys states (4th parameter of the callback). |
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseLeave |
Signal emitted when the InputArea receives a mouse leave event.
void | Return type of the callback hooked to this signal. |
int | Mouse X position (1st parameter of the callback). |
int | Mouse Y position (2nd parameter of the callback). |
unsigned | long Mouse button states (3rd parameter of the callback). |
unsigned | long Keyboard special keys states (4th parameter of the callback). |
sigc::signal<void, int, int, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseMove |
Signal emitted when the Mouse moves over the InputArea surface.
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseUp |
Signal emitted when the InputArea receives a mouse up event.
void | Return type of the callback hooked to this signal. |
int | Mouse X position (1st parameter of the callback). |
int | Mouse Y position (2nd parameter of the callback). |
unsigned | long Mouse button states (3rd parameter of the callback). |
unsigned | long Keyboard special keys states (4th parameter of the callback). |
sigc::signal< void, int, int, int, unsigned long, unsigned long > nux::InputArea::OnMouseWheel |
Signal emitted when the InputArea receives a mouse wheel event.
sigc::signal<void> nux::InputArea::OnStartFocus |
Signal emitted when the area gets the keyboard focus. The is a result of a mouse down event or a call to ForceStartFocus.
sigc::signal<void> nux::InputArea::OnStartMouseFocus |
Signal emitted when the area gets the mouse focus. This is the result of a mouse down event.