summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/togglebutton.h
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-07-08 14:58:09 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-07-08 14:58:09 +0000
commit4dd0c8e37a02f75a7e301cc6ef7292bb18e86b44 (patch)
tree840485da73b15b705ed9a3f71f609f7f956105b4 /src/live_effects/parameter/togglebutton.h
parentBugged powerstroke point array tried accessing points on a quickly diverging ... (diff)
downloadinkscape-4dd0c8e37a02f75a7e301cc6ef7292bb18e86b44.tar.gz
inkscape-4dd0c8e37a02f75a7e301cc6ef7292bb18e86b44.zip
Add signals to ToggleButton; more coding style
(bzr r13341.1.87)
Diffstat (limited to 'src/live_effects/parameter/togglebutton.h')
-rw-r--r--src/live_effects/parameter/togglebutton.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/live_effects/parameter/togglebutton.h b/src/live_effects/parameter/togglebutton.h
index 9b1c71185..753af6dbd 100644
--- a/src/live_effects/parameter/togglebutton.h
+++ b/src/live_effects/parameter/togglebutton.h
@@ -2,14 +2,14 @@
#define INKSCAPE_LIVEPATHEFFECT_PARAMETER_TOGGLEBUTTON_H
/*
- * Inkscape::LivePathEffectParameters
- *
-* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
+ * Copyright (C) Jabiertxo Arraiza Cenoz 2014
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <glib.h>
+#include <sigc++/connection.h>
+#include <sigc++/signal.h>
#include "live_effects/parameter/parameter.h"
@@ -17,7 +17,10 @@ namespace Inkscape {
namespace LivePathEffect {
-
+/**
+ * class ToggleButtonParam:
+ * represents a Gtk::ToggleButton as a Live Path Effect parameter
+ */
class ToggleButtonParam : public Parameter {
public:
ToggleButtonParam( const Glib::ustring& label,
@@ -39,6 +42,9 @@ public:
bool get_value() const { return value; };
inline operator bool() const { return value; };
+
+ sigc::signal<void>& signal_toggled() { return _signal_toggled; }
+ virtual void toggled();
private:
ToggleButtonParam(const ToggleButtonParam&);
@@ -46,6 +52,9 @@ private:
bool value;
bool defvalue;
+
+ sigc::signal<void> _signal_toggled;
+ sigc::connection _toggled_connection;
};