Add AISAppView.

This commit is contained in:
Jared Boone 2016-01-14 09:30:23 -08:00
parent fc16bc7867
commit 1f2b28b2b8
3 changed files with 22 additions and 1 deletions

View File

@ -292,4 +292,15 @@ void AISRecentEntriesView::advance(const int32_t amount) {
set_dirty();
}
AISAppView::AISAppView() {
add_children({ {
&recent_entries_view,
} });
}
void AISAppView::set_parent_rect(const Rect new_parent_rect) {
View::set_parent_rect(new_parent_rect);
recent_entries_view.set_parent_rect({ 0, 0, new_parent_rect.width(), new_parent_rect.height() });
}
} /* namespace ui */

View File

@ -134,6 +134,16 @@ private:
void advance(const int32_t amount);
};
class AISAppView : public View {
public:
AISAppView();
void set_parent_rect(const Rect new_parent_rect) override;
private:
AISRecentEntriesView recent_entries_view;
};
} /* namespace ui */
#endif/*__AIS_APP_H__*/

View File

@ -517,7 +517,7 @@ void ReceiverView::on_modulation_changed(ReceiverModel::Mode mode) {
break;
case ReceiverModel::Mode::AIS:
widget_content = std::make_unique<AISRecentEntriesView>();
widget_content = std::make_unique<AISAppView>();
break;
case ReceiverModel::Mode::SpectrumAnalysis: