/* Copyright (C) 1998-2002 The gtkmm Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ // To exclude this file from the documentation when build-deprecated-api=false. _CONFIGINCLUDE(gtkmmconfig.h) _DEFS(gtkmm,gtk) _PINCLUDE(gtkmm/private/hvbox_p.h) _PINCLUDE(gtkmm/private/dialog_p.h) #m4 _PUSH(SECTION_CC_PRE_INCLUDES) #undef GTK_DISABLE_DEPRECATED #define GDK_DISABLE_DEPRECATION_WARNINGS 1 #m4 _POP() #include #include #include #include namespace Gtk { /** A widget used to select a color. * * This widget is used to select a color. It * consists of a color wheel and number of sliders and entry boxes for color * parameters such as hue, saturation, value, red, green, blue, and opacity. * * It is found on the standard color selection dialog box * Gtk::ColorSelectionDialog. * * @ingroup Widgets * @deprecated Use ColorButton or ColorChooserDialog instead. */ class GTKMM_API ColorSelection : public VBox { _CLASS_GTKOBJECT(ColorSelection,GtkColorSelection,GTK_COLOR_SELECTION,Gtk::VBox,GtkVBox,,,GTKMM_API) _IS_DEPRECATED _IGNORE(gtk_color_selection_get_current_color, gtk_color_selection_get_previous_color) public: _CTOR_DEFAULT() _WRAP_METHOD(bool get_has_opacity_control() const, gtk_color_selection_get_has_opacity_control) _WRAP_METHOD(void set_has_opacity_control(bool has_opacity = true), gtk_color_selection_set_has_opacity_control) _WRAP_METHOD(bool get_has_palette() const, gtk_color_selection_get_has_palette) _WRAP_METHOD(void set_has_palette(bool has_palette = true), gtk_color_selection_set_has_palette) _WRAP_METHOD(void set_current_color(const Gdk::Color& color), gtk_color_selection_set_current_color, deprecated "Use set_current_rgba() instead.") _WRAP_METHOD(void set_current_alpha(guint16 alpha), gtk_color_selection_set_current_alpha) Gdk::Color get_current_color() const; _WRAP_METHOD(guint16 get_current_alpha() const, gtk_color_selection_get_current_alpha) _WRAP_METHOD(void set_previous_color(const Gdk::Color& color), gtk_color_selection_set_previous_color) _WRAP_METHOD(void set_previous_alpha(guint16 alpha), gtk_color_selection_set_previous_alpha) Gdk::Color get_previous_color() const; _WRAP_METHOD(guint16 get_previous_alpha() const, gtk_color_selection_get_previous_alpha) _IGNORE(gtk_color_selection_get_previous_rgba, gtk_color_selection_get_current_rgba) Gdk::RGBA get_current_rgba() const; Gdk::RGBA get_previous_rgba() const; _WRAP_METHOD(void set_current_rgba(const Gdk::RGBA& rgba), gtk_color_selection_set_current_rgba) _WRAP_METHOD(void set_previous_rgba(const Gdk::RGBA& rgba), gtk_color_selection_set_previous_rgba) _WRAP_METHOD(bool is_adjusting() const, gtk_color_selection_is_adjusting) static std::vector palette_from_string(const Glib::ustring& str); static Glib::ustring palette_to_string(const std::vector& colors); typedef sigc::slot&, const std::vector&> SlotChangePaletteHook; static SlotChangePaletteHook set_change_palette_hook(const SlotChangePaletteHook& slot); _WRAP_SIGNAL(void color_changed(), "color_changed") _WRAP_PROPERTY("has-palette", bool) _WRAP_PROPERTY("has-opacity-control", bool) _WRAP_PROPERTY("current-color", Gdk::Color) _WRAP_PROPERTY("current-alpha", guint) //The whole class was deprecated before this was added: _WRAP_PROPERTY("current-rgba", Gdk::RGBA) }; /** This dialog allows the user to select a color. * * A ColorSelectionDialog looks like this: * @image html colorselectiondialog1.png * * @ingroup Dialogs * @deprecated Use ColorChooserDialog instead. */ class GTKMM_API ColorSelectionDialog : public Dialog { _CLASS_GTKOBJECT(ColorSelectionDialog,GtkColorSelectionDialog,GTK_COLOR_SELECTION_DIALOG,Gtk::Dialog,GtkDialog,,,GTKMM_API) _UNMANAGEABLE() _IS_DEPRECATED public: _CTOR_DEFAULT() _WRAP_CTOR(ColorSelectionDialog(const Glib::ustring& title), gtk_color_selection_dialog_new) _WRAP_METHOD(ColorSelection* get_color_selection(), gtk_color_selection_dialog_get_color_selection) _WRAP_METHOD(const ColorSelection* get_color_selection() const, gtk_color_selection_dialog_get_color_selection) _WRAP_PROPERTY("color-selection", ColorSelection*) _WRAP_PROPERTY("ok-button", Button*) _WRAP_PROPERTY("cancel-button", Button*) _WRAP_PROPERTY("help-button", Button*) }; } // namespace Gtk