00001
00021
00022
00023
00024
00025 #ifndef __SYNFIG_STUDIO_DOCK_PAL_EDIT_H
00026 #define __SYNFIG_STUDIO_DOCK_PAL_EDIT_H
00027
00028
00029
00030 #include <gtk/gtk.h>
00031 #include <gtkmm/adjustment.h>
00032 #include <gtkmm/table.h>
00033 #include <gtkmm/button.h>
00034 #include <gtkmm/dialog.h>
00035 #include <gtkmm/drawingarea.h>
00036 #include <gtkmm/optionmenu.h>
00037 #include <gtkmm/checkbutton.h>
00038
00039 #include <synfig/gamma.h>
00040 #include <synfig/time.h>
00041
00042 #include "../widget_coloredit.h"
00043
00044 #include <synfigapp/value_desc.h>
00045 #include <synfig/time.h>
00046
00047 #include "../dockable.h"
00048 #include <vector>
00049 #include <gtkmm/actiongroup.h>
00050
00051 #include <synfig/palette.h>
00052
00053
00054
00055
00056
00057
00058
00059 namespace synfigapp {
00060 class CanvasInterface;
00061 };
00062
00063 namespace studio {
00064
00065 class Widget_Color;
00066 class PaletteSettings;
00067
00068 class Dock_PalEdit : public Dockable
00069 {
00070 friend class PaletteSettings;
00071
00072 Glib::RefPtr<Gtk::ActionGroup> action_group;
00073
00074 synfig::Palette palette_;
00075
00076 Gtk::Table table;
00077
00078 void on_add_pressed();
00079
00080 void show_menu(int i);
00081
00082 sigc::signal<void> signal_changed_;
00083
00084
00085 private:
00086 int add_color(const synfig::Color& x);
00087 void set_color(synfig::Color x, int i);
00088 void erase_color(int i);
00089
00090 void select_color(int i);
00091 synfig::Color get_color(int i)const;
00092 void edit_color(int i);
00093 public:
00094 void set_palette(const synfig::Palette& x);
00095 const synfig::Palette& get_palette()const { return palette_; }
00096
00097 int size()const;
00098
00099 void set_default_palette();
00100
00101 void refresh();
00102
00103 const sigc::signal<void>& signal_changed() { return signal_changed_; }
00104
00105 Dock_PalEdit();
00106 ~Dock_PalEdit();
00107 };
00108
00109 };
00110
00111
00112
00113 #endif