libt3widget
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
t3_widget::dialog_base_t Class Reference
Inheritance diagram for t3_widget::dialog_base_t:
t3_widget::window_component_t t3_widget::container_t t3_widget::window_component_t t3_widget::dialog_t t3_widget::popup_t t3_widget::attribute_picker_dialog_t t3_widget::file_dialog_t t3_widget::find_dialog_t t3_widget::goto_dialog_t t3_widget::input_selection_dialog_t t3_widget::insert_char_dialog_t t3_widget::main_window_base_t t3_widget::menu_panel_t t3_widget::message_dialog_t t3_widget::replace_buttons_dialog_t t3_widget::edit_window_t::autocomplete_panel_t t3_widget::file_pane_t::search_panel_t t3_widget::text_field_t::drop_down_list_t

Public Member Functions

virtual void center_over (window_component_t *center)
 Set the position and anchoring for this dialog such that it is centered over a window_component_t.
virtual void force_redraw (void)
virtual void hide (void)
virtual void set_focus (focus_t focus)
virtual void set_position (optint top, optint left)
virtual bool set_size (optint height, optint width)
virtual void show (void)
virtual void update_contents (void)
virtual ~dialog_base_t ()
 Destroy this dialog.
- Public Member Functions inherited from t3_widget::window_component_t
virtual void force_redraw (void)=0
 Request that this window_component_t be completely redrawn.
virtual t3_window_t * get_base_window (void)
 Retrieve the t3_window_t for this window_component_t.
virtual void hide (void)=0
 Hide the window_component_t.
virtual bool process_key (key_t key)=0
 Handle a key press by the user.
virtual void set_focus (focus_t focus)=0
 Set whether this window_component_t has the input focus.
virtual void set_position (optint top, optint left)=0
 Move the window_component_t to a specified position.
virtual bool set_size (optint height, optint width)=0
 Set the size of this window_component_t.
virtual void show (void)=0
 Display the window_component_t.
virtual void update_contents (void)=0
 Update the contents of the window.
 window_component_t (void)
 Base constructor.
virtual ~window_component_t (void)
 Base destructor.

Static Public Member Functions

static void force_redraw_all (void)
 Call #force_redraw on all dialogs.

Protected Member Functions

 dialog_base_t (int height, int width, bool has_shadow)
 Create a new dialog with height and width, and with title _title.
void focus_next (void)
 Focus the previous widget, wrapping around if necessary.
void focus_previous (void)
 Focus the next widget, wrapping around if necessary.
virtual bool is_child (window_component_t *widget)
 Determine whether a window_compnent_t is a child of the container_t.
void push_back (widget_t *widget)
 Add a widget to this dialog.
virtual void set_child_focus (window_component_t *target)
 Set the focus to a specific window component.
- Protected Member Functions inherited from t3_widget::container_t
virtual bool set_widget_parent (window_component_t *widget)
 Make widget a child window of this container_t, by setting its parent window.
virtual void unset_widget_parent (window_component_t *widget)
 Unset the parent window for a widget.

Protected Attributes

widgets_t::iterator current_widget
 Iterator indicating the widget that has the input focus.
bool redraw
 Boolean indicating whether redrawing is necessary.
cleanup_t3_window_ptr shadow_window
 t3_window_t used to draw the shadow under a dialog.
widgets_t widgets
 List of widgets on this dialog.
- Protected Attributes inherited from t3_widget::window_component_t
cleanup_t3_window_ptr window
 The t3_window_t used for presenting this item on screen (see libt3window).

Friends

class dialog_t

Additional Inherited Members

- Public Types inherited from t3_widget::window_component_t
enum  focus_t {
  FOCUS_OUT, FOCUS_SET, FOCUS_IN_FWD, FOCUS_IN_BCK,
  FOCUS_REVERT
}

Constructor & Destructor Documentation

t3_widget::dialog_base_t::dialog_base_t ( int  height,
int  width,
bool  has_shadow 
)
protected

Create a new dialog with height and width, and with title _title.

t3_widget::dialog_base_t::~dialog_base_t ( )
virtual

Destroy this dialog.

Any widgets on the dialog are deleted as well.

Member Function Documentation

void t3_widget::dialog_base_t::center_over ( window_component_t center)
virtual

Set the position and anchoring for this dialog such that it is centered over a window_component_t.

void t3_widget::dialog_base_t::focus_next ( void  )
protected

Focus the previous widget, wrapping around if necessary.

void t3_widget::dialog_base_t::focus_previous ( void  )
protected

Focus the next widget, wrapping around if necessary.

void t3_widget::dialog_base_t::force_redraw_all ( void  )
static

Call #force_redraw on all dialogs.

bool t3_widget::dialog_base_t::is_child ( window_component_t component)
protectedvirtual

Determine whether a window_compnent_t is a child of the container_t.

Implements t3_widget::container_t.

Reimplemented in t3_widget::dialog_t, and t3_widget::menu_panel_t.

void t3_widget::dialog_base_t::push_back ( widget_t widget)
protected

Add a widget to this dialog.

If a widget is not added through push_back, it will not be displayed, or receive input.

void t3_widget::dialog_base_t::set_child_focus ( window_component_t target)
protectedvirtual

Set the focus to a specific window component.

Implements t3_widget::container_t.

Reimplemented in t3_widget::dialog_t.

Member Data Documentation

widgets_t::iterator t3_widget::dialog_base_t::current_widget
protected

Iterator indicating the widget that has the input focus.

bool t3_widget::dialog_base_t::redraw
protected

Boolean indicating whether redrawing is necessary.

cleanup_t3_window_ptr t3_widget::dialog_base_t::shadow_window
protected

t3_window_t used to draw the shadow under a dialog.

widgets_t t3_widget::dialog_base_t::widgets
protected

List of widgets on this dialog.

This list should only be filled using push_back.