NDEVR
API Documentation
TouchDesktopThemeButton

A button for allowing the user to switch between Desktop/Touch mode which affects the size of all of the widgets and text. More...

Collaboration diagram for TouchDesktopThemeButton:
[legend]

Public Member Functions

 TouchDesktopThemeButton (WindowManager *manager, Button *button)
 Constructs a touch/desktop mode toggle button.
void invert (bool is_inverted=true)
 Inverts the button behavior so it shows the opposite mode.
void setUseLargeIcons (bool use_large_icons)
 Sets whether to use large icon variants on the button.
void themeChanged ()
 Updates the button appearance to reflect the current widget mode.
WidgetOptions::WidgetMode themeTarget () const
 Returns the widget mode that will be activated when the button is clicked.

Protected Attributes

Buttonm_button
 The button widget this toggle controls.
WidgetOptions::WidgetMode m_constant_theme = WidgetOptions::WidgetMode::e_size
 The locked mode, or e_size if not locked.
bool m_invert = false
 Whether the toggle behavior is inverted.
WindowManagerm_manager
 The window manager providing mode context.
bool m_use_large_icons = false
 Whether to use large icon variants.

Detailed Description

A button for allowing the user to switch between Desktop/Touch mode which affects the size of all of the widgets and text.


Definition at line 92 of file ThemeButton.h.

Constructor & Destructor Documentation

◆ TouchDesktopThemeButton()

TouchDesktopThemeButton::TouchDesktopThemeButton ( WindowManager * manager,
Button * button )

Constructs a touch/desktop mode toggle button.

Parameters
[in]managerThe window manager providing mode context.
[in]buttonThe button to attach toggle behavior to.

Member Function Documentation

◆ invert()

void TouchDesktopThemeButton::invert ( bool is_inverted = true)

Inverts the button behavior so it shows the opposite mode.

Parameters
[in]is_invertedWhether to invert.

◆ setUseLargeIcons()

void TouchDesktopThemeButton::setUseLargeIcons ( bool use_large_icons)

Sets whether to use large icon variants on the button.

Parameters
[in]use_large_iconsWhether to use large icons.

◆ themeTarget()

WidgetOptions::WidgetMode TouchDesktopThemeButton::themeTarget ( ) const

Returns the widget mode that will be activated when the button is clicked.

Returns
The target WidgetMode.

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