]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/dialog.h
Don't pass events to an invisible root widget
[libs/gltk.git] / source / dialog.h
index 0a9b0d88c9037c358ba50fa9eee8329239f08a9b..aa4380a8881f16f5a855f45bd6c7a0566c0542bb 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspgltk
-Copyright © 2010  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GLTK_DIALOG_H_
 #define MSP_GLTK_DIALOG_H_
 
@@ -21,20 +14,29 @@ Dialog's action buttons are clicked, it will emit a signal and delete itself.
 */
 class Dialog: public Panel
 {
+public:
+       class Loader: public DataFile::DerivedObjectLoader<Dialog, Panel::Loader>
+       {
+       public:
+               Loader(Dialog &, WidgetMap &);
+       private:
+               void action_button(const std::string &, int);
+       };
+
+       sigc::signal<void, int> signal_response;
+
 private:
        bool stale;
 
 public:
-       sigc::signal<void, int> signal_response;
-
-       Dialog(const Resources &);
+       Dialog();
 
        /** Adds an action button to the dialog.  Pressing the button will invoke
        response handlers and delete the dialog. */
        void add_button(Button &, int);
 
        virtual void button_release(int, int, unsigned);
-       virtual void key_release(unsigned, unsigned);
+       virtual bool key_release(unsigned, unsigned);
 protected:
        void response(int);