Inkscape
Vector Graphics Editor
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Inkscape::UI::Widget::StyleSwatch Class Reference

#include <style-swatch.h>

Inheritance diagram for Inkscape::UI::Widget::StyleSwatch:

Public Member Functions

 StyleSwatch (SPCSSAttr *attr, gchar const *main_tip, Gtk::Orientation orient=Gtk::Orientation::VERTICAL)
 
 ~StyleSwatch () override
 
void setStyle (SPStyle *style)
 
void setStyle (SPCSSAttr *attr)
 
SPCSSAttrgetStyle ()
 
void setWatchedTool (const char *path, bool synthesize)
 
void setToolName (const Glib::ustring &tool_name)
 
void setDesktop (SPDesktop *desktop)
 

Private Types

using PrefObs = Preferences::PreferencesObserver
 

Private Attributes

SPDesktop_desktop
 
Glib::ustring _tool_name
 
SPCSSAttr_css
 
std::unique_ptr< PrefObs_tool_obs
 
std::unique_ptr< PrefObs_style_obs
 
Glib::ustring _tool_path
 
Gtk::Grid * _table
 
Gtk::Label _label [2]
 
Gtk::Box _empty_space
 
Gtk::Label _value [2]
 
Gtk::Box _place [2]
 
Gtk::Label _opacity_value
 
std::unique_ptr< ColorPreview_color_preview [2]
 
Glib::ustring _color [2]
 
Gtk::Box _stroke
 
Gtk::Label _stroke_width
 
Util::Unit_sw_unit
 

Friends

void tool_obs_callback (StyleSwatch &, Preferences::Entry const &)
 Watches whether the tool uses the current style.
 

Detailed Description

Definition at line 43 of file style-swatch.h.

Member Typedef Documentation

◆ PrefObs

Constructor & Destructor Documentation

◆ StyleSwatch()

Inkscape::UI::Widget::StyleSwatch::StyleSwatch ( SPCSSAttr attr,
gchar const *  main_tip,
Gtk::Orientation  orient = Gtk::Orientation::VERTICAL 
)

◆ ~StyleSwatch()

Inkscape::UI::Widget::StyleSwatch::~StyleSwatch ( )
override

Definition at line 175 of file style-swatch.cpp.

References _css, and sp_repr_css_attr_unref().

Member Function Documentation

◆ getStyle()

SPCSSAttr * Inkscape::UI::Widget::StyleSwatch::getStyle ( )

◆ setDesktop()

void Inkscape::UI::Widget::StyleSwatch::setDesktop ( SPDesktop desktop)

Definition at line 171 of file style-swatch.cpp.

References _desktop, and desktop.

◆ setStyle() [1/2]

void Inkscape::UI::Widget::StyleSwatch::setStyle ( SPCSSAttr attr)

◆ setStyle() [2/2]

◆ setToolName()

void Inkscape::UI::Widget::StyleSwatch::setToolName ( const Glib::ustring &  tool_name)

Definition at line 167 of file style-swatch.cpp.

References _tool_name.

◆ setWatchedTool()

void Inkscape::UI::Widget::StyleSwatch::setWatchedTool ( const char *  path,
bool  synthesize 
)

Friends And Related Symbol Documentation

◆ tool_obs_callback

void tool_obs_callback ( StyleSwatch _style_swatch,
Preferences::Entry const &  val 
)
friend

Watches whether the tool uses the current style.

Definition at line 61 of file style-swatch.cpp.

Referenced by setWatchedTool().

Member Data Documentation

◆ _color

Glib::ustring Inkscape::UI::Widget::StyleSwatch::_color[2]
private

Definition at line 73 of file style-swatch.h.

◆ _color_preview

std::unique_ptr<ColorPreview> Inkscape::UI::Widget::StyleSwatch::_color_preview[2]
private

Definition at line 72 of file style-swatch.h.

Referenced by setStyle(), and StyleSwatch().

◆ _css

SPCSSAttr* Inkscape::UI::Widget::StyleSwatch::_css
private

Definition at line 62 of file style-swatch.h.

Referenced by setStyle(), and ~StyleSwatch().

◆ _desktop

SPDesktop* Inkscape::UI::Widget::StyleSwatch::_desktop
private

Definition at line 60 of file style-swatch.h.

Referenced by setDesktop(), and setStyle().

◆ _empty_space

Gtk::Box Inkscape::UI::Widget::StyleSwatch::_empty_space
private

Definition at line 68 of file style-swatch.h.

Referenced by StyleSwatch().

◆ _label

Gtk::Label Inkscape::UI::Widget::StyleSwatch::_label[2]
private

Definition at line 67 of file style-swatch.h.

Referenced by StyleSwatch().

◆ _opacity_value

Gtk::Label Inkscape::UI::Widget::StyleSwatch::_opacity_value
private

Definition at line 71 of file style-swatch.h.

Referenced by setStyle(), and StyleSwatch().

◆ _place

Gtk::Box Inkscape::UI::Widget::StyleSwatch::_place[2]
private

Definition at line 70 of file style-swatch.h.

Referenced by setStyle(), and StyleSwatch().

◆ _stroke

Gtk::Box Inkscape::UI::Widget::StyleSwatch::_stroke
private

Definition at line 74 of file style-swatch.h.

Referenced by StyleSwatch().

◆ _stroke_width

Gtk::Label Inkscape::UI::Widget::StyleSwatch::_stroke_width
private

Definition at line 75 of file style-swatch.h.

Referenced by setStyle(), and StyleSwatch().

◆ _style_obs

std::unique_ptr<PrefObs> Inkscape::UI::Widget::StyleSwatch::_style_obs
private

Definition at line 64 of file style-swatch.h.

◆ _sw_unit

Util::Unit* Inkscape::UI::Widget::StyleSwatch::_sw_unit
private

Definition at line 76 of file style-swatch.h.

Referenced by setStyle().

◆ _table

Gtk::Grid* Inkscape::UI::Widget::StyleSwatch::_table
private

Definition at line 66 of file style-swatch.h.

Referenced by StyleSwatch().

◆ _tool_name

Glib::ustring Inkscape::UI::Widget::StyleSwatch::_tool_name
private

Definition at line 61 of file style-swatch.h.

Referenced by setToolName().

◆ _tool_obs

std::unique_ptr<PrefObs> Inkscape::UI::Widget::StyleSwatch::_tool_obs
private

Definition at line 63 of file style-swatch.h.

Referenced by setWatchedTool().

◆ _tool_path

Glib::ustring Inkscape::UI::Widget::StyleSwatch::_tool_path
private

Definition at line 65 of file style-swatch.h.

Referenced by setWatchedTool().

◆ _value

Gtk::Label Inkscape::UI::Widget::StyleSwatch::_value[2]
private

Definition at line 69 of file style-swatch.h.

Referenced by setStyle().


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