Back to index

nux  3.0.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
nux::GridHLayout Class Reference

An horizontal grid layout. More...

#include <GridHLayout.h>

Inheritance diagram for nux::GridHLayout:
Inheritance graph
[legend]
Collaboration diagram for nux::GridHLayout:
Collaboration graph
[legend]

List of all members.

Public Types

enum  FillingOrder { FILL_HORIZONTAL, FILL_VERTICAL }

Public Member Functions

 GridHLayout (NUX_FILE_LINE_PROTO)
 ~GridHLayout ()
virtual void GetCompositeList (std::list< Area * > *ViewList)
void EnablePartialVisibility (bool partial_visibility)
 Control the visibility of elements on the bottom edge.
void SetChildrenSize (int width, int height)
 Set the size of the grid element.
Size GetChildrenSize () const
 Get the size of the grid element.
void ForceChildrenSize (bool force)
 Force the grid elements size.
int GetNumColumn () const
 Get the number of columns in the grid.
int GetNumRow () const
 Get the number of rows in the grid.
void MatchContentSize (bool match_content)
 Make the grid width match the size of its content.
bool IsMatchingContentSize () const
 Return True if the grid width match the size of its content.
virtual void ProcessDraw (GraphicsEngine &graphics_engine, bool force_draw)
 Draw Element.
void SetSpaceBetweenChildren (int horizontal_space, int vertical_space)
void SetFillingOrder (FillingOrder order)
FillingOrder GetFillingOrder () const
 NUX_DECLARE_OBJECT_TYPE (InitiallyUnownedObject, Object)
 NUX_DECLARE_OBJECT_TYPE (BaseObject, Trackable)
virtual void AddLayout (Layout *, unsigned int stretchFactor=1, MinorDimensionPosition=eAbove, MinorDimensionSize extend=eFull, float percentage=100.0f, LayoutPosition=NUX_LAYOUT_END)
virtual void AddView (Area *baseobject, unsigned int stretchFactor=1, MinorDimensionPosition positioning=eAbove, MinorDimensionSize extend=eFull, float percentage=100.0f, LayoutPosition index=NUX_LAYOUT_END)
 Add an object to the layout.
virtual void AddSpace (unsigned int width, unsigned int stretchFactor=0, LayoutPosition index=NUX_LAYOUT_END)
virtual void Clear ()
void SetLeftAndRightPadding (int padding)
 Set the left/right padding with the same value.
void SetLeftAndRightPadding (int left, int right)
 Set the left/right padding independently.
void SetTopAndBottomPadding (int padding)
 Set the top/bottom padding with the same value.
void SetTopAndBottomPadding (int top, int bottom)
 Set the top/bottom padding independently.
void SetPadding (int top_bottom_padding, int left_right_padding)
 Set the left/right and top/bottom padding of the layout.
void SetPadding (int top, int right, int bottom, int left)
 Set the left/right/top/bottom padding of the layout.
void SetPadding (int padding)
 Set the left/right/top/bottom padding of the layout.
virtual unsigned int GetMaxStretchFactor ()
unsigned int GetMinStretchFactor ()
unsigned int GetNumStretchFactor (unsigned int sf)
int GetContentWidth () const
int GetContentHeight () const
void SetHorizontalExternalMargin (int m)
 Deprecated. Use SetLeftRightPadding.
void SetVerticalExternalMargin (int m)
 Deprecated. Use SetTopBottomPadding,.
int GetLeftPadding () const
int GetRightPadding () const
int GetTopPadding () const
int GetBottomPadding () const
virtual void Draw ()
void DoneRedraw ()
bool SearchInAllSubNodes (Area *bo)
bool SearchInFirstSubNodes (Area *bo)
AreaFindAreaUnderMouse (const Point &mouse_position, NuxEventType event_type)
 Return the area under the mouse pointer.
virtual void QueueDraw ()
 Mark all element in the layout as dirty.
bool IsQueuedForDraw ()
 Return true if a draw has been scheduled for this layout.
virtual void SetContentDistribution (LayoutContentDistribution stacking_order)
 Define how elements are spread out inside the layout.
virtual LayoutContentDistribution GetContentDistribution ()
virtual bool FindWidget (Area *WidgetObject) const
virtual bool IsEmpty () const
virtual void RemoveChildObject (Area *)
virtual void RequestBottomUpLayoutComputation (Area *bo_initiator)
 Request a Layout recompute after a change of size.
std::list< Area * > & GetChildren ()
virtual void ChildViewQueuedDraw (View *view)
virtual void ChildLayoutQueuedDraw (Layout *layout)
virtual void ChildLayoutChildQueuedDraw (Area *area)
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 SetGeometry (int x, int y, int w, int h)
 Set the geometry of the object.
void SetGeometry (const Geometry &geo)
 Set the geometry of the object.
void IncreaseSize (int x, int y)
void SetBaseString (const char *Caption)
const NStringGetBaseString () const
AreaGetToplevel ()
 Deprecated. Use GetToplevel.
AreaGetRootParent ()
 Return the root parent of the rendering tree for this area.
AreaGetTopLevelViewWindow ()
 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 void ComputeContentPosition (float offsetX, float offsetY)
virtual bool IsArea () const
virtual bool IsInputArea () const
virtual bool IsView () const
virtual bool IsLayout () const
virtual bool IsSpaceLayout () const
virtual bool IsViewWindow () const
AreaGetParentObject () 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.
virtual AreaFindKeyFocusArea (unsigned int key_symbol, unsigned long x11_key_code, unsigned long special_keys_state)
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

sigc::signal< void, Layout * > OnQueueDraw
 Signal emitted when a layout is scheduled for a draw.
sigc::signal< void, Area * > OnChildQueueDraw
sigc::signal< void, Layout
*, Area * > 
ViewAdded
sigc::signal< void, Layout
*, Area * > 
ViewRemoved
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

long ComputeLayoutRowOrder ()
long ComputeLayoutColumnOrder ()
virtual long ComputeContentSize ()
int GetChildPos (Area *child)
AreaGetChildAtPosition (int pos)
AreaKeyNavIterationRowOrder (KeyNavDirection direction)
AreaKeyNavIterationColumnOrder (KeyNavDirection direction)
virtual AreaKeyNavIteration (KeyNavDirection direction)
virtual bool AcceptKeyNavFocus ()
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.
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 *)
AreaGetNextObjectToKeyFocusArea ()
 Gets the next object in the chain that ends with the area that has the keyboard focus.
void SetOwnedReference (bool b)

Protected Attributes

FillingOrder filling_order_
int m_v_in_margin
int m_h_in_margin
bool _queued_draw
Size m_ContentSize
int m_contentWidth
int m_contentHeight
int m_fittingWidth
int m_fittingHeight
int space_between_children_
int top_padding_
int bottom_padding_
int left_padding_
int right_padding_
std::list< Area * > _layout_element_list
NString m_name
LayoutContentDistribution m_ContentStacking
bool on_geometry_change_reconfigure_parent_layout_
bool has_key_focus_
 If this variable is true, then this area has the keyboard focus.
Areanext_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 (GridHLayout, Layout)

Private Attributes

Size _children_size
bool _dynamic_column
bool _force_children_size
bool _partial_visibility
bool match_content_size_
 If True, for the height of the layout to match the height of the content.
int _num_row
int _num_column

Detailed Description

An horizontal grid layout.

Fills the grid from left to right and going down.

Definition at line 34 of file GridHLayout.h.


Member Enumeration Documentation

Enumerator:
FILL_HORIZONTAL 
FILL_VERTICAL 

Definition at line 45 of file GridHLayout.h.


Constructor & Destructor Documentation

Definition at line 33 of file GridHLayout.cpp.

    :   Layout(NUX_FILE_LINE_PARAM)
  {
#if DEBUG_LAYOUT
    m_h_in_margin = 10;
    left_padding_ = 10;
    right_padding_ = 10;
    m_v_in_margin = 10;
    top_padding_ = 10;
    bottom_padding_ = 10;
#endif

    m_h_in_margin = 10;
    m_v_in_margin = 10;

    filling_order_ = FILL_HORIZONTAL;
    _children_size = Size(64, 64);
    _force_children_size = true;
    _partial_visibility = true;
    _num_row = 1;
    _num_column = 1;
    _dynamic_column = true;
    match_content_size_ = true;

    // Start packing the elements from the top. Is the layout has more space than the elements can use,
    // leave that space at the bottom of the GridHLayout.
    m_ContentStacking = MAJOR_POSITION_LEFT;

    SetMinimumSize(32, 32);
  }

