ESPHome
2024.11.2
esphome
esphome
components
lcd_menu
lcd_menu.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/lcd_base/lcd_display.h
"
4
#include "
esphome/components/display_menu_base/display_menu_base.h
"
5
6
#include <forward_list>
7
#include <vector>
8
9
namespace
esphome
{
10
namespace
lcd_menu {
11
15
class
LCDCharacterMenuComponent
:
public
display_menu_base::DisplayMenuComponent
{
16
public
:
17
void
set_display
(
lcd_base::LCDDisplay
*display) { this->
display_
= display; }
18
void
set_dimensions
(uint8_t columns, uint8_t rows) {
19
this->
columns_
= columns;
20
set_rows
(rows);
21
}
22
void
set_mark_selected
(uint8_t c) { this->
mark_selected_
= c; }
23
void
set_mark_editing
(uint8_t c) { this->
mark_editing_
= c; }
24
void
set_mark_submenu
(uint8_t c) { this->
mark_submenu_
= c; }
25
void
set_mark_back
(uint8_t c) { this->
mark_back_
= c; }
26
27
void
setup
()
override
;
28
float
get_setup_priority
()
const override
;
29
30
void
dump_config
()
override
;
31
32
protected
:
33
void
draw_item
(
const
display_menu_base::MenuItem
*item, uint8_t row,
bool
selected)
override
;
34
void
update
()
override
{ this->
display_
->
update
(); }
35
36
lcd_base::LCDDisplay
*
display_
;
37
uint8_t
columns_
;
38
char
mark_selected_
;
39
char
mark_editing_
;
40
char
mark_submenu_
;
41
char
mark_back_
;
42
};
43
44
}
// namespace lcd_menu
45
}
// namespace esphome
esphome::lcd_menu::LCDCharacterMenuComponent::set_dimensions
void set_dimensions(uint8_t columns, uint8_t rows)
Definition:
lcd_menu.h:18
esphome::lcd_menu::LCDCharacterMenuComponent
Class to display a hierarchical menu.
Definition:
lcd_menu.h:15
esphome::lcd_base::LCDDisplay::update
void update() override
Definition:
lcd_display.cpp:114
esphome::lcd_menu::LCDCharacterMenuComponent::dump_config
void dump_config() override
Definition:
lcd_menu.cpp:21
esphome::lcd_menu::LCDCharacterMenuComponent::update
void update() override
Definition:
lcd_menu.h:34
esphome::lcd_menu::LCDCharacterMenuComponent::set_mark_editing
void set_mark_editing(uint8_t c)
Definition:
lcd_menu.h:23
lcd_display.h
esphome::lcd_menu::LCDCharacterMenuComponent::get_setup_priority
float get_setup_priority() const override
Definition:
lcd_menu.cpp:19
esphome::lcd_menu::LCDCharacterMenuComponent::set_mark_submenu
void set_mark_submenu(uint8_t c)
Definition:
lcd_menu.h:24
esphome::lcd_menu::LCDCharacterMenuComponent::set_mark_selected
void set_mark_selected(uint8_t c)
Definition:
lcd_menu.h:22
esphome::lcd_menu::LCDCharacterMenuComponent::mark_back_
char mark_back_
Definition:
lcd_menu.h:41
esphome::display_menu_base::MenuItem
Definition:
menu_item.h:40
esphome::lcd_menu::LCDCharacterMenuComponent::set_display
void set_display(lcd_base::LCDDisplay *display)
Definition:
lcd_menu.h:17
esphome::lcd_menu::LCDCharacterMenuComponent::mark_selected_
char mark_selected_
Definition:
lcd_menu.h:38
esphome::lcd_menu::LCDCharacterMenuComponent::mark_submenu_
char mark_submenu_
Definition:
lcd_menu.h:40
esphome::lcd_base::LCDDisplay
Definition:
lcd_display.h:14
esphome::lcd_menu::LCDCharacterMenuComponent::display_
lcd_base::LCDDisplay * display_
Definition:
lcd_menu.h:36
esphome::display_menu_base::DisplayMenuComponent::set_rows
void set_rows(uint8_t rows)
Definition:
display_menu_base.h:27
esphome::lcd_menu::LCDCharacterMenuComponent::mark_editing_
char mark_editing_
Definition:
lcd_menu.h:39
esphome::lcd_menu::LCDCharacterMenuComponent::setup
void setup() override
Definition:
lcd_menu.cpp:10
esphome::lcd_menu::LCDCharacterMenuComponent::set_mark_back
void set_mark_back(uint8_t c)
Definition:
lcd_menu.h:25
esphome::lcd_menu::LCDCharacterMenuComponent::columns_
uint8_t columns_
Definition:
lcd_menu.h:37
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
display_menu_base.h
esphome::lcd_menu::LCDCharacterMenuComponent::draw_item
void draw_item(const display_menu_base::MenuItem *item, uint8_t row, bool selected) override
Definition:
lcd_menu.cpp:31
esphome::display_menu_base::DisplayMenuComponent
Class to display a hierarchical menu.
Definition:
display_menu_base.h:22
Generated by
1.8.13