Files
Upsilon/apps/title_bar_view.h
Émilie Feral 39b0bd9b66 [apps] Display the preferences in the title bar
Change-Id: Ib1defef85b68a48f667127c583901b659db1cbaf
2017-01-30 16:06:48 +01:00

26 lines
692 B
C++

#ifndef APPS_TITLE_BAR_VIEW_H
#define APPS_TITLE_BAR_VIEW_H
#include <escher.h>
#include "battery_view.h"
#include "preferences.h"
class TitleBarView : public View {
public:
TitleBarView();
void drawRect(KDContext * ctx, KDRect rect) const override;
void setTitle(const char * title);
void setChargeState(Ion::Battery::Charge chargeState);
void setPreferences(Preferences * preferences);
private:
constexpr static KDCoordinate k_batteryLeftMargin = 5;
int numberOfSubviews() const override;
void layoutSubviews() override;
View * subviewAtIndex(int index) override;
PointerTextView m_titleView;
BatteryView m_batteryView;
BufferTextView m_preferenceView;
};
#endif