ESPHome  2024.10.2
Public Member Functions | Protected Attributes
esphome::display_menu_base::MenuItemMenu Class Reference

#include <menu_item.h>

Inheritance diagram for esphome::display_menu_base::MenuItemMenu:
esphome::display_menu_base::MenuItem

Public Member Functions

 MenuItemMenu ()
 
void add_item (MenuItem *item)
 
size_t items_size () const
 
MenuItemget_item (size_t i)
 
- 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 get_immediate_edit () 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

std::vector< MenuItem * > items_
 
- 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 74 of file menu_item.h.

Constructor & Destructor Documentation

◆ MenuItemMenu()

esphome::display_menu_base::MenuItemMenu::MenuItemMenu ( )
inlineexplicit

Definition at line 76 of file menu_item.h.

Member Function Documentation

◆ add_item()

void esphome::display_menu_base::MenuItemMenu::add_item ( MenuItem item)
inline

Definition at line 77 of file menu_item.h.

◆ get_item()

MenuItem* esphome::display_menu_base::MenuItemMenu::get_item ( size_t  i)
inline

Definition at line 82 of file menu_item.h.

◆ items_size()

size_t esphome::display_menu_base::MenuItemMenu::items_size ( ) const
inline

Definition at line 81 of file menu_item.h.

Field Documentation

◆ items_

std::vector<MenuItem *> esphome::display_menu_base::MenuItemMenu::items_
protected

Definition at line 85 of file menu_item.h.


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