nux-0.9.46

nux::View Class Reference

#include <Nux/View.h>

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

Public Member Functions

 View (NUX_FILE_LINE_DECL)
virtual ~View ()
long BaseProcessEvent (IEvent &ievent, long TraverseInfo, long ProcessEventInfo)
virtual long ComputeChildLayout ()
virtual void PositionChildLayout (float offsetX, float offsetY)
virtual long ComputeLayout2 ()
virtual void ComputePosition2 (float offsetX, float offsetY)
virtual void PreLayoutManagement ()
virtual long PostLayoutManagement (long LayoutResult)
virtual void PreResizeGeometry ()
virtual void PostResizeGeometry ()
virtual long PostProcessEvent2 (IEvent &ievent, long TraverseInfo, long ProcessEventInfo)
virtual bool IsLayout () const
virtual bool IsSpaceLayout () const
virtual bool IsArea () const
virtual bool IsView () const
void SetUsingStyleDrawing (bool b)
bool IsUsingStyleDrawing () const
void DeactivateView ()
void ActivateView ()
bool IsViewActive () const
virtual void ProcessDraw (GraphicsEngine &GfxContext, bool force_draw)
virtual void QueueDraw ()
 Causes a redraw. The widget parameter _need_redraw is set to true. The widget Draw(), DrawContent() and PostDraw() are called.
virtual void NeedRedraw ()
 Deprecated. Use QueueDraw.
virtual void NeedSoftRedraw ()
 Causes a soft redraw. The widget parameter _need_redraw is set to false. The widget DrawContent() and PostDraw() are called.
virtual bool IsRedrawNeeded ()
virtual void DoneRedraw ()
virtual void OverlayDrawing (GraphicsEngine &GfxContext)
bool SearchInAllSubNodes (Area *bo)
bool SearchInFirstSubNodes (Area *bo)
virtual void SetGeometry (const Geometry &geo)
 Set Geometry.
virtual bool CanBreakLayout ()
 Return true if this object can break the layout.
virtual void SetTextColor (const Color &color)
virtual Color GetTextColor ()
virtual LayoutGetLayout ()
 Get the default layout of this view.
virtual bool SetLayout (Layout *layout)
 Set the default layout for this view.
void SetFont (ObjectPtr< FontTexture > font)
ObjectPtr< FontTextureGetFont ()
virtual long ProcessFocusEvent (IEvent &ievent, long TraverseInfo, long ProcessEventInfo)
virtual void DoSetFocused (bool focused)
virtual bool DoCanFocus ()
virtual bool DoGetFocused ()
void SetCanFocus (bool can_focus)
void SetFocusControl (bool focus_control)
bool HasFocusControl ()
bool HasPassiveFocus ()

Data Fields

sigc::signal< void, View
*, Layout * > 
LayoutAdded
sigc::signal< void, View
*, Layout * > 
LayoutRemoved
sigc::signal< void, View * > OnQueueDraw
 Signal emitted when a view is scheduled for a draw.

Protected Member Functions

void OnChildFocusChanged (Area *parent, Area *child)
virtual long ProcessEvent (IEvent &ievent, long TraverseInfo, long ProcessEventInfo)=0
virtual void Draw (GraphicsEngine &GfxContext, bool force_draw)=0
virtual void DrawContent (GraphicsEngine &GfxContext, bool force_draw)
virtual void PostDraw (GraphicsEngine &GfxContext, bool force_draw)
void DoMouseDownOutsideArea (int x, int y, unsigned long mousestate, unsigned long keystate)
void InitializeWidgets ()
void InitializeLayout ()
void DestroyLayout ()
virtual LayoutGetCompositionLayout ()
 Deprecated. Use GetLayout();.
virtual bool SetCompositionLayout (Layout *layout)
 Deprecated. Use SetLayout();.
void RemoveLayout ()
void RemoveCompositionLayout ()
bool IsFullRedraw () const
virtual void GeometryChangePending ()
virtual void GeometryChanged ()

Protected Attributes

bool _can_focus
sigc::connection _on_focus_changed_handler
Color m_TextColor
ObjectPtr< FontTexture_font
Layoutm_CompositionLayout
bool _need_redraw
bool _full_redraw
bool _is_active
 True if the view is enabled (it can receive events and process them).
bool _can_pass_focus_to_composite_layout

Friends

class WindowCompositor
class Layout
class Area
class LayeredLayout

Constructor & Destructor Documentation

nux::View::View ( NUX_FILE_LINE_DECL  )
virtual nux::View::~View ( ) [virtual]

Member Function Documentation

void nux::View::ActivateView ( )

Activate the View. It can process them. The rendering of the View is normal.

long nux::View::BaseProcessEvent ( IEvent ievent,
long  TraverseInfo,
long  ProcessEventInfo 
)
virtual bool nux::View::CanBreakLayout ( ) [inline, virtual]

Return true if this object can break the layout.

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

virtual long nux::View::ComputeChildLayout ( ) [virtual]
virtual long nux::View::ComputeLayout2 ( ) [virtual]

Reimplemented from nux::Area.

virtual void nux::View::ComputePosition2 ( float  offsetX,
float  offsetY 
) [virtual]

Reimplemented from nux::Area.

void nux::View::DeactivateView ( )

Activate the View. The view cannot receive events. Its rendering is grayed (NUXTODO).

virtual bool nux::View::DoCanFocus ( ) [virtual]

Reimplemented from nux::Area.

virtual bool nux::View::DoGetFocused ( ) [virtual]

Reimplemented from nux::Area.

void nux::View::DoMouseDownOutsideArea ( int  x,
int  y,
unsigned long  mousestate,
unsigned long  keystate 
) [protected]
virtual void nux::View::DoneRedraw ( ) [virtual]

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

virtual void nux::View::DoSetFocused ( bool  focused) [virtual]

Reimplemented from nux::InputArea.

Reimplemented in nux::ComboBoxSimple, and nux::TextEntry.

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

Reimplemented from nux::Area.

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

Reimplemented from nux::Area.

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

Deprecated. Use GetLayout();.

ObjectPtr<FontTexture> nux::View::GetFont ( )
virtual Layout* nux::View::GetLayout ( ) [virtual]

Get the default layout of this view.

Get the default layout of this view.

Returns:
The default layout of this view.

Reimplemented in nux::BaseWindow.

virtual Color nux::View::GetTextColor ( ) [virtual]
bool nux::View::HasFocusControl ( )
bool nux::View::HasPassiveFocus ( )
virtual bool nux::View::IsArea ( ) const [inline, virtual]

Reimplemented from nux::InputArea.

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

Accessed inside ContentDraw () to help determine if some parts needs to be rendered. Do not use it elsewhere.

Returns:
True if Draw () was called before ContentDraw ().
virtual bool nux::View::IsLayout ( ) const [inline, virtual]

Reimplemented from nux::Area.

virtual bool nux::View::IsRedrawNeeded ( ) [virtual]
virtual bool nux::View::IsSpaceLayout ( ) const [inline, virtual]

Reimplemented from nux::Area.

bool nux::View::IsUsingStyleDrawing ( ) const [inline]
virtual bool nux::View::IsView ( ) const [inline, virtual]

Reimplemented from nux::Area.

bool nux::View::IsViewActive ( ) const
Returns:
True if the view is active.
virtual void nux::View::NeedRedraw ( ) [virtual]

Deprecated. Use QueueDraw.

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

virtual void nux::View::NeedSoftRedraw ( ) [virtual]

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

void nux::View::OnChildFocusChanged ( Area parent,
Area child 
) [protected]

Reimplemented in nux::ScrollView.

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

Reimplemented from nux::InputArea.

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

virtual void nux::View::PositionChildLayout ( float  offsetX,
float  offsetY 
) [virtual]
virtual long nux::View::PostLayoutManagement ( long  LayoutResult) [virtual]
virtual long nux::View::PostProcessEvent2 ( IEvent ievent,
long  TraverseInfo,
long  ProcessEventInfo 
) [virtual]
virtual void nux::View::PostResizeGeometry ( ) [virtual]
virtual void nux::View::PreLayoutManagement ( ) [virtual]
virtual void nux::View::PreResizeGeometry ( ) [virtual]
virtual void nux::View::ProcessDraw ( GraphicsEngine GfxContext,
bool  force_draw 
) [virtual]
virtual long nux::View::ProcessFocusEvent ( IEvent ievent,
long  TraverseInfo,
long  ProcessEventInfo 
) [virtual]
virtual void nux::View::QueueDraw ( ) [virtual]

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

Emits the signal OnQueueDraw.

void nux::View::RemoveCompositionLayout ( ) [protected]
void nux::View::RemoveLayout ( ) [protected]
bool nux::View::SearchInAllSubNodes ( Area bo)
bool nux::View::SearchInFirstSubNodes ( Area bo)
void nux::View::SetCanFocus ( bool  can_focus)
virtual bool nux::View::SetCompositionLayout ( Layout layout) [protected, virtual]

Deprecated. Use SetLayout();.

void nux::View::SetFocusControl ( bool  focus_control)
void nux::View::SetFont ( ObjectPtr< FontTexture font)

Reimplemented in nux::StaticTextBox.

virtual void nux::View::SetGeometry ( const Geometry geo) [virtual]

Set Geometry.

Reimplemented from nux::Area.

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

Referenced by nux::ScrollBar::resize().

virtual bool nux::View::SetLayout ( Layout layout) [virtual]

Set the default layout for this view.

Set the default layout for this view.

Parameters:
layoutA Layout object.

Reimplemented in nux::BaseWindow, nux::GroupBox, nux::GroupBox2, nux::Panel, and nux::ScrollView.

virtual void nux::View::SetTextColor ( const Color color) [virtual]

Reimplemented in nux::TextEntry.

void nux::View::SetUsingStyleDrawing ( bool  b) [inline]

Friends And Related Function Documentation

friend class Area [friend]
friend class LayeredLayout [friend]
friend class Layout [friend]

Reimplemented from nux::Area.

Reimplemented in nux::HScrollBar, and nux::VScrollBar.

friend class WindowCompositor [friend]

Reimplemented from nux::Area.

Reimplemented in nux::BaseWindow, and nux::FloatingWindow.


Field Documentation

bool nux::View::_can_focus [protected]
bool nux::View::_full_redraw [protected]
bool nux::View::_is_active [protected]

True if the view is enabled (it can receive events and process them).

bool nux::View::_need_redraw [protected]
sigc::connection nux::View::_on_focus_changed_handler [protected]
sigc::signal<void, View*, Layout*> nux::View::LayoutAdded
sigc::signal<void, View*, Layout*> nux::View::LayoutRemoved

Reimplemented in nux::StaticTextBox.

sigc::signal<void, View*> nux::View::OnQueueDraw

Signal emitted when a view is scheduled for a draw.


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