libt3widget
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
List of all members | Public Member Functions | Protected Attributes
t3_widget::center_component_t Class Reference

Base class for components which need to center dialogs. More...

Inheritance diagram for t3_widget::center_component_t:
t3_widget::window_component_t t3_widget::edit_window_t t3_widget::text_field_t t3_widget::text_window_t

Public Member Functions

 center_component_t (void)
 Create a new center_component_t. More...
 
virtual void set_center_window (window_component_t *_center_window)
 Set the window_component_t to center over. More...
 

Protected Attributes

window_component_tcenter_window
 The window_component_t to center over. More...
 

Detailed Description

Base class for components which need to center dialogs.

This base class is specifically made for widgets like edit_window_t which need to show dialogs. In some cases it is better to center those dialogs over the widget itself, but in other cases it is more intuitive to center those dialogs over the containing window_component_t of the widget. The latter may be the case when the widget is itself part of a dialog. To allow both cases, this interface defines a function to set the window_component_t used for centering.

Constructor & Destructor Documentation

t3_widget::center_component_t::center_component_t ( void  )

Create a new center_component_t.

The center_window member will be set to this.

Member Function Documentation

void t3_widget::center_component_t::set_center_window ( window_component_t _center_window)
virtual

Set the window_component_t to center over.

Member Data Documentation

window_component_t* t3_widget::center_component_t::center_window
protected

The window_component_t to center over.