Baseline for testing
Selection.h@3:8395f7ab6d3e, 2019-07-25 (annotated)
- Committer:
- foxbrianr
- Date:
- Thu Jul 25 00:42:49 2019 +0000
- Revision:
- 3:8395f7ab6d3e
- Parent:
- 2:2654dc659298
Baseline for testing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pyeh9 | 0:577f0ec71f4c | 1 | #ifndef SELECTION_H |
pyeh9 | 0:577f0ec71f4c | 2 | #define SELECTION_H |
pyeh9 | 0:577f0ec71f4c | 3 | |
pyeh9 | 1:84d263c8932d | 4 | #include "Menu.h" |
pyeh9 | 1:84d263c8932d | 5 | |
pyeh9 | 1:84d263c8932d | 6 | class Menu; |
pyeh9 | 1:84d263c8932d | 7 | |
foxbrianr | 3:8395f7ab6d3e | 8 | typedef void (*Selection_Callback)(void* obj); |
foxbrianr | 3:8395f7ab6d3e | 9 | |
pyeh9 | 0:577f0ec71f4c | 10 | class Selection { |
pyeh9 | 0:577f0ec71f4c | 11 | private: |
pyeh9 | 0:577f0ec71f4c | 12 | |
pyeh9 | 0:577f0ec71f4c | 13 | public: |
foxbrianr | 3:8395f7ab6d3e | 14 | |
foxbrianr | 3:8395f7ab6d3e | 15 | Selection_Callback callback; // pointer to a function to execute |
foxbrianr | 3:8395f7ab6d3e | 16 | |
pyeh9 | 2:2654dc659298 | 17 | char* selText; // selection text |
foxbrianr | 3:8395f7ab6d3e | 18 | |
pyeh9 | 2:2654dc659298 | 19 | int pos; // selection position |
foxbrianr | 3:8395f7ab6d3e | 20 | |
pyeh9 | 1:84d263c8932d | 21 | Menu *childMenu; |
pyeh9 | 0:577f0ec71f4c | 22 | |
foxbrianr | 3:8395f7ab6d3e | 23 | Selection( Selection_Callback callback, int, Menu *, char * text); |
foxbrianr | 3:8395f7ab6d3e | 24 | |
foxbrianr | 3:8395f7ab6d3e | 25 | virtual void select(); |
foxbrianr | 3:8395f7ab6d3e | 26 | |
foxbrianr | 3:8395f7ab6d3e | 27 | virtual char * getText () { return selText; } |
pyeh9 | 2:2654dc659298 | 28 | |
pyeh9 | 0:577f0ec71f4c | 29 | }; |
pyeh9 | 0:577f0ec71f4c | 30 | |
foxbrianr | 3:8395f7ab6d3e | 31 | |
pyeh9 | 0:577f0ec71f4c | 32 | #endif |