Boost.UI
User Interface Boost library
Public Member Functions | List of all members
boost::ui::time_picker Class Reference

Time picker widget. More...

Inheritance diagram for boost::ui::time_picker:
[legend]

Public Member Functions

std::time_t get_time_t () const
 Returns count of seconds since midnight in std::time_t format. More...
 
time_pickerset_time_t (std::time_t t)
 Sets time in std::time_t format. More...
 
std::tm get_tm () const
 Returns local time in std::tm format at epoch start day (1900-01-01) More...
 
time_pickerset_tm (const std::tm &t)
 Sets local time in std::tm format. More...
 
boost::posix_time::time_duration posix_time_duration () const
 Returns boost::posix_time::time_duration. More...
 
time_pickerposix_time_duration (const boost::posix_time::time_duration &d)
 Sets boost::posix_time::time_duration. More...
 
template<class Rep , class Period >
boost::chrono::duration< Rep, Period > boost_chrono_duration () const
 Returns boost::chrono::duration. More...
 
template<class Rep , class Period >
time_pickerchrono_duration (const boost::chrono::duration< Rep, Period > &d)
 Sets boost::chrono::duration. More...
 
template<class Rep , class Period >
std::chrono::duration< Rep, Period > chrono_duration () const
 Returns std::chrono::duration. More...
 
template<class Rep , class Period >
time_pickerchrono_duration (const std::chrono::duration< Rep, Period > &d)
 Sets std::chrono::duration. More...
 
template<class T >
void get_time (T hours_ptr, T minutes_ptr, T seconds_ptr)
 Returns time.
 
time_pickerset_time (int hours, int minutes, int seconds)
 Sets time. More...
 
template<class F , class ... Args>
time_pickeron_change (F &&f, Args &&... args)
 Connects time change handler.
 
 time_picker (widget &parent)
 Creates widget.
 
time_pickercreate (widget &parent)
 Creates widget.
 
- Public Member Functions inherited from boost::ui::widget
ui::layout::item layout ()
 Returns layout::item with this widget.
 
widgetresize (coord_type width, coord_type height)
 Changes widget size to specified values.
 
coord_type x () const
 Returns x coordinate relative to the parent widget client area.
 
coord_type y () const
 Returns y coordinate relative to the parent widget client area.
 
coord_type width () const
 Returns widget width.
 
coord_type height () const
 Returns widget height.
 
point pos () const
 Returns widget position relative to the parent widget client area.
 
size dimensions () const
 Returns widget size.
 
rect bounds () const
 Returns widget bounds in client coordinates.
 
widgetenable (bool do_enable=true)
 Enables widget if do_enable is true, disables otherwise.
 
widgetdisable ()
 Disables widget.
 
bool is_enabled () const
 Returns true if widget is enabled, false otherwise.
 
widgetshow (bool do_show=true)
 Shows widget if do_show is true, hides otherwise.
 
widgethide ()
 Hides widget.
 
bool is_shown () const
 Returns true if widget is shown on screen, false otherwise.
 
widgettooltip (const uistring &text)
 Sets tooltip text. More...
 
uistring tooltip () const
 Returns tooltip text.
 
widgetfont (const ui::font &f)
 Sets font.
 
ui::font font () const
 Returns font.
 
bool native_valid () const noexcept
 Returns true only if native widget was created.
 
widgetappend (const widget &w)
 Creates native widget and appends it to this widget.
 
widgetoperator<< (const widget &w)
 Creates native widget and appends it to this widget.
 
widgetmove (coord_type x, coord_type y)
 Moves widget to specified position.
 
widgetmove (const point &pos)
 Moves widget to specified position.
 
template<class F , class ... Args>
widgeton_resize (F &&f, Args &&... args)
 Connects widget resize handler.
 
template<class F , class ... Args>
widgeton_key_press (F &&f, Args &&... args)
 Connects keyboard event handler.
 
template<class F , class ... Args>
widgeton_key_press_event (F &&f, Args &&... args)
 Connects keyboard event handler.
 
template<class F , class ... Args>
widgeton_key_down (F &&f, Args &&... args)
 Connects keyboard event handler.
 
template<class F , class ... Args>
widgeton_key_down_event (F &&f, Args &&... args)
 Connects keyboard event handler.
 
template<class F , class ... Args>
widgeton_key_up (F &&f, Args &&... args)
 Connects keyboard event handler.
 
