Justin Howard / Mbed 2 deprecated AdaFruit_RGBLCD

Dependencies:   AdaFruit_RGBLCDShield MCP23017 mbed RTclock

Dependents:   SX1276_GPS

Fork of MCP_test by Wim Huiskamp

MenuManager.h

Committer:
vtraveller
Date:
2014-10-08
Revision:
24:e67c825ec6d8
Parent:
20:93c70a1869ee

File content as of revision 24:e67c825ec6d8:

#ifndef __MENUMANAGER_H__
#define __MENUMANAGER_H__

class MenuManager
{    
public:
    MenuManager
    (
        Module **               in_pModules,
        size_t                  in_nModules,
        Adafruit_RGBLCDShield & in_cLCD,
        int                     in_nCols,
        int                     in_nRows
    );    
    void loop();

protected:
    void changeModule(bool in_bUp);
    void createChars();
    void initialise();
    void processKeys(uint8_t in_nKeys);
    void setCursor
    (
        bool        in_bCursor,
        bool        in_bBlink
    );
    void setMode(Module::EModes in_eMode);    
    void showModules(bool in_bRefresh = false);
    void showTracking(bool in_bShow);
    void updateDisplay();

protected:
    Module **               m_pModules;
    size_t                  m_nModules;    
    Adafruit_RGBLCDShield & m_cLCD;
    Module::EModes          m_eMode;
    size_t                  m_nMenuPos;
    size_t                  m_nIndex;
    int                     m_nCursorX, m_nCursorY;
    int                     m_nColumns, m_nRows;
};

#endif /* __MENUMANAGER_H__ */