nux-1.14.0
nux::InputArea Class Reference
Inheritance diagram for nux::InputArea:
nux::Area nux::InitiallyUnownedObject nux::Focusable nux::Object nux::Trackable nux::Introspectable nux::View nux::AbstractButton nux::AbstractComboBox nux::AbstractSeparator nux::AnimatedTextureArea nux::BaseWindow nux::BezierCurveControl nux::BezierCurveControl2 nux::Canvas nux::ClientArea nux::ColorArea nux::ColorEditor nux::ColorGradient nux::ColorPreview nux::CurveControl nux::EditTextBox nux::FileSelector nux::FunctionGraph nux::GroupBox nux::GroupBox2 nux::Histogram nux::HSplitter nux::HToolBar nux::Matrix3Editor nux::Matrix3Preview nux::Matrix4Editor nux::Matrix4Preview nux::MenuBar nux::MenuItem nux::MenuPage nux::MenuSeparator nux::MouseAreaCtrl nux::RangeValue nux::RangeValueInteger nux::RGBValuator nux::ScrollBar nux::ScrollView nux::SpinBox_Logic nux::SplineCurveEditor nux::SplineCurvePreview nux::StaticText nux::StaticTextBox nux::TabView nux::TextEntry nux::TextureArea nux::TimeGraph nux::ToolButton nux::Valuator nux::Vector3Valuator nux::VSplitter nux::VToolBar TilesView

List of all members.

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
AreaFindAreaUnderMouse (const Point &mouse_position, NuxEventType event_type)
AreaFindKeyFocusArea (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

Detailed Description

Definition at line 43 of file InputArea.h.


Member Function Documentation

Area * nux::InputArea::FindAreaUnderMouse ( const Point mouse_position,
NuxEventType  event_type 
) [virtual]

Return the area under the mouse pointer.

Returns:
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.

Parameters:
xCoordinates of the mouse down event relative to the top left corner of the area.
yCoordinates of the mouse down event relative to the top left corner of the area.
Returns:
True if the simulated action was successful.

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.

Returns:
Return true if the mouse pointer is inside the Area.

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.

Returns:
True if this Area is the owner of the mouse pointer.

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.

Parameters:
force_draw.

Definition at line 82 of file InputArea.cpp.

Referenced by nux::Layout::ProcessDraw().

  {
    GfxContext.QRP_Color (GetBaseX(), GetBaseY(), GetBaseWidth(), GetBaseHeight(), m_AreaColor);
  }

Member Data Documentation

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.

Parameters:
voidReturn type of the callback hooked to this signal.
intMouse X position (1st parameter of the callback).
intMouse Y position (2nd parameter of the callback).
unsignedlong Mouse button states (3rd parameter of the callback).
unsignedlong 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.

Parameters:
voidReturn type of the callback hooked to this signal.
intMouse X position (1st parameter of the callback).
intMouse Y position (2nd parameter of the callback).
unsignedlong Mouse button states (3rd parameter of the callback).
unsignedlong 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.

Parameters:
voidReturn type of the callback hooked to this signal.
intMouse X position (1st parameter of the callback).
intMouse Y position (2nd parameter of the callback).
unsignedlong Mouse button states (3rd parameter of the callback).
unsignedlong 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.

Parameters:
intPosition of the mouse down event.
intPosition of the mouse down event.
ulongMouse button states.
ulongKeyboard 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).

Parameters:
voidReturn type of the callback hooked to this signal.
intMouse X position (1st parameter of the callback).
intMouse Y position (2nd parameter of the callback).
intMouse X delta (3thr parameter of the callback).
intMouse Y delta (4th parameter of the callback).
unsignedlong Mouse button states (5th parameter of the callback).
unsignedlong 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.

Parameters:
voidReturn type of the callback hooked to this signal.
intMouse X position (1st parameter of the callback).
intMouse Y position (2nd parameter of the callback).
unsignedlong Mouse button states (3rd parameter of the callback).
unsignedlong 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.

Parameters:
voidReturn type of the callback hooked to this signal.
intMouse X position (1st parameter of the callback).
intMouse Y position (2nd parameter of the callback).
unsignedlong Mouse button states (3rd parameter of the callback).
unsignedlong 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.

Parameters:
voidReturn type of the callback hooked to this signal.
intMouse X position (1st parameter of the callback).
intMouse Y position (2nd parameter of the callback).
unsignedlong Mouse button states (3rd parameter of the callback).
unsignedlong Keyboard special keys states (4th parameter of the callback).

Definition at line 241 of file InputArea.h.

Referenced by nux::TableCtrl::TableCtrl().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends