Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::Widget::ColorPicker Class Reference

#include <color-picker.h>

Inheritance diagram for Inkscape::UI::Widget::ColorPicker:
Inkscape::UI::Widget::PrefColorPicker

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
 

Detailed Description

Definition at line 40 of file color-picker.h.

Constructor & Destructor Documentation

◆ ColorPicker() [1/2]

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().

◆ ColorPicker() [2/2]

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().

◆ ~ColorPicker()

Inkscape::UI::Widget::ColorPicker::~ColorPicker ( )
overridedefault

Member Function Documentation

◆ _construct()

◆ _onSelectedColorChanged()

void Inkscape::UI::Widget::ColorPicker::_onSelectedColorChanged ( )
private

◆ close()

void Inkscape::UI::Widget::ColorPicker::close ( )

◆ connectChanged()

sigc::connection Inkscape::UI::Widget::ColorPicker::connectChanged ( sigc::slot< void(Colors::Color const &)>  slot)
inline

◆ get_current_color()

◆ on_changed()

void Inkscape::UI::Widget::ColorPicker::on_changed ( Colors::Color const &  )
privatevirtual

Reimplemented in Inkscape::UI::Widget::PrefColorPicker.

Definition at line 131 of file color-picker.cpp.

Referenced by _onSelectedColorChanged().

◆ open()

void Inkscape::UI::Widget::ColorPicker::open ( )

Definition at line 103 of file color-picker.cpp.

◆ set_preview()

void Inkscape::UI::Widget::ColorPicker::set_preview ( std::uint32_t  rgba)
private

◆ setColor()

◆ setTitle()

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().

Member Data Documentation

◆ _changed_signal

sigc::signal<void (Colors::Color const &)> Inkscape::UI::Widget::ColorPicker::_changed_signal
private

Definition at line 77 of file color-picker.h.

Referenced by _onSelectedColorChanged(), and connectChanged().

◆ _color_selector

ColorNotebook* Inkscape::UI::Widget::ColorPicker::_color_selector = nullptr
private

Definition at line 82 of file color-picker.h.

Referenced by _construct().

◆ _colors

std::shared_ptr<Colors::ColorSet> Inkscape::UI::Widget::ColorPicker::_colors
private

◆ _popup

Gtk::Popover Inkscape::UI::Widget::ColorPicker::_popup
private

Definition at line 81 of file color-picker.h.

Referenced by _construct().

◆ _preview

ColorPreview* Inkscape::UI::Widget::ColorPicker::_preview = nullptr
private

Definition at line 75 of file color-picker.h.

Referenced by _construct(), and set_preview().

◆ _title

Glib::ustring Inkscape::UI::Widget::ColorPicker::_title
private

Definition at line 76 of file color-picker.h.

Referenced by _construct(), and setTitle().

◆ _undo

bool Inkscape::UI::Widget::ColorPicker::_undo = false
private

Definition at line 78 of file color-picker.h.

Referenced by _onSelectedColorChanged().

◆ _updating

bool Inkscape::UI::Widget::ColorPicker::_updating = false
private

Definition at line 79 of file color-picker.h.

Referenced by _onSelectedColorChanged(), and setColor().


The documentation for this class was generated from the following files: