Baseline for testing

Menu.h

Committer:
foxbrianr
Date:
2019-07-25
Revision:
3:8395f7ab6d3e
Parent:
1:84d263c8932d

File content as of revision 3:8395f7ab6d3e:

#ifndef MENU_H
#define MENU_H

#include "mbed.h"
#include "Selection.h"
#include "LCD.h"

#include <vector>
#include <string>

class Selection;

class Menu {
    private:
               
    public:
        
        LCD  * lcd;
        Menu * parent;
        
        int update_needed;
        
        int cursorPos;  // what selection the cursor points to
        int cursorLine; // what line of the lcd the cursor is one
    
        vector<Selection> selections;
        string menuID;
        
        Menu(char *id);
        Menu(string id);
        
    
        
        void add(const Selection &toAdd);
        
        virtual void select();
        
        //char * getText() { return menuID.c_str(); };
        
        virtual void display(LCD * lcd);
        
        void moveUp();
        void moveDown();
        
        virtual void pressClear();  
        virtual void pressMode();        
        virtual void pressSet();    
        virtual void pressDown();    
        virtual void pressUp();
        
        void printMenu();
        void printCursor();
        
};
#endif