template<class F , class ... Args>
widgeton_key_up_event (F &&f, Args &&... args)
 Connects keyboard event handler.
 
template<class F , class ... Args>
widgeton_left_mouse_down (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_left_mouse_down_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_left_mouse_up (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_left_mouse_up_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_right_mouse_down (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_right_mouse_down_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_right_mouse_up (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_right_mouse_up_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_middle_mouse_down (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_middle_mouse_down_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_middle_mouse_up (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_middle_mouse_up_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_left_mouse_double_click (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_left_mouse_double_click_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_right_mouse_double_click (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_right_mouse_double_click_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_middle_mouse_double_click (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_middle_mouse_double_click_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_move (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_move_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_drag (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_drag_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_enter (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_enter_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_leave (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_leave_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_context_menu (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_context_menu_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_wheel (F &&f, Args &&... args)
 Connects mouse event handler.
 
template<class F , class ... Args>
widgeton_mouse_wheel_event (F &&f, Args &&... args)
 Connects mouse event handler.
 
native_handle_type native_handle ()
 Returns the implementation-defined underlying widget handle.
 
const native_handle_type native_handle () const
 Returns the implementation-defined underlying widget handle.
 

Additional Inherited Members

- Public Types inherited from boost::ui::widget
typedef void * native_handle_type
 Implementation-defined widget type.
 

Detailed Description

Time picker widget.

Works with time in range [0 hours, 24 hours)

Member Function Documentation

◆ boost_chrono_duration()

template<class Rep , class Period >
boost::chrono::duration<Rep, Period> boost::ui::time_picker::boost_chrono_duration ( ) const
inline

Returns boost::chrono::duration.

Exceptions
std::out_of_rangeIf time is out of range
See also
BOOST_UI_USE_CHRONO

◆ chrono_duration() [1/3]

template<class Rep , class Period >
std::chrono::duration<Rep, Period> boost::ui::time_picker::chrono_duration ( ) const
inline

Returns std::chrono::duration.

Exceptions
std::out_of_rangeIf time is out of range

◆ chrono_duration() [2/3]

template<class Rep , class Period >
time_picker& boost::ui::time_picker::chrono_duration ( const boost::chrono::duration< Rep, Period > &  d)
inline

Sets boost::chrono::duration.

Exceptions
std::out_of_rangeIf requested time is invalid
See also
BOOST_UI_USE_CHRONO

◆ chrono_duration() [3/3]

template<class Rep , class Period >
time_picker& boost::ui::time_picker::chrono_duration ( const std::chrono::duration< Rep, Period > &  d)
inline

Sets std::chrono::duration.

Exceptions
std::out_of_rangeIf requested time is invalid

◆ get_time_t()

std::time_t boost::ui::time_picker::get_time_t ( ) const

Returns count of seconds since midnight in std::time_t format.

Exceptions
std::out_of_rangeIf selected time is not compatible with std::time_t format

◆ get_tm()

std::tm boost::ui::time_picker::get_tm ( ) const

Returns local time in std::tm format at epoch start day (1900-01-01)

Exceptions
std::out_of_rangeIf selected time is not compatible with std::tm format

◆ posix_time_duration() [1/2]

boost::posix_time::time_duration boost::ui::time_picker::posix_time_duration ( ) const
inline

Returns boost::posix_time::time_duration.

Exceptions
std::out_of_rangeIf time is out of range
See also
BOOST_UI_USE_DATE_TIME

◆ posix_time_duration() [2/2]

time_picker& boost::ui::time_picker::posix_time_duration ( const boost::posix_time::time_duration &  d)
inline

Sets boost::posix_time::time_duration.

Exceptions
std::out_of_rangeIf requested time is invalid
See also
BOOST_UI_USE_DATE_TIME

◆ set_time()

time_picker& boost::ui::time_picker::set_time ( int  hours,
int  minutes,
int  seconds 
)

Sets time.

Exceptions
std::out_of_rangeIf time is out of range

◆ set_time_t()

time_picker& boost::ui::time_picker::set_time_t ( std::time_t  t)

Sets time in std::time_t format.

Exceptions
std::out_of_rangeIf requested time is invalid

◆ set_tm()

time_picker& boost::ui::time_picker::set_tm ( const std::tm &  t)

Sets local time in std::tm format.

Exceptions
std::out_of_rangeIf requested time is invalid

The documentation for this class was generated from the following file: