region list patch #2 from chris g, slightly reworked by me; sv_se po changes, possibl...
[ardour.git] / gtk2_ardour / ardour_dialog.h
index d6b1ece72bc9e231987281fa3c65b8c47708b4bf..b2c531b0d03d5ca873f0896b1c32e7d330ef43d0 100644 (file)
 #define __ardour_dialog_h__
 
 #include <ardour/ardour.h>
-#include <gtk--/window.h>
-
-#include "keyboard_target.h"
+#include <gtkmm/window.h>
+#include <gtkmm/dialog.h>
 
 namespace ARDOUR {
        class Session;
-};
+}
 
 /*
  * This virtual parent class is so that each dialog box uses the
  * same mechanism to declare its closing, and to have a common
  * method of connecting and disconnecting from a Session.
  */
-class ArdourDialog : public Gtk::Window, public KeyboardTarget
+class ArdourDialog : public Gtk::Dialog
 {
   public:
-       ArdourDialog (string name);
+       ArdourDialog (std::string title, bool modal = false, bool use_separator = false);
+       ArdourDialog (Gtk::Window& parent, std::string title, bool modal = false, bool use_separator = false);  
        ~ArdourDialog();
 
-       bool within_hiding() const { return _within_hiding; }
-
-       void run ();
-       void stop (int);
-       void close ();
-       void set_keyboard_input (bool yn);
-       void set_hide_on_stop (bool yn);
-       int  run_status();
-
-       gint enter_notify_event_impl (GdkEventCrossing*);
-       gint leave_notify_event_impl (GdkEventCrossing*);
-       gint unmap_event_impl (GdkEventAny *);
+       bool on_enter_notify_event (GdkEventCrossing*);
+       bool on_leave_notify_event (GdkEventCrossing*);
+       void on_unmap ();
+       void on_show ();
 
        ARDOUR::Session *session;
 
@@ -63,19 +55,9 @@ class ArdourDialog : public Gtk::Window, public KeyboardTarget
                set_session (0);
        }
 
-       void quit ();
-       void wm_close();
-       void wm_doi ();
-       gint wm_close_event (GdkEventAny *);
-       gint wm_doi_event (GdkEventAny *);
-       gint wm_doi_event_stop (GdkEventAny *);
-
   private:
-       int  _run_status;
-       bool _within_hiding;
-       bool kbd_input;
-       bool running;
-       bool hide_on_stop;
+       void init ();
 };
 
 #endif // __ardour_dialog_h__
+