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.
Dependents: TouchScreenGUIDemo
Core/Point.h@13:6714534e7974, 2016-05-21 (annotated)
- Committer:
- duncanFrance
- Date:
- Sat May 21 14:40:09 2016 +0000
- Revision:
- 13:6714534e7974
Cleaned up SpinnerWidget; Started on SpinnerDialog - will extract Dialog later
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| duncanFrance | 13:6714534e7974 | 1 | #ifndef SIMPLEGUI_POINT_H | 
| duncanFrance | 13:6714534e7974 | 2 | #define SIMPLEGUI_POINT_H | 
| duncanFrance | 13:6714534e7974 | 3 | |
| duncanFrance | 13:6714534e7974 | 4 | class Point { | 
| duncanFrance | 13:6714534e7974 | 5 | |
| duncanFrance | 13:6714534e7974 | 6 | public: | 
| duncanFrance | 13:6714534e7974 | 7 | |
| duncanFrance | 13:6714534e7974 | 8 | Point(int x, int y) : _x(x), _y(y) {} | 
| duncanFrance | 13:6714534e7974 | 9 | |
| duncanFrance | 13:6714534e7974 | 10 | int x() { return _x; } | 
| duncanFrance | 13:6714534e7974 | 11 | int y() { return _y; } | 
| duncanFrance | 13:6714534e7974 | 12 | void x(int x) { _x = x; } | 
| duncanFrance | 13:6714534e7974 | 13 | void y(int y) { _y = y; } | 
| duncanFrance | 13:6714534e7974 | 14 | |
| duncanFrance | 13:6714534e7974 | 15 | bool equals(Point *p) { | 
| duncanFrance | 13:6714534e7974 | 16 | return (p->x() == x()) && (p->y() == y()); | 
| duncanFrance | 13:6714534e7974 | 17 | } | 
| duncanFrance | 13:6714534e7974 | 18 | |
| duncanFrance | 13:6714534e7974 | 19 | private: | 
| duncanFrance | 13:6714534e7974 | 20 | |
| duncanFrance | 13:6714534e7974 | 21 | int _x, _y; | 
| duncanFrance | 13:6714534e7974 | 22 | |
| duncanFrance | 13:6714534e7974 | 23 | }; | 
| duncanFrance | 13:6714534e7974 | 24 | |
| duncanFrance | 13:6714534e7974 | 25 | |
| duncanFrance | 13:6714534e7974 | 26 | #endif |