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

Abstract base class for all items displayed on screen. More...

Inheritance diagram for t3_widget::window_component_t:
t3_widget::center_component_t t3_widget::container_t t3_widget::dialog_base_t t3_widget::mouse_target_t t3_widget::widget_t t3_widget::edit_window_t t3_widget::text_field_t t3_widget::text_window_t t3_widget::dialog_base_t t3_widget::edit_window_t t3_widget::file_pane_t t3_widget::frame_t t3_widget::list_pane_t t3_widget::multi_widget_t t3_widget::split_t t3_widget::text_window_t t3_widget::widget_container_t t3_widget::widget_group_t t3_widget::dialog_t t3_widget::popup_t t3_widget::popup_t t3_widget::widget_t t3_widget::attribute_test_line_t t3_widget::bullet_t t3_widget::button_t t3_widget::checkbox_t t3_widget::color_picker_base_t t3_widget::dummy_widget_t t3_widget::edit_window_t t3_widget::expander_t t3_widget::file_pane_t t3_widget::frame_t t3_widget::label_t t3_widget::list_pane_t t3_widget::menu_bar_t t3_widget::menu_item_base_t t3_widget::multi_widget_t t3_widget::scrollbar_t t3_widget::separator_t t3_widget::smart_label_t t3_widget::split_t t3_widget::text_field_t t3_widget::text_window_t t3_widget::widget_group_t

Public Types

enum  focus_t {
  FOCUS_OUT, FOCUS_SET, FOCUS_IN_FWD, FOCUS_IN_BCK,
  FOCUS_REVERT
}

Public Member Functions

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.

Protected Attributes

cleanup_t3_window_ptr window
 The t3_window_t used for presenting this item on screen (see libt3window).

Detailed Description

Abstract base class for all items displayed on screen.

Constructor & Destructor Documentation

t3_widget::window_component_t::window_component_t ( void  )

Base constructor.

t3_widget::window_component_t::~window_component_t ( void  )
virtual

Base destructor.

Member Function Documentation

virtual void t3_widget::window_component_t::force_redraw ( void  )
pure virtual

Request that this window_component_t be completely redrawn.

t3_window_t * t3_widget::window_component_t::get_base_window ( void  )
virtual

Retrieve the t3_window_t for this window_component_t.

The returned pointer should be used only for setting anchor positions of other window_component_t's and similar operations.

virtual void t3_widget::window_component_t::hide ( void  )
pure virtual

Hide the window_component_t.

virtual bool t3_widget::window_component_t::process_key ( key_t  key)
pure virtual

Handle a key press by the user.

Returns
A boolean indicating whether this window_component_t handled the key press.
virtual void t3_widget::window_component_t::set_focus ( focus_t  focus)
pure virtual

Set whether this window_component_t has the input focus.

Note that this merely notifies the window_component_t that it should change it's appearance to indicate the user that this window_component_t has the input focus. Which window_component_t actually receives the input events is handled outside of the window_component_t.

virtual void t3_widget::window_component_t::set_position ( optint  top,
optint  left 
)
pure virtual

Move the window_component_t to a specified position.

Note that the position is relative to the anchor point.

virtual bool t3_widget::window_component_t::set_size ( optint  height,
optint  width 
)
pure virtual

Set the size of this window_component_t.

Parameters
heightThe new height of the window_component_t in cells, or None if it should remain unchanged.
widthThe new width of the window_component_t in cells, or None if it should remain unchanged.
Returns
A boolean indicating whether all allocations required for the resize operation succeeded.
virtual void t3_widget::window_component_t::show ( void  )
pure virtual

Display the window_component_t.

virtual void t3_widget::window_component_t::update_contents ( void  )
pure virtual

Update the contents of the window.

Member Data Documentation

cleanup_t3_window_ptr t3_widget::window_component_t::window
protected

The t3_window_t used for presenting this item on screen (see libt3window).