Here is the call graph for this function:

Definition at line 64 of file GridHLayout.cpp.

  {

  }

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::Layout::AcceptKeyNavFocus ( ) [protected, virtual, inherited]

Definition at line 598 of file Layout.cpp.

  {
    return false;
  }
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::Layout::AddLayout ( Layout layout,
unsigned int  stretchFactor = 1,
MinorDimensionPosition  minor_position = eAbove,
MinorDimensionSize  extend = eFull,
float  percentage = 100.0f,
LayoutPosition  index = NUX_LAYOUT_END 
) [virtual, inherited]

Reimplemented in nux::SpaceLayout, and nux::LinearLayout.

Definition at line 199 of file Layout.cpp.

  {
    nuxAssertMsg(layout != 0, "[Layout::AddView] Invalid parameter.");
    NUX_RETURN_IF_TRUE(layout == 0);
    //  Should never happen
    nuxAssertMsg(layout != this, "[Layout::AddLayout] Error: Trying to add a layout to itself.");
    NUX_RETURN_IF_FALSE(layout != 0);

    Area *parent = layout->GetParentObject();
    nuxAssertMsg(parent == 0, "[Layout::AddLayout] Trying to add an object that already has a parent.");
    NUX_RETURN_IF_TRUE(parent != 0);

    nuxAssertMsg(index >= 0, "[Layout::AddLayout] Invalid index position. Adding at the beginning of the list..");

    layout->SetScaleFactor(stretchFactor);
    layout->SetPositioning(minor_position);
    layout->SetExtend(minor_size);

    if (percentage < 1.0f)
    {
      layout->SetPercentage(1.0f);
    }
    else if (percentage > 100.0f)
    {
      layout->SetPercentage(100.0f);
    }
    else
    {
      layout->SetPercentage(percentage);
    }

    layout->SetParentObject(this);

    layout->OnChildQueueDraw.connect(sigc::mem_fun(this, &Layout::ChildLayoutChildQueuedDraw));
    layout->OnQueueDraw.connect(sigc::mem_fun(this, &Layout::ChildLayoutQueuedDraw));

    if (index < 0)
      index = NUX_LAYOUT_BEGIN;

    if (index == NUX_LAYOUT_END || index >= _layout_element_list.size())
    {
      _layout_element_list.push_back(layout);
    }
    else
    {
      std::list<Area *>::iterator pos = _layout_element_list.begin();
      int idx = index;
      while (pos != _layout_element_list.end() && idx > 0)
      {
        idx--;
        pos++;
      }
      _layout_element_list.insert(pos, layout);
    }

  }

Here is the call graph for this function:

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::Layout::AddSpace ( unsigned int  width,
unsigned int  stretchFactor = 0,
LayoutPosition  index = NUX_LAYOUT_END 
) [virtual, inherited]

Reimplemented in nux::SpaceLayout, and nux::LinearLayout.

Definition at line 347 of file Layout.cpp.

  {
    AddLayout(new SpaceLayout(), stretchFactor);
  }

Here is the call graph for this function:

void nux::Layout::AddView ( Area bo,
unsigned int  stretchFactor = 1,
MinorDimensionPosition  minor_position = eAbove,
MinorDimensionSize  minor_size = eFull,
float  percentage = 100.0f,
LayoutPosition  index = NUX_LAYOUT_END 
) [virtual, inherited]

Add an object to the layout.

Add an object to the layout. A baseobject minor dimension with respect to a layout object is the dimension opposite to the layout flow. A baseobject major dimension with respect to a layout object is the dimension aligned with the layout flow. A layout object minor dimension is the dimension opposite to the layout flow. A layout object major dimension is the dimension aligned with the layout flow.

Add an object to the layout. The added object get its size and position managed by the layout. When a baseobject is added with a stretches factor equal to 0, its major dimension assumes its minimum value. For instance, if the layout is a vertical layout and the added object has a stretch factor equal 0, then during the layout, the added object height will be set to its minimum value using ApplyMinHeight().

The positioning parameter controls how the layout will place the object within itself. A vertical layout object controls the horizontal positioning of its children baseobject, While an horizontal layout object controls the vertical positioning of its children baseobject.

The extend parameter controls how much size the baseobject minor dimension gets from the layout minor dimension. See MinorDimensionSize.

/param baseobject The object that is being added. /param stretchFactor This value controls how the layout object share space between its children baseobject. /param positioning Controls how the layout position the object. /param extend Controls the object minor dimension size. /param percentage Controls the object minor dimension size in percentage of the layout minor dimension size. /param index Controls the object position in the layout.

Add an object to the layout. A baseobject minor dimension with respect to a layout object is the dimension opposite to the layout flow. A baseobject major dimension with respect to a layout object is the dimension aligned with the layout flow. A layout object minor dimension is the dimension opposite to the layout flow. A layout object major dimension is the dimension aligned with the layout flow.

Add an object to the layout. The added object get its size and position managed by the layout. When a baseobject is added with a stretches factor equal to 0, its major dimension assumes its minimum value. For instance, if the layout is a vertical layout and the added object has a stretch factor equal 0, then during the layout, the added object height will be set to its minimum value using ApplyMinHeight().

The minor_position parameter controls how the layout will place the object within itself. A vertical layout object controls the horizontal positioning of its children baseobjects, While an horizontal layout object controls the vertical positioning of its children baseobjects.

The minor_size parameter controls how much size the baseobject minor dimension gets from the layout minor dimension. See MinorDimensionSize.

/param baseobject The object that is being added. /param stretchFactor This value controls how the layout object share space between its children baseobject. /param minor_position Controls how the layout position the object. /param minor_size Controls the object minor dimension size. /param percentage Controls the object minor dimension size in percentage of the layout minor dimension size. /param index Controls the object position in the layout children.

Reimplemented in nux::SpaceLayout, and nux::LinearLayout.

Definition at line 281 of file Layout.cpp.

  {
    nuxAssertMsg(bo != 0, "[Layout::AddView] Invalid parameter.");
    NUX_RETURN_IF_TRUE(bo == 0);

    Area *parent = bo->GetParentObject();
    nuxAssertMsg(parent == 0, "[Layout::AddView] Trying to add an object that already has a parent.");
    NUX_RETURN_IF_TRUE(parent != 0);

    nuxAssertMsg(index >= 0, "[Layout::AddView] Invalid index position. Adding at the beginning of the list..");

    bo->SetScaleFactor(stretchFactor);
    bo->SetPositioning(minor_position);
    bo->SetExtend(minor_size);

    if (percentage < 1.0f)
    {
      bo->SetPercentage(1.0f);
    }
    else if (percentage > 100.0f)
    {
      bo->SetPercentage(100.0f);
    }
    else
    {
      bo->SetPercentage(percentage);
    }

    bo->SetParentObject(this);

    if (bo->IsView())
      static_cast<View *> (bo)->OnQueueDraw.connect(sigc::mem_fun(this, &Layout::ChildViewQueuedDraw));

    //if(HasFocusControl() && HasFocusableEntries() == false)
    //{
      //bo->SetFocused(true);
      //ChildFocusChanged(this, bo);
    //}

    if (index < 0)
      index = NUX_LAYOUT_BEGIN;

    if (index == NUX_LAYOUT_END || index >= _layout_element_list.size())
    {
      _layout_element_list.push_back(bo);
    }
    else
    {
#if defined(NUX_OS_WINDOWS) && !defined(NUX_VISUAL_STUDIO_2010)
      std::list<Area *>::iterator pos = _layout_element_list.begin();
#else
      auto pos = _layout_element_list.begin();
#endif
      int idx = index;
      while (pos != _layout_element_list.end() && idx > 0)
      {
        idx--;
        pos++;
      }
      _layout_element_list.insert(pos, bo);
    }

    ViewAdded.emit(this, bo);
    //--->> Removed because it cause problem with The splitter widget: ComputeContentSize();
  }

Here is the call graph for this function:

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:

void nux::Layout::ChildLayoutChildQueuedDraw ( Area area) [virtual, inherited]

Definition at line 593 of file Layout.cpp.

  {
    OnChildQueueDraw.emit(area);
  }

Here is the caller graph for this function:

