nux-0.9.46

nux::BaseWindow Class Reference

#include <Nux/BaseWindow.h>

Inheritance diagram for nux::BaseWindow:
nux::View nux::InputArea nux::Area nux::InitiallyUnownedObject nux::Focusable nux::Object nux::Trackable nux::FloatingWindow nux::Dialog nux::PopUpWindow nux::ColorPickerDialog

Public Member Functions

 BaseWindow (const TCHAR *WindowName=TEXT(""), NUX_FILE_LINE_PROTO)
virtual ~BaseWindow ()
virtual long ProcessEvent (IEvent &ievent, long TraverseInfo, long ProcessEventInfo)
virtual void Draw (GraphicsEngine &GfxContext, bool force_draw)
virtual void DrawContent (GraphicsEngine &GfxContext, bool force_draw)
virtual void PostDraw (GraphicsEngine &GfxContext, bool force_draw)
void AddWidget (View *ic)
void AddWidget (View *ic, int stretchfactor)
void AddWidget (std::list< View * > *ViewList)
virtual LayoutGetLayout ()
 Get the default layout of this view.
virtual bool SetLayout (Layout *layout)
 Set the default layout for this view.
void PushHigher (BaseWindow *floating_view)
 Push the view one level up the ViewWindow stack.
void PushLower (BaseWindow *floating_view)
 Push the view one level down the ViewWindow stack.
void PushToFront ()
 Push the view to the front of the ViewWindow stack.
void PushToBack ()
 Push the view to the back of the ViewWindow stack.
virtual void SetWindowSizeMatchLayout (bool b)
 Set the window size to respect the layout container.
bool IsSizeMatchContent () const
 Check if the window size is constrained to the layout container size.
virtual void ShowWindow (bool b, bool StartModal=false)
void StopModal ()
bool IsModal () const
bool IsVisible () const
virtual void SetGeometry (const Geometry &geo)
 Set Geometry.
void SetConfigureNotifyCallback (ConfigureNotifyCallback Callback, void *Data)
void SetBackgroundLayer (AbstractPaintLayer *layer)
void SetBackgroundColor (const Color &color)
void SetOpacity (float opacity)
float GetOpacity ()
void SetEnterFocusInputArea (InputArea *input_area)
 Set an InputArea to receive the keyboard focus when the BaseWIndow receives the NUX_WINDOW_ENTER_FOCUS event.
void * GetBackupTextureData (int &width, int &height, int &format)
 Get the backup texture data of this BaseWindow,.
NString GetWindowName ()

Data Fields

sigc::signal< void, BaseWindow * > sigVisible
 Emit a signal when the BaseWindow becomes visible.
sigc::signal< void, BaseWindow * > sigHidden
 Emit a signal when the BaseWindow becomes hidden.

Protected Member Functions

virtual void PreLayoutManagement ()
virtual long PostLayoutManagement (long LayoutResult)
virtual void PositionChildLayout (float offsetX, float offsetY)
virtual void LayoutWindowElements ()
 Layout the window elements.
virtual void NotifyConfigurationChange (int Width, int Height)
int GetBorder () const
int GetTopBorder () const
void SetBorder (int border)
void SetTopBorder (int border)
bool ChildNeedsRedraw ()

Protected Attributes

ConfigureNotifyCallback m_configure_notify_callback
 Callback function to set the window position and size.
void * m_configure_notify_callback_data
 Callback data for ConfigureNotifyCallback.
Layoutm_layout
int m_TopBorder
int m_Border
AbstractPaintLayer_paint_layer
bool _entering_visible_state
 the window is about to be made visible during event processing
bool _entering_hidden_state
 the window is about to be made hidden during event processing

Friends

class ComboBox_Logic_WindowView
class PopUpWindow
class WindowThread
class WindowCompositor

Detailed Description

A floating area on top of the main window. A BaseWindow is referenced by the WindowCompositor who calls Reference on the BaseWindow during registration.


Constructor & Destructor Documentation

nux::BaseWindow::BaseWindow ( const TCHAR WindowName = TEXT(""),
NUX_FILE_LINE_PROTO   
)
virtual nux::BaseWindow::~BaseWindow ( ) [virtual]

Member Function Documentation

void nux::BaseWindow::AddWidget ( View ic)
void nux::BaseWindow::AddWidget ( View ic,
int  stretchfactor 
)
void nux::BaseWindow::AddWidget ( std::list< View * > *  ViewList)
bool nux::BaseWindow::ChildNeedsRedraw ( ) [protected]
virtual void nux::BaseWindow::Draw ( GraphicsEngine GfxContext,
bool  force_draw 
) [virtual]

Implements nux::View.

Reimplemented in nux::FloatingWindow.

virtual void nux::BaseWindow::DrawContent ( GraphicsEngine GfxContext,
bool  force_draw 
) [virtual]

Reimplemented from nux::View.

Reimplemented in nux::FloatingWindow.

void* nux::BaseWindow::GetBackupTextureData ( int &  width,
int &  height,
int &  format 
)

Get the backup texture data of this BaseWindow,.

int nux::BaseWindow::GetBorder ( ) const [protected]
virtual Layout* nux::BaseWindow::GetLayout ( ) [virtual]

Get the default layout of this view.

Get the default layout of this view.

Returns:
The default layout of this view.

Reimplemented from nux::View.

float nux::BaseWindow::GetOpacity ( )
int nux::BaseWindow::GetTopBorder ( ) const [protected]
NString nux::BaseWindow::GetWindowName ( ) [inline]
bool nux::BaseWindow::IsModal ( ) const
bool nux::BaseWindow::IsSizeMatchContent ( ) const [inline]

