mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-18 10:32:16 +00:00
Make Widget flags private, expose via methods.
This commit is contained in:
@@ -83,6 +83,7 @@ public:
|
||||
virtual void blur();
|
||||
virtual void on_blur();
|
||||
bool focusable() const;
|
||||
void set_focusable(const bool value);
|
||||
bool has_focus();
|
||||
virtual Widget* last_child_focus() const;
|
||||
virtual void set_last_child_focus(Widget* const child);
|
||||
@@ -110,12 +111,18 @@ public:
|
||||
|
||||
void visible(bool v);
|
||||
|
||||
bool highlighted() const;
|
||||
void set_highlighted(const bool value);
|
||||
|
||||
protected:
|
||||
/* Widget rectangle relative to parent pos(). */
|
||||
Rect parent_rect;
|
||||
const Style* style_ { nullptr };
|
||||
Widget* parent_ { nullptr };
|
||||
|
||||
void dirty_overlapping_children_in_rect(const Rect& child_rect);
|
||||
|
||||
private:
|
||||
struct flags_t {
|
||||
bool dirty : 1; // Widget content has changed.
|
||||
bool hidden : 1; // Hide widget and children.
|
||||
@@ -131,8 +138,6 @@ protected:
|
||||
.highlighted = false,
|
||||
.visible = false,
|
||||
};
|
||||
|
||||
void dirty_overlapping_children_in_rect(const Rect& child_rect);
|
||||
};
|
||||
|
||||
class View : public Widget {
|
||||
|
Reference in New Issue
Block a user