libt3widget
|
A widget showing a frame. More...
Public Types | |
enum | frame_dimension_t { AROUND_ALL, COVER_BOTTOM, COVER_RIGHT, COVER_LEFT, COVER_TOP } |
Constants defining bits determining which parts of the frame should be covered by the child widget. More... |
Public Member Functions | |
virtual bool | accepts_focus (void) |
virtual void | force_redraw (void) |
frame_t (frame_dimension_t _dimension=AROUND_ALL) | |
Create a new frame_t. | |
virtual bool | is_child (window_component_t *component) |
virtual bool | is_hotkey (key_t key) |
virtual bool | process_key (key_t key) |
void | set_child (widget_t *_child) |
Set the child widget. | |
virtual void | set_child_focus (window_component_t *target) |
virtual void | set_enabled (bool enable) |
virtual void | set_focus (focus_t focus) |
virtual bool | set_size (optint height, optint width) |
virtual void | update_contents (void) |
![]() | |
virtual bool | accepts_focus (void) |
Query whether this widget accepts focus. | |
virtual void | force_redraw (void) |
virtual void | hide (void) |
virtual bool | is_enabled (void) |
Query the enabled status of this widget. | |
virtual bool | is_hotkey (key_t key) |
Query whether key is a hotkey for this widget. | |
virtual bool | is_shown (void) |
Query the visibility status of this widget. | |
virtual bool | process_mouse_event (mouse_event_t event) |
Process a mouse event. | |
virtual void | set_anchor (window_component_t *anchor, int relation) |
Set this widget's anchor. | |
virtual void | set_enabled (bool enable) |
Set the enabled status of this widget. | |
virtual void | set_focus (focus_t focus) |
virtual void | set_position (optint top, optint left) |
virtual void | show (void) |
![]() | |
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. | |
![]() | |
void | grab_mouse (void) |
Grab all future mouse events. | |
void | register_mouse_target (t3_window_t *target) |
Register a window to receive mouse events. | |
void | release_mouse_grab (void) |
Release a previous mouse grab. | |
void | unregister_mouse_target (t3_window_t *target) |
Unregister a window to receive mouse events. | |
![]() | |
virtual bool | is_child (window_component_t *component)=0 |
Determine whether a window_compnent_t is a child of the container_t. | |
virtual void | set_child_focus (window_component_t *target)=0 |
Set the focus to a specific window component. |
Additional Inherited Members | |
![]() | |
static bool | handle_mouse_event (mouse_event_t event) |
![]() | |
void | init_unbacked_window (int height, int width, bool register_as_mouse_target=false) |
Initialize the window with an unbacked t3_window_t with height and width . | |
void | init_window (int height, int width, bool register_as_mouse_target=true) |
Initialize the window with a t3_window_t with height and width . | |
widget_t (int height, int width, bool register_as_mouse_target=true) | |
Constructor which creates a default t3_window_t with height and width . | |
widget_t (void) | |
Constructor which does not create a default t3_window_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 . | |
![]() | |
bool | enabled |
Widget is enabled. | |
bool | redraw |
Widget requires redrawing on next update_contents call. | |
bool | shown |
Widget is shown. |
A widget showing a frame.
This widget is primarily meant to draw frames around other widgets. The child widget is automatically resized to fit the frame.
Constants defining bits determining which parts of the frame should be covered by the child widget.
t3_widget::frame_t::frame_t | ( | frame_dimension_t | _dimension = AROUND_ALL | ) |
Create a new frame_t.
_dimension | Bit map indicating which parts of the frame should be covered by the child widget. |
For some widgets, it may provide a more aesthetic appearance if part of the widget overlaps the frame. This is mostly the case for widgets that have a scrollbar on one side, like for example the list_pane_t. Making the scrollbar overlap the frame looks better and leaves more space while still clearly delinating the edges of the list.
void t3_widget::frame_t::set_child | ( | widget_t * | _child | ) |
Set the child widget.