void nux::Layout::ChildLayoutQueuedDraw ( Layout layout) [virtual, inherited]

Definition at line 588 of file Layout.cpp.

  {
    OnChildQueueDraw.emit(layout);
  }

Here is the caller graph for this function:

void nux::Layout::ChildViewQueuedDraw ( View view) [virtual, inherited]

Definition at line 583 of file Layout.cpp.

  {
    OnChildQueueDraw.emit(view);
  }

Here is the caller graph for this function:

void nux::Layout::Clear ( ) [virtual, inherited]

Reimplemented in nux::LayeredLayout.

Definition at line 352 of file Layout.cpp.

  {
    std::list<Area *>::iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      (*it)->UnParentObject();
    }

    _layout_element_list.clear();
  }

Here is the caller graph for this function:

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

Reimplemented in nux::SpaceLayout, nux::ScrollView, nux::BaseWindow, nux::TabView, nux::FloatingWindow, nux::GroupBox, nux::GroupBox2, nux::Panel, nux::View, nux::HLayout, and nux::VLayout.

Definition at line 406 of file Area.cpp.

  {

  }

Here is the caller graph for this function:

long nux::GridHLayout::ComputeContentSize ( ) [protected, virtual]

Reimplemented from nux::Area.

Definition at line 451 of file GridHLayout.cpp.

  {
    if (filling_order_ == FILL_HORIZONTAL)
    {
      return ComputeLayoutRowOrder();
    }
    else
    {
      return ComputeLayoutColumnOrder();
    }
  }

Here is the call graph for this function:

Definition at line 313 of file GridHLayout.cpp.

  {
    std::list<Area *> elements;

    if (GetScaleFactor() == 0)
    {
      ApplyMinHeight();
    }

    if (_layout_element_list.size() == 0)
    {
      return eCompliantHeight | eCompliantWidth;
    }

    int num_elements = 0;

    std::list<Area *>::iterator it;
    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it)->IsVisible())
      {
        (*it)->SetLayoutDone(false);
        elements.push_back(*it);
        num_elements++;
      }
      (*it)->SetLayoutDone(false);
    }

    int original_width = GetBaseWidth();

    nux::Geometry base = GetGeometry();
    it = elements.begin();
    int num_row = 0;
    int num_column = 0;

    if (num_elements > 0)
      ++num_column;

    if (_dynamic_column)
    {
      int X = base.x + left_padding_;
      int Y = base.y + top_padding_;

      bool first_element_of_column = true;

      for (int i = 0; i < num_elements; i++)
      {
        if (num_column == 1)
          num_row++;

        if (first_element_of_column)
        {
          first_element_of_column = false;
        }

        if (_force_children_size)
        {
          (*it)->SetMinimumSize(_children_size.width, _children_size.height);
        }

        (*it)->SetGeometry(nux::Geometry(X, Y, _children_size.width, _children_size.height));

        (*it)->ComputeContentSize();

        Y += _children_size.height + m_v_in_margin;

        it++;

        if ((!_partial_visibility) && (Y + _children_size.height > base.y + base.height - top_padding_))
        {
          X += _children_size.width + m_h_in_margin;
          Y = base.y + top_padding_;

          first_element_of_column = true;
          if (i < num_elements - 1)
            ++num_column;
        }
        else if (Y >= base.y + base.height)
        {
          X += _children_size.width + m_h_in_margin;
          Y = base.y + top_padding_;

          first_element_of_column = true;
          if (i < num_elements - 1)
            ++num_column;
        }
      }
    }

    _num_row = num_row;
    _num_column = num_column;

    if ((GetScaleFactor() == 0) || match_content_size_)
    {
      int w = num_column * _children_size.width + (left_padding_ + right_padding_) + (num_column - 1) * m_h_in_margin;
      SetMinimumWidth(w);
      SetBaseWidth(w);
    }

    long size_compliance = 0L;

    if (GetBaseWidth() > original_width)
    {
#if DEBUG_LAYOUT_COMPUTATION
      // The layout has been resized larger in WIDTH to tightly pack its content.
      // Or you can say that the layout refuse to be smaller than total WIDTH of its elements.
      std::cout << "ComputeContentSize: VLayout Width block at " << GetWidth() << std::endl;
#endif
      size_compliance |= eLargerWidth; // need scrollbar
    }
    else if (GetBaseWidth() < original_width)
    {
#if DEBUG_LAYOUT_COMPUTATION
      // The layout is smaller.
      std::cout << "ComputeContentSize: VLayout Width smaller = " << GetWidth() << std::endl;
#endif
      size_compliance |= eSmallerWidth;
    }
    else
    {
#if DEBUG_LAYOUT_COMPUTATION
      // The layout and its content resized together without trouble.
      std::cout << "ComputeContentSize: VLayout Width compliant = " << GetWidth() << std::endl;
#endif
      size_compliance |= eCompliantWidth;
    }

    {
#if DEBUG_LAYOUT_COMPUTATION
      // The layout and its content resized together without trouble.
      std::cout << "ComputeContentSize: VLayout Height compliant = " << m_fittingHeight << std::endl;
#endif
      size_compliance |= eCompliantHeight;
    }

    return size_compliance;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 163 of file GridHLayout.cpp.

  {
    std::list<Area *> elements;

    if (GetScaleFactor() == 0)
    {
      ApplyMinWidth();
    }

    if (_layout_element_list.size() == 0)
    {
      return eCompliantHeight | eCompliantWidth;
    }

    int num_elements = 0;

    std::list<Area *>::iterator it;
    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it)->IsVisible())
      {
        (*it)->SetLayoutDone(false);
        elements.push_back(*it);
        num_elements++;
      }
      (*it)->SetLayoutDone(false);
    }

    int original_height = GetBaseHeight();

    // The grid layout goes through the child elements and assign them a size and position. Children are filled in the grid like this:
    //  0   1   2   3   4   5
    //  6   7   8   9   10  11
    //  12  13  ..  ..  ..  ..
    // This is a left to right fill going down. An option can be added the fill the grid from top to bottom and going toward the right.

    nux::Geometry base = GetGeometry();
    it = elements.begin();
    int num_row = 0;
    int num_column = 0;

    if (num_elements > 0)
      ++num_row;

    if (_dynamic_column)
    {
      int X = base.x + left_padding_;
      int Y = base.y + top_padding_;

      bool first_element_of_row = true;

      for (int i = 0; i < num_elements; i++)
      {
        if (num_row == 1)
          num_column++;

        if (first_element_of_row)
        {
          first_element_of_row = false;
        }

        if (_force_children_size)
        {
          (*it)->SetMinimumSize(_children_size.width, _children_size.height);
        }

        (*it)->SetGeometry(nux::Geometry(X, Y, _children_size.width, _children_size.height));

        (*it)->ComputeContentSize();

        X += _children_size.width + m_h_in_margin;

        it++;

        if ((!_partial_visibility) && (X + _children_size.width > base.x + base.width))
        {
          X = base.x + left_padding_;
          Y += _children_size.height + m_v_in_margin;

          first_element_of_row = true;
          if (i < num_elements - 1)
            ++num_row;
        }
        else if (X >= base.x + base.width)
        {
          X = base.x + left_padding_;
          Y += _children_size.height + m_v_in_margin;

          first_element_of_row = true;
          if (i < num_elements - 1)
            ++num_row;
        }
      }
    }

    _num_row = num_row;
    _num_column = num_column;

    if ((GetScaleFactor() == 0) || match_content_size_)
    {
      int h = num_row * _children_size.height + (top_padding_ + bottom_padding_) + (num_row - 1) * m_v_in_margin;
      SetMinimumHeight(h);
      SetBaseHeight(h);
    }

    long size_compliance = 0L;
    {
#if DEBUG_LAYOUT_COMPUTATION
      // The layout and its content resized together without trouble.
      std::cout << "ComputeContentSize: GridHLayout Width compliant = " << m_fittingWidth << std::endl;
#endif
      size_compliance |= eCompliantWidth;
    }

    // The layout has been resized to tightly pack its content
    if (GetBaseHeight() > original_height)
    {
#if DEBUG_LAYOUT_COMPUTATION
      // The layout has been resized larger in height to tightly pack its content.
      // Or you can say that the layout refuse to be smaller than total HEIGHT of its elements.
      std::cout << "ComputeContentSize: GridHLayout Height block at " << GetBaseHeight() << std::endl;
#endif
      size_compliance |= eLargerHeight; // need scrollbar
    }
    else if (GetBaseHeight() < original_height)
    {
#if DEBUG_LAYOUT_COMPUTATION
      // The layout is smaller.
      std::cout << "ComputeContentSize: GridHLayout Height is smaller = " << GetBaseHeight() << std::endl;
#endif
      size_compliance |= eSmallerHeight;
    }
    else
    {
#if DEBUG_LAYOUT_COMPUTATION
      // The layout and its content resized together without trouble.
      std::cout << "ComputeContentSize: GridHLayout Height compliant = " << GetBaseHeight() << std::endl;
#endif
      size_compliance |= eCompliantHeight;
    }

    //    if (GetScaleFactor() == 0)
    //    {
    //        return size_compliance | eForceComply;
    //    }

    //SetDirty(false);
    return size_compliance;
  }

