Back to index

nux  3.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
TestScrollView Class Reference

#include <test-scrollview.h>

Inheritance diagram for TestScrollView:
Inheritance graph
[legend]
Collaboration diagram for TestScrollView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TestScrollView (NUX_FILE_LINE_PROTO)
 ~TestScrollView ()
nux::Color GetColor () const
void ResetEvents ()
nux::VScrollBarGetVScrollbar ()
 NUX_DECLARE_OBJECT_TYPE (InputArea, Area)
 NUX_DECLARE_OBJECT_TYPE (InitiallyUnownedObject, Object)
 NUX_DECLARE_OBJECT_TYPE (BaseObject, Trackable)
void EnableVerticalScrollBar (bool b)
void EnableHorizontalScrollBar (bool b)
virtual bool SetLayout (Layout *layout)
 Set the default layout for this view.
void SetSizeMatchContent (bool b)
 Set the table size to be such that all the content items of the table are visible .
bool IsSizeMatchContent () const
 Check if the table size is constrained by its content.
virtual void SetGeometry (const Geometry &geo)
 Inherited from Area.
void SetGeometry (int x, int y, int w, int h)
 Set the geometry of the object.
void OnSizeGrigMouseDown (int x, int y, unsigned long button_flags, unsigned long key_flags)
void OnSizeGrigMouseDrag (int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
void EmitMouseDrag (int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
virtual void ScrollLeft (float stepx, int mousedx)
virtual void ScrollRight (float stepx, int mousedx)
virtual void ScrollUp (float stepy, int mousedy)
virtual void ScrollDown (float stepy, int mousedy)
virtual void ResetScrollToLeft ()
virtual void ResetScrollToRight ()
virtual void ResetScrollToUp ()
virtual void ResetScrollToDown ()
void SetViewContentLeftMargin (int margin)
int GetViewContentLeftMargin () const
void SetViewContentRightMargin (int margin)
int GetViewContentRightMargin () const
void SetViewContentTopMargin (int margin)
int GetViewContentTopMargin () const
void SetViewContentBottomMargin (int margin)
int GetViewContentBottomMargin () const
virtual bool AcceptKeyNavFocus () const
virtual long ComputeContentSize ()
virtual void EnableView ()
 Enable a View.
virtual void DisableView ()
 Disable a View.
virtual void SetEnableView (bool enable)
 Set the enable state of the view.
bool IsViewEnabled () const
 Gets the enable state of the View.
virtual void ProcessDraw (GraphicsEngine &graphics_engine, bool force_draw)
virtual void QueueDraw ()
 Causes a redraw. The widget parameter draw_cmd_queued_ is set to true. The widget Draw(), DrawContent() and PostDraw() are called.
virtual void NeedSoftRedraw ()
 Causes a soft redraw. The widget parameter draw_cmd_queued_ is set to false. The widget DrawContent() and PostDraw() are called.
virtual bool IsRedrawNeeded ()
virtual void DoneRedraw ()
virtual void OverlayDrawing (GraphicsEngine &graphics_engine)
bool SearchInAllSubNodes (Area *bo)
bool SearchInFirstSubNodes (Area *bo)
virtual bool CanBreakLayout ()
 Return true if this object can break the layout.
virtual void SetTextColor (const Color &color)
virtual Color GetTextColor ()
virtual Layout * GetLayout ()
 Get the default layout of this view.
void SetFont (ObjectPtr< FontTexture > font)
ObjectPtr< FontTexture > GetFont ()
virtual Area * KeyNavIteration (KeyNavDirection direction)
void IsHitDetectionSkipingChildren (bool skip_children)
virtual void OnDraw (GraphicsEngine &graphics_engine, bool force_draw)
 Draw InputArea.
bool HasKeyboardFocus ()
bool MouseFocusOnOtherArea ()
void CaptureMouseDownAnyWhereElse (bool b)
bool IsCaptureMouseDownAnyWhereElse () const
virtual void SetBaseString (const char *Caption)
void SetKeyboardReceiverIgnoreMouseDownOutside (bool ignore_mouse_down_outside)
void SetAcceptKeyNavFocusOnMouseDown (bool accept)
void SetAcceptKeyNavFocusOnMouseEnter (bool accept)
bool KeyboardReceiverIgnoreMouseDownOutside ()
virtual bool IsArea () const
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 has been determined as inside the this area, following event processing.
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.
int GetBaseX () const
int GetBaseY () const
int GetBaseWidth () const
int GetBaseHeight () const
void SetBaseX (int x)
void SetBaseY (int y)
void SetBaseXY (int x, int y)
void SetBaseWidth (int w)
void SetBaseHeight (int h)
virtual void SetBaseSize (int w, int h)
 Set the size of the object.
virtual void SetMinimumSize (int w, int h)
virtual void SetMaximumSize (int w, int h)
virtual void SetMinMaxSize (int w, int h)
virtual void SetMinimumWidth (int w)
virtual void SetMaximumWidth (int w)
virtual void SetMinimumHeight (int h)
virtual void SetMaximumHeight (int h)
virtual int GetMinimumWidth () const
virtual int GetMaximumWidth () const
virtual int GetMinimumHeight () const
virtual int GetMaximumHeight () const
virtual void ApplyMinWidth ()
virtual void ApplyMinHeight ()
virtual void ApplyMaxWidth ()
virtual void ApplyMaxHeight ()
virtual Size GetMinimumSize () const
virtual Size GetMaximumSize () const
Geometry const & GetGeometry () const
 Get the geometry of the object.
void IncreaseSize (int x, int y)
const NString & GetBaseString () const
Area * GetToplevel ()
 Deprecated. Use GetToplevel.
Area * GetRootParent ()
 Return the root parent of the rendering tree for this area.
Area * GetTopLevelViewWindow ()
 Return the Top level BaseWindow of this area.
bool HasTopLevelParent ()
 Return true is this area has a top level parent.
bool IsChildOf (Area *parent)
 Return true is area is a child of the given parent in the widget tree.
bool TestMousePointerInclusion (const Point &mouse_position, NuxEventType event_type)
 Test if a point is inside the area.
bool TestMousePointerInclusionFilterMouseWheel (const Point &mouse_position, NuxEventType event)
 Test if a point is inside the area and if the area accepts mouse wheel events.
bool IsMousePointerInside () const
 Test if the mouse pointer is inside the area.
virtual bool IsInputArea () const
virtual bool IsView () const
virtual bool IsLayout () const
virtual bool IsSpaceLayout () const
virtual bool IsViewWindow () const
Area * GetParentObject () const
void SetVisible (bool visible)
 Set visibility of the area.
bool IsVisible ()
 Get the visibility of the area.
void SetSensitive (bool)
 Deprecated. Use SetInputEventSensitivity.
void SetInputEventSensitivity (bool sensitive)
 Set input event sensitivity of the area.
bool IsSensitive () const
 Deprecated. Use GetInputEventSensitivity.
bool GetInputEventSensitivity () const
 Get input event sensitivity of the area is sensitive.
void QueueRelayout ()
 Queue a relayout.
virtual unsigned int GetScaleFactor ()
 Get the area scale factor.
virtual void SetScaleFactor (unsigned int sf)
 Set the area scale factor.
virtual MinorDimensionPosition GetPositioning ()
virtual void SetPositioning (MinorDimensionPosition p)
virtual MinorDimensionSize GetExtend ()
virtual void SetExtend (MinorDimensionSize ext)
virtual float GetPercentage ()
virtual void SetPercentage (float f)
virtual bool IsLayoutDone ()
virtual void SetLayoutDone (bool b)
void Set2DMatrix (const Matrix4 &mat)
void Set2DTranslation (float tx, float ty, float tz)
Matrix4 Get2DMatrix () const
Matrix4 Get3DMatrix () const
bool Is3DArea () const
virtual Geometry GetAbsoluteGeometry () const
 Return the position of this object with regard to the top left corner of the physical window.
int GetAbsoluteX () const
 Return the area absolute x coordinate.
int GetAbsoluteY () const
 Return the area absolute y coordinate.
int GetAbsoluteWidth () const
 Return the area absolute width.
int GetAbsoluteHeight () const
 Return the area absolute height.
virtual Geometry GetRootGeometry () const
 Return the position of this object with regard to its top level parent(the main layout or a BaseWindow).
int GetRootX () const
 Return the area root x coordinate.
int GetRootY () const
 Return the area root y coordinate.
int GetRootWidth () const
 Return the area root width.
int GetRootHeight () const
 Return the area root height.
virtual bool SetParentObject (Area *parent)
 SetParentObject/UnParentObject are protected API.
virtual void UnParentObject ()
 Un-parent and area.
void SetPathToKeyFocusArea ()
 Mark the path from this area to its top level parent as the one to follow
to get to the area that has the keyboard.
void ResetDownwardPathToKeyFocusArea ()
 Erase the path from this area to the child area that has the keyboard.
void ResetUpwardPathToKeyFocusArea ()
 Erase the path that marks this object as part of the keyboard focus chain,
from this area to its top level parent.
virtual bool InspectKeyEvent (unsigned int event_type, unsigned int keysym, const char *character)
 Return True if the the area knows what to do with the key event.
bool HasKeyFocus () const
void SetReconfigureParentLayoutOnGeometryChange (bool reconfigure_parent_layout)
 Set to True to initiate a layout reconfiguration when the geometry of this widget changes.
bool ReconfigureParentLayoutOnGeometryChange ()
 Return True if the the parent layouts of this area should be reconfigured on geometry changed.
void SetAcceptKeyboardEvent (bool accept_key_event)
 Enable keyboard event processing.
bool AcceptKeyboardEvent () const
 Return true if the Area is interested in keyboard events.
void SetAcceptMouseWheelEvent (bool accept_mouse_wheel_event)
 Enable mouse wheel event processing.
bool AcceptMouseWheelEvent () const
 Return true if the area is accepts mouse wheel events.
bool Reference ()
 Increase reference count.
bool UnReference ()
 Decrease reference count.
virtual bool SinkReference ()
 Mark the object as owned.
virtual bool Dispose ()
 Destroy and object that has a floating reference.
int GetReferenceCount () const
 Get the reference count of this object.
std::string GetAllocationLoation () const
 NUX_DECLARE_ROOT_OBJECT_TYPE (Trackable)
bool OwnsTheReference ()
 Test if object reference is owned.
bool IsHeapAllocated ()
 Test if object was allocated dynamically.
bool IsDynamic () const
 Test if object was allocated dynamically.
virtual int GetObjectSize ()
 Return the size of allocated for this object.
bool SetProperty (std::string const &name, const char *value)
 If the property was not able to be set with the value, the method returns false.
template<typename T >
bool SetProperty (std::string const &name, T const &value)
template<typename T >
GetProperty (std::string const &name, T *foo=0)
void AddProperty (std::string const &name, PropertyBase *property)

Static Public Member Functions

static std::new_handler set_new_handler (std::new_handler handler)
static void * operator new (size_t size)
static void * operator new (size_t size, void *ptr)
static void operator delete (void *ptr)

Public Attributes

bool registered_scroll_
int m_MouseWheelScrollSize
int m_ViewContentX
 X Position of the content.
int m_ViewContentY
 Y Position of the content.
int m_ViewContentWidth
 Width of content.
int m_ViewContentHeight
 Height of content.
int m_ViewX
 X position of the scroll view content area.
int m_ViewY
 Y position of the scroll view content area.
int m_ViewWidth
 Width of the scroll view content area.
int m_ViewHeight
 Height of the scroll view content area.
Geometry m_ViewGeometry
Geometry m_ContentGeometry
sigc::signal< void, int, int > scrolling
 Emitted when scrolling happens.
sigc::signal< void, View
*, Layout * > 
LayoutAdded
sigc::signal< void, View
*, Layout * > 
LayoutRemoved
sigc::signal< void, View * > OnQueueDraw
 Signal emitted when a view is scheduled for a draw.
bool mouse_in_
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 char *, 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
sigc::signal< void, Area * > ChildFocusChanged
sigc::signal< void, Area
*, bool, KeyNavDirection > 
key_nav_focus_change
 This signal is received whether the area receiving or loosing the keyboard focus.
sigc::signal< void, Area * > key_nav_focus_activate
 This signal is received when the area has the key focus and the ENTER key has been pressed.
sigc::signal< void, int, int,
int, int > 
OnResize
 Signal emitted when an area is resized.
sigc::signal< void, Area *, bool > OnVisibleChanged
sigc::signal< void, Area *, bool > OnSensitiveChanged
sigc::signal< void, Area
*, Geometry & > 
OnGeometryChanged
 This signal is only meant to inform of a change of size.
sigc::signal< void, Object * > object_destroyed
 Signal emitted immediately before the object is destroyed.

Protected Member Functions

void Draw (nux::GraphicsEngine &graphics_engine, bool force_draw)
void OnScrolling (int hscroll, int vscroll)
virtual void DrawContent (GraphicsEngine &graphics_engine, bool force_draw)
virtual void PostDraw (GraphicsEngine &graphics_engine, bool force_draw)
virtual Area * FindAreaUnderMouse (const Point &mouse_position, NuxEventType event_type)
 Return the area under the mouse pointer.
void RecvMouseWheel (int x, int y, int wheel_delta, long button_flags, unsigned long key_flags)
void OnChildFocusChanged (Area *child)
void SetVScrollBar (VScrollBar *newVScrollBar)
 Change Vertical Scrollbar in the ScrollView.
void SwapTextureIndex ()
void SetTextureIndex (int index)
int GetTextureIndex ()
void FormatContent ()
virtual void PreLayoutManagement ()
virtual long PostLayoutManagement (long LayoutResult)
virtual void ComputeContentPosition (float offsetX, float offsetY)
virtual long PostLayoutManagement2 (long LayoutResult)
virtual void PreResizeGeometry ()
virtual void PostResizeGeometry ()
void InitializeWidgets ()
void InitializeLayout ()
virtual Layout * GetCompositionLayout ()
 Deprecated. Use GetLayout();.
virtual bool SetCompositionLayout (Layout *layout)
 Deprecated. Use SetLayout();.
void RemoveLayout ()
void RemoveCompositionLayout ()
bool IsFullRedraw () const
 Accessed inside ContentDraw() to help determine if some parts needs to be rendered.
virtual void GeometryChangePending ()
 This signal is only meant to inform that the size is about to change.
virtual void GeometryChanged ()
 This signal is only meant to inform that the size has changed.
virtual Area * FindKeyFocusArea (unsigned int key_symbol, unsigned long x11_key_code, unsigned long special_keys_state)
virtual bool AcceptKeyNavFocusOnMouseDown () const
virtual bool AcceptKeyNavFocusOnMouseEnter () const
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 EmitMouseDownOutsideArea (int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state)
virtual void RequestBottomUpLayoutComputation (Area *bo_initiator)
 Request a Layout recompute after a change of size.
void InnerGetAbsoluteGeometry (Geometry &geometry)
 Return the absolute geometry starting with a relative geometry passed as argument.
void InnerGetRootGeometry (Geometry &geometry)
 Return the absolute geometry starting with a relative geometry passed as argument.
void SetNextObjectToKeyFocusArea (Area *)
Area * GetNextObjectToKeyFocusArea ()
 Gets the next object in the chain that ends with the area that has the keyboard focus.
void SetOwnedReference (bool b)

Protected Attributes

ObjectPtr
< IOpenGLFrameBufferObject > 
m_FrameBufferObject
int m_TextureIndex
bool m_ReformatTexture
HScrollBar * _hscrollbar
VScrollBar * _vscrollbar
bool m_horizontal_scrollbar_enable
bool m_vertical_scrollbar_enable
int m_top_border
int m_border
int _delta_x
 Horizontal scrollbar offsets.
int _delta_y
 Vertical scrollbar offsets.
sigc::connection _on_focus_changed_handler
Color m_TextColor
Layout * view_layout_
bool draw_cmd_queued_
bool full_view_draw_cmd_
bool _capture_mouse_down_any_where_else
bool _double_click
 If True, this InputArea can emit the signal mouse_double_click.
bool _keyboard_receiver_ignore_mouse_down_outside
bool accept_key_nav_focus_on_mouse_down_
bool accept_key_nav_focus_on_mouse_enter_
bool on_geometry_change_reconfigure_parent_layout_
bool has_key_focus_
 If this variable is true, then this area has the keyboard focus.
Area * next_object_to_key_focus_area_
 If this variable is not NULL, then this area is part of the keyboard focus chain.
int _heap_allocated

Private Member Functions

 NUX_DECLARE_OBJECT_TYPE (TestView, ScrollView)

Private Attributes

nux::Color normal_color_
nux::Color current_color_

Detailed Description

Definition at line 27 of file test-scrollview.h.


Constructor & Destructor Documentation

TestScrollView::TestScrollView ( NUX_FILE_LINE_PROTO  )

Definition at line 32 of file test-scrollview.cpp.

  : nux::ScrollView(NUX_FILE_LINE_PARAM)
  , registered_scroll_(false)
  , normal_color_(nux::color::Green)
  , current_color_(normal_color_)
{
  EnableVerticalScrollBar(true);
  EnableHorizontalScrollBar(true);
  
  scrolling.connect(sigc::mem_fun(this, &TestScrollView::OnScrolling));
}

Here is the call graph for this function:

Here is the caller graph for this function:

TestScrollView::~TestScrollView ( )

Definition at line 44 of file test-scrollview.cpp.

{

}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

bool nux::Area::AcceptKeyboardEvent ( ) const [inherited]

Return true if the Area is interested in keyboard events.

Returns:
True if the area accepts in keyboard events.

Definition at line 858 of file Area.cpp.

Here is the caller graph for this function:

bool nux::InputArea::AcceptKeyNavFocus ( ) const [virtual, inherited]

Definition at line 407 of file InputArea.cpp.

  {
    if (GetInputEventSensitivity() == false)
      return false;

    return true;
  }  

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::InputArea::AcceptKeyNavFocusOnMouseDown ( ) const [protected, virtual, inherited]

Definition at line 387 of file InputArea.cpp.

Here is the caller graph for this function:

bool nux::InputArea::AcceptKeyNavFocusOnMouseEnter ( ) const [protected, virtual, inherited]

Definition at line 392 of file InputArea.cpp.

Here is the caller graph for this function:

bool nux::Area::AcceptMouseWheelEvent ( ) const [inherited]

Return true if the area is accepts mouse wheel events.

Returns:
True if the area accepts mouse wheel events.

Definition at line 868 of file Area.cpp.

Here is the caller graph for this function:

void nux::Introspectable::AddProperty ( std::string const &  name,
PropertyBase property 
) [inline, inherited]

Definition at line 254 of file Property-inl.h.

{
  // check to see if it exists and if it does barf horribly as we can't
  // have two properties with the same name;
  properties_[name] = property;
}

Here is the caller graph for this function:

void nux::Area::ApplyMaxHeight ( ) [virtual, inherited]

Definition at line 192 of file Area.cpp.

Here is the call graph for this function:

void nux::Area::ApplyMaxWidth ( ) [virtual, inherited]

Definition at line 185 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::ApplyMinHeight ( ) [virtual, inherited]

Definition at line 178 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::ApplyMinWidth ( ) [virtual, inherited]

Reimplemented in nux::StaticText.

Definition at line 171 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool nux::View::CanBreakLayout ( ) [inline, virtual, inherited]

Return true if this object can break the layout.

Reimplemented in nux::FloatingWindow, nux::HSplitter, nux::VSplitter, and nux::TabView.

Definition at line 114 of file View.h.

    {
      return false;
    }

Here is the caller graph for this function:

void nux::InputArea::CaptureMouseDownAnyWhereElse ( bool  b) [inherited]

Definition at line 94 of file InputArea.cpp.

Here is the caller graph for this function:

void nux::ScrollView::ComputeContentPosition ( float  offsetX,
float  offsetY 
) [protected, virtual, inherited]

Reimplemented from nux::View.

Reimplemented in nux::Panel.

Definition at line 668 of file ScrollView.cpp.

  {
    Geometry geo = GetGeometry();
    int w = 0;
    int h = 0;

    w = _vscrollbar->GetBaseWidth();
    h = _hscrollbar->GetBaseHeight();

    m_ViewX = GetBaseX() + m_border + m_ViewContentLeftMargin;
    m_ViewY = GetBaseY() + m_top_border + m_ViewContentTopMargin;

    if (m_vertical_scrollbar_enable == false)
      m_ViewWidth = GetBaseWidth() - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;
    else
      m_ViewWidth = GetBaseWidth() - w - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;

    if (m_horizontal_scrollbar_enable == false)
      m_ViewHeight = GetBaseHeight() - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;
    else
      m_ViewHeight = GetBaseHeight() - h - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;


    if (m_ViewX + _delta_x +  m_ViewContentWidth < m_ViewX + m_ViewWidth)
    {
      _delta_x = - (m_ViewContentWidth > m_ViewWidth ? m_ViewContentWidth - m_ViewWidth : 0);
    }

    if (m_ViewY + _delta_y + m_ViewContentHeight < m_ViewY + m_ViewHeight)
    {
      _delta_y = - (m_ViewContentHeight > m_ViewHeight ? m_ViewContentHeight - m_ViewHeight : 0);
    }

    if (view_layout_)
    {
      view_layout_->SetBaseX(m_ViewX);
      view_layout_->SetBaseY(m_ViewY);
    }

    // Horizontal scrollbar Geometry
    if (m_horizontal_scrollbar_enable)
    {
      if (m_vertical_scrollbar_enable == false)
        _hscrollbar->SetBaseWidth(GetBaseWidth() - 2 * m_border);
      else
        _hscrollbar->SetBaseWidth(GetBaseWidth() - w - 2 * m_border);

      _hscrollbar->SetBaseX(geo.x + m_border);
      _hscrollbar->SetBaseY(geo.y + geo.GetHeight() - _hscrollbar->GetBaseHeight() - m_border);
      _hscrollbar->ComputeContentSize();
    }

    // Vertical scrollbar Geometry
    if (m_vertical_scrollbar_enable)
    {
      if (m_horizontal_scrollbar_enable == false)
        _vscrollbar->SetBaseHeight(GetBaseHeight() - m_top_border - m_border);
      else
        _vscrollbar->SetBaseHeight(GetBaseHeight() - h - m_top_border - m_border);

      _vscrollbar->SetBaseX(geo.x + geo.GetWidth() - w - m_border);
      _vscrollbar->SetBaseY(geo.y + m_top_border);
      _vscrollbar->ComputeContentSize();
    }

    if (view_layout_)
    {
      m_ViewContentX = view_layout_->GetBaseX();
      m_ViewContentY = view_layout_->GetBaseY();
    }
    else
    {
      m_ViewContentX = m_ViewX;
      m_ViewContentY = m_ViewY;
    }

    _vscrollbar->SetContentOffset(_delta_x, _delta_y);
    _hscrollbar->SetContentOffset(_delta_x, _delta_y);

    if (view_layout_)
    {
      view_layout_->ComputeContentPosition(0, 0);
    }
  }

Here is the call graph for this function:

long nux::View::ComputeContentSize ( ) [virtual, inherited]

Reimplemented from nux::Area.

Reimplemented in nux::MenuPage, nux::Button, nux::StaticText, nux::AbstractCheckedButton, nux::HSplitter, and nux::VSplitter.

Definition at line 57 of file View.cpp.

  {
    if (view_layout_)
    {
      PreLayoutManagement();

      int PreWidth = GetBaseWidth();
      int PreHeight = GetBaseHeight();

      long ret = view_layout_->ComputeContentSize();

      PostLayoutManagement(ret);

      int PostWidth = GetBaseWidth();
      int PostHeight = GetBaseHeight();

      long size_compliance = 0;

      // The layout has been resized to tightly pack its content
      if (PostWidth > PreWidth)
      {
        size_compliance |= eLargerWidth; // need scrollbar
      }
      else if (PostWidth < PreWidth)
      {
        size_compliance |= eSmallerWidth;
      }
      else
      {
        size_compliance |= eCompliantWidth;
      }

      // The layout has been resized to tightly pack its content
      if (PostHeight > PreHeight)
      {
        size_compliance |= eLargerHeight; // need scrollbar
      }
      else if (PostHeight < PreHeight)
      {
        size_compliance |= eSmallerHeight;
      }
      else
      {
        size_compliance |= eCompliantHeight;
      }

      return size_compliance;
    }
    else
    {
      PreLayoutManagement();
      int ret = PostLayoutManagement(eCompliantHeight | eCompliantWidth);
      return ret;
    }

    return 0;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::DisableView ( ) [virtual, inherited]

Disable a View.

Disable the view. The view cannot receive input events(keyboard, mouse, touch). As for the rendering, each view handle its own rendering while is disabled state.

Definition at line 391 of file View.cpp.

  {
    view_enabled_ = false;
  }

Here is the caller graph for this function:

bool nux::Object::Dispose ( ) [virtual, inherited]

Destroy and object that has a floating reference.

Returns:
True is the object has been destroyed

Reimplemented from nux::Trackable.

Definition at line 311 of file Object.cpp.

  {
    // The intent of the Dispose call is to destroy objects with a float
    // reference (reference count is equal to 1 and the '_owns_the_reference'
    // flag is set to false). In Nux, only widgets object can have a floating
    // reference.  And widgets are only visible if added to the widget tree.
    // When an object with a floating reference is added to the widget tree,
    // it becomes "owned'. It looses it floating reference status but it still
    // has a reference count number of 1.  In practice, since widgets must be
    // added to the widget tree, there should never be a need to call Dispose
    // (except in a few cases).

    // Dispose() was designed to only destroy objects with floating
    // references, while UnReference() destroys objects that are "owned".
    // That is now relaxed. Dispose() calls UnReference().
    return UnReference();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::DoneRedraw ( ) [virtual, inherited]

Reimplemented in nux::HSplitter, and nux::VSplitter.

Definition at line 259 of file View.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::InputArea::DoubleClickEnabled ( ) const [inherited]

Returns true if the double click signal is enable for this InputArea.

Definition at line 109 of file InputArea.cpp.

  {
    return _double_click;
  }

Here is the caller graph for this function:

void TestScrollView::Draw ( nux::GraphicsEngine graphics_engine,
bool  force_draw 
) [protected, virtual]

Reimplemented from nux::ScrollView.

Definition at line 61 of file test-scrollview.cpp.

{
  nux::Geometry geo = GetGeometry();
  graphics_engine.QRP_Color(geo.x, geo.y, geo.width, geo.height, current_color_);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::ScrollView::DrawContent ( GraphicsEngine graphics_engine,
bool  force_draw 
) [protected, virtual, inherited]

Reimplemented from nux::View.

Reimplemented in nux::Panel.

Definition at line 237 of file ScrollView.cpp.

  {
    if (IsFullRedraw())
      GetPainter().PushBackgroundStack();
      
    graphics_engine.PushClippingRectangle(GetGeometry());

    graphics_engine.PushClippingRectangle(Rect(m_ViewX, m_ViewY, m_ViewWidth, m_ViewHeight));

    if (view_layout_)
    {
//       graphics_engine.PushClipOffset(_delta_x, _delta_y);
//       graphics_engine.PushClippingRectangle(view_layout_->GetGeometry());
//       graphics_engine.Push2DTranslationModelViewMatrix(_delta_x, _delta_y, 0.0f);
      view_layout_->ProcessDraw(graphics_engine, force_draw);
//       graphics_engine.PopModelViewMatrix();
//       graphics_engine.PopClippingRectangle();
//       graphics_engine.PopClipOffset();
    }

    graphics_engine.PopClippingRectangle();

    if (m_vertical_scrollbar_enable)
    {
      _vscrollbar->ProcessDraw(graphics_engine, force_draw);
    }

    if (m_horizontal_scrollbar_enable)
    {
      _hscrollbar->ProcessDraw(graphics_engine, force_draw);
    }

    graphics_engine.PopClippingRectangle();

    if (IsFullRedraw())
      GetPainter().PopBackgroundStack();
  }

Here is the call graph for this function:

void nux::InputArea::EmitKeyDownSignal ( unsigned int  key_symbol,
unsigned long  x11_key_code,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 302 of file InputArea.cpp.

  {
    //OnKeyPressed.emit(key_symbol, x11_key_code, special_keys_state);
  }
void nux::InputArea::EmitKeyEventSignal ( unsigned long  event_type,
unsigned int  key_symbol,
unsigned long  special_keys_state,
const char *  text,
int  key_repeat_count 
) [protected, virtual, inherited]

Definition at line 312 of file InputArea.cpp.

  {
    key_down.emit(
      event_type,
      key_sym,
      special_keys_state,
      text,
      key_repeat_count);
  }

Here is the caller graph for this function:

void nux::InputArea::EmitKeyUpSignal ( unsigned int  key_symbol,
unsigned long  x11_key_code,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 307 of file InputArea.cpp.

  {
    key_up.emit(key_symbol, x11_key_code, special_keys_state);
  }

Here is the caller graph for this function:

void nux::InputArea::EmitMouseClickSignal ( int  x,
int  y,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 343 of file InputArea.cpp.

  {
    mouse_click.emit(x, y, mouse_button_state, special_keys_state);
  }

Here is the caller graph for this function:

void nux::InputArea::EmitMouseDoubleClickSignal ( int  x,
int  y,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 348 of file InputArea.cpp.

  {
    mouse_double_click.emit(x, y, mouse_button_state, special_keys_state);
  }

Here is the caller graph for this function:

void nux::InputArea::EmitMouseDownOutsideArea ( int  x,
int  y,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 353 of file InputArea.cpp.

  {
    mouse_down_outside_pointer_grab_area.emit(x, y, mouse_button_state, special_keys_state);
  }
void nux::InputArea::EmitMouseDownSignal ( int  x,
int  y,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 282 of file InputArea.cpp.

  {
    mouse_down.emit(x, y, mouse_button_state, special_keys_state);
  }

Here is the caller graph for this function:

void nux::ScrollView::EmitMouseDrag ( int  x,
int  y,
int  dx,
int  dy,
unsigned long  button_flags,
unsigned long  key_flags 
) [inherited]
void nux::InputArea::EmitMouseDragSignal ( int  x,
int  y,
int  dx,
int  dy,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 326 of file InputArea.cpp.

  {
    mouse_drag.emit(x, y, dx, dy, mouse_button_state, special_keys_state);
  }

Here is the caller graph for this function:

void nux::InputArea::EmitMouseEnterSignal ( int  x,
int  y,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 331 of file InputArea.cpp.

  {
    mouse_in_ = true;
    mouse_enter.emit(x, y, mouse_button_state, special_keys_state);
  }

Here is the caller graph for this function:

void nux::InputArea::EmitMouseLeaveSignal ( int  x,
int  y,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 337 of file InputArea.cpp.

  {
    mouse_in_ = false;
    mouse_leave.emit(x, y, mouse_button_state, special_keys_state);
  }

Here is the caller graph for this function:

void nux::InputArea::EmitMouseMoveSignal ( int  x,
int  y,
int  dx,
int  dy,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 292 of file InputArea.cpp.

  {
    mouse_move.emit(x, y, dx, dy, mouse_button_state, special_keys_state);
  }

Here is the caller graph for this function:

void nux::InputArea::EmitMouseUpSignal ( int  x,
int  y,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 287 of file InputArea.cpp.

  {
    mouse_up.emit(x, y, mouse_button_state, special_keys_state);
  }

Here is the caller graph for this function:

void nux::InputArea::EmitMouseWheelSignal ( int  x,
int  y,
int  wheel_delta,
unsigned long  mouse_button_state,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Definition at line 297 of file InputArea.cpp.

  {
    mouse_wheel.emit(x, y, wheel_delta, mouse_button_state, special_keys_state);
  }

Here is the caller graph for this function:

void nux::InputArea::EnableDoubleClick ( bool  double_click) [inherited]

Enable the double click event signal on this InputArea.

Definition at line 104 of file InputArea.cpp.

  {
    _double_click = double_click;
  }

Here is the caller graph for this function:

void nux::ScrollView::EnableHorizontalScrollBar ( bool  b) [inherited]

Definition at line 290 of file ScrollView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::ScrollView::EnableVerticalScrollBar ( bool  b) [inherited]

Definition at line 283 of file ScrollView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::EnableView ( ) [virtual, inherited]

Enable a View.

Enable the view. The view cannot receive events. As for the rendering, each view handle its own rendering while is enabled state.

Definition at line 386 of file View.cpp.

  {
    view_enabled_ = true;
  }

Here is the caller graph for this function:

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

Return the area under the mouse pointer.

Returns:
The Area under the mouse pointer.

Reimplemented from nux::View.

Definition at line 168 of file ScrollView.cpp.

  {
    // Test if the mouse is inside the ScrollView.
    // The last parameter of TestMousePointerInclusion is a boolean used to test if the case
    // of mouse wheel events. If that boolean value is true, then TestMousePointerInclusion
    // returns true only if the mouse pointer is over this area and the the area accepts
    // mouse wheel events(see Area::SetAcceptMouseWheelEvent)
    bool mouse_inside = TestMousePointerInclusionFilterMouseWheel(mouse_position, event_type);

    if (mouse_inside == false)
    {
      // The mouse pointer is not over this Area. return NULL.
      return NULL;
    }

    Area* found_area;

    // Recursively go over the ui element that are managed by this ScrollView and look
    // for the area that is below the mouse.

    // Test the vertical scrollbar
    found_area = _vscrollbar->FindAreaUnderMouse(mouse_position, event_type);
    NUX_RETURN_VALUE_IF_NOTNULL(found_area, found_area);

    // Test the horizontal scrollbar
    found_area = _hscrollbar->FindAreaUnderMouse(mouse_position, event_type);
    NUX_RETURN_VALUE_IF_NOTNULL(found_area, found_area);

    // If the code gets here, it means that no area has been found yet.
    // Test the layout of the ScrollView
    return View::FindAreaUnderMouse(mouse_position, event_type);
  }

Here is the call graph for this function:

Area * nux::View::FindKeyFocusArea ( unsigned int  key_symbol,
unsigned long  x11_key_code,
unsigned long  special_keys_state 
) [protected, virtual, inherited]

Reimplemented from nux::InputArea.

Definition at line 445 of file View.cpp.

  {
    if (has_key_focus_)
    {
      return this;
    }
    else if (next_object_to_key_focus_area_)
    {
      return next_object_to_key_focus_area_->FindKeyFocusArea(key_symbol, x11_key_code, special_keys_state);
    }
    return NULL;
  }

Here is the call graph for this function:

void nux::ScrollView::FormatContent ( ) [protected, inherited]

Definition at line 307 of file ScrollView.cpp.

  {
    Geometry geo;
    geo = GetGeometry();

    ComputeContentSize();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::GeometryChanged ( ) [protected, virtual, inherited]

This signal is only meant to inform that the size has changed.

When overriding this function, don't do anything that could change the size of this object. Or you risk creating an infinite loop.

Reimplemented from nux::Area.

Reimplemented in nux::TextEntry.

Definition at line 419 of file View.cpp.

  {
    if (IsLayoutDone())
      QueueDraw();
  }

Here is the call graph for this function:

void nux::View::GeometryChangePending ( ) [protected, virtual, inherited]

This signal is only meant to inform that the size is about to change.

When overriding this function, don't do anything that could change the size of this object. Or you risk creating an infinite loop.

Reimplemented from nux::Area.

Definition at line 413 of file View.cpp.

  {
    if (IsLayoutDone())
      QueueDraw();
  }

Here is the call graph for this function:

Matrix4 nux::Area::Get2DMatrix ( ) const [inherited]

Definition at line 666 of file Area.cpp.

  {
    return _2d_xform;
  }

Here is the caller graph for this function:

Matrix4 nux::Area::Get3DMatrix ( ) const [inherited]

Definition at line 671 of file Area.cpp.

  {
    return _3d_xform;
  }
Geometry nux::Area::GetAbsoluteGeometry ( ) const [virtual, inherited]

Return the position of this object with regard to the top left corner of the physical window.

Return the position of the Area inside the physical window. For the main layout set in WindowThread, The following functions are equivalent:

Reimplemented in nux::MenuPage.

Definition at line 705 of file Area.cpp.

  {
    if (Type().IsDerivedFromType(BaseWindow::StaticObjectType) ||
      Type().IsDerivedFromType(MenuPage::StaticObjectType) ||
      (this == window_thread_->GetLayout()))
    {
      // Do not apply the _2D_xform matrix  to a BaseWindow or the main layout
      return geometry_;
    }
    else
    {
      nux::Geometry geo = geometry_;
      MatrixXFormGeometry(_2d_xform, geo);

      Area *parent = GetParentObject();
      if (parent)
        parent->InnerGetAbsoluteGeometry(geo);

      return geo;
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

int nux::Area::GetAbsoluteHeight ( ) const [inherited]

Return the area absolute height.

As long as _2d_xform contains only translations, the absolute height is the same as value returned by GetBaseHeight();

Definition at line 742 of file Area.cpp.

  {
    return GetAbsoluteGeometry().height;
  }

Here is the call graph for this function:

int nux::Area::GetAbsoluteWidth ( ) const [inherited]

Return the area absolute width.

As long as _2d_xform contains only translations, the absolute width is the same as value returned by GetBaseWidth();

Definition at line 737 of file Area.cpp.

  {
    return GetAbsoluteGeometry().width;
  }

Here is the call graph for this function:

int nux::Area::GetAbsoluteX ( ) const [inherited]

Return the area absolute x coordinate.

Definition at line 727 of file Area.cpp.

  {
    return GetAbsoluteGeometry().x;
  }

Here is the call graph for this function:

int nux::Area::GetAbsoluteY ( ) const [inherited]

Return the area absolute y coordinate.

Definition at line 732 of file Area.cpp.

  {
    return GetAbsoluteGeometry().y;
  }

Here is the call graph for this function:

std::string nux::Object::GetAllocationLoation ( ) const [inherited]

Definition at line 348 of file Object.cpp.

{
  std::ostringstream sout;
  sout << allocation_file_name_ << ":" << allocation_line_number_;
  return sout.str();
}

Here is the caller graph for this function:

int nux::Area::GetBaseHeight ( ) const [inherited]

Definition at line 333 of file Area.cpp.

  {
    return geometry_.height;
  }
const NString & nux::Area::GetBaseString ( ) const [inherited]

Definition at line 69 of file Area.cpp.

  {
    return _base_string;
  }

Here is the caller graph for this function:

int nux::Area::GetBaseWidth ( ) const [inherited]

Definition at line 328 of file Area.cpp.

  {
    return geometry_.width;
  }
int nux::Area::GetBaseX ( ) const [inherited]

Definition at line 318 of file Area.cpp.

  {
    return geometry_.x;
  }
int nux::Area::GetBaseY ( ) const [inherited]

Definition at line 323 of file Area.cpp.

  {
    return geometry_.y;
  }
nux::Color TestScrollView::GetColor ( ) const

Definition at line 56 of file test-scrollview.cpp.

{
  return current_color_;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Layout * nux::View::GetCompositionLayout ( ) [protected, virtual, inherited]

Deprecated. Use GetLayout();.

Definition at line 274 of file View.cpp.

  {
    return GetLayout();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

MinorDimensionSize nux::Area::GetExtend ( ) [virtual, inherited]

Definition at line 596 of file Area.cpp.

  {
    return minor_axis_size_;
  }
ObjectPtr< FontTexture > nux::View::GetFont ( ) [inherited]

Definition at line 369 of file View.cpp.

  {
    if (!_font.IsValid())
      _font = GetSysFont();
    return _font;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Geometry const & nux::Area::GetGeometry ( ) const [inherited]

Get the geometry of the object.

Returns:
The Geometry of the object.
See also:
GetBaseWidth(), GetBaseHeight(), GetBaseX(), GetBaseY().

Definition at line 360 of file Area.cpp.

  {
    return geometry_;
  }
bool nux::Area::GetInputEventSensitivity ( ) const [inherited]

Get input event sensitivity of the area is sensitive.

Gets whether the area is sensitive to input events

Returns:
whether the area is visible

Definition at line 581 of file Area.cpp.

  {
    return sensitive_;
  }

Here is the caller graph for this function:

Layout * nux::View::GetLayout ( ) [virtual, inherited]

Get the default layout of this view.

Get the default layout of this view.

Returns:
The default layout of this view.

Reimplemented in nux::BaseWindow.

Definition at line 269 of file View.cpp.

  {
    return view_layout_;
  }

Here is the caller graph for this function:

int nux::Area::GetMaximumHeight ( ) const [virtual, inherited]

Definition at line 256 of file Area.cpp.

  {
    return max_size_.height;
  }

Here is the caller graph for this function:

Size nux::Area::GetMaximumSize ( ) const [virtual, inherited]

Definition at line 204 of file Area.cpp.

  {
    return max_size_;
  }
int nux::Area::GetMaximumWidth ( ) const [virtual, inherited]

Definition at line 246 of file Area.cpp.

  {
    return max_size_.width;
  }

Here is the caller graph for this function:

int nux::Area::GetMinimumHeight ( ) const [virtual, inherited]

Definition at line 251 of file Area.cpp.

  {
    return min_size_.height;
  }

Here is the caller graph for this function:

Size nux::Area::GetMinimumSize ( ) const [virtual, inherited]

Definition at line 199 of file Area.cpp.

  {
    return min_size_;
  }

Here is the caller graph for this function:

int nux::Area::GetMinimumWidth ( ) const [virtual, inherited]

Definition at line 241 of file Area.cpp.

  {
    return min_size_.width;
  }

Here is the caller graph for this function:

Area * nux::Area::GetNextObjectToKeyFocusArea ( ) [protected, inherited]

Gets the next object in the chain that ends with the area that has the keyboard focus.

Gets the next object in the chain that ends with the area that has the keyboard focus. The next object is a child of this area.

Returns:
An area that is the next object in the chain that leads to the area that has the keyboard focus.

Definition at line 963 of file Area.cpp.

int nux::Trackable::GetObjectSize ( ) [virtual, inherited]

Return the size of allocated for this object.

Returns:
The size allocated for this object.

Definition at line 217 of file Object.cpp.

  {
    return _size_of_this_object;
  }
Area * nux::Area::GetParentObject ( ) const [inherited]

Definition at line 313 of file Area.cpp.

  {
    return parent_area_;
  }

Here is the caller graph for this function:

float nux::Area::GetPercentage ( ) [virtual, inherited]

Definition at line 606 of file Area.cpp.

MinorDimensionPosition nux::Area::GetPositioning ( ) [virtual, inherited]

Definition at line 586 of file Area.cpp.

  {
    return minor_axis_position_;
  }
template<typename T >
T nux::Introspectable::GetProperty ( std::string const &  name,
T *  foo = 0 
) [inherited]

Definition at line 285 of file Property-inl.h.

{
  PropertyContainer::iterator i = properties_.find(name);
  if (i == properties_.end())
    return T();

  std::string s = i->second->GetSerializedValue();
  std::pair<T, bool> result = type::PropertyTrait<T>::from_string(s);
  // If this is called with a template type that the property does not
  // support nice conversion to, you'll get no error, but will get
  // a default constructed T.  We could use an exception here.
  return result.first;
}
int nux::Object::GetReferenceCount ( ) const [inherited]

Get the reference count of this object.

Returns:
The reference count of this object.

Definition at line 343 of file Object.cpp.

  {
    return reference_count_->GetValue();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Geometry nux::Area::GetRootGeometry ( ) const [virtual, inherited]

Return the position of this object with regard to its top level parent(the main layout or a BaseWindow).

Return the position of the Area inside the physical window. For the main layout set in WindowThread or for a BaseWindow, GetRootGeometry() is equivalent to GetGeometry().

Reimplemented in nux::MenuPage.

Definition at line 759 of file Area.cpp.

  {
    nux::Geometry geo = geometry_;
    MatrixXFormGeometry(_2d_xform, geo);

    if (Type().IsDerivedFromType(BaseWindow::StaticObjectType) || (this == window_thread_->GetLayout()))
    {
      return geo;
    }
    else
    {
      Area *parent = GetParentObject();
      if (parent)
        parent->InnerGetRootGeometry(geo);

      return geo;
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

int nux::Area::GetRootHeight ( ) const [inherited]

Return the area root height.

As long as _2d_xform contains only translations, the root width is the same as value returned by GetBaseWidth();

Definition at line 793 of file Area.cpp.

  {
    return GetRootGeometry().height;
  }

Here is the call graph for this function:

Area * nux::Area::GetRootParent ( ) [inherited]

Return the root parent of the rendering tree for this area.

The root parent of the rendering tree is either a BaseWindow or the main layout. If the object isn't hooked to the rendering tree the function returns NULL.

Returns:
The root parent of the rendering tree or NULL.

Definition at line 803 of file Area.cpp.

  {
    if (Type().IsDerivedFromType(BaseWindow::StaticObjectType) || (this == window_thread_->GetLayout()))
    {
      return this;
    }

    Area* parent = GetParentObject();
    if (!parent) //we didn't find a way to salvation!
    {
      return 0;
    }
    return parent->GetRootParent();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

int nux::Area::GetRootWidth ( ) const [inherited]

Return the area root width.

As long as _2d_xform contains only translations, the root width is the same as value returned by GetBaseWidth();

Definition at line 788 of file Area.cpp.

  {
    return GetRootGeometry().width;
  }

Here is the call graph for this function:

int nux::Area::GetRootX ( ) const [inherited]

Return the area root x coordinate.

Definition at line 778 of file Area.cpp.

  {
    return GetRootGeometry().x;
  }

Here is the call graph for this function:

int nux::Area::GetRootY ( ) const [inherited]

Return the area root y coordinate.

Definition at line 783 of file Area.cpp.

  {
    return GetRootGeometry().y;
  }

Here is the call graph for this function:

unsigned int nux::Area::GetScaleFactor ( ) [virtual, inherited]

Get the area scale factor.

The scale factor is used to control the layout of area objects inside HLayout and VLayout.

See also:
HLayout, VLayout.
Returns:
the Area scale factor.

Definition at line 261 of file Area.cpp.

  {
    return scale_factor_;
  }

Here is the caller graph for this function:

Color nux::View::GetTextColor ( ) [virtual, inherited]

Definition at line 381 of file View.cpp.

  {
    return m_TextColor;
  }

Here is the caller graph for this function:

int nux::ScrollView::GetTextureIndex ( ) [inline, protected, inherited]

Definition at line 186 of file ScrollView.h.

    {
      return m_TextureIndex;
    }
Area * nux::Area::GetToplevel ( ) [inherited]

Deprecated. Use GetToplevel.

Definition at line 798 of file Area.cpp.

  {
    return GetRootParent();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Area * nux::Area::GetTopLevelViewWindow ( ) [inherited]

Return the Top level BaseWindow of this area.

Returns:
The top level BaseWindow or NULL.

Definition at line 818 of file Area.cpp.

  {
    Area* area = GetRootParent();

    if (area && area->IsViewWindow())
      return area;

    return NULL;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

int nux::ScrollView::GetViewContentBottomMargin ( ) const [inline, inherited]

Definition at line 153 of file ScrollView.h.

int nux::ScrollView::GetViewContentLeftMargin ( ) const [inline, inherited]

Definition at line 129 of file ScrollView.h.

int nux::ScrollView::GetViewContentRightMargin ( ) const [inline, inherited]

Definition at line 137 of file ScrollView.h.

int nux::ScrollView::GetViewContentTopMargin ( ) const [inline, inherited]

Definition at line 145 of file ScrollView.h.

nux::VScrollBar* TestScrollView::GetVScrollbar ( ) [inline]

Definition at line 36 of file test-scrollview.h.

{return _vscrollbar;}
void nux::InputArea::GrabKeyboard ( ) [inherited]

Definition at line 256 of file InputArea.cpp.

Here is the call graph for this function:

void nux::InputArea::GrabPointer ( ) [inherited]

Definition at line 246 of file InputArea.cpp.

Here is the call graph for this function:

bool nux::InputArea::HasKeyboardFocus ( ) [inherited]

Definition at line 78 of file InputArea.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::Area::HasKeyFocus ( ) const [inherited]

Definition at line 1024 of file Area.cpp.

  {
    return has_key_focus_;
  }

Here is the caller graph for this function:

bool nux::Area::HasTopLevelParent ( ) [inherited]

Return true is this area has a top level parent.

Returns:
True if this area has a top level parent.

Definition at line 828 of file Area.cpp.

  {
    if (GetRootParent())
    {
      return true;
    }
    return false;
  }

Here is the call graph for this function:

void nux::Area::IncreaseSize ( int  x,
int  y 
) [inherited]

Definition at line 395 of file Area.cpp.

Here is the call graph for this function:

void nux::View::InitializeLayout ( ) [protected, inherited]
void nux::View::InitializeWidgets ( ) [protected, inherited]
void nux::Area::InnerGetAbsoluteGeometry ( Geometry geometry) [protected, inherited]

Return the absolute geometry starting with a relative geometry passed as argument.

Definition at line 690 of file Area.cpp.

  {
    if (this->Type().IsDerivedFromType(BaseWindow::StaticObjectType) || (this == window_thread_->GetLayout()))
    {
      geometry.OffsetPosition(geometry_.x, geometry_.y);
      return;
    }

    MatrixXFormGeometry(_2d_xform, geometry);

    Area *parent = GetParentObject();
    if (parent)
      parent->InnerGetAbsoluteGeometry(geometry);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::InnerGetRootGeometry ( Geometry geometry) [protected, inherited]

Return the absolute geometry starting with a relative geometry passed as argument.

Definition at line 747 of file Area.cpp.

  {
    if (this->Type().IsDerivedFromType(BaseWindow::StaticObjectType) || (this == window_thread_->GetLayout()))
      return;

    MatrixXFormGeometry(_2d_xform, geometry);

    Area *parent = GetParentObject();
    if (parent)
      parent->InnerGetRootGeometry(geometry);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::Area::InspectKeyEvent ( unsigned int  event_type,
unsigned int  keysym,
const char *  character 
) [virtual, inherited]

Return True if the the area knows what to do with the key event.

For a View to receive the key_up and key_down signal, it must override this function and return true.

Parameters:
even_typeEvent type is either EVENT_KEY_DOWN or EVENT_KEY_UP.
keysymThe key symbol.
charactersThe character string of the key.
Returns:
bool True if the View wants to received the key events signals.

Reimplemented in nux::TextEntry, nux::Coverflow, and nux::EditTextBox.

Definition at line 1012 of file Area.cpp.

  {
    return false;
  }

Here is the caller graph for this function:

bool nux::Area::Is3DArea ( ) const [inherited]

Definition at line 676 of file Area.cpp.

  {
    return _3d_area;
  }
virtual bool nux::InputArea::IsArea ( ) const [inline, virtual, inherited]

Reimplemented from nux::Area.

Definition at line 91 of file InputArea.h.

    {
      return true;
    }

Definition at line 99 of file InputArea.cpp.

bool nux::Area::IsChildOf ( Area parent) [inherited]

Return true is area is a child of the given parent in the widget tree.

Parameters:
parentArea to test if it is a parent of this area.
Returns:
True if this area is area is a child of parent in the widget tree.

Definition at line 837 of file Area.cpp.

  {
    if (this == parent)
      return true;

    if (!parent || !parent_area_)
      return false;

    return parent_area_->IsChildOf(parent);    
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::Trackable::IsDynamic ( ) const [inherited]

Test if object was allocated dynamically.

Definition at line 201 of file Object.cpp.

  {
    // Get pointer to beginning of the memory occupied by this.
    const void *ptr = dynamic_cast<const void *> (this);

    // Search for ptr in allocation_list
#if defined(NUX_OS_WINDOWS) && !defined(NUX_VISUAL_STUDIO_2010)
    std::list<void*>::iterator i = std::find(GObjectStats._allocation_list.begin(),
      GObjectStats._allocation_list.end(), ptr);
#else
    auto i = std::find(GObjectStats._allocation_list.begin(),
                       GObjectStats._allocation_list.end(), ptr);
#endif
    return i != GObjectStats._allocation_list.end();
  }

Here is the caller graph for this function:

bool nux::View::IsFullRedraw ( ) const [protected, inherited]

Accessed inside ContentDraw() to help determine if some parts needs to be rendered.

Do not use it elsewhere.

Returns:
True if Draw() was called before ContentDraw().

Definition at line 254 of file View.cpp.

  {
    return full_view_draw_cmd_;
  }

Here is the caller graph for this function:

bool nux::Trackable::IsHeapAllocated ( ) [inherited]

Test if object was allocated dynamically.

Definition at line 191 of file Object.cpp.

  {
    if (_heap_allocated == -1)
    {
      _heap_allocated = (IsDynamic () ? 1 : 0);
    }

    return (_heap_allocated == 1 ? true : false);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::IsHitDetectionSkipingChildren ( bool  skip_children) [inherited]
bool nux::Area::IsInputArea ( ) const [virtual, inherited]

Definition at line 631 of file Area.cpp.

  {
    return this->Type().IsDerivedFromType(InputArea::StaticObjectType);;
  }
bool nux::Area::IsLayout ( ) const [virtual, inherited]

Definition at line 641 of file Area.cpp.

  {
    return this->Type().IsDerivedFromType(Layout::StaticObjectType);
  }

Here is the caller graph for this function:

bool nux::Area::IsLayoutDone ( ) [virtual, inherited]

Definition at line 616 of file Area.cpp.

  {
    return layout_done_;
  }

Here is the caller graph for this function:

bool nux::InputArea::IsMouseInside ( ) [inherited]

Returns true if the mouse pointer has been determined as inside the this area, following event processing.

Returns true if during a call to FindAreaUnderMouse, this area has been determined to be directly under the mouse pointer. Note that this is true only for the first area that is found. There might be other areas that which have the mouse pointer inside of them.
Call Area::IsMousePointerInside to find out if the mouse pointer is inside an area.

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

Definition at line 83 of file InputArea.cpp.

  {
    return mouse_in_;
  }

Here is the caller graph for this function:

bool nux::InputArea::IsMouseOwner ( ) [inherited]

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 276 of file InputArea.cpp.

  {
    return (GetWindowThread()->GetWindowCompositor().GetMouseOwnerArea() == this);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::Area::IsMousePointerInside ( ) const [inherited]

Test if the mouse pointer is inside the area.

Return true if the mouse pointer is inside the area.

Returns:
True if the mouse pointer is inside the area.

Definition at line 1029 of file Area.cpp.

  {
    Geometry geo = GetAbsoluteGeometry();
    Point position = GetWindowThread()->GetWindowCompositor().GetMousePosition();
    
    if (geo.IsInside(position))
      return true;

    return false;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::View::IsRedrawNeeded ( ) [virtual, inherited]

Definition at line 249 of file View.cpp.

  {
    return draw_cmd_queued_;
  }

Here is the caller graph for this function:

bool nux::Area::IsSensitive ( ) const [inherited]

Deprecated. Use GetInputEventSensitivity.

Definition at line 576 of file Area.cpp.

  {
    return GetInputEventSensitivity();
  }

Here is the call graph for this function:

bool nux::ScrollView::IsSizeMatchContent ( ) const [inherited]

Check if the table size is constrained by its content.

Returns:
If the return value is true, the table size is constrained by its content.
See also:
SetSizeMatchContent

Definition at line 864 of file ScrollView.cpp.

  {
    return m_bSizeMatchContent;
  }

Here is the caller graph for this function:

bool nux::Area::IsSpaceLayout ( ) const [virtual, inherited]

Definition at line 651 of file Area.cpp.

  {
    return this->Type().IsDerivedFromType(SpaceLayout::StaticObjectType);;
  }
bool nux::Area::IsView ( ) const [virtual, inherited]

Definition at line 636 of file Area.cpp.

  {
    return this->Type().IsDerivedFromType(View::StaticObjectType);;
  }

Here is the caller graph for this function:

bool nux::View::IsViewEnabled ( ) const [inherited]

Gets the enable state of the View.

Returns:
True if the view is active.

Definition at line 408 of file View.cpp.

  {
    return view_enabled_;
  }
bool nux::Area::IsViewWindow ( ) const [virtual, inherited]

Definition at line 646 of file Area.cpp.

  {
    return this->Type().IsDerivedFromType(BaseWindow::StaticObjectType);
  }

Here is the caller graph for this function:

bool nux::Area::IsVisible ( ) [inherited]

Get the visibility of the area.

Gets whether the area is visible to the user and will be visible to the user. Default is true.

Returns:
whether the area is visible

Definition at line 553 of file Area.cpp.

  {
    return visible_;
  }

Here is the caller graph for this function:

Definition at line 119 of file InputArea.cpp.

Area * nux::View::KeyNavIteration ( KeyNavDirection  direction) [virtual, inherited]

Reimplemented from nux::Area.

Reimplemented in nux::HSplitter, and nux::VSplitter.

Definition at line 460 of file View.cpp.

  {
    if (next_object_to_key_focus_area_)
    {
      return NULL;
    }

    if (IsVisible() == false)
      return NULL;

    if (AcceptKeyNavFocus())
    {
      QueueDraw();
      return this;
    }
    else if (view_layout_)
    {
      return view_layout_->KeyNavIteration(direction);
    }

    return NULL;
  }

Here is the call graph for this function:

Definition at line 89 of file InputArea.cpp.

  {
    return false;
  }
void nux::View::NeedSoftRedraw ( ) [virtual, inherited]

Causes a soft redraw. The widget parameter draw_cmd_queued_ is set to false. The widget DrawContent() and PostDraw() are called.

Definition at line 237 of file View.cpp.

  {
    //GetWindowCompositor()..AddToDrawList(this);
    WindowThread* application = GetWindowThread();
    if (application)
    {
        application->AddToDrawList(this);
        application->RequestRedraw();
    }
    //draw_cmd_queued_ = false;
  }

Here is the call graph for this function:

TestScrollView::NUX_DECLARE_OBJECT_TYPE ( TestView  ,
ScrollView   
) [private]
nux::Object::NUX_DECLARE_OBJECT_TYPE ( BaseObject  ,
Trackable   
) [inherited]
void nux::ScrollView::OnChildFocusChanged ( Area child) [protected, inherited]

Reimplemented from nux::View.

Definition at line 130 of file ScrollView.cpp.

  {
//     if (child->IsView())
//     {
//       View *view = (View*)child;
//       if (view->HasPassiveFocus())
//       {
//         return;
//       }
//     }
    if (child->IsLayout())
      return;

    int child_y = child->GetGeometry().y - GetGeometry().y;
    int child_y_diff = child_y - abs(_delta_y);


    if (child_y_diff + child->GetGeometry().height < GetGeometry().height && child_y_diff >= 0)
    {
      return;
    }

    if (child_y_diff < 0)
    {
      ScrollUp(1, abs(child_y_diff));
    }
    else
    {
      int size = child_y_diff - GetGeometry().height;

      // always keeps the top of a view on the screen
      size += (child->GetGeometry().height, GetGeometry().height) ? child->GetGeometry().height : GetGeometry().height;

      ScrollDown(1, size);
    }

  }

Here is the call graph for this function:

void nux::InputArea::OnDraw ( GraphicsEngine graphics_engine,
bool  force_draw 
) [virtual, inherited]

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 68 of file InputArea.cpp.

  {
    graphics_engine.QRP_Color(GetBaseX(), GetBaseY(), GetBaseWidth(), GetBaseHeight(), area_color_);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void TestScrollView::OnScrolling ( int  hscroll,
int  vscroll 
) [protected]

Definition at line 67 of file test-scrollview.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::ScrollView::OnSizeGrigMouseDown ( int  x,
int  y,
unsigned long  button_flags,
unsigned long  key_flags 
) [inherited]
void nux::ScrollView::OnSizeGrigMouseDrag ( int  x,
int  y,
int  dx,
int  dy,
unsigned long  button_flags,
unsigned long  key_flags 
) [inherited]
void nux::Trackable::operator delete ( void *  ptr) [static, inherited]

Definition at line 178 of file Object.cpp.

  {
    ObjectStats::AllocationList::iterator i = std::find (GObjectStats._allocation_list.begin(), GObjectStats._allocation_list.end(), ptr);

    if (i != GObjectStats._allocation_list.end() )
    {
      GObjectStats._total_allocated_size -= NUX_STATIC_CAST (Trackable *, ptr)->_size_of_this_object;
      --GObjectStats._number_of_objects;
      GObjectStats._allocation_list.erase (i);
      ::operator delete (ptr);
    }
  }
void * nux::Trackable::operator new ( size_t  size) [static, inherited]

Definition at line 140 of file Object.cpp.

  {
    // Set the new_handler for this call
    std::new_handler global_handler  = std::set_new_handler (_new_current_handler);

    // If allocation fails _new_current_handler is called, if specified,
    // otherwise the global new_handler is called.
    void *ptr;

    try
    {
      ptr = ::operator new (size);

      GObjectStats._allocation_list.push_front (ptr);
      NUX_STATIC_CAST (Trackable *, ptr)->_size_of_this_object = size;
      GObjectStats._total_allocated_size += size;
      ++GObjectStats._number_of_objects;
    }
    catch (std::bad_alloc &)
    {
      std::set_new_handler (global_handler);
      throw;
    }

    //  Reset gloabal new_handler
    std::set_new_handler (global_handler);
    return ptr;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void * nux::Trackable::operator new ( size_t  size,
void *  ptr 
) [static, inherited]

Definition at line 171 of file Object.cpp.

  {
    return ::operator new (size, ptr);
  }

Here is the call graph for this function:

virtual void nux::View::OverlayDrawing ( GraphicsEngine graphics_engine) [inline, virtual, inherited]

Reimplemented from nux::InputArea.

Reimplemented in nux::HSplitter, and nux::VSplitter.

Definition at line 93 of file View.h.

{}
bool nux::InputArea::OwnsKeyboardGrab ( ) [inherited]

Definition at line 271 of file InputArea.cpp.

Here is the call graph for this function:

bool nux::InputArea::OwnsPointerGrab ( ) [inherited]

Definition at line 266 of file InputArea.cpp.

Here is the call graph for this function:

bool nux::Trackable::OwnsTheReference ( ) [inherited]

Test if object reference is owned.

Definition at line 117 of file Object.cpp.

  {
    return _owns_the_reference;
  }

Here is the caller graph for this function:

void nux::ScrollView::PostDraw ( GraphicsEngine graphics_engine,
bool  force_draw 
) [protected, virtual, inherited]

Reimplemented from nux::View.

Definition at line 275 of file ScrollView.cpp.

  {

  }
long nux::ScrollView::PostLayoutManagement ( long  LayoutResult) [protected, virtual, inherited]

Reimplemented from nux::View.

Reimplemented in nux::Panel.

Definition at line 425 of file ScrollView.cpp.

  {
    if (IsSizeMatchContent())
      return PostLayoutManagement2(LayoutResult);

    int ScrollBarWidth = 0;
    int ScrollBarHeight = 0;

    if (view_layout_)
    {
      m_ViewContentX = view_layout_->GetBaseX();
      m_ViewContentY = view_layout_->GetBaseY();
      m_ViewContentWidth = view_layout_->GetBaseWidth();
      m_ViewContentHeight = view_layout_->GetBaseHeight();
    }

    if (m_horizontal_scrollbar_enable)
      ScrollBarHeight = _hscrollbar->GetBaseHeight();

    if (m_vertical_scrollbar_enable)
      ScrollBarWidth = _vscrollbar->GetBaseWidth();

    _hscrollbar->SetContainerSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                  GetBaseY() + m_top_border + m_ViewContentTopMargin,
                                  GetBaseWidth() - ScrollBarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
                                  GetBaseHeight() - ScrollBarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);

    if (m_horizontal_scrollbar_enable)
    {
      if (view_layout_)
      {
        _hscrollbar->SetContentSize(view_layout_->GetBaseX(), view_layout_->GetBaseY(),
                                    view_layout_->GetBaseWidth(), view_layout_->GetBaseHeight());
      }
      else
      {
        _hscrollbar->SetContentSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                    GetBaseY() + m_top_border + m_ViewContentTopMargin, 0, 0);
      }

      _hscrollbar->SetContentOffset(_delta_x, _delta_y);
    }
    else
    {
      _hscrollbar->SetContentSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                  GetBaseY() + m_top_border + m_ViewContentTopMargin, 0, 0);
      _hscrollbar->SetContentOffset(0, 0);
    }

    _vscrollbar->SetContainerSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                  GetBaseY() + m_top_border + m_ViewContentTopMargin,
                                  GetBaseWidth() - ScrollBarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
                                  GetBaseHeight() - ScrollBarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);

    if (m_vertical_scrollbar_enable)
    {
      if (view_layout_)
      {
        _vscrollbar->SetContentSize(view_layout_->GetBaseX(), view_layout_->GetBaseY(),
                                    view_layout_->GetBaseWidth(), view_layout_->GetBaseHeight());
      }
      else
      {
        _vscrollbar->SetContentSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                    GetBaseY() + m_top_border + m_ViewContentTopMargin, 0, 0);
      }

      _vscrollbar->SetContentOffset(_delta_x, _delta_y);
    }
    else
    {
      _vscrollbar->SetContentSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                  GetBaseY() + m_top_border + m_ViewContentTopMargin, 0, 0);
      _vscrollbar->SetContentOffset(0, 0);
    }

    // I may not be necessary to call this function here since ComputeContentPosition was called on ComputeContentPosition
    // during the layout process.
    if (view_layout_)
      view_layout_->ComputeContentPosition(0, 0);

    // The ScrollView always returns complient width and height to its parent layout.
    return (eCompliantHeight | eCompliantWidth);
  }

Here is the call graph for this function:

long nux::ScrollView::PostLayoutManagement2 ( long  LayoutResult) [protected, virtual, inherited]

Definition at line 510 of file ScrollView.cpp.

  {
    // In case IsSizeMatchContent returns True, The scroll view is resized to match its content.
    int ScrollbarWidth = 0;
    int ScrollbarHeight = 0;

    if (m_horizontal_scrollbar_enable)
      ScrollbarHeight = _hscrollbar->GetBaseHeight();

    if (m_vertical_scrollbar_enable)
      ScrollbarWidth = _vscrollbar->GetBaseWidth();

    // We want the controller to match the size of the content as defined in:
    //      m_ViewContentX
    //      m_ViewContentY
    //      m_ViewContentWidth
    //      m_ViewContentHeight
    // So we make the composition layout the same size as the content
    // Note that classes that inherits from ScrollView are responsible for setting the dimension of the ViewContent

    if (view_layout_)
    {
      view_layout_->SetBaseX(m_ViewContentX);
      view_layout_->SetBaseY(m_ViewContentY);
      view_layout_->SetBaseWidth(m_ViewContentWidth);
      view_layout_->SetBaseHeight(m_ViewContentHeight);
    }

    Geometry base;
    // Given the(m_ViewContentWidth, m_ViewContentHeight) compute the size of the ScrollView.
    // It is possible that the ScrollView size be limited by its min/Max dimension. If this happens, then the scrollbar will reflect that.
    base.SetX(m_ViewContentX - m_border - m_ViewContentLeftMargin);
    base.SetY(m_ViewContentY - m_top_border - m_ViewContentTopMargin);

    if (m_horizontal_scrollbar_enable)
      base.SetHeight(m_top_border + m_ViewContentTopMargin + m_ViewContentHeight + m_ViewContentBottomMargin + ScrollbarHeight + m_border);
    else
      base.SetHeight(m_top_border + m_ViewContentTopMargin + m_ViewContentHeight + m_ViewContentBottomMargin + m_border);

    if (m_vertical_scrollbar_enable)
      base.SetWidth(m_border + m_ViewContentLeftMargin + m_ViewContentWidth + m_ViewContentRightMargin + ScrollbarWidth + m_border);
    else
      base.SetWidth(m_border + m_ViewContentLeftMargin + m_ViewContentWidth + m_ViewContentRightMargin + m_border);

    // Set the size so that is is equal to the visible content.
    Area::SetBaseWidth(base.GetWidth());
    Area::SetBaseHeight(base.GetHeight());
    Geometry geo = GetGeometry();

    // Horizontal scrollbar Geometry
    if (m_horizontal_scrollbar_enable)
    {
      if (m_vertical_scrollbar_enable == false)
        _hscrollbar->SetBaseWidth(GetBaseWidth() - 2 * m_border);
      else
        _hscrollbar->SetBaseWidth(GetBaseWidth() - ScrollbarWidth - 2 * m_border);

      _hscrollbar->SetBaseX(geo.x + m_border);
      _hscrollbar->SetBaseY(geo.y + geo.GetHeight() - _hscrollbar->GetBaseHeight() - m_border);
      _hscrollbar->ComputeContentSize();

      //---
      _hscrollbar->SetContainerSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                    GetBaseY() + m_top_border + m_ViewContentTopMargin,
                                    GetBaseWidth() - ScrollbarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
                                    GetBaseHeight() - ScrollbarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);

      if (view_layout_)
      {
        _hscrollbar->SetContentSize(view_layout_->GetBaseX(), view_layout_->GetBaseY(),
                                    view_layout_->GetBaseWidth(), view_layout_->GetBaseHeight());
      }
      else
      {
        _hscrollbar->SetContentSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                    GetBaseY() + m_top_border + m_ViewContentTopMargin, 0, 0);
      }

      _hscrollbar->SetContentOffset(_delta_x, _delta_y);
    }
    else
    {
      _hscrollbar->SetBaseWidth(GetBaseWidth() - ScrollbarWidth - 2 * m_border);
      _hscrollbar->SetBaseX(geo.x + m_border);
      _hscrollbar->SetBaseY(geo.y + geo.GetHeight() - _hscrollbar->GetBaseHeight() - m_border);
      _hscrollbar->ComputeContentSize();

      //---
      _hscrollbar->SetContainerSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                    GetBaseY() + m_top_border + m_ViewContentTopMargin,
                                    GetBaseWidth() - ScrollbarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
                                    GetBaseHeight() - ScrollbarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);
      _hscrollbar->SetContentSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                  GetBaseY() + m_top_border + m_ViewContentTopMargin, 0, 0);
      _hscrollbar->SetContentOffset(0, 0);
    }


    // Vertical scrollbar Geometry
    if (m_vertical_scrollbar_enable)
    {
      if (m_horizontal_scrollbar_enable == false)
        _vscrollbar->SetBaseHeight(GetBaseHeight() - m_top_border - m_border);
      else
        _vscrollbar->SetBaseHeight(GetBaseHeight() - ScrollbarHeight - m_top_border - m_border);

      _vscrollbar->SetBaseX(geo.x + geo.GetWidth() - ScrollbarWidth - m_border);
      _vscrollbar->SetBaseY(geo.y + m_top_border);
      _vscrollbar->ComputeContentSize();

      //---
      _vscrollbar->SetContainerSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                    GetBaseY() + m_top_border + m_ViewContentTopMargin,
                                    GetBaseWidth() - ScrollbarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
                                    GetBaseHeight() - ScrollbarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);

      if (view_layout_)
      {
        _vscrollbar->SetContentSize(view_layout_->GetBaseX(), view_layout_->GetBaseY(),
                                    view_layout_->GetBaseWidth(), view_layout_->GetBaseHeight());
      }
      else
      {
        _vscrollbar->SetContentSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                    GetBaseY() + m_top_border + m_ViewContentTopMargin, 0, 0);
      }

      _vscrollbar->SetContentOffset(_delta_x, _delta_y);
    }
    else
    {
      _vscrollbar->SetBaseHeight(GetBaseHeight() - ScrollbarHeight - m_top_border - m_border);
      _vscrollbar->SetBaseX(geo.x + geo.GetWidth() - ScrollbarWidth - m_border);
      _vscrollbar->SetBaseY(geo.y + m_top_border);
      _vscrollbar->ComputeContentSize();

      //---
      _vscrollbar->SetContainerSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                    GetBaseY() + m_top_border + m_ViewContentTopMargin,
                                    GetBaseWidth() - ScrollbarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
                                    GetBaseHeight() - ScrollbarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);
      _vscrollbar->SetContentSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
                                  GetBaseY() + m_top_border + m_ViewContentTopMargin, 0, 0);
      _vscrollbar->SetContentOffset(0, 0);
    }

    if (view_layout_)
      view_layout_->ComputeContentPosition(0, 0);

    return (eCompliantHeight | eCompliantWidth);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::PostResizeGeometry ( ) [protected, virtual, inherited]

Definition at line 152 of file View.cpp.

  {
  }

Here is the caller graph for this function:

void nux::ScrollView::PreLayoutManagement ( ) [protected, virtual, inherited]

Reimplemented from nux::View.

Reimplemented in nux::Panel.

Definition at line 315 of file ScrollView.cpp.

  {
    // Give the managed layout the same size and position as the Control.

    Geometry geo = GetGeometry();
    int ScrollBarWidth = _vscrollbar->GetBaseWidth();
    int ScrollBarHeight = _hscrollbar->GetBaseHeight();

    nuxAssertMsg(ScrollBarWidth > 0, "[ScrollView::PreLayoutManagement] Invalid scrollbar width: %d", ScrollBarWidth);
    nuxAssertMsg(ScrollBarHeight > 0, "[ScrollView::PreLayoutManagement] Invalid scrollbar height: %d", ScrollBarHeight);

    m_ViewX = GetBaseX() + m_border + m_ViewContentLeftMargin;
    m_ViewY = GetBaseY() + m_top_border + m_ViewContentTopMargin;

    if (m_vertical_scrollbar_enable == false)
      m_ViewWidth = GetBaseWidth() - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;
    else
      m_ViewWidth = GetBaseWidth() - ScrollBarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;

    nuxAssertMsg(m_ViewWidth > 0, "[ScrollView::PreLayoutManagement] Invalid view width: %d", m_ViewWidth);

    if (m_horizontal_scrollbar_enable == false)
      m_ViewHeight = GetBaseHeight() - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;
    else
      m_ViewHeight = GetBaseHeight() - ScrollBarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;

    nuxAssertMsg(m_ViewHeight > 0, "[ScrollView::PreLayoutManagement] Invalid view height: %d", m_ViewHeight);

    if (m_ViewX + _delta_x +  m_ViewContentWidth < m_ViewX + m_ViewWidth)
    {
      // The position of the end of the content is smaller than the view right border position
      // Compute _delta_x so the end of the content match exactly the view right border position
      _delta_x = - (m_ViewContentWidth > m_ViewWidth ? m_ViewContentWidth - m_ViewWidth : 0);
      nuxAssert(_delta_x <= 0);
    }

    if (m_ViewY + _delta_y + m_ViewContentHeight < m_ViewY + m_ViewHeight)
    {
      // The position of the end of the content is smaller than the view right border position
      // Compute _delta_y so the end of the content match exactly the view right border position
      _delta_y = - (m_ViewContentHeight > m_ViewHeight ? m_ViewContentHeight - m_ViewHeight : 0);
      nuxAssert(_delta_y <= 0);
    }

    if (view_layout_)
    {
      // Set the composition layout to the size of the view area and offset it by(_delta_x, _delta_y)

      if (view_layout_->GetScaleFactor() != 0)
      {
        view_layout_->SetGeometry(
                m_ViewX,
                m_ViewY,
                m_ViewWidth,
                m_ViewHeight);
      }

      view_layout_->Set2DTranslation(_delta_x, _delta_y, 0);
    }

    // Horizontal scrollbar Geometry
    if (m_horizontal_scrollbar_enable)
    {
      if (m_vertical_scrollbar_enable == false)
      {
        // If there is no vertical scrollbar, take all the width available.
        _hscrollbar->SetBaseWidth(GetBaseWidth() - 2 * m_border);
      }
      else
        _hscrollbar->SetBaseWidth(GetBaseWidth() - ScrollBarWidth - 2 * m_border);

      _hscrollbar->SetBaseX(geo.x + m_border);
      _hscrollbar->SetBaseY(geo.y + geo.GetHeight() - _hscrollbar->GetBaseHeight() - m_border);
      _hscrollbar->ComputeContentSize();
    }
    else
    {
      // The horizontal scrollbar won't be visible but give it a proper size anyway.
      _hscrollbar->SetBaseWidth(GetBaseWidth() - ScrollBarWidth - 2 * m_border);
      _hscrollbar->SetBaseX(geo.x + m_border);
      _hscrollbar->SetBaseY(geo.y + geo.GetHeight() - _hscrollbar->GetBaseHeight() - m_border);
      _hscrollbar->ComputeContentSize();
    }


    // Vertical scrollbar Geometry
    if (m_vertical_scrollbar_enable)
    {
      if (m_horizontal_scrollbar_enable == false)
      {
        // If there is no horizontal scrollbar, take all the width available.
        _vscrollbar->SetBaseHeight(GetBaseHeight() - m_top_border - m_border);
      }
      else
        _vscrollbar->SetBaseHeight(GetBaseHeight() - ScrollBarHeight - m_top_border - m_border);

      _vscrollbar->SetBaseX(geo.x + geo.GetWidth() - ScrollBarWidth - m_border);
      _vscrollbar->SetBaseY(geo.y + m_top_border);
      _vscrollbar->ComputeContentSize();
    }
    else
    {
      // The vertical scrollbar won't be visible but give it a proper size anyway.
      _vscrollbar->SetBaseHeight(GetBaseHeight() - ScrollBarHeight - m_top_border - m_border);
      _vscrollbar->SetBaseX(geo.x + geo.GetWidth() - ScrollBarWidth - m_border);
      _vscrollbar->SetBaseY(geo.y + m_top_border);
      _vscrollbar->ComputeContentSize();
    }
  }

Here is the call graph for this function:

void nux::View::PreResizeGeometry ( ) [protected, virtual, inherited]

Definition at line 147 of file View.cpp.

  {

  }
void nux::View::ProcessDraw ( GraphicsEngine graphics_engine,
bool  force_draw 
) [virtual, inherited]

Definition at line 156 of file View.cpp.

  {
    full_view_draw_cmd_ = false;

    graphics_engine.PushModelViewMatrix(Get2DMatrix());

    if (force_draw)
    {
      GetPainter().PaintBackground(graphics_engine, GetGeometry());
      GetPainter().PushPaintLayerStack();

      draw_cmd_queued_ = true;
      full_view_draw_cmd_ = true;
      Draw(graphics_engine, force_draw);
      DrawContent(graphics_engine, force_draw);
      PostDraw(graphics_engine, force_draw);

      GetPainter().PopPaintLayerStack();
    }
    else
    {
      if (draw_cmd_queued_)
      {
        GetPainter().PaintBackground(graphics_engine, GetGeometry());
        GetPainter().PushPaintLayerStack();

        full_view_draw_cmd_ = true;
        Draw(graphics_engine, false);
        DrawContent(graphics_engine, false);
        PostDraw(graphics_engine, false);

        GetPainter().PopPaintLayerStack();
      }
      else
      {
        DrawContent(graphics_engine, false);
        PostDraw(graphics_engine, false);
      }
    }

    graphics_engine.PopModelViewMatrix();

    draw_cmd_queued_ = false;
    full_view_draw_cmd_ = false;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::QueueDraw ( ) [virtual, inherited]

Causes a redraw. The widget parameter draw_cmd_queued_ is set to true. The widget Draw(), DrawContent() and PostDraw() are called.

Emits the signal OnQueueDraw.

Reimplemented in nux::ClientArea, and nux::TestView.

Definition at line 217 of file View.cpp.

  {
    if (draw_cmd_queued_)
      return;

    //GetWindowCompositor()..AddToDrawList(this);
    WindowThread* application = GetWindowThread();
    if (application)
    {
      application->AddToDrawList(this);
      application->RequestRedraw();
      //GetWindowCompositor().AddToDrawList(this);
    }
    if (view_layout_)
      view_layout_->QueueDraw();

    draw_cmd_queued_ = true;
    OnQueueDraw.emit(this);
  }

Here is the call graph for this function:

void nux::Area::QueueRelayout ( ) [inherited]

Queue a relayout.

Queues a relayout before the next paint cycle. This is safe to call multiple times within a cycle.

Definition at line 848 of file Area.cpp.

Here is the call graph for this function:

Return True if the the parent layouts of this area should be reconfigured on geometry changed.

Returns:
True if the parent layouts of this area must be reconfigured on a geometry change.

Definition at line 416 of file Area.cpp.

void nux::ScrollView::RecvMouseWheel ( int  x,
int  y,
int  wheel_delta,
long  button_flags,
unsigned long  key_flags 
) [protected, inherited]

Definition at line 931 of file ScrollView.cpp.

  {
    // nux can't tell the difference between horizontal and vertical mouse wheel events
    // so we are only going to support vertical
    if (wheel_delta < 0)
    {
      ScrollDown(abs(wheel_delta / NUX_MOUSEWHEEL_DELTA), m_MouseWheelScrollSize);
    }
    else
    {
      ScrollUp(abs(wheel_delta / NUX_MOUSEWHEEL_DELTA), m_MouseWheelScrollSize);
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::Object::Reference ( ) [virtual, inherited]

Increase reference count.

Returns:
True if the object has successfully referenced.

Reimplemented from nux::Trackable.

Definition at line 254 of file Object.cpp.

  {
    if (!IsHeapAllocated())
    {
      LOG_WARN(logger) << "Trying to reference an object that was not heap allocated."
                       << "\nObject allocated at: " << GetAllocationLoation() << "\n";
      return false;
    }

    if (!OwnsTheReference())
    {
      SetOwnedReference(true);
      // The ref count remains at 1. Exit the method.
      return true;
    }

    reference_count_->Increment();
    return true;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::RemoveCompositionLayout ( ) [protected, inherited]

Definition at line 336 of file View.cpp.

  {
    RemoveLayout();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::RemoveLayout ( ) [protected, inherited]

Definition at line 326 of file View.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::RequestBottomUpLayoutComputation ( Area bo_initiator) [protected, virtual, inherited]

Request a Layout recompute after a change of size.

Reimplemented in nux::Layout.

Definition at line 532 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Erase the path from this area to the child area that has the keyboard.

Definition at line 986 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TestScrollView::ResetEvents ( )

Definition at line 49 of file test-scrollview.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::ScrollView::ResetScrollToDown ( ) [virtual, inherited]

Definition at line 913 of file ScrollView.cpp.

Here is the call graph for this function:

void nux::ScrollView::ResetScrollToLeft ( ) [virtual, inherited]

Definition at line 869 of file ScrollView.cpp.

Here is the call graph for this function:

void nux::ScrollView::ResetScrollToRight ( ) [virtual, inherited]

Definition at line 881 of file ScrollView.cpp.

Here is the call graph for this function:

void nux::ScrollView::ResetScrollToUp ( ) [virtual, inherited]

Definition at line 901 of file ScrollView.cpp.

Here is the call graph for this function:

Erase the path that marks this object as part of the keyboard focus chain,
from this area to its top level parent.

Definition at line 999 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::ScrollView::ScrollDown ( float  stepy,
int  mousedy 
) [virtual, inherited]

Reimplemented in nux::Panel.

Definition at line 828 of file ScrollView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::ScrollView::ScrollLeft ( float  stepx,
int  mousedx 
) [virtual, inherited]

Reimplemented in nux::Panel.

Definition at line 754 of file ScrollView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::ScrollView::ScrollRight ( float  stepx,
int  mousedx 
) [virtual, inherited]

Reimplemented in nux::Panel.

Definition at line 777 of file ScrollView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::ScrollView::ScrollUp ( float  stepy,
int  mousedy 
) [virtual, inherited]

Reimplemented in nux::Panel.

Definition at line 800 of file ScrollView.cpp.

  {
    if (m_ViewContentHeight <= m_ViewHeight)
      return;

    if (view_layout_)
    {
      int last_delta_y = _delta_y;
      _delta_y += stepy * mousedy;

      if (_delta_y > 0)
      {
        _delta_y = 0;
      }

      if (last_delta_y != _delta_y)
      {
        QueueDraw();
        _vscrollbar->QueueDraw();
      }

      view_layout_->Set2DTranslation(_delta_x, _delta_y, 0);
      _vscrollbar->SetContentOffset(_delta_x, _delta_y);

      scrolling.emit(_delta_x, _delta_y);
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::View::SearchInAllSubNodes ( Area bo) [inherited]

Definition at line 341 of file View.cpp.

  {
    if (view_layout_)
      return view_layout_->SearchInAllSubNodes(bo);

    return false;
  }

Here is the call graph for this function:

bool nux::View::SearchInFirstSubNodes ( Area bo) [inherited]

Definition at line 349 of file View.cpp.

  {
    if (view_layout_)
      return view_layout_->SearchInFirstSubNodes(bo);

    return false;
  }

Here is the call graph for this function:

void nux::Area::Set2DMatrix ( const Matrix4 mat) [inherited]

Definition at line 656 of file Area.cpp.

  {
    _2d_xform = mat;
  }
void nux::Area::Set2DTranslation ( float  tx,
float  ty,
float  tz 
) [inherited]

Definition at line 661 of file Area.cpp.

  {
    _2d_xform.Translate(tx, ty, tz);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

std::new_handler nux::Trackable::set_new_handler ( std::new_handler  handler) [static, inherited]

Definition at line 133 of file Object.cpp.

  {
    std::new_handler old_handler = _new_current_handler;
    _new_current_handler = handler;
    return old_handler;
  }

Here is the caller graph for this function:

void nux::Area::SetAcceptKeyboardEvent ( bool  accept_key_event) [inherited]

Enable keyboard event processing.

Parameters:
accept_key_eventSet it to true if the area accepts keyboard events.

Definition at line 853 of file Area.cpp.

  {
    accept_keyboard_event_ = accept_keyboard_event;
  }

Here is the caller graph for this function:

void nux::InputArea::SetAcceptKeyNavFocusOnMouseDown ( bool  accept) [inherited]

Definition at line 397 of file InputArea.cpp.

Here is the caller graph for this function:

void nux::InputArea::SetAcceptKeyNavFocusOnMouseEnter ( bool  accept) [inherited]

Definition at line 402 of file InputArea.cpp.

Here is the caller graph for this function:

void nux::Area::SetAcceptMouseWheelEvent ( bool  accept_mouse_wheel_event) [inherited]

Enable mouse wheel event processing.

Parameters:
accept_mouse_wheel_eventSet it to true if the area accepts mouse wheel events.

Definition at line 863 of file Area.cpp.

  {
    accept_mouse_wheel_event_ = accept_mouse_wheel_event;
  }

Here is the caller graph for this function:

void nux::Area::SetBaseHeight ( int  h) [inherited]

Definition at line 390 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetBaseSize ( int  w,
int  h 
) [virtual, inherited]

Set the size of the object.

Definition at line 380 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::InputArea::SetBaseString ( const char *  Caption) [virtual, inherited]

Reimplemented from nux::Area.

Definition at line 73 of file InputArea.cpp.

  {
    Area::SetBaseString(Caption);
  }

Here is the caller graph for this function:

void nux::Area::SetBaseWidth ( int  w) [inherited]

Definition at line 385 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetBaseX ( int  x) [inherited]

Definition at line 365 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetBaseXY ( int  x,
int  y 
) [inherited]

Definition at line 375 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetBaseY ( int  y) [inherited]

Definition at line 370 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::View::SetCompositionLayout ( Layout layout) [protected, virtual, inherited]

Deprecated. Use SetLayout();.

Definition at line 321 of file View.cpp.

  {
    return SetLayout(layout);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::View::SetEnableView ( bool  enable) [virtual, inherited]

Set the enable state of the view.

Set the enable state of the view.

Parameters:
enable.The state of the view to be set.

Definition at line 396 of file View.cpp.

  {
    if (enable)
    {
      EnableView();
    }
    else
    {
      DisableView();
    }
  }

Here is the call graph for this function:

void nux::Area::SetExtend ( MinorDimensionSize  ext) [virtual, inherited]

Definition at line 601 of file Area.cpp.

  {
    minor_axis_size_ = ext;
  }

Here is the caller graph for this function:

void nux::View::SetFont ( ObjectPtr< FontTexture font) [inherited]

Reimplemented in nux::StaticTextBox.

Definition at line 364 of file View.cpp.

  {
    _font = font;
  }

Here is the caller graph for this function:

void nux::ScrollView::SetGeometry ( const Geometry geo) [virtual, inherited]

Inherited from Area.

Reimplemented from nux::View.

Definition at line 301 of file ScrollView.cpp.

  {
    Area::SetGeometry(geo);
    //ComputeContentSize();
  }

Here is the caller graph for this function:

void nux::Area::SetGeometry ( int  x,
int  y,
int  w,
int  h 
) [inherited]

Set the geometry of the object.

Set the width, height, and x, y position of the object on the screen.

Parameters:
xHorizontal position.
yVertical position.
wWidth.
hHeight.
See also:
SetBaseWidth(), SetBaseHeight(), SetBaseX(), SetBaseY().

Definition at line 338 of file Area.cpp.

  {
    h = nux::Clamp<int> (h, min_size_.height, max_size_.height);
    w = nux::Clamp<int> (w, min_size_.width, max_size_.width);

    nux::Geometry geometry(x, y, w, h);
    if (geometry_ == geometry)
      return;

    GeometryChangePending();
    geometry_ = geometry;
    ReconfigureParentLayout();
    GeometryChanged();

    OnGeometryChanged.emit(this, geometry_);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetInputEventSensitivity ( bool  sensitive) [inherited]

Set input event sensitivity of the area.

A insensitive Area will not receive input events.
If the Area has a layout, the event will be passed down to it. Sensitivity only control an area's ability to receive input events(keyboard, mouse, touch). An area that is not sensitive will return false in TestMousePointerInclusion, TestMousePointerInclusionFilterMouseWheel and AcceptKeyNavFocus.
Sensitivity does not affect layouts since they do not process events.

By default, an area is sensitive.

Parameters:
sensitiveIf the area should receive input events

Definition at line 563 of file Area.cpp.

  {
    if (IsLayout())
      return;

    if (sensitive_ == sensitive)
      return;

    sensitive_ = sensitive;

    OnSensitiveChanged.emit(this, sensitive_);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::InputArea::SetKeyboardReceiverIgnoreMouseDownOutside ( bool  ignore_mouse_down_outside) [inherited]

Definition at line 114 of file InputArea.cpp.

  {
    _keyboard_receiver_ignore_mouse_down_outside = ignore_mouse_down_outside;
  }
bool nux::ScrollView::SetLayout ( Layout layout) [virtual, inherited]

Set the default layout for this view.

Set the default layout for this view. Assigns a scale factor of 1 to the layout.

Parameters:
layoutA Layout object.

Reimplemented from nux::View.

Reimplemented in nux::Panel.

Definition at line 201 of file ScrollView.cpp.

  {
    if (View::SetLayout(layout) == false)
    {
      return false;
    }

    FormatContent();

    return true;
  }

Here is the call graph for this function:

void nux::Area::SetLayoutDone ( bool  b) [virtual, inherited]

Definition at line 621 of file Area.cpp.

  {
    layout_done_ = b;
  }
void nux::Area::SetMaximumHeight ( int  h) [virtual, inherited]

Definition at line 233 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetMaximumSize ( int  w,
int  h 
) [virtual, inherited]

Definition at line 150 of file Area.cpp.

  {
    nuxAssert(w >= 0);
    nuxAssert(h >= 0);
    max_size_ = Size(w, h);

    CheckMaxSize();

    ReconfigureParentLayout();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetMaximumWidth ( int  w) [virtual, inherited]

Definition at line 217 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetMinimumHeight ( int  h) [virtual, inherited]

Definition at line 225 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: