el h / SimpleGUI

Fork of SimpleGUI by Duncan McIntyre

Revision:
14:e6515b19f5a0
Parent:
13:6714534e7974
Child:
15:e69fd74d42e4
--- 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);
-
 
 };