Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos MLX90614
Item.h@2:fcde41900fa5, 2015-04-04 (annotated)
- Committer:
- ovidiup13
- Date:
- Sat Apr 04 18:24:21 2015 +0000
- Revision:
- 2:fcde41900fa5
- Parent:
- 0:1e597b0f8b3b
- Child:
- 3:688b62ff6474
Cleaned up interface, added buttons.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ovidiup13 | 0:1e597b0f8b3b | 1 | #ifndef _ITEM_H |
| ovidiup13 | 0:1e597b0f8b3b | 2 | #define _ITEM_H |
| ovidiup13 | 0:1e597b0f8b3b | 3 | |
| ovidiup13 | 0:1e597b0f8b3b | 4 | #include "st7565LCD.h" |
| ovidiup13 | 0:1e597b0f8b3b | 5 | #include "UserInterface.h" |
| ovidiup13 | 0:1e597b0f8b3b | 6 | |
| ovidiup13 | 0:1e597b0f8b3b | 7 | #define LEFT_MARGIN 5 |
| ovidiup13 | 0:1e597b0f8b3b | 8 | #define DEFAULT_COLOR 20 |
| ovidiup13 | 0:1e597b0f8b3b | 9 | |
| ovidiup13 | 0:1e597b0f8b3b | 10 | class UI; |
| ovidiup13 | 0:1e597b0f8b3b | 11 | |
| ovidiup13 | 0:1e597b0f8b3b | 12 | class Item { |
| ovidiup13 | 0:1e597b0f8b3b | 13 | public: |
| ovidiup13 | 0:1e597b0f8b3b | 14 | //name |
| ovidiup13 | 0:1e597b0f8b3b | 15 | char * title; |
| ovidiup13 | 0:1e597b0f8b3b | 16 | ST7565 * st7565; |
| ovidiup13 | 0:1e597b0f8b3b | 17 | UI * ui; |
| ovidiup13 | 0:1e597b0f8b3b | 18 | bool isSelectable; |
| ovidiup13 | 0:1e597b0f8b3b | 19 | |
| ovidiup13 | 0:1e597b0f8b3b | 20 | //declare pure virtual functions |
| ovidiup13 | 0:1e597b0f8b3b | 21 | virtual void display(void) = 0; |
| ovidiup13 | 0:1e597b0f8b3b | 22 | virtual void update(char c) = 0; |
| ovidiup13 | 0:1e597b0f8b3b | 23 | |
| ovidiup13 | 2:fcde41900fa5 | 24 | //get title function |
| ovidiup13 | 2:fcde41900fa5 | 25 | char * getTitle(void){ |
| ovidiup13 | 2:fcde41900fa5 | 26 | return title; |
| ovidiup13 | 2:fcde41900fa5 | 27 | } |
| ovidiup13 | 2:fcde41900fa5 | 28 | |
| ovidiup13 | 2:fcde41900fa5 | 29 | /* |
| ovidiup13 | 0:1e597b0f8b3b | 30 | //constructors |
| ovidiup13 | 0:1e597b0f8b3b | 31 | Item(char *title, ST7565 * lcd, UI * ui){ |
| ovidiup13 | 0:1e597b0f8b3b | 32 | this->title = title; |
| ovidiup13 | 0:1e597b0f8b3b | 33 | this->st7565 = lcd; |
| ovidiup13 | 0:1e597b0f8b3b | 34 | } |
| ovidiup13 | 0:1e597b0f8b3b | 35 | Item(void){ |
| ovidiup13 | 0:1e597b0f8b3b | 36 | title = NULL; |
| ovidiup13 | 0:1e597b0f8b3b | 37 | st7565 = NULL; |
| ovidiup13 | 0:1e597b0f8b3b | 38 | ui = NULL; |
| ovidiup13 | 0:1e597b0f8b3b | 39 | } |
| ovidiup13 | 2:fcde41900fa5 | 40 | */ |
| ovidiup13 | 0:1e597b0f8b3b | 41 | }; |
| ovidiup13 | 0:1e597b0f8b3b | 42 | |
| ovidiup13 | 0:1e597b0f8b3b | 43 | #endif |