[display] Inline the trivial DisplayPage setters and page navigation helpers

This commit is contained in:
J. Nick Koston
2026-08-22 01:14:15 -05:00
parent ef1d77885d
commit 0d9f6dc0e4
2 changed files with 6 additions and 9 deletions
-6
View File
@@ -685,9 +685,6 @@ void Display::show_page(DisplayPage *page) {
} }
} }
void Display::show_next_page() { this->page_->show_next(); }
void Display::show_prev_page() { this->page_->show_prev(); }
void Display::do_update_() { void Display::do_update_() {
if (this->auto_clear_enabled_) { if (this->auto_clear_enabled_) {
this->clear(); this->clear();
@@ -892,9 +889,6 @@ void DisplayPage::show_prev() {
this->prev_->show(); this->prev_->show();
} }
void DisplayPage::set_parent(Display *parent) { this->parent_ = parent; }
void DisplayPage::set_prev(DisplayPage *prev) { this->prev_ = prev; }
void DisplayPage::set_next(DisplayPage *next) { this->next_ = next; }
const display_writer_t &DisplayPage::get_writer() const { return this->writer_; } const display_writer_t &DisplayPage::get_writer() const { return this->writer_; }
const LogString *text_align_to_string(TextAlign textalign) { const LogString *text_align_to_string(TextAlign textalign) {
+6 -3
View File
@@ -802,9 +802,9 @@ class DisplayPage final {
void show(); void show();
void show_next(); void show_next();
void show_prev(); void show_prev();
void set_parent(Display *parent); void set_parent(Display *parent) { this->parent_ = parent; }
void set_prev(DisplayPage *prev); void set_prev(DisplayPage *prev) { this->prev_ = prev; }
void set_next(DisplayPage *next); void set_next(DisplayPage *next) { this->next_ = next; }
const display_writer_t &get_writer() const; const display_writer_t &get_writer() const;
protected: protected:
@@ -814,6 +814,9 @@ class DisplayPage final {
DisplayPage *next_{nullptr}; DisplayPage *next_{nullptr};
}; };
inline void Display::show_next_page() { this->page_->show_next(); }
inline void Display::show_prev_page() { this->page_->show_prev(); }
template<typename... Ts> class DisplayPageShowAction final : public Action<Ts...> { template<typename... Ts> class DisplayPageShowAction final : public Action<Ts...> {
public: public:
TEMPLATABLE_VALUE(DisplayPage *, page) TEMPLATABLE_VALUE(DisplayPage *, page)