1 /* === S Y N F I G ========================================================= */
2 /*! \file dock_paledit.h
3 ** \brief Template Header
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_STUDIO_DOCK_PAL_EDIT_H
26 #define __SYNFIG_STUDIO_DOCK_PAL_EDIT_H
28 /* === H E A D E R S ======================================================= */
31 #include <gtkmm/adjustment.h>
32 #include <gtkmm/table.h>
33 #include <gtkmm/button.h>
34 #include <gtkmm/dialog.h>
35 #include <gtkmm/drawingarea.h>
36 #include <gtkmm/optionmenu.h>
37 #include <gtkmm/checkbutton.h>
39 #include <synfig/gamma.h>
40 #include <synfig/time.h>
42 #include <synfigapp/value_desc.h>
43 #include <synfig/time.h>
45 #include "../dockable.h"
46 #include "../widget_color.h"
48 #include <gtkmm/actiongroup.h>
50 #include <synfig/palette.h>
52 /* === M A C R O S ========================================================= */
54 /* === T Y P E D E F S ===================================================== */
56 /* === C L A S S E S & S T R U C T S ======================================= */
59 class CanvasInterface;
65 class PaletteSettings;
67 class Dock_PalEdit : public Dockable
69 friend class PaletteSettings;
71 Glib::RefPtr<Gtk::ActionGroup> action_group;
73 synfig::Palette palette_;
77 void on_add_pressed();
79 void show_menu(int i);
81 sigc::signal<void> signal_changed_;
85 int add_color(const synfig::Color& x);
86 void set_color(synfig::Color x, int i);
87 void erase_color(int i);
89 void select_color(int i);
90 synfig::Color get_color(int i)const;
91 void edit_color(int i);
93 void set_palette(const synfig::Palette& x);
94 const synfig::Palette& get_palette()const { return palette_; }
98 void set_default_palette();
102 const sigc::signal<void>& signal_changed() { return signal_changed_; }
106 }; // END of Dock_PalEdit
108 }; // END of namespace studio
110 /* === E N D =============================================================== */