Clock to test the draw events. More...
#include <debug_clock.hpp>
Classes | |
struct | ttime |
Helper struct to keep track of the time. More... | |
Public Member Functions | |
tdebug_clock () | |
Public Member Functions inherited from gui2::tpopup | |
tpopup () | |
virtual | ~tpopup () |
void | show (CVideo &video, const bool allow_interaction=false, const unsigned auto_close_time=0) |
Shows the window. More... | |
void | hide () |
Hides the window. More... | |
Private Member Functions | |
virtual const std::string & | window_id () const |
Inherited from tdialog, implemented by REGISTER_DIALOG. More... | |
void | pre_show (twindow &window) |
Inherited from tdialog. More... | |
void | post_show (CVideo &video) |
Inherited from tdialog. More... | |
void | update_time (const bool force) |
The callback for the drawing routine. More... | |
Private Attributes | |
tprogress_bar * | hour_percentage_ |
Progress bar for displaying the hours as a percentage. More... | |
tprogress_bar * | minute_percentage_ |
Progress bar for displaying the minutes as a percentage. More... | |
tprogress_bar * | second_percentage_ |
Progress bar for displaying the seconds as a percentage. More... | |
tinteger_selector_ * | hour_ |
An integer selector to display the total seconds. More... | |
tinteger_selector_ * | minute_ |
An integer selector to display the total seconds this hour. More... | |
tinteger_selector_ * | second_ |
An integer selector to display the seconds this minute. More... | |
tpane * | pane_ |
tcontrol * | clock_ |
A widget that can display the time. More... | |
twindow * | window_ |
The window being shown. More... | |
event::tsignal_function | signal_ |
The signal patched in the drawing routine. More... | |
ttime | time_ |
The `current' time. More... | |
Clock to test the draw events.
Definition at line 31 of file debug_clock.hpp.
|
inline |
Definition at line 34 of file debug_clock.hpp.
Inherited from tdialog.
Definition at line 114 of file debug_clock.cpp.
References gui2::event::tdispatcher::disconnect_signal(), gui2::event::DRAW, signal_, and window_.
Inherited from tdialog.
Reimplemented from gui2::tpopup.
Definition at line 78 of file debug_clock.cpp.
References gui2::event::DRAW, gui2::event::tdispatcher::front_child, and update_time().
|
private |
The callback for the drawing routine.
It updates the `time' in the various controls.
force | Force an update even it the time didn't change? (This is used to set the clock initially.) |
Definition at line 119 of file debug_clock.cpp.
References gui2::tcontrol::canvas(), clock_, gui2::tpane::create_item(), gui2::tdebug_clock::ttime::hour, hour_, hour_percentage_, gui2::tdebug_clock::ttime::minute, minute_, minute_percentage_, pane_, gui2::tdebug_clock::ttime::second, second_, second_percentage_, gui2::twidget::set_is_dirty(), gui2::tprogress_bar::set_percentage(), gui2::tinteger_selector_::set_value(), gui2::tdebug_clock::ttime::step(), and time_.
Referenced by pre_show().
|
privatevirtual |
Inherited from tdialog, implemented by REGISTER_DIALOG.
Implements gui2::tpopup.
|
private |
A widget that can display the time.
Definition at line 72 of file debug_clock.hpp.
Referenced by update_time().
|
private |
An integer selector to display the total seconds.
Definition at line 61 of file debug_clock.hpp.
Referenced by update_time().
|
private |
Progress bar for displaying the hours as a percentage.
Definition at line 52 of file debug_clock.hpp.
Referenced by update_time().
|
private |
An integer selector to display the total seconds this hour.
Definition at line 64 of file debug_clock.hpp.
Referenced by update_time().
|
private |
Progress bar for displaying the minutes as a percentage.
Definition at line 55 of file debug_clock.hpp.
Referenced by update_time().
|
private |
Definition at line 69 of file debug_clock.hpp.
Referenced by update_time().
|
private |
An integer selector to display the seconds this minute.
Definition at line 67 of file debug_clock.hpp.
Referenced by update_time().
|
private |
Progress bar for displaying the seconds as a percentage.
Definition at line 58 of file debug_clock.hpp.
Referenced by update_time().
|
private |
The signal patched in the drawing routine.
Definition at line 78 of file debug_clock.hpp.
Referenced by post_show().
|
private |
The `current' time.
Definition at line 125 of file debug_clock.hpp.
Referenced by update_time().
|
private |