mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-11-16 07:34:00 +00:00
Move app-level config to new AISAppView class.
This commit is contained in:
@@ -108,8 +108,7 @@ namespace ui {
|
||||
|
||||
class AISRecentEntriesView : public View {
|
||||
public:
|
||||
AISRecentEntriesView();
|
||||
~AISRecentEntriesView();
|
||||
AISRecentEntriesView(AISRecentEntries& recent);
|
||||
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
@@ -119,29 +118,31 @@ public:
|
||||
bool on_encoder(const EncoderEvent event) override;
|
||||
|
||||
private:
|
||||
AISLogger logger;
|
||||
|
||||
AISRecentEntries& recent;
|
||||
|
||||
using EntryKey = ais::MMSI;
|
||||
EntryKey selected_key;
|
||||
const EntryKey invalid_key = 0xffffffff;
|
||||
|
||||
bool has_focus = false;
|
||||
|
||||
AISRecentEntries recent;
|
||||
|
||||
void on_packet(const ais::Packet& packet);
|
||||
|
||||
void advance(const int32_t amount);
|
||||
};
|
||||
|
||||
class AISAppView : public View {
|
||||
public:
|
||||
AISAppView();
|
||||
~AISAppView();
|
||||
|
||||
void set_parent_rect(const Rect new_parent_rect) override;
|
||||
|
||||
private:
|
||||
AISRecentEntriesView recent_entries_view;
|
||||
AISRecentEntries recent;
|
||||
AISLogger logger;
|
||||
|
||||
AISRecentEntriesView recent_entries_view { recent };
|
||||
|
||||
void on_packet(const ais::Packet& packet);
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
||||
Reference in New Issue
Block a user