ESPHome  2023.5.5
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::display_menu_base::MenuItemNumber Class Reference

#include <menu_item.h>

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

Public Member Functions

 MenuItemNumber ()
void set_number_variable (number::Number *var)
void set_format (const std::string &fmt)
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

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

Protected Attributes

number::Numbernumber_var_ {nullptr}
std::string format_
- 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 114 of file menu_item.h.

Constructor & Destructor Documentation

◆ MenuItemNumber()

esphome::display_menu_base::MenuItemNumber::MenuItemNumber ( )

Definition at line 116 of file menu_item.h.

Member Function Documentation

◆ get_number_value_()

float esphome::display_menu_base::MenuItemNumber::get_number_value_ ( ) const

Definition at line 99 of file menu_item.cpp.

◆ get_value_text()

std::string esphome::display_menu_base::MenuItemNumber::get_value_text ( ) const

Reimplemented from esphome::display_menu_base::MenuItem.

Definition at line 53 of file menu_item.cpp.

◆ has_value()

bool esphome::display_menu_base::MenuItemNumber::has_value ( ) const

Reimplemented from esphome::display_menu_base::MenuItem.

Definition at line 120 of file menu_item.h.

◆ select_next()

bool esphome::display_menu_base::MenuItemNumber::select_next ( )

Reimplemented from esphome::display_menu_base::MenuItem.

Definition at line 67 of file menu_item.cpp.

◆ select_prev()

bool esphome::display_menu_base::MenuItemNumber::select_prev ( )

Reimplemented from esphome::display_menu_base::MenuItem.

Definition at line 83 of file menu_item.cpp.

◆ set_format()

void esphome::display_menu_base::MenuItemNumber::set_format ( const std::string &  fmt)

Definition at line 118 of file menu_item.h.

◆ set_number_variable()

void esphome::display_menu_base::MenuItemNumber::set_number_variable ( number::Number var)

Definition at line 117 of file menu_item.h.

Field Documentation

◆ format_

std::string esphome::display_menu_base::MenuItemNumber::format_

Definition at line 130 of file menu_item.h.

◆ number_var_

number::Number* esphome::display_menu_base::MenuItemNumber::number_var_ {nullptr}

Definition at line 129 of file menu_item.h.

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