ESPHome  2024.10.3
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::display_menu_base::MenuItemCustom Class Reference

#include <menu_item.h>

Inheritance diagram for esphome::display_menu_base::MenuItemCustom:
esphome::display_menu_base::MenuItemEditable esphome::display_menu_base::MenuItem

Public Member Functions

 MenuItemCustom ()
 
void add_on_next_callback (std::function< void()> &&cb)
 
void add_on_prev_callback (std::function< void()> &&cb)
 
bool has_value () const override
 
std::string get_value_text () const override
 
bool select_next () override
 
bool select_prev () override
 
- Public Member Functions inherited from esphome::display_menu_base::MenuItemEditable
 MenuItemEditable (MenuItemType t)
 
void set_immediate_edit (bool val)
 
bool get_immediate_edit () const override
 
void set_value_lambda (value_getter_t &&getter)
 
- Public Member Functions inherited from esphome::display_menu_base::MenuItem
 MenuItem (MenuItemType t)
 
void set_parent (MenuItemMenu *parent)
 
MenuItemMenuget_parent ()
 
MenuItemType get_type () const
 
template<typename V >
void set_text (V val)
 
void add_on_enter_callback (std::function< void()> &&cb)
 
void add_on_leave_callback (std::function< void()> &&cb)
 
void add_on_value_callback (std::function< void()> &&cb)
 
std::string get_text () const
 
void on_enter ()
 
void on_leave ()
 

Protected Member Functions

void on_next_ ()
 
void on_prev_ ()
 
- Protected Member Functions inherited from esphome::display_menu_base::MenuItem
void on_value_ ()
 

Protected Attributes

CallbackManager< void()> on_next_callbacks_ {}
 
CallbackManager< void()> on_prev_callbacks_ {}
 
- Protected Attributes inherited from esphome::display_menu_base::MenuItemEditable
bool immediate_edit_ {false}
 
optional< value_getter_tvalue_getter_ {}
 
- Protected Attributes inherited from esphome::display_menu_base::MenuItem
MenuItemType item_type_
 
MenuItemMenuparent_ {nullptr}
 
TemplatableValue< std::string, const MenuItem * > text_
 
CallbackManager< void()> on_enter_callbacks_ {}
 
CallbackManager< void()> on_leave_callbacks_ {}
 
CallbackManager< void()> on_value_callbacks_ {}
 

Detailed Description

Definition at line 170 of file menu_item.h.

Constructor & Destructor Documentation

◆ MenuItemCustom()

esphome::display_menu_base::MenuItemCustom::MenuItemCustom ( )
inlineexplicit

Definition at line 172 of file menu_item.h.

Member Function Documentation

◆ add_on_next_callback()

void esphome::display_menu_base::MenuItemCustom::add_on_next_callback ( std::function< void()> &&  cb)
inline

Definition at line 173 of file menu_item.h.

◆ add_on_prev_callback()

void esphome::display_menu_base::MenuItemCustom::add_on_prev_callback ( std::function< void()> &&  cb)
inline

Definition at line 174 of file menu_item.h.

◆ get_value_text()

std::string esphome::display_menu_base::MenuItemCustom::get_value_text ( ) const
overridevirtual

Reimplemented from esphome::display_menu_base::MenuItem.

Definition at line 171 of file menu_item.cpp.

◆ has_value()

bool esphome::display_menu_base::MenuItemCustom::has_value ( ) const
inlineoverridevirtual

Reimplemented from esphome::display_menu_base::MenuItem.

Definition at line 176 of file menu_item.h.

◆ on_next_()

void esphome::display_menu_base::MenuItemCustom::on_next_ ( )
protected

Definition at line 197 of file menu_item.cpp.

◆ on_prev_()

void esphome::display_menu_base::MenuItemCustom::on_prev_ ( )
protected

Definition at line 199 of file menu_item.cpp.

◆ select_next()

bool esphome::display_menu_base::MenuItemCustom::select_next ( )
overridevirtual

Reimplemented from esphome::display_menu_base::MenuItem.

Definition at line 185 of file menu_item.cpp.

◆ select_prev()

bool esphome::display_menu_base::MenuItemCustom::select_prev ( )
overridevirtual

Reimplemented from esphome::display_menu_base::MenuItem.

Definition at line 191 of file menu_item.cpp.

Field Documentation

◆ on_next_callbacks_

CallbackManager<void()> esphome::display_menu_base::MenuItemCustom::on_next_callbacks_ {}
protected

Definition at line 186 of file menu_item.h.

◆ on_prev_callbacks_

CallbackManager<void()> esphome::display_menu_base::MenuItemCustom::on_prev_callbacks_ {}
protected

Definition at line 187 of file menu_item.h.


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