Ardour  8.7-14-g57a6773833
stripable_colorpicker.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __gtkardour_stripable_colorpicker_h__
20 #define __gtkardour_stripable_colorpicker_h__
21 
22 #include <memory>
23 
24 #include <gtkmm/colorbutton.h>
25 #include <gtkmm/colorselection.h>
26 
27 #include "ardour/stripable.h"
28 
30 {
31 public:
34  void reset ();
35  void popup (std::shared_ptr<ARDOUR::Stripable> s);
36  void popup (const std::string&, uint32_t);
37  sigc::signal<void, uint32_t> ColorChanged;
38 
39 private:
42  void color_changed ();
43 
44  std::shared_ptr<ARDOUR::Stripable> _stripable;
46 
47  sigc::connection _color_changed_connection;
48 
49 
50  static bool palette_initialized;
51  static void palette_changed_hook (const Glib::RefPtr<Gdk::Screen>&, const Gdk::ArrayHandle_Color&);
53 };
54 
56 {
57 public:
59 
60 protected:
61  void on_clicked();
62  void color_selected (uint32_t color);
63 
64 private:
66 };
67 
68 #endif
void on_clicked()
This is a default handler for the signal signal_clicked().
StripableColorDialog _color_picker
void color_selected(uint32_t color)
sigc::slot< void, const Glib::RefPtr< Gdk::Screen > &, const Gdk::ArrayHandle_Color & > SlotChangePaletteHook
void response(int response_id)
std::shared_ptr< ARDOUR::Stripable > _stripable
void popup(std::shared_ptr< ARDOUR::Stripable > s)
sigc::signal< void, uint32_t > ColorChanged
sigc::connection _color_changed_connection
static Gtk::ColorSelection::SlotChangePaletteHook gtk_palette_changed_hook
ARDOUR::PresentationInfo::color_t _initial_color
void finish_color_edit(int response)
static void palette_changed_hook(const Glib::RefPtr< Gdk::Screen > &, const Gdk::ArrayHandle_Color &)
void popup(const std::string &, uint32_t)
void initialize_color_palette()
PBD::PropertyDescriptor< uint32_t > color
Glib::ArrayHandle< Color, ColorTraits > ArrayHandle_Color
Definition: color.h:242