]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/button.h
Report non-basic variables in Layout::LinearProgram as having zero value
[libs/gltk.git] / source / button.h
index 31d87e1f0ba806f5dfc100c1c6bde41b20cb3a6c..31009c731ec1d3cae065e98ca0e286f771aee1f2 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspgltk
-Copyright © 2007, 2009  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GLTK_BUTTON_H_
 #define MSP_GLTK_BUTTON_H_
 
@@ -31,23 +24,32 @@ public:
                void text(const std::string &);
        };
 
+       sigc::signal<void> signal_clicked;
+
 private:
        Text text;
        const GL::Texture2D *icon;
        bool pressed;
 
 public:
-       sigc::signal<void> signal_clicked;
+       Button(const std::string & = std::string());
+
+       virtual const char *get_class() const { return "button"; }
+
+       virtual void autosize();
 
-       Button(const Resources &, const std::string & =std::string());
        void set_text(const std::string &);
        void set_icon(const GL::Texture2D *);
+
+private:
+       virtual void render_special(const Part &) const;
+
+public:
        virtual void button_press(int, int, unsigned);
        virtual void button_release(int, int, unsigned);
        virtual void pointer_motion(int, int);
 private:
-       virtual const char *get_class() const { return "button"; }
-       virtual void render_special(const Part &) const;
+       virtual void on_style_change();
 };
 
 } // namespace GLtk