Numworks Epsilon  1.4.1
Graphing Calculator Operating System
title_bar_view.h
Go to the documentation of this file.
1 #ifndef APPS_TITLE_BAR_VIEW_H
2 #define APPS_TITLE_BAR_VIEW_H
3 
4 #include <escher.h>
5 #include "battery_view.h"
7 #include "i18n.h"
8 
9 class TitleBarView : public View {
10 public:
11  TitleBarView();
12  void drawRect(KDContext * ctx, KDRect rect) const override;
13  void setTitle(I18n::Message title);
14  bool setChargeState(Ion::Battery::Charge chargeState);
15  bool setIsCharging(bool isCharging);
16  bool setIsPlugged(bool isPlugged);
18  void refreshPreferences();
19 private:
20  constexpr static KDCoordinate k_alphaRightMargin = 5;
21  constexpr static KDCoordinate k_examIconWidth = 18;
22  constexpr static KDCoordinate k_examIconHeight = 9;
23  constexpr static KDCoordinate k_examIconMargin = 93;
24  int numberOfSubviews() const override;
25  void layoutSubviews() override;
26  View * subviewAtIndex(int index) override;
27  MessageTextView m_titleView;
28  BatteryView m_batteryView;
29  ShiftAlphaLockView m_shiftAlphaLockView;
30  BufferTextView m_preferenceView;
31  ImageView m_examModeIconView;
32 };
33 
34 #endif
bool isPlugged()
Definition: usb.cpp:12
void refreshPreferences()
ShiftAlphaStatus
Definition: events.h:41
void drawRect(KDContext *ctx, KDRect rect) const override
bool isCharging()
Definition: battery.cpp:16
int16_t KDCoordinate
Definition: coordinate.h:6
bool setChargeState(Ion::Battery::Charge chargeState)
bool setShiftAlphaLockStatus(Ion::Events::ShiftAlphaStatus status)
bool setIsCharging(bool isCharging)
bool setIsPlugged(bool isPlugged)
void setTitle(I18n::Message title)
Definition: rect.h:26
Definition: view.h:23