ESPHome  2024.12.2
Public Member Functions | Protected Attributes
esphome::display_menu_base::MenuItemEditable Class Reference

#include <menu_item.h>

Inheritance diagram for esphome::display_menu_base::MenuItemEditable:
esphome::display_menu_base::MenuItem esphome::display_menu_base::MenuItemCustom esphome::display_menu_base::MenuItemNumber esphome::display_menu_base::MenuItemSelect esphome::display_menu_base::MenuItemSwitch

Public Member Functions

 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
 
virtual bool has_value () const
 
virtual std::string get_value_text () const
 
virtual bool select_next ()
 
virtual bool select_prev ()
 
void on_enter ()
 
void on_leave ()
 

Protected Attributes

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_ {}
 

Additional Inherited Members

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

Detailed Description

Definition at line 88 of file menu_item.h.

Constructor & Destructor Documentation

◆ MenuItemEditable()

esphome::display_menu_base::MenuItemEditable::MenuItemEditable ( MenuItemType  t)
inlineexplicit

Definition at line 90 of file menu_item.h.

Member Function Documentation

◆ get_immediate_edit()

bool esphome::display_menu_base::MenuItemEditable::get_immediate_edit ( ) const
inlineoverridevirtual

Reimplemented from esphome::display_menu_base::MenuItem.

Definition at line 92 of file menu_item.h.

◆ set_immediate_edit()

void esphome::display_menu_base::MenuItemEditable::set_immediate_edit ( bool  val)
inline

Definition at line 91 of file menu_item.h.

◆ set_value_lambda()

void esphome::display_menu_base::MenuItemEditable::set_value_lambda ( value_getter_t &&  getter)
inline

Definition at line 93 of file menu_item.h.

Field Documentation

◆ immediate_edit_

bool esphome::display_menu_base::MenuItemEditable::immediate_edit_ {false}
protected

Definition at line 96 of file menu_item.h.

◆ value_getter_

optional<value_getter_t> esphome::display_menu_base::MenuItemEditable::value_getter_ {}
protected

Definition at line 97 of file menu_item.h.


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