summaryrefslogtreecommitdiff
path: root/gtk2_ardour/stripable_colorpicker.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-30 15:20:48 +0200
committerRobin Gareus <robin@gareus.org>2017-03-30 15:20:48 +0200
commitdd7063277a52efd0a335156f055a778613d63283 (patch)
tree1a63cbb4bdfa8cf4fb9d41d26ee418e04edf78da /gtk2_ardour/stripable_colorpicker.h
parentea8c6e9fc81fb4a5bf44e6c2d5a3506b52e530e1 (diff)
Add ColorButton drop-in replacement with palette support
Diffstat (limited to 'gtk2_ardour/stripable_colorpicker.h')
-rw-r--r--gtk2_ardour/stripable_colorpicker.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk2_ardour/stripable_colorpicker.h b/gtk2_ardour/stripable_colorpicker.h
index 952640da70..4af5bbd7e1 100644
--- a/gtk2_ardour/stripable_colorpicker.h
+++ b/gtk2_ardour/stripable_colorpicker.h
@@ -20,7 +20,9 @@
#define __gtkardour_stripable_colorpicker_h__
#include <boost/shared_ptr.hpp>
+#include <gtkmm/colorbutton.h>
#include <gtkmm/colorselection.h>
+
#include "ardour/stripable.h"
class StripableColorDialog : public Gtk::ColorSelectionDialog
@@ -30,6 +32,8 @@ public:
~StripableColorDialog ();
void reset ();
void popup (boost::shared_ptr<ARDOUR::Stripable> s);
+ void popup (const std::string&, uint32_t);
+ sigc::signal<void, uint32_t> ColorChanged;
private:
void initialize_color_palette ();
@@ -47,4 +51,17 @@ private:
static Gtk::ColorSelection::SlotChangePaletteHook gtk_palette_changed_hook;
};
+class ArdourColorButton : public Gtk::ColorButton
+{
+public:
+ ArdourColorButton ();
+
+protected:
+ void on_clicked();
+ void color_selected (uint32_t color);
+
+private:
+ StripableColorDialog _color_picker;
+};
+
#endif