TermOx
Static Public Member Functions | List of all members
ox::detail::Focus Class Reference

Static Public Member Functions

static auto focus_widget () -> ox::Widget *
 Return a pointer to the currently focused Widget, can return nullptr.
 
static void mouse_press (ox::Widget &clicked)
 Sets the focus to clicked if it has a Focus_policy::Mouse/Strong.
 
static auto tab_press () -> bool
 Find the next Focus_policy::Tab/Strong Widget and set focus to it.
 
static auto shift_tab_press () -> bool
 Find the previous Focus_policy::Tab/Strong Widget and set focus to it.
 
static void set (ox::Widget &new_focus)
 Sets focus to new_focus, via a posted Focus_in event. More...
 
static void clear ()
 Set the focus widget to nullptr and send Focus_out_event to focus_widg.
 
static void clear_without_posting_event ()
 Set the focus widget to nullptr and do not send a Focus_out_event. More...
 
static void enable_tab_focus ()
 Enable Tab/Back_tab keys to change the focus Widget.
 
static void disable_tab_focus ()
 Disable Tab/Back_tab keys from changing focus Widget.
 
static void suppress_tab ()
 Stops a Tab or Back_tab from changing focus to the next Widget.
 
static void unsuppress_tab ()
 Re-enable a Tab or Back_tab to change focus to the next Widget.
 

Member Function Documentation

◆ clear_without_posting_event()

void ox::detail::Focus::clear_without_posting_event ( )
static

Set the focus widget to nullptr and do not send a Focus_out_event.

Needed to unregister the focus widget if it is being destroyed.

◆ set()

void ox::detail::Focus::set ( ox::Widget new_focus)
static

Sets focus to new_focus, via a posted Focus_in event.

If new_focus has Focus_policy::None, calls Focus::clear().


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