nux-0.9.48

nux::InputArea Class Reference

#include <Nux/InputArea.h>

Inheritance diagram for nux::InputArea:
nux::Area nux::InitiallyUnownedObject nux::Focusable nux::Object nux::Trackable nux::View nux::AbstractButton nux::AbstractComboBox nux::AbstractSeparator nux::AnimatedTextureArea nux::BaseWindow nux::BezierCurveControl nux::BezierCurveControl2 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

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.

Constructor & Destructor Documentation

nux::InputArea::InputArea ( NUX_FILE_LINE_PROTO  )
virtual nux::InputArea::~InputArea ( ) [virtual]

Member Function Documentation

void nux::InputArea::CaptureMouseDownAnyWhereElse ( bool  b)
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

See also:
_print_event_debug_trace
Parameters:
enableIf 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.

Parameters:
enableIf true, the area gets the keyboard focus when a mouse down occurs.
See also:
_enable_keyboard_focus_on_mouse_down.
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.

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

See also:
_print_event_debug_trace
Returns:
True, if event processing debug information for this widget has been activated.
bool nux::InputArea::GetKeyboardFocusOnMouseDown ( ) const

Return the status of keyboard focus on mouse down.

Returns:
Return true if the area gets the 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]

Reimplemented from nux::Area.

Reimplemented in nux::View.

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 ( )
nux::InputArea::NUX_DECLARE_OBJECT_TYPE ( InputArea  ,
Area   
)
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.

Parameters:
force_draw.
virtual long nux::InputArea::OnEvent ( Event ievent,
long  TraverseInfo,
long  ProcessEventInfo 
) [virtual]
virtual void nux::InputArea::OverlayDrawing ( GraphicsEngine GfxContext) [inline, virtual]
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 ( )

Field Documentation

If True, this InputArea can emit the signal OnMouseDoubleClick. Default is false.

Get the keyboard focus when a mouse down occurs.

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.

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).
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseDoubleClick

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).
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseDown

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).
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.

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

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).
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseEnter

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).
sigc::signal<void, int, int, unsigned long, unsigned long> nux::InputArea::OnMouseLeave

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).
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.

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).
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.

Signal emitted when the area gets the mouse focus. This is the result of a mouse down event.


The documentation for this class was generated from the following file: