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
Diff: Widgets/Widget.h
- Revision:
- 13:6714534e7974
- Parent:
- 12:63db16fea709
- Child:
- 16:e9a771ecfdbe
--- a/Widgets/Widget.h Sun May 08 14:42:08 2016 +0000 +++ b/Widgets/Widget.h Sat May 21 14:40:09 2016 +0000 @@ -6,6 +6,7 @@ #include "GraphicsContext.h" #include "EventListener.h" #include "Rectangle.h" +#include "Point.h" /** * A basic widget draws itself in a rectangular area @@ -41,8 +42,10 @@ virtual int y(); virtual int height(); virtual int width(); - const Rectangle &outer(); - const Rectangle &inner(); + + virtual void setOffset(int x, int y); + virtual int offsetX(); + virtual int offsetY(); virtual void setForeground(uint16_t color); virtual void setBackground(uint16_t color); @@ -102,6 +105,7 @@ GraphicsContext* _context; uint16_t _fg, _bg; + Point _offset; Rectangle _outer; Rectangle _inner;