From d380ffe52b9ca32aa3e501483cd526d19cd2b70a Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Wed, 13 Jan 2016 11:56:23 -0800 Subject: [PATCH] Extract AIS record renderer from AISView. --- firmware/application/ais_app.cpp | 4 ++-- firmware/application/ais_app.hpp | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/firmware/application/ais_app.cpp b/firmware/application/ais_app.cpp index 9f0de16f..bf4e2111 100644 --- a/firmware/application/ais_app.cpp +++ b/firmware/application/ais_app.cpp @@ -210,7 +210,7 @@ bool AISView::on_encoder(const EncoderEvent event) { return true; } -void AISView::draw_entry( +static void ais_list_item_draw( const AISRecentEntry& entry, const Rect& target_rect, Painter& painter, @@ -261,7 +261,7 @@ void AISView::paint(Painter& painter) { for(auto p = start; p != end; p++) { const auto& entry = *p; const auto is_selected_key = (selected_key == entry.mmsi); - draw_entry(entry, target_rect, painter, s, (has_focus && is_selected_key)); + ais_list_item_draw(entry, target_rect, painter, s, (has_focus && is_selected_key)); target_rect.pos.y += target_rect.height(); } } diff --git a/firmware/application/ais_app.hpp b/firmware/application/ais_app.hpp index 68ac70d0..4a11efaf 100644 --- a/firmware/application/ais_app.hpp +++ b/firmware/application/ais_app.hpp @@ -105,14 +105,6 @@ private: void on_packet(const ais::Packet& packet); - void draw_entry( - const AISRecentEntry& entry, - const Rect& target_rect, - Painter& painter, - const Style& style, - const bool is_selected - ); - void truncate_entries(); RecentEntries::iterator selected_entry();