Check if the window size is constrained to the layout container size.

Check if the window size is constrained to the layout container size.

Returns:
If the return value is true, the window size is constrained by the size the layout container.

Referenced by nux::FloatingWindow::CanBreakLayout().

bool nux::BaseWindow::IsVisible ( ) const
virtual void nux::BaseWindow::LayoutWindowElements ( ) [protected, virtual]

Layout the window elements.

Layout elements such as button on the title bar, and the resize widget according to the current geometry of the window. Also initiate the computation of the child layout if there is one.

Reimplemented in nux::FloatingWindow.

virtual void nux::BaseWindow::NotifyConfigurationChange ( int  Width,
int  Height 
) [protected, virtual]

Floating Area need to be informed when the main window has been resized.

Parameters:
WidthNew width of the window.
HeightNew height of the window.
virtual void nux::BaseWindow::PositionChildLayout ( float  offsetX,
float  offsetY 
) [protected, virtual]

Reimplemented from nux::View.

Reimplemented in nux::FloatingWindow.

virtual void nux::BaseWindow::PostDraw ( GraphicsEngine GfxContext,
bool  force_draw 
) [virtual]

Reimplemented from nux::View.

Reimplemented in nux::FloatingWindow.

virtual long nux::BaseWindow::PostLayoutManagement ( long  LayoutResult) [protected, virtual]

Reimplemented from nux::View.

Reimplemented in nux::FloatingWindow.

virtual void nux::BaseWindow::PreLayoutManagement ( ) [protected, virtual]

Reimplemented from nux::View.

Reimplemented in nux::FloatingWindow.

virtual long nux::BaseWindow::ProcessEvent ( IEvent ievent,
long  TraverseInfo,
long  ProcessEventInfo 
) [virtual]

Implements nux::View.

Reimplemented in nux::FloatingWindow.

void nux::BaseWindow::PushHigher ( BaseWindow floating_view)

Push the view one level up the ViewWindow stack.

Push this view one level up the ViewWindow stack. Does it even if the view is hidden.

void nux::BaseWindow::PushLower ( BaseWindow floating_view)

Push the view one level down the ViewWindow stack.

Push this view one level down the ViewWindow stack. Does it even if the view is hidden.

void nux::BaseWindow::PushToBack ( )

Push the view to the back of the ViewWindow stack.

Push this view to the back of the ViewWindow stack. Does it even if the view is hidden.

void nux::BaseWindow::PushToFront ( )

Push the view to the front of the ViewWindow stack.

Push this view to the top of the ViewWindow stack. Does it even if the view is hidden. If a valid ViewWindow has been forced at the top of the stack with a call to WindowCompositor::SetAlwaysOnFrontWindow(), then this view will be positioned one level below that view.

See also:
SetAlwaysOnFrontWindow ();
void nux::BaseWindow::SetBackgroundColor ( const Color color)
void nux::BaseWindow::SetBackgroundLayer ( AbstractPaintLayer layer)
void nux::BaseWindow::SetBorder ( int  border) [protected]
void nux::BaseWindow::SetConfigureNotifyCallback ( ConfigureNotifyCallback  Callback,
void *  Data 
)

Call this function to set a callback function that is called when this object is need to be resized or re-positioned.

Parameters:
CallbackFunction to be called to set the this object size and position.
DataThe callback data.
void nux::BaseWindow::SetEnterFocusInputArea ( InputArea input_area)

Set an InputArea to receive the keyboard focus when the BaseWIndow receives the NUX_WINDOW_ENTER_FOCUS event.

See also:
_enter_focus_input_area.
Parameters:
input_areaAn InputArea pointer object. Must be a child of this BaseWindow.
virtual void nux::BaseWindow::SetGeometry ( const Geometry geo) [virtual]

Set Geometry.

Reimplemented from nux::View.

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

Set the default layout for this view.

Set the default layout for this view.

Parameters:
layoutA Layout object.

Reimplemented from nux::View.

void nux::BaseWindow::SetOpacity ( float  opacity)
void nux::BaseWindow::SetTopBorder ( int  border) [protected]
virtual void nux::BaseWindow::SetWindowSizeMatchLayout ( bool  b) [inline, virtual]

Set the window size to respect the layout container.

Set the window size to be such that the container layout size remains the same after ComputeSizeLayout2 is called on the layout. The window elements (title bar, minimize and close buttons) are positioned accordingly. The size grip is not responding anymore.

Parameters:
bIf b is true, the window size respect the size the layout container.
virtual void nux::BaseWindow::ShowWindow ( bool  b,
bool  StartModal = false 
) [virtual]
void nux::BaseWindow::StopModal ( )

Friends And Related Function Documentation

friend class ComboBox_Logic_WindowView [friend]

Reimplemented in nux::FloatingWindow.

friend class PopUpWindow [friend]

Reimplemented in nux::FloatingWindow.

friend class WindowCompositor [friend]

Reimplemented from nux::View.

Reimplemented in nux::FloatingWindow.

friend class WindowThread [friend]

Reimplemented from nux::Area.


Field Documentation

the window is about to be made hidden during event processing

the window is about to be made visible during event processing

int nux::BaseWindow::m_Border [protected]

Callback function to set the window position and size.

Callback data for ConfigureNotifyCallback.

sigc::signal<void, BaseWindow*> nux::BaseWindow::sigHidden

Emit a signal when the BaseWindow becomes hidden.

Emit a signal when the BaseWindow becomes visible.


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