nux-0.9.48
|
#include <Nux/BaseWindow.h>
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 Layout * | GetLayout () |
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. | |
Layout * | m_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 |
A floating area on top of the main window. A BaseWindow is referenced by the WindowCompositor who calls Reference on the BaseWindow during registration.
nux::BaseWindow::BaseWindow | ( | const TCHAR * | WindowName = TEXT("") , |
NUX_FILE_LINE_PROTO | |||
) |
virtual nux::BaseWindow::~BaseWindow | ( | ) | [virtual] |
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.
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.
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.
Width | New width of the window. |
Height | New 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.
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.
Callback | Function to be called to set the this object size and position. |
Data | The 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.
input_area | An 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] |
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.
b | If 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 | ( | ) |
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.
bool nux::BaseWindow::_entering_hidden_state [protected] |
the window is about to be made hidden during event processing
bool nux::BaseWindow::_entering_visible_state [protected] |
the window is about to be made visible during event processing
AbstractPaintLayer* nux::BaseWindow::_paint_layer [protected] |
int nux::BaseWindow::m_Border [protected] |
Callback function to set the window position and size.
void* nux::BaseWindow::m_configure_notify_callback_data [protected] |
Callback data for ConfigureNotifyCallback.
Layout* nux::BaseWindow::m_layout [protected] |
int nux::BaseWindow::m_TopBorder [protected] |
sigc::signal<void, BaseWindow*> nux::BaseWindow::sigHidden |
Emit a signal when the BaseWindow becomes hidden.
sigc::signal<void, BaseWindow*> nux::BaseWindow::sigVisible |
Emit a signal when the BaseWindow becomes visible.