Here is the call graph for this function:

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::Layout::DoneRedraw ( ) [inherited]

Definition at line 457 of file Layout.cpp.

  {
    std::list<Area *>::iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it)->IsView())
      {
        View *ic = NUX_STATIC_CAST(View *, (*it));
        ic->DoneRedraw();
      }
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void nux::Layout::Draw ( ) [inline, virtual, inherited]

Definition at line 178 of file Layout.h.

{}
void nux::GridHLayout::EnablePartialVisibility ( bool  partial_visibility)

Control the visibility of elements on the bottom edge.

Controls how the layout places the elements at its bottom edge.

Parameters:
partial_visibilityIf True, the layout will position elements at its bottom edge even if they are partially visible.

Definition at line 104 of file GridHLayout.cpp.

  {
    _partial_visibility = partial_visibility;
  }

Here is the caller graph for this function:

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

Return the area under the mouse pointer.

Returns:
The Area under the mouse pointer.

Reimplemented from nux::Area.

Reimplemented in nux::LayeredLayout.

Definition at line 471 of file Layout.cpp.

  {
    bool mouse_inside = TestMousePointerInclusionFilterMouseWheel(mouse_position, event_type);

    if (mouse_inside == false)
      return NULL;

    std::list<Area *>::iterator it;
    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it)->IsVisible() && (*it)->GetInputEventSensitivity())
      {
        Area* hit_view = NUX_STATIC_CAST(Area*, (*it)->FindAreaUnderMouse(mouse_position, event_type));
        if (hit_view)
          return hit_view;
      }
    }

    return NULL;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented in nux::View, and nux::InputArea.

Definition at line 943 of file Area.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:

Here is the caller graph for this function:

bool nux::Layout::FindWidget ( Area WidgetObject) const [virtual, inherited]

Reimplemented in nux::SpaceLayout.

Definition at line 176 of file Layout.cpp.

  {
    std::list<Area *>::const_iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it) == WidgetObject)
      {
        return true;
      }
    }

    return false;
  }

Force the grid elements size.

Force the grid elements size to be the one provided by SetChildrenSize.

Definition at line 119 of file GridHLayout.cpp.

  {
    _force_children_size = force;
  }

Here is the caller graph for this function:

virtual void nux::Area::GeometryChanged ( ) [inline, 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 in nux::TextEntry, and nux::View.

Definition at line 592 of file Area.h.

{}

Here is the caller graph for this function:

virtual void nux::Area::GeometryChangePending ( ) [inline, 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 in nux::View.

Definition at line 586 of file Area.h.

{}

Here is the caller 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;
  }
int nux::Layout::GetBottomPadding ( ) const [inherited]

Definition at line 82 of file Layout.cpp.

  {
    return bottom_padding_;
  }
Area * nux::GridHLayout::GetChildAtPosition ( int  pos) [protected]

Definition at line 89 of file GridHLayout.cpp.

  {
    int position = 0;
    std::list<Area *>::const_iterator it;
    for (it = GetChildren().begin(); it != GetChildren().end(); it++)
    {
      if (position == pos)
        return (*it);

      ++position;
    }

    return NULL;
  }

Here is the call graph for this function:

int nux::GridHLayout::GetChildPos ( Area child) [protected]

Definition at line 75 of file GridHLayout.cpp.

  {
    int position = 0;
    std::list<Area *>::const_iterator it;
    for (it = GetChildren().begin(); it != GetChildren().end(); it++)
    {
      if ((*it) == child)
        break;
      ++position;
    }

    return position;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

std::list<Area *>& nux::Layout::GetChildren ( ) [inline, inherited]

Definition at line 238 of file Layout.h.

    {
      return _layout_element_list;
    }

Here is the caller graph for this function:

Get the size of the grid element.

Returns:
Size of the grid elements.

Definition at line 114 of file GridHLayout.cpp.

  {
    return _children_size;
  }
void nux::GridHLayout::GetCompositeList ( std::list< Area * > *  ViewList) [virtual]

Reimplemented from nux::Layout.

Definition at line 144 of file GridHLayout.cpp.

  {
    std::list<Area *>::iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it)->IsView())
      {
        View *ic = static_cast<View *>(*it);
        ViewList->push_back(ic);
      }
      else if ((*it)->IsLayout())
      {
        Layout *layout = static_cast<Layout *>(*it);
        layout->GetCompositeList(ViewList);
      }
    }
  }

Here is the call graph for this function:

Definition at line 573 of file Layout.cpp.

  {
    return m_ContentStacking;
  }
int nux::Layout::GetContentHeight ( ) const [inline, inherited]

Definition at line 134 of file Layout.h.

    {
      return m_contentHeight;
    };
int nux::Layout::GetContentWidth ( ) const [inline, inherited]

Definition at line 129 of file Layout.h.

    {
      return m_contentWidth;
    };
MinorDimensionSize nux::Area::GetExtend ( ) [virtual, inherited]

Definition at line 596 of file Area.cpp.

  {
    return minor_axis_size_;
  }

Definition at line 866 of file GridHLayout.cpp.

  {
    return filling_order_;
  }
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:

int nux::Layout::GetLeftPadding ( ) const [inherited]

Definition at line 67 of file Layout.cpp.

  {
    return left_padding_;
  }
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:

unsigned int nux::Layout::GetMaxStretchFactor ( ) [virtual, inherited]

Reimplemented in nux::HLayout, and nux::VLayout.

Definition at line 403 of file Layout.cpp.

  {
    unsigned int value = 0;
    unsigned int sf;
    std::list<Area *>::iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      sf = (*it)->GetScaleFactor();

      if (sf >= value)
      {
        value = sf;
      }
    }

    return value;
  }
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:

unsigned int nux::Layout::GetMinStretchFactor ( ) [inherited]

Definition at line 422 of file Layout.cpp.

  {
    unsigned int value = 0xFFFFFFFF;
    unsigned int sf;
    std::list<Area *>::iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      sf = (*it)->GetScaleFactor();

      if (sf <= value)
      {
        value = sf;
      }
    }

    return value;
  }
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.

Get the number of columns in the grid.

Definition at line 124 of file GridHLayout.cpp.

  {
    return _num_column;
  }

Here is the caller graph for this function:

Get the number of rows in the grid.

Definition at line 129 of file GridHLayout.cpp.

  {
    return _num_row;
  }

Here is the caller graph for this function:

unsigned int nux::Layout::GetNumStretchFactor ( unsigned int  sf) [inherited]

Definition at line 441 of file Layout.cpp.

  {
    unsigned int count = 0;
    std::list<Area *>::iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it)->GetScaleFactor() == sf)
      {
        count++;
      }
    }

    return count;
  }
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.

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:

int nux::Layout::GetRightPadding ( ) const [inherited]

Definition at line 72 of file Layout.cpp.

  {
    return right_padding_;
  }
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:

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:

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::Layout::GetTopPadding ( ) const [inherited]

Definition at line 77 of file Layout.cpp.

  {
    return top_padding_;
  }
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::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;
  }
bool nux::Area::IsArea ( ) const [virtual, inherited]

Reimplemented in nux::InputArea.

Definition at line 626 of file Area.cpp.

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

Here is the caller graph for this function:

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::Layout::IsEmpty ( ) const [virtual, inherited]

Reimplemented in nux::SpaceLayout.

Definition at line 191 of file Layout.cpp.

  {
    return (_layout_element_list.size() == 0);
  }

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:

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:

Return True if the grid width match the size of its content.

Definition at line 139 of file GridHLayout.cpp.

  {
    return match_content_size_;
  }
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::Layout::IsQueuedForDraw ( ) [inherited]

Return true if a draw has been scheduled for this layout.

Returns:
True if a draw has been scheduled for this layout.

Definition at line 563 of file Layout.cpp.

  {
    return _queued_draw;
  }

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

Area * nux::GridHLayout::KeyNavIteration ( KeyNavDirection  direction) [protected, virtual]

Reimplemented from nux::Area.

Definition at line 849 of file GridHLayout.cpp.

  {
    if (filling_order_ == FILL_HORIZONTAL)
    {
      return KeyNavIterationRowOrder(direction);
    }
    else
    {
      return KeyNavIterationColumnOrder(direction);
    }
  }

Here is the call graph for this function:

Definition at line 717 of file GridHLayout.cpp.

  {
    if (_layout_element_list.size() == 0)
      return NULL;

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

    if (next_object_to_key_focus_area_)
    {
      std::list<Area*>::iterator it;
      std::list<Area*>::iterator it_next;
      it = std::find(_layout_element_list.begin(), _layout_element_list.end(), next_object_to_key_focus_area_);
      it_next = it;
      ++it_next;

      if (it == _layout_element_list.end())
      {
        // Should never happen
        nuxAssert(0);
        return NULL;
      }

      int position = GetChildPos(*it); // note that(*it) == next_object_to_key_focus_area_
      int nun_column = GetNumColumn();
      int nun_row = GetNumRow();

      if ((direction == KEY_NAV_UP) && (it == _layout_element_list.begin()))
      {
        // first item
        return NULL;
      }

      if ((direction == KEY_NAV_DOWN) && (it_next == _layout_element_list.end()))
      {
        // last item
        return NULL;
      }

      if ((direction == KEY_NAV_UP) && ((position % nun_row) == 0))
      {
        // Left edge
        return NULL;
      }

      if ((direction == KEY_NAV_DOWN) && (position == (position / nun_row) * nun_row + (nun_row -1)))
      {
        // right edge
        return NULL;
      }

      if ((direction == KEY_NAV_LEFT) && ((position / nun_row) == 0))
      {
        // top edge
        return NULL;
      }

      if ((direction == KEY_NAV_RIGHT) && ((position / nun_row) == nun_column))
      {
        // bottom edge
        return NULL;
      }

      if (direction == KEY_NAV_UP)
      {
        --it;
        Area* key_nav_focus = (*it)->KeyNavIteration(direction);

        while (key_nav_focus == NULL)
        {
          int pos = GetChildPos(*it);
          if (it == _layout_element_list.begin() || ((pos % nun_row) == 0))
            break;

          --it;
          key_nav_focus = (*it)->KeyNavIteration(direction);
        }

        return key_nav_focus;
      }

      if (direction == KEY_NAV_DOWN)
      {
        ++it;
        Area* key_nav_focus = (*it)->KeyNavIteration(direction);

        while (key_nav_focus == NULL)
        {
          ++it;
          int pos = GetChildPos(*it);

          if ((it == _layout_element_list.end()) || (pos == (pos / nun_row) * nun_row + (nun_row -1)))
            break;

          key_nav_focus = (*it)->KeyNavIteration(direction);
        }

        return key_nav_focus;
      }

      if (direction == KEY_NAV_LEFT)
      {
        for (int i = 0; i < nun_row; ++i)
        {
          --it;
        }
        return (*it)->KeyNavIteration(direction);
      }

      if (direction == KEY_NAV_RIGHT)
      {
        for (int i = 0; i < nun_row; ++i)
        {
          ++it;
          if (it == _layout_element_list.end())
            return NULL;
        }
        return (*it)->KeyNavIteration(direction);
      }
    }
    else
    {
      std::list<Area*>::iterator it;
      it = _layout_element_list.begin();
      return (*it)->KeyNavIteration(direction);
    }

    return NULL;

  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 585 of file GridHLayout.cpp.

  {
    if (_layout_element_list.size() == 0)
      return NULL;

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

    if (next_object_to_key_focus_area_)
    {
      std::list<Area*>::iterator it;
      std::list<Area*>::iterator it_next;
      it = std::find(_layout_element_list.begin(), _layout_element_list.end(), next_object_to_key_focus_area_);
      it_next = it;
      ++it_next;

      if (it == _layout_element_list.end())
      {
        // Should never happen
        nuxAssert(0);
        return NULL;
      }

      int position = GetChildPos(*it); // note that(*it) == next_object_to_key_focus_area_
      int nun_column = GetNumColumn();
      int nun_row = GetNumRow();

      if ((direction == KEY_NAV_LEFT) && (it == _layout_element_list.begin()))
      {
        // first item
        return NULL;
      }

      if ((direction == KEY_NAV_LEFT) && position % nun_column == 0)
      {
        return NULL;
      }

      if ((direction == KEY_NAV_RIGHT) && (it_next == _layout_element_list.end()))
      {
        // last item
        return NULL;
      }

      if ((direction == KEY_NAV_RIGHT) && position % nun_column == nun_column - 1)
      {
        // last item
        return NULL;
      }

      if ((direction == KEY_NAV_UP) && ((position / nun_column) == 0))
      {
        // top edge
        return NULL;
      }

      if ((direction == KEY_NAV_DOWN) && ((position / nun_column) == (nun_row - 1)))
      {
        // bottom edge
        return NULL;
      }

      if (direction == KEY_NAV_LEFT)
      {
        --it;
        Area* key_nav_focus = (*it)->KeyNavIteration(direction);

        while (key_nav_focus == NULL)
        {
          int pos = GetChildPos(*it);
          if (it == _layout_element_list.begin() || ((pos % nun_column) == 0))
            break;

          --it;
          key_nav_focus = (*it)->KeyNavIteration(direction);
        }

        return key_nav_focus;
      }

      if (direction == KEY_NAV_RIGHT)
      {
        ++it;
        Area* key_nav_focus = (*it)->KeyNavIteration(direction);

        while (key_nav_focus == NULL)
        {
          int pos = GetChildPos(*it);

          if ((it == _layout_element_list.end()) || (pos == (pos / nun_column) * nun_column + (nun_column -1)))
            break;

          ++it;
          key_nav_focus = (*it)->KeyNavIteration(direction);
        }

        return key_nav_focus;
      }

      if (direction == KEY_NAV_UP)
      {
        for (int i = 0; i < nun_column; ++i)
        {
          --it;
        }

        if (it != _layout_element_list.end())
          return (*it)->KeyNavIteration(direction);
      }

      if (direction == KEY_NAV_DOWN)
      {
        for (int i = 0; i < nun_column; ++i)
        {
          ++it;
        }

        if (it != _layout_element_list.end())
          return (*it)->KeyNavIteration(direction);
      }
    }
    else
    {
      std::list<Area*>::iterator it;
      it = _layout_element_list.begin();
      return (*it)->KeyNavIteration(direction);
    }

    return NULL;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::GridHLayout::MatchContentSize ( bool  match_content)

Make the grid width match the size of its content.

Parameters:
match_contentIf True, force the height of the layout to match the height of the content. This can also be achieve if the stretch factor of this layout is set to 0;

Definition at line 134 of file GridHLayout.cpp.

  {
    match_content_size_ = match_content;
  }
nux::Object::NUX_DECLARE_OBJECT_TYPE ( BaseObject  ,
Trackable   
) [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:

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::GridHLayout::ProcessDraw ( GraphicsEngine graphics_engine,
bool  force_draw 
) [virtual]

Draw Element.

Draw all elements inside the layout. If force_draw is true then the system requests that all objects redraw themselves completely.

Parameters:
force_draw
TraverseInfo
ProcessEventInfo
Returns:
The state of the Process Event.

Reimplemented from nux::Layout.

Definition at line 463 of file GridHLayout.cpp.

  {
    if (_layout_element_list.size() == 0)
      return;

    std::list<Area *> elements;
    std::list<Area *>::iterator it = _layout_element_list.begin();

    graphics_engine.PushModelViewMatrix(Get2DMatrix());

    Geometry base = GetGeometry();
    Geometry absolute_geometry = GetAbsoluteGeometry();
    Geometry parent_geometry = absolute_geometry;
    Geometry visibility_geometry = absolute_geometry;

    if (GetToplevel())
    {
      parent_geometry = GetToplevel()->GetAbsoluteGeometry();
    }

    visibility_geometry = parent_geometry.Intersect(absolute_geometry);

    graphics_engine.PushClippingRectangle(base);

    it = _layout_element_list.begin();

    bool first = false;
    bool last = false;

    int JJ = 0;
    int II = 0;

    if (filling_order_ == FILL_HORIZONTAL)
    {
      JJ = _num_row;
      II = _num_column;
    }
    else
    {
      JJ = _num_column;
      II = _num_row;
    }

    for (int j = 0; j < JJ; j++)
    {
      for (int i = 0; i < II; i++)
      {
        if (it == _layout_element_list.end())
          break;

        if ((*it)->IsVisible() == false)
        {
          ++it;
          continue;
        }

        Geometry it_geo = (*it)->GetAbsoluteGeometry();
        Geometry intersection = visibility_geometry.Intersect(it_geo);

        // Test if the element is inside the Grid before rendering.
        if (!intersection.IsNull())
        {
          if (first == false)
          {
            first = true; // First invisible child.
          }

          int x = 0;
          int y = 0;
          if (filling_order_ == FILL_HORIZONTAL)
          {
            x = base.x + left_padding_ + i * (_children_size.width + m_h_in_margin);
            y = base.y + top_padding_ + j * (_children_size.height + m_v_in_margin);
          }
          else
          {
            x = base.x + left_padding_ + j * (_children_size.width + m_h_in_margin);
            y = base.y + top_padding_ + i * (_children_size.height + m_v_in_margin);
          }

          graphics_engine.PushClippingRectangle(Geometry(x, y, _children_size.width, _children_size.height));

          if ((*it)->IsView())
          {
            View *ic = static_cast<View *>(*it);
            ic->ProcessDraw(graphics_engine, force_draw);
          }
          else if ((*it)->IsLayout())
          {
            Layout *layout = static_cast<Layout *>(*it);
            layout->ProcessDraw(graphics_engine, force_draw);
          }

          graphics_engine.PopClippingRectangle();
        }
        else
        {
          if (first)
          {
            // First invisible child. Exit!
            last = true;
          }
        }

        if (first && last)
        {
          // Early exit
          break;
        }

        it++;
      }
      if (first && last)
        break;
    }

    graphics_engine.PopClippingRectangle();
    graphics_engine.PopModelViewMatrix();

    _queued_draw = false;
  }

Here is the call graph for this function:

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

Mark all element in the layout as dirty.

Mark all element in the layout as dirty. This will also mark all sub elements as dirty. InputArea element are not marked as dirty(they don't have the flags). Emits the signal OnQueueDraw.

Definition at line 535 of file Layout.cpp.

  {
    if (_queued_draw)
    {
      // A draw has already been scheduled.
      return;
    }

    std::list<Area *>::iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it)->IsView())
      {
        View *ic = NUX_STATIC_CAST(View *, (*it));
        ic->QueueDraw();
      }
      else if ((*it)->IsLayout())
      {
        Layout *layout = NUX_STATIC_CAST(Layout *, (*it));
        layout->QueueDraw();
      }
    }

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

Here is the call graph for this function:

Here is the caller 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.

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::Layout::RemoveChildObject ( Area bo) [virtual, inherited]

Reimplemented in nux::LayeredLayout.

Definition at line 161 of file Layout.cpp.

  {
    std::list<Area *>::iterator it;
    it = std::find(_layout_element_list.begin(), _layout_element_list.end(), bo);

    if (it != _layout_element_list.end())
    {
      /* we need to emit the signal before the un-parent, just in case
         one of the callbacks wanted to use this object */
      ViewRemoved.emit(this, bo);
      bo->UnParentObject();
      _layout_element_list.erase(it);
    }
  }

Here is the call graph for this function:

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

Request a Layout recompute after a change of size.

Reimplemented from nux::Area.

Definition at line 578 of file Layout.cpp.

  {

  }

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:

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:

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

Definition at line 364 of file Layout.cpp.

  {
    std::list<Area *>::iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it) == bo)
      {
        return true;
      }
      else if ((*it)->IsLayout())
      {
        Layout *layout = NUX_STATIC_CAST(Layout *, (*it));

        if (layout->SearchInAllSubNodes(bo))
        {
          return true;
        }
      }
    }

    return false;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 388 of file Layout.cpp.

  {
    std::list<Area *>::iterator it;

    for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
    {
      if ((*it) == bo)
      {
        return true;
      }
    }

    return false;
  }

Here is the caller 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::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::Area::SetBaseString ( const char *  Caption) [inherited]

Reimplemented in nux::InputArea.

Definition at line 74 of file Area.cpp.

  {
    _base_string = Caption;
  }
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:

void nux::GridHLayout::SetChildrenSize ( int  width,
int  height 
)

Set the size of the grid element.

Set the size of the grid element.

Parameters:
widthWidth of elements.
heightHeight of elements.

Definition at line 109 of file GridHLayout.cpp.

  {
    _children_size = Size(width, height);
  }

Here is the caller graph for this function:

void nux::Layout::SetContentDistribution ( LayoutContentDistribution  stacking_order) [virtual, inherited]

Define how elements are spread out inside the layout.

Typically, a layout stacks it elements from left to right(HLayout) or top to bottom(VLayout). When the elements don't uses all the space that is available, the content stacking policy allows alternatives ways to position the elements. This does not affect the elements size, only their position inside the layout.

Parameters:
stacking_order

Definition at line 568 of file Layout.cpp.

  {
    m_ContentStacking = stacking;
  }

Here is the caller 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:

Definition at line 861 of file GridHLayout.cpp.

  {
    filling_order_ = filling_order;
  }
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::SetGeometry ( const Geometry geo) [inherited]

Set the geometry of the object.

This is an overloaded member function, provided for convenience. It behaves essentially like SetGeometry(int x, int y, int w, int h).

Parameters:
geoGeometry object.
See also:
SetWidth(), SetHeight(), SetX(), SetY().

Reimplemented in nux::MenuPage, nux::BaseWindow, nux::StaticTextBox, nux::View, nux::MouseAreaCtrl, and nux::ScrollView.

Definition at line 355 of file Area.cpp.

  {
    SetGeometry(geo.x, geo.y, geo.width, geo.height);
  }

Here is the call graph for this function:

void nux::Layout::SetHorizontalExternalMargin ( int  m) [inherited]

Deprecated. Use SetLeftRightPadding.

Definition at line 150 of file Layout.cpp.

  {
    SetLeftAndRightPadding(padding);
  }

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::Area::SetLayoutDone ( bool  b) [virtual, inherited]

Definition at line 621 of file Area.cpp.

  {
    layout_done_ = b;
  }
void nux::Layout::SetLeftAndRightPadding ( int  padding) [inherited]

Set the left/right padding with the same value.

Set the left/right padding of the layout.
Valid only for HLayout, VLayouts, HGridLayouts and VGridLayout.

Parameters:
paddingThe left/right padding value of the layout.

Definition at line 87 of file Layout.cpp.

  {
#if DEBUG_LAYOUT
    return;
#endif
    left_padding_ = padding < 0 ? 0 : padding;
    right_padding_ = padding < 0 ? 0 : padding;
  }

Here is the caller graph for this function:

void nux::Layout::SetLeftAndRightPadding ( int  left,
int  right 
) [inherited]

Set the left/right padding independently.

Set the left/right padding of the layout.
Valid only for HLayout, VLayouts, HGridLayouts and VGridLayout.

Parameters:
leftLeft padding value of the layout.
rightRight padding value of the layout.

Definition at line 96 of file Layout.cpp.

  {
#if DEBUG_LAYOUT
    return;
#endif
    left_padding_ = left < 0 ? 0 : left;
    right_padding_ = right < 0 ? 0 : right;
  }
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:

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

Definition at line 139 of file Area.cpp.

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

    CheckMinSize();

    ReconfigureParentLayout();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 209 of file Area.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 161 of file Area.cpp.

  {
    nuxAssert(w >= 0);
    nuxAssert(h >= 0);
    SetMinimumSize(w, h);
    SetMaximumSize(w, h);

    //ReconfigureParentLayout();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetNextObjectToKeyFocusArea ( Area area) [protected, inherited]

Definition at line 958 of file Area.cpp.

void nux::Trackable::SetOwnedReference ( bool  b) [protected, inherited]

Definition at line 122 of file Object.cpp.

  {
    if (_owns_the_reference == true)
    {
      LOG_DEBUG(logger) << "Do not change the ownership if is already set to true!" << "\n";
      return;
    }

    _owns_the_reference = b;
  }

Here is the caller graph for this function:

void nux::Layout::SetPadding ( int  top_bottom_padding,
int  left_right_padding 
) [inherited]

Set the left/right and top/bottom padding of the layout.

Set the left/right and top/bottom padding of the layout.
Valid only for HLayout, VLayouts, HGridLayouts and VGridLayout.

Parameters:
top_bottom_paddingThe top/bottom padding value of the layout.
left_right_paddingThe left/right padding value of the layout.

Definition at line 131 of file Layout.cpp.

  {
    top_padding_ = top_bottom_padding < 0 ? 0 : top_bottom_padding;
    bottom_padding_ = top_padding_;

    right_padding_ = left_right_padding < 0 ? 0 : left_right_padding;
    left_padding_ = right_padding_;
  }

Here is the caller graph for this function:

void nux::Layout::SetPadding ( int  top,
int  right,
int  bottom,
int  left 
) [inherited]

Set the left/right/top/bottom padding of the layout.

Set the left/right and top/bottom padding of the layout.
Valid only for HLayout, VLayouts, HGridLayouts and VGridLayout.

Parameters:
topThe top padding value of the layout.
rightThe right padding value of the layout.
bottomThe bottom padding value of the layout.
leftThe left padding value of the layout.

Definition at line 141 of file Layout.cpp.

  {
    top_padding_ = top < 0 ? 0 : top;
    right_padding_ = right < 0 ? 0 : right;
    bottom_padding_ = bottom < 0 ? 0 : bottom;
    left_padding_ = left < 0 ? 0 : left;
  }
void nux::Layout::SetPadding ( int  padding) [inherited]

Set the left/right/top/bottom padding of the layout.

Set the left/right/top/bottom padding of the layout.
Valid only for HLayout, VLayouts, HGridLayouts and VGridLayout.

Parameters:
paddingThe top/right/bottom/left padding value of the layout.

Definition at line 123 of file Layout.cpp.

bool nux::Area::SetParentObject ( Area parent) [virtual, inherited]

SetParentObject/UnParentObject are protected API.

They are not meant to be used directly by users. Users add widgets to layouts and layout have to be attached to a composition for objects to be rendered. Setting a parent to and child widget does not mean that when the parent is rendered, the child is also rendered. For instance, setting a button to be the child of a check-box means absolutely nothing is terms of rendering. The check-box draw function would have to be aware of the existence of the button in order to render it.
A view with a parent cannot be parented to another area for rendering. It has to be un-parented first.
A layout with a parent cannot be parented to another area for rendering. It has to be un-parented first.
In essence only View and Layouts should be calling SetParentObject/UnParentObject.
SetParentObject returns true if it was successful.

Parameters:
parentThe object that will become the parent of this area.
Returns:
True if the object is successfully parented.

Definition at line 272 of file Area.cpp.

  {
    if (parent == 0)
    {
      nuxAssertMsg(0, "[Area::SetParentObject] Invalid parent obejct.");
      return false;
    }

    if (parent_area_ && (parent_area_ != parent))
    {
      nuxAssertMsg(0, "[Area::SetParentObject] Object already has a parent. You must UnParent the object before you can parenting again.");
      return false;
    }

    if (parent_area_)
    {
      // Already parented to the same area. Return.
      return true;
    }

    parent_area_ = parent;
    Reference();

    return true;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

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

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.

Definition at line 968 of file Area.cpp.

  {
    has_key_focus_ = true;
    next_object_to_key_focus_area_ = NULL;

    Area* child = this;
    Area* parent = GetParentObject();

    while (parent)
    {
      parent->next_object_to_key_focus_area_ = child;
      parent->next_object_to_key_focus_area_->Reference();
      parent->has_key_focus_ = false;
      child = parent;
      parent = parent->GetParentObject();
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetPercentage ( float  f) [virtual, inherited]

Definition at line 611 of file Area.cpp.

Here is the caller graph for this function:

void nux::Area::SetPositioning ( MinorDimensionPosition  p) [virtual, inherited]

Definition at line 591 of file Area.cpp.

Here is the caller graph for this function:

bool nux::Introspectable::SetProperty ( std::string const &  name,
const char *  value 
) [inline, inherited]

If the property was not able to be set with the value, the method returns false.

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

{
  PropertyContainer::iterator i = properties_.find(name);
  if (i == properties_.end())
    return false;
  else
    return i->second->SetValue(value);
}
template<typename T >
bool nux::Introspectable::SetProperty ( std::string const &  name,
T const &  value 
) [inherited]

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

{
  PropertyContainer::iterator i = properties_.find(name);
  if (i == properties_.end())
    return false;
  else
  {
    return i->second->SetValue(type::PropertyTrait<T>::to_string(value));
  }
}
void nux::Area::SetReconfigureParentLayoutOnGeometryChange ( bool  reconfigure_parent_layout) [inherited]

Set to True to initiate a layout reconfiguration when the geometry of this widget changes.

When the geometry of an area changes, the new geometry can be recursively propagated to all its parent so a layout reconfiguration is initiated.

See also:
ReconfigureParentLayout()
on_geometry_change_reconfigure_parent_layout_
Parameters:
reconfigure_parent_layoutSet it to True to reconfigure this area parent layouts.

Definition at line 411 of file Area.cpp.

  {
    on_geometry_change_reconfigure_parent_layout_ = reconfigure_parent_layout;
  }

Here is the caller graph for this function:

void nux::Area::SetScaleFactor ( unsigned int  sf) [virtual, inherited]

Set the area scale factor.

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

See also:
HLayout, VLayout.
Parameters:
thescale factor.

Definition at line 266 of file Area.cpp.

  {
    // re implemented by Layout
    scale_factor_ = sf;
  }

Here is the caller graph for this function:

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

Deprecated. Use SetInputEventSensitivity.

Definition at line 558 of file Area.cpp.

  {
    SetInputEventSensitivity(sensitive);
  }

Here is the call graph for this function:

void nux::GridHLayout::SetSpaceBetweenChildren ( int  horizontal_space,
int  vertical_space 
)

Definition at line 69 of file GridHLayout.cpp.

  {
    m_h_in_margin = horizontal_space;
    m_v_in_margin = vertical_space;
  }

Here is the caller graph for this function:

void nux::Layout::SetTopAndBottomPadding ( int  padding) [inherited]

Set the top/bottom padding with the same value.

Set the top/bottom padding of the layout.
Valid only for HLayout, VLayouts, HGridLayouts and VGridLayout.

Parameters:
paddingThe top/bottom padding value of the layout.

Definition at line 105 of file Layout.cpp.

  {
#if DEBUG_LAYOUT
    return;
#endif
    top_padding_ = padding < 0 ? 0 : padding;
    bottom_padding_ = padding < 0 ? 0 : padding;
  }

Here is the caller graph for this function:

void nux::Layout::SetTopAndBottomPadding ( int  top,
int  bottom 
) [inherited]

Set the top/bottom padding independently.

Set the top/bottom padding of the layout.
Valid only for HLayout, VLayouts, HGridLayouts and VGridLayout.

Parameters:
topTop padding value of the layout.
bottomBottom padding value of the layout.

Definition at line 114 of file Layout.cpp.

  {
#if DEBUG_LAYOUT
    return;
#endif
    top_padding_ = top < 0 ? 0 : top;
    bottom_padding_ = bottom < 0 ? 0 : bottom;
  }
void nux::Layout::SetVerticalExternalMargin ( int  m) [inherited]

Deprecated. Use SetTopBottomPadding,.

Definition at line 156 of file Layout.cpp.

  {
    SetTopAndBottomPadding(padding);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::Area::SetVisible ( bool  visible) [inherited]

Set visibility of the area.

If visible, an area will be drawn. Default: true.

Parameters:
visibleif the area is visible to the user

Definition at line 540 of file Area.cpp.

  {
    if (IsLayout())
      return;

    if (visible_ == visible)
      return;

    visible_ = visible;

    OnVisibleChanged.emit(this, visible_);
  }

Here is the call graph for this function:

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

Mark the object as owned.

If this object is not owned, calling SinkReference() as the same effect as calling Reference().

Returns:
True if the object was not owned previously

Reimplemented from nux::Trackable.

Definition at line 306 of file Object.cpp.

  {
    return Reference();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::Area::TestMousePointerInclusion ( const Point mouse_position,
NuxEventType  event_type 
) [inherited]

Test if a point is inside the area.

Parameters:
pA 2D point.
event_typeThe type of mouse event(a parameter of FindAreaUnderMouse).
Returns:
True if p is located inside the Area.

Definition at line 873 of file Area.cpp.

   {
     if ((IsLayout() == false) && ((visible_ == false) ||
       (sensitive_ == false) ||
       (view_enabled_ == false)))
     {
       // If this area is not a view and:
       //    - it is insensitive to input event
       //    - it is not enabled
       //    - it is not visible
       // then return false.
       return false;
     }
 
     bool mouse_pointer_inside_area = false;
 
     if (Type().IsDerivedFromType(MenuPage::StaticObjectType))
     {
       // A MenuPage geometry is already in absolute coordinates.
       mouse_pointer_inside_area = geometry_.IsInside(mouse_position);
     }
     else
     {
       mouse_pointer_inside_area = GetAbsoluteGeometry().IsInside(mouse_position);
     }
 
     if ((event_type == NUX_MOUSE_WHEEL) && mouse_pointer_inside_area)
     {
       if (accept_mouse_wheel_event_ == false)
         return NULL;
     }
 
     return mouse_pointer_inside_area;
   }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::Area::TestMousePointerInclusionFilterMouseWheel ( const Point mouse_position,
NuxEventType  event 
) [inherited]

Test if a point is inside the area and if the area accepts mouse wheel events.

Parameters:
pA 2D point.
event_typeThe type of mouse event(a parameter of FindAreaUnderMouse).
filter_mouse_wheel_eventIf the event type is NUX_MOUSE_WHEEL and the mouse is over this area and this area does not accept mouse wheel events, then return false.
Returns:
True if p is located inside the Area.

Definition at line 908 of file Area.cpp.

   {
     if ((IsLayout() == false) && ((visible_ == false) ||
       (sensitive_ == false) ||
       (view_enabled_ == false)))
     {
       // If this area is not a view and:
       //    - it is insensitive to input event
       //    - it is not enabled
       //    - it is not visible
       // then return false.
 
       return false;
     }
 
     bool mouse_pointer_inside_area = false;
 
     if (Type().IsDerivedFromType(MenuPage::StaticObjectType))
     {
       // A MenuPage geometry is already in absolute coordinates.
       mouse_pointer_inside_area = geometry_.IsInside(mouse_position);
     }
     else
     {
       mouse_pointer_inside_area = GetAbsoluteGeometry().IsInside(mouse_position);
     }
 
     return mouse_pointer_inside_area;
   }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Un-parent and area.

For un-parented areas the following functions are equivalent:

Definition at line 298 of file Area.cpp.

  {
    // If the area is on the path to the key focus area, or has focus, reset it.
    if (has_key_focus_ || next_object_to_key_focus_area_)
    {
      GetWindowThread()->GetWindowCompositor().SetKeyFocusArea(NULL, KEY_NAV_NONE);
    }

    if (parent_area_)
    {
      parent_area_ = 0;
      UnReference();
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Decrease reference count.

Returns:
True if the object reference count has reached 0 and the object has been destroyed.

Reimplemented from nux::Trackable.

Definition at line 274 of file Object.cpp.

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

    if (objectptr_count_->GetValue() == reference_count_->GetValue())
    {
      // There are ObjectPtr's hosting this object. Release all of them to
      // destroy this object.  This prevent from calling UnReference () many
      // times and destroying the object when there are ObjectPtr's hosting
      // it.  This method should not be called directly in that case.
      LOG_WARN(logger) << "There are ObjectPtr hosting this object. "
                       << "Release all of them to destroy this object. "
                       << "\nObject allocated at: " << GetAllocationLoation() << "\n";
      return false;
    }

    reference_count_->Decrement();

    if (reference_count_->GetValue() == 0)
    {
      Destroy();
      return true;
    }

    return false;
  }

Here is the call graph for this function:


Member Data Documentation

Definition at line 135 of file GridHLayout.h.

Definition at line 136 of file GridHLayout.h.

Definition at line 137 of file GridHLayout.h.

int nux::Trackable::_heap_allocated [protected, inherited]

Definition at line 158 of file Object.h.

std::list<Area *> nux::Layout::_layout_element_list [protected, inherited]

Definition at line 274 of file Layout.h.

Definition at line 142 of file GridHLayout.h.

Definition at line 141 of file GridHLayout.h.

Definition at line 138 of file GridHLayout.h.

bool nux::Layout::_queued_draw [protected, inherited]

Definition at line 255 of file Layout.h.

int nux::Layout::bottom_padding_ [protected, inherited]

Definition at line 270 of file Layout.h.

sigc::signal<void, Area*> nux::Area::ChildFocusChanged [inherited]

Definition at line 341 of file Area.h.

Definition at line 130 of file GridHLayout.h.

bool nux::Area::has_key_focus_ [protected, inherited]

If this variable is true, then this area has the keyboard focus.

Definition at line 610 of file Area.h.

sigc::signal<void, Area*> nux::Area::key_nav_focus_activate [inherited]

This signal is received when the area has the key focus and the ENTER key has been pressed.

Definition at line 354 of file Area.h.

sigc::signal<void, Area*, bool, KeyNavDirection> nux::Area::key_nav_focus_change [inherited]

This signal is received whether the area receiving or loosing the keyboard focus.

If the second parameter is true, it means the area is receiving the focus. The third parameter of this signal indicates the keyboard action that triggered this area to receive or loose the keyboard focus.

Definition at line 349 of file Area.h.

int nux::Layout::left_padding_ [protected, inherited]

Definition at line 271 of file Layout.h.

int nux::Layout::m_contentHeight [protected, inherited]

Definition at line 259 of file Layout.h.

Size nux::Layout::m_ContentSize [protected, inherited]

Definition at line 257 of file Layout.h.

Definition at line 278 of file Layout.h.

int nux::Layout::m_contentWidth [protected, inherited]

Definition at line 258 of file Layout.h.

int nux::Layout::m_fittingHeight [protected, inherited]

Definition at line 263 of file Layout.h.

int nux::Layout::m_fittingWidth [protected, inherited]

Definition at line 262 of file Layout.h.

Definition at line 132 of file GridHLayout.h.

NString nux::Layout::m_name [protected, inherited]

Definition at line 276 of file Layout.h.

Definition at line 131 of file GridHLayout.h.

If True, for the height of the layout to match the height of the content.

Definition at line 139 of file GridHLayout.h.

If this variable is not NULL, then this area is part of the keyboard focus chain.

Definition at line 624 of file Area.h.

sigc::signal<void, Object *> nux::Object::object_destroyed [inherited]

Signal emitted immediately before the object is destroyed.

Definition at line 214 of file Object.h.

Definition at line 607 of file Area.h.

sigc::signal<void, Area*> nux::Layout::OnChildQueueDraw [inherited]

Definition at line 248 of file Layout.h.

sigc::signal<void, Area *, Geometry&> nux::Area::OnGeometryChanged [inherited]

This signal is only meant to inform of a change of size.

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

Definition at line 459 of file Area.h.

sigc::signal<void, Layout*> nux::Layout::OnQueueDraw [inherited]

Signal emitted when a layout is scheduled for a draw.

Definition at line 247 of file Layout.h.

sigc::signal<void, int, int, int, int> nux::Area::OnResize [inherited]

Signal emitted when an area is resized.

Definition at line 451 of file Area.h.

sigc::signal<void, Area *, bool> nux::Area::OnSensitiveChanged [inherited]

Definition at line 453 of file Area.h.

sigc::signal<void, Area *, bool> nux::Area::OnVisibleChanged [inherited]

Definition at line 452 of file Area.h.

int nux::Layout::right_padding_ [protected, inherited]

Definition at line 272 of file Layout.h.

int nux::Layout::space_between_children_ [protected, inherited]

Definition at line 268 of file Layout.h.

int nux::Layout::top_padding_ [protected, inherited]

Definition at line 269 of file Layout.h.

sigc::signal<void, Layout*, Area*> nux::Layout::ViewAdded [inherited]

Definition at line 249 of file Layout.h.

sigc::signal<void, Layout*, Area*> nux::Layout::ViewRemoved [inherited]

Definition at line 250 of file Layout.h.


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