Justin Howard / Mbed 2 deprecated AdaFruit_RGBLCD

Dependencies:   AdaFruit_RGBLCDShield MCP23017 mbed RTclock

Dependents:   SX1276_GPS

Fork of MCP_test by Wim Huiskamp

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers module.h Source File

module.h

00001 #ifndef __MODULE_H__
00002 #define __MODULE_H__
00003 
00004 #ifndef _countof
00005     #define _countof(a) (sizeof(a) / sizeof(a[0]))
00006 #endif
00007 
00008 class Module
00009 {
00010 public:
00011     enum EModes
00012     {
00013         eModeMenu = 0,
00014         eModeSelect,
00015         eModeChange,
00016         eModeLast
00017     };
00018     
00019 public:
00020     Module(Serial & in_cDisplay);
00021     virtual ~Module();
00022     
00023     virtual bool    canRefresh() { return false; }
00024     virtual void    change
00025                     (
00026                         size_t      in_nIndex,
00027                         bool        in_bUp
00028                     )
00029                     { ; }
00030     virtual int     getCursorOffset(size_t & inout_nIndex)
00031                     { return -1; }
00032     virtual void    onModeChange(EModes in_eMode)
00033                     { ; }
00034     virtual void    show(bool in_bRefresh) = 0;
00035     
00036 protected:
00037     Serial & m_cDisplay;
00038 };
00039 
00040 #endif /* __MODULE_H__ */