#include <sigc++/sigc++.h>
#include <msp/gl/texture2d.h>
+#include "mspgltk_api.h"
#include "text.h"
#include "widget.h"
A clickable button widget. Buttons can have a text label, which is displayed
in a spacial part "text".
*/
-class Button: public Widget
+class MSPGLTK_API Button: public Widget
{
public:
- class Loader: public DataFile::DerivedObjectLoader<Button, Widget::Loader>
+ class MSPGLTK_API Loader: public DataFile::DerivedObjectLoader<Button, Widget::Loader>
{
public:
Loader(Button &);
private:
Text text;
- const GL::Texture2D *icon;
- bool pressed;
+ const GL::Texture2D *icon = nullptr;
+ bool pressed = false;
public:
Button(const std::string & = std::string());
virtual void button_press(int, int, unsigned);
virtual void button_release(int, int, unsigned);
virtual void pointer_motion(int, int);
+ virtual bool navigate(Navigation);
private:
virtual void on_style_change();
};