Foundation classes for a basic GUI implementing simple widgets and events. (Fork for custom changes.)
Fork of SimpleGUI by
Widgets/SpinnerWidget.cpp
- Committer:
- duncanFrance
- Date:
- 2016-04-22
- Revision:
- 11:b485561aa112
- Child:
- 12:63db16fea709
File content as of revision 11:b485561aa112:
#include "SpinnerWidget.h" #include"resources/spinner-upArrow.bmp" #include"resources/spinner-downArrow.bmp" SpinnerWidget::SpinnerWidget(GUI* gui) : ContainerWidget(gui), _upArrow(gui), _downArrow(gui), _text(gui), _min(0), _max(0), _increment(1), _value(0) { _upArrow.setBitmap(spinner_upArrow_bmp); _upArrow.setSize(10,10); _downArrow.setBitmap(spinner_downArrow_bmp); _downArrow.setSize(10,10); _text.setSize(gui->defaultFont()->width() * 4, gui->defaultFont()->height()); append(_upArrow); append(_downArrow); append(_text); } void SpinnerWidget::setMin(float min) { } void SpinnerWidget::setMax(float max) { } void SpinnerWidget::setIncrement(float increment) { } void SpinnerWidget::setValue(float value) { } void SpinnerWidget::getValue() { } template<typename T> void SpinnerWidget::onChange(T* tptr, void (T::*mptr)(SpinnerWidget*)) { _onChange.attach(tptr, mptr); } void SpinnerWidget::_onUpClick() { } void SpinnerWidget::_onDownClick() { }