Inkscape
Vector Graphics Editor
|
#include <color-picker.h>
Public Member Functions | |
ColorPicker (Glib::ustring title, Glib::ustring const &tip, Colors::Color const &initial, bool undo, bool use_transparency=true) | |
ColorPicker (BaseObjectType *cobject, Glib::RefPtr< Gtk::Builder > const &, Glib::ustring title, bool use_transparency=true) | |
~ColorPicker () override | |
void | setColor (Colors::Color const &) |
void | open () |
void | close () |
void | setTitle (Glib::ustring title) |
sigc::connection | connectChanged (sigc::slot< void(Colors::Color const &)> slot) |
Colors::Color | get_current_color () const |
Private Member Functions | |
void | _onSelectedColorChanged () |
virtual void | on_changed (Colors::Color const &) |
void | _construct () |
void | set_preview (std::uint32_t rgba) |
Private Attributes | |
ColorPreview * | _preview = nullptr |
Glib::ustring | _title |
sigc::signal< void(Colors::Color const &)> | _changed_signal |
bool | _undo = false |
bool | _updating = false |
std::shared_ptr< Colors::ColorSet > | _colors |
Gtk::Popover | _popup |
ColorNotebook * | _color_selector = nullptr |
Definition at line 40 of file color-picker.h.
Inkscape::UI::Widget::ColorPicker::ColorPicker | ( | Glib::ustring | title, |
Glib::ustring const & | tip, | ||
Colors::Color const & | initial, | ||
bool | undo, | ||
bool | use_transparency = true |
||
) |
Definition at line 33 of file color-picker.cpp.
References _colors, and _construct().
Inkscape::UI::Widget::ColorPicker::ColorPicker | ( | BaseObjectType * | cobject, |
Glib::RefPtr< Gtk::Builder > const & | , | ||
Glib::ustring | title, | ||
bool | use_transparency = true |
||
) |
Definition at line 52 of file color-picker.cpp.
References _construct().
|
overridedefault |
|
private |
Definition at line 62 of file color-picker.cpp.
References _color_selector, _colors, _onSelectedColorChanged(), _popup, _preview, _title, Inkscape::UI::Widget::height, Inkscape::UI::Widget::ColorPreview::Outlined, restrict_minsize_to_square(), Inkscape::UI::Widget::ColorNotebook::set_label(), and Inkscape::UI::Widget::ColorPreview::setStyle().
Referenced by ColorPicker(), and ColorPicker().
|
private |
Definition at line 111 of file color-picker.cpp.
References _changed_signal, _colors, _in_use, _undo, _updating, Inkscape::DocumentUndo::done(), on_changed(), and set_preview().
Referenced by _construct().
void Inkscape::UI::Widget::ColorPicker::close | ( | ) |
Definition at line 107 of file color-picker.cpp.
Referenced by Inkscape::UI::Dialog::ObjectProperties::update_entries(), and Inkscape::UI::Widget::PatternEditor::update_widgets_from_pattern().
|
inline |
Definition at line 58 of file color-picker.h.
References _changed_signal.
Referenced by Inkscape::UI::Dialog::ObjectProperties::_init(), Inkscape::UI::Dialog::CloneTiler::CloneTiler(), Inkscape::UI::Widget::PatternEditor::PatternEditor(), Inkscape::UI::Dialog::BatchExport::setup(), and Inkscape::UI::Dialog::SingleExport::setup().
|
inline |
Definition at line 63 of file color-picker.h.
References _colors.
Referenced by Inkscape::UI::Dialog::BatchExport::onExport(), Inkscape::UI::Dialog::SingleExport::onExport(), Inkscape::UI::Dialog::BatchExport::refreshPreview(), and Inkscape::UI::Dialog::SingleExport::refreshPreview().
|
privatevirtual |
Reimplemented in Inkscape::UI::Widget::PrefColorPicker.
Definition at line 131 of file color-picker.cpp.
Referenced by _onSelectedColorChanged().
void Inkscape::UI::Widget::ColorPicker::open | ( | ) |
Definition at line 103 of file color-picker.cpp.
|
private |
Definition at line 133 of file color-picker.cpp.
References _colors, _preview, and Inkscape::UI::Widget::ColorPreview::setRgba32().
Referenced by _onSelectedColorChanged(), and setColor().
void Inkscape::UI::Widget::ColorPicker::setColor | ( | Colors::Color const & | color | ) |
Definition at line 93 of file color-picker.cpp.
References _colors, _in_use, _updating, set_preview(), and Inkscape::Colors::Color::toRGBA().
Referenced by Inkscape::UI::Widget::PrefColorPicker::init(), Inkscape::UI::Dialog::BatchExport::setDocument(), Inkscape::UI::Dialog::SingleExport::setDocument(), Inkscape::UI::Dialog::ObjectProperties::update_entries(), and Inkscape::UI::Widget::PatternEditor::update_widgets_from_pattern().
void Inkscape::UI::Widget::ColorPicker::setTitle | ( | Glib::ustring | title | ) |
Definition at line 89 of file color-picker.cpp.
References _title.
Referenced by Inkscape::UI::Widget::PrefColorPicker::init().
|
private |
Definition at line 77 of file color-picker.h.
Referenced by _onSelectedColorChanged(), and connectChanged().
|
private |
Definition at line 82 of file color-picker.h.
Referenced by _construct().
|
private |
Definition at line 80 of file color-picker.h.
Referenced by _construct(), _onSelectedColorChanged(), ColorPicker(), get_current_color(), set_preview(), and setColor().
|
private |
Definition at line 81 of file color-picker.h.
Referenced by _construct().
|
private |
Definition at line 75 of file color-picker.h.
Referenced by _construct(), and set_preview().
|
private |
Definition at line 76 of file color-picker.h.
Referenced by _construct(), and setTitle().
|
private |
Definition at line 78 of file color-picker.h.
Referenced by _onSelectedColorChanged().
|
private |
Definition at line 79 of file color-picker.h.
Referenced by _onSelectedColorChanged(), and setColor().