nux-1.14.0
|
Public Member Functions | |
NUX_DECLARE_OBJECT_TYPE (InputArea, Area) | |
InputArea (NUX_FILE_LINE_PROTO) | |
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 | HasMouseFocus () |
bool | MouseFocusOnOtherArea () |
void | CaptureMouseDownAnyWhereElse (bool b) |
bool | IsCaptureMouseDownAnyWhereElse () const |
Area * | FindAreaUnderMouse (const Point &mouse_position, NuxEventType event_type) |
Area * | FindKeyFocusArea (unsigned int key_symbol, unsigned long x11_key_code, unsigned long special_keys_state) |
virtual void | SetBaseString (const TCHAR *Caption) |
void | SetKeyboardReceiverIgnoreMouseDownOutside (bool ignore_mouse_down_outside) |
bool | KeyboardReceiverIgnoreMouseDownOutside () |
virtual bool | IsArea () const |
void | SetAreaMousePosition (int x, int y) |
void | GrabPointer () |
void | GrabKeyboard () |
void | UnGrabPointer () |
void | UnGrabKeyboard () |
bool | OwnsPointerGrab () |
bool | OwnsKeyboardGrab () |
bool | IsMouseOwner () |
Return true if this Area is the owner of the mouse pointer. | |
bool | IsMouseInside () |
Returns true if the mouse pointer is inside the Area. | |
void | EnableDoubleClick (bool double_click) |
Enable the double click event signal on this InputArea. | |
bool | DoubleClickEnabled () const |
Returns true if the double click signal is enable for this InputArea. | |
void | DoSetFocused (bool focus) |
Public Attributes | |
AreaEventProcessor | _event_processor |
sigc::signal< void, int, int, int, int, unsigned long, unsigned long > | mouse_move |
Signal emitted when the Mouse moves over the InputArea surface. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | mouse_down |
Signal emitted when the InputArea receives a mouse down event. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | mouse_up |
Signal emitted when the InputArea receives a mouse up event. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | mouse_enter |
Signal emitted when the InputArea receives a mouse enter event. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | mouse_leave |
Signal emitted when the InputArea receives a mouse leave event. | |
sigc::signal< void, int, int, unsigned long, unsigned long > | mouse_click |
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 > | mouse_double_click |
Signal emitted when the InputArea receives a double click event. | |
sigc::signal< void, int, int, int, int, unsigned long, unsigned long > | mouse_drag |
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 > | mouse_wheel |
Signal emitted when the InputArea receives a mouse wheel event. | |
sigc::signal< void, unsigned int, unsigned long, unsigned long > | key_up |
Signal emitted when the InputArea receives a key release event. | |
sigc::signal< void > | begin_key_focus |
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 > | end_key_focus |
Signal emitted when the area looses the keyboard focus. | |
sigc::signal< void, unsigned long, unsigned long, unsigned long, const TCHAR *, unsigned short > | key_down |
sigc::signal< void, int, int, unsigned long, unsigned long > | mouse_down_outside_pointer_grab_area |
Signal emitted when a mouse down event occurs outside of this area. | |
sigc::signal< void, InputArea * > | start_keyboard_grab |
sigc::signal< void, InputArea * > | end_keyboard_grab |
Protected Member Functions | |
virtual bool | AcceptKeyNavFocus () |
virtual void | EmitMouseDownSignal (int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state) |
virtual void | EmitMouseUpSignal (int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state) |
virtual void | EmitMouseMoveSignal (int x, int y, int dx, int dy, unsigned long mouse_button_state, unsigned long special_keys_state) |
virtual void | EmitMouseWheelSignal (int x, int y, int wheel_delta, unsigned long mouse_button_state, unsigned long special_keys_state) |
virtual void | EmitKeyDownSignal (unsigned int key_symbol, unsigned long x11_key_code, unsigned long special_keys_state) |
virtual void | EmitKeyUpSignal (unsigned int key_symbol, unsigned long x11_key_code, unsigned long special_keys_state) |
virtual void | EmitKeyEventSignal (unsigned long event_type, unsigned int key_symbol, unsigned long special_keys_state, const char *text, int key_repeat_count) |
virtual void | EmitMouseDragSignal (int x, int y, int dx, int dy, unsigned long mouse_button_state, unsigned long special_keys_state) |
virtual void | EmitMouseEnterSignal (int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state) |
virtual void | EmitMouseLeaveSignal (int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state) |
virtual void | EmitMouseClickSignal (int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state) |
virtual void | EmitMouseDoubleClickSignal (int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state) |
virtual void | EmitStartKeyboardFocus () |
virtual void | EmitEndKeyboardFocus () |
virtual void | EmitMouseDownOutsideArea (int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state) |
Protected Attributes | |
bool | _has_keyboard_focus |
bool | _capture_mouse_down_any_where_else |
bool | _double_click |
If True, this InputArea can emit the signal mouse_double_click. Default is false. | |
bool | _keyboard_receiver_ignore_mouse_down_outside |
Friends | |
class | WindowCompositor |
Definition at line 43 of file InputArea.h.
Area * nux::InputArea::FindAreaUnderMouse | ( | const Point & | mouse_position, |
NuxEventType | event_type | ||
) | [virtual] |
Return the area under the mouse pointer.
Reimplemented from nux::Area.
Reimplemented in TilesView, nux::BaseWindow, nux::ComboBoxSimple, nux::FloatingWindow, nux::HScrollBar, nux::HSplitter, nux::Matrix4Editor, nux::MenuPage, nux::ScrollView, nux::TabView, nux::TextEntry, nux::View, nux::VScrollBar, and nux::VSplitter.
Definition at line 415 of file InputArea.cpp.
References nux::Area::TestMousePointerInclusion().
{ if(TestMousePointerInclusion(mouse_position, event_type)) { return this; } return NULL; }
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. |
Definition at line 66 of file InputArea.cpp.
{ return false; }
bool nux::InputArea::IsMouseInside | ( | ) |
Returns true if the mouse pointer is inside the Area.
Returns true if during a call to FindAreaUnderMouse it the Area has been determined to be directly under the mouse pointer. Note that is is true only for the first area that is found. there might be other areas that which have the mouse pointer inside of them.
Definition at line 112 of file InputArea.cpp.
{
return _event_processor.MouseIn();
}
bool nux::InputArea::IsMouseOwner | ( | ) |
Return true if this Area is the owner of the mouse pointer.
The owner of the mouse pointer is the Area that has received a Mouse down event and the mouse button responsible for the event is still pressed.
Definition at line 322 of file InputArea.cpp.
{ return (GetWindowCompositor().GetMouseOwnerArea() == this); }
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. |
Definition at line 82 of file InputArea.cpp.
Referenced by nux::Layout::ProcessDraw().
{ GfxContext.QRP_Color (GetBaseX(), GetBaseY(), GetBaseWidth(), GetBaseHeight(), m_AreaColor); }
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::mouse_click |
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). |
Definition at line 271 of file InputArea.h.
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::mouse_double_click |
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). |
Definition at line 281 of file InputArea.h.
Referenced by nux::TableCtrl::TableCtrl().
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::mouse_down |
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). |
Definition at line 231 of file InputArea.h.
Referenced by nux::TableCtrl::TableCtrl().
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::mouse_down_outside_pointer_grab_area |
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. |
Definition at line 331 of file InputArea.h.
sigc::signal<void, int, int, int, int, unsigned long, unsigned long> nux::InputArea::mouse_drag |
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). |
Definition at line 293 of file InputArea.h.
Referenced by nux::TableCtrl::TableCtrl().
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::mouse_enter |
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). |
Definition at line 251 of file InputArea.h.
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::mouse_leave |
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). |
Definition at line 261 of file InputArea.h.
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::mouse_up |
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). |
Definition at line 241 of file InputArea.h.
Referenced by nux::TableCtrl::TableCtrl().