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.
Fork of SimpleGUI by
Diff: Dialogs/SpinnerDialog.h
- Revision:
- 14:e6515b19f5a0
- Parent:
- 13:6714534e7974
- Child:
- 15:e69fd74d42e4
diff -r 6714534e7974 -r e6515b19f5a0 Dialogs/SpinnerDialog.h
--- a/Dialogs/SpinnerDialog.h Sat May 21 14:40:09 2016 +0000
+++ b/Dialogs/SpinnerDialog.h Sat May 21 16:36:02 2016 +0000
@@ -1,40 +1,20 @@
-#ifndef SPINNER_DIALOG_H
-#define SPINNER_DIALOG_H
+#ifndef SIMPLEGUI_SPINNER_DIALOG_H
+#define SIMPLEGUI_SPINNER_DIALOG_H
-#include "ContainerWidget.h"
+#include "OKCancelDialog.h"
#include "SpinnerWidget.h"
#include "BitmapWidget.h"
-/**
-* A Dialog takes over the whole screen and offers some sort of control
-* together with apply and cancel buttons
-**/
-class SpinnerDialog : public ContainerWidget
+class SpinnerDialog : public OKCancelDialog
{
public:
SpinnerDialog(GraphicsContext *context);
SpinnerWidget *spinner();
- template<typename T>
- void onOK(T* tptr, void (T::*mptr)(Event e)) {
- _onOK.attach(ptr, mptr);
- }
-
- template<typename T>
- void onCancel(T* tptr, void (T::*mptr)(Event e)) {
- _onCancel.attach(ptr, mptr);
- }
-
private:
SpinnerWidget *_spinner;
- FunctionPointerArg1<void,Event> _onOK;
- FunctionPointerArg1<void,Event> _onCancel;
-
- void _handleOK(Event e);
- void _handleCancel(Event e);
-
};
