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

Selected style indicator (fill, stroke, opacity). More...

#include <selected-style.h>

Inheritance diagram for Inkscape::UI::Widget::SelectedStyle:
Inkscape::UI::Widget::PopoverBin Inkscape::UI::DefocusTarget

Public Member Functions

 SelectedStyle ()
 
void setDesktop (SPDesktop *desktop)
 
SPDesktopgetDesktop ()
 
void update ()
 
- Public Member Functions inherited from Inkscape::UI::Widget::PopoverBin
 PopoverBin ()
 
void setChild (Gtk::Widget *child)
 
void setPopover (Gtk::Popover *popover)
 

Public Attributes

bool dragging = false
 
std::optional< Colors::Color_lastselected [2]
 
std::optional< Colors::Color_thisselected [2]
 
guint _mode [2]
 
double current_stroke_width = 0.0
 
Inkscape::Util::Unit const * _sw_unit = nullptr
 

Protected Member Functions

Gtk::EventSequenceState on_fill_click (Gtk::GestureClick const &click, int n_press, double x, double y)
 
Gtk::EventSequenceState on_stroke_click (Gtk::GestureClick const &click, int n_press, double x, double y)
 
Gtk::EventSequenceState on_opacity_click (Gtk::GestureClick const &click, int n_press, double x, double y)
 
Gtk::EventSequenceState on_sw_click (Gtk::GestureClick const &click, int n_press, double x, double y)
 
void make_popup_opacity ()
 
void on_opacity_changed ()
 
bool on_opacity_popup (PopupMenuOptionalClick)
 
void opacity_0 ()
 
void opacity_025 ()
 
void opacity_05 ()
 
void opacity_075 ()
 
void opacity_1 ()
 
void on_fill_remove ()
 
void on_stroke_remove ()
 
void on_fill_lastused ()
 
void on_stroke_lastused ()
 
void on_fill_lastselected ()
 
void on_stroke_lastselected ()
 
void on_fill_unset ()
 
void on_stroke_unset ()
 
void on_fill_edit ()
 
void on_stroke_edit ()
 
void on_fillstroke_swap ()
 
void on_fill_invert ()
 
void on_stroke_invert ()
 
void on_fill_white ()
 
void on_stroke_white ()
 
void on_fill_black ()
 
void on_stroke_black ()
 
void on_fill_copy ()
 
void on_stroke_copy ()
 
void on_fill_paste ()
 
void on_stroke_paste ()
 
void on_fill_opaque ()
 
void on_stroke_opaque ()
 
void _on_paste_callback (Glib::RefPtr< Gio::AsyncResult > &result, Glib::ustring typepaste)
 
void make_popup (FillOrStroke i)
 
void make_popup_units ()
 
void on_popup_units (Inkscape::Util::Unit const *u)
 
void on_popup_preset (int i)
 

Protected Attributes

SPDesktop_desktop = nullptr
 
Gtk::Grid * grid
 
Gtk::Label * label [2]
 
Gtk::Label * tag [2]
 
std::unique_ptr< Gtk::Label > type_label [2]
 
std::unique_ptr< GradientImagegradient_preview [2]
 
std::unique_ptr< ColorPreviewcolor_preview [2]
 
RotateableSwatchswatch [2]
 
Gtk::Label * stroke_width
 
RotateableStrokeWidthstroke_width_rotateable
 
Gtk::Label * opacity_label
 
Glib::RefPtr< Gtk::Adjustment > opacity_adjustment
 
Inkscape::UI::Widget::SpinButtonopacity_sb
 
Glib::ustring _paintserver_id [2]
 
sigc::scoped_connection selection_changed_connection
 
sigc::scoped_connection selection_modified_connection
 
bool _opacity_blocked = false
 
std::unique_ptr< UI::Widget::PopoverMenu_popup_opacity
 
std::unique_ptr< UI::Widget::PopoverMenu_popup [2]
 
UI::Widget::PopoverMenuItem_popup_copy [2] {}
 
std::unique_ptr< UI::Widget::PopoverMenu_popup_sw
 
std::vector< Gtk::CheckButton * > _unit_mis
 
std::unique_ptr< SelectedStyleDropTracker > drop [2]
 
bool dropEnabled [2] = {false, false}
 

Private Member Functions

void onDefocus () override
 
 ~DefocusTarget ()=default
 

Detailed Description

Selected style indicator (fill, stroke, opacity).

Definition at line 119 of file selected-style.h.

Constructor & Destructor Documentation

◆ SelectedStyle()

Member Function Documentation

◆ _on_paste_callback()

void Inkscape::UI::Widget::SelectedStyle::_on_paste_callback ( Glib::RefPtr< Gio::AsyncResult > &  result,
Glib::ustring  typepaste 
)
protected

◆ getDesktop()

◆ make_popup()

◆ make_popup_opacity()

void Inkscape::UI::Widget::SelectedStyle::make_popup_opacity ( )
protected

◆ make_popup_units()

◆ on_fill_black()

void Inkscape::UI::Widget::SelectedStyle::on_fill_black ( )
protected

◆ on_fill_click()

Gtk::EventSequenceState Inkscape::UI::Widget::SelectedStyle::on_fill_click ( Gtk::GestureClick const &  click,
int  n_press,
double  x,
double  y 
)
protected

◆ on_fill_copy()

void Inkscape::UI::Widget::SelectedStyle::on_fill_copy ( )
protected

◆ on_fill_edit()

void Inkscape::UI::Widget::SelectedStyle::on_fill_edit ( )
protected

◆ on_fill_invert()

◆ on_fill_lastselected()

◆ on_fill_lastused()

void Inkscape::UI::Widget::SelectedStyle::on_fill_lastused ( )
protected

◆ on_fill_opaque()

void Inkscape::UI::Widget::SelectedStyle::on_fill_opaque ( )
protected

◆ on_fill_paste()

void Inkscape::UI::Widget::SelectedStyle::on_fill_paste ( )
protected

Definition at line 480 of file selected-style.cpp.

References _on_paste_callback().

◆ on_fill_remove()

void Inkscape::UI::Widget::SelectedStyle::on_fill_remove ( )
protected

◆ on_fill_unset()

void Inkscape::UI::Widget::SelectedStyle::on_fill_unset ( )
protected

◆ on_fill_white()

void Inkscape::UI::Widget::SelectedStyle::on_fill_white ( )
protected

◆ on_fillstroke_swap()

void Inkscape::UI::Widget::SelectedStyle::on_fillstroke_swap ( )
protected

◆ on_opacity_changed()

◆ on_opacity_click()

Gtk::EventSequenceState Inkscape::UI::Widget::SelectedStyle::on_opacity_click ( Gtk::GestureClick const &  click,
int  n_press,
double  x,
double  y 
)
protected

◆ on_opacity_popup()

bool Inkscape::UI::Widget::SelectedStyle::on_opacity_popup ( PopupMenuOptionalClick  )
protected

◆ on_popup_preset()

◆ on_popup_units()

void Inkscape::UI::Widget::SelectedStyle::on_popup_units ( Inkscape::Util::Unit const *  u)
protected

Definition at line 690 of file selected-style.cpp.

References _sw_unit, and update().

Referenced by make_popup_units().

◆ on_stroke_black()

void Inkscape::UI::Widget::SelectedStyle::on_stroke_black ( )
protected

◆ on_stroke_click()

Gtk::EventSequenceState Inkscape::UI::Widget::SelectedStyle::on_stroke_click ( Gtk::GestureClick const &  click,
int  n_press,
double  x,
double  y 
)
protected

◆ on_stroke_copy()

void Inkscape::UI::Widget::SelectedStyle::on_stroke_copy ( )
protected

◆ on_stroke_edit()

void Inkscape::UI::Widget::SelectedStyle::on_stroke_edit ( )
protected

Definition at line 501 of file selected-style.cpp.

References _desktop, and Inkscape::UI::Widget::get_fill_and_stroke_panel().

Referenced by make_popup().

◆ on_stroke_invert()

◆ on_stroke_lastselected()

◆ on_stroke_lastused()

void Inkscape::UI::Widget::SelectedStyle::on_stroke_lastused ( )
protected

◆ on_stroke_opaque()

void Inkscape::UI::Widget::SelectedStyle::on_stroke_opaque ( )
protected

◆ on_stroke_paste()

void Inkscape::UI::Widget::SelectedStyle::on_stroke_paste ( )
protected

Definition at line 486 of file selected-style.cpp.

References _on_paste_callback().

Referenced by make_popup().

◆ on_stroke_remove()

void Inkscape::UI::Widget::SelectedStyle::on_stroke_remove ( )
protected

◆ on_stroke_unset()

void Inkscape::UI::Widget::SelectedStyle::on_stroke_unset ( )
protected

◆ on_stroke_white()

void Inkscape::UI::Widget::SelectedStyle::on_stroke_white ( )
protected

◆ on_sw_click()

Gtk::EventSequenceState Inkscape::UI::Widget::SelectedStyle::on_sw_click ( Gtk::GestureClick const &  click,
int  n_press,
double  x,
double  y 
)
protected

◆ onDefocus()

void Inkscape::UI::Widget::SelectedStyle::onDefocus ( )
overrideprivatevirtual

Implements Inkscape::UI::DefocusTarget.

Definition at line 712 of file selected-style.cpp.

References _desktop, and SPDesktop::getCanvas().

◆ opacity_0()

void Inkscape::UI::Widget::SelectedStyle::opacity_0 ( )
protected

Definition at line 942 of file selected-style.cpp.

References opacity_sb.

Referenced by make_popup_opacity().

◆ opacity_025()

void Inkscape::UI::Widget::SelectedStyle::opacity_025 ( )
protected

Definition at line 943 of file selected-style.cpp.

References opacity_sb.

Referenced by make_popup_opacity().

◆ opacity_05()

void Inkscape::UI::Widget::SelectedStyle::opacity_05 ( )
protected

Definition at line 944 of file selected-style.cpp.

References opacity_sb.

Referenced by make_popup_opacity().

◆ opacity_075()

void Inkscape::UI::Widget::SelectedStyle::opacity_075 ( )
protected

Definition at line 945 of file selected-style.cpp.

References opacity_sb.

Referenced by make_popup_opacity().

◆ opacity_1()

void Inkscape::UI::Widget::SelectedStyle::opacity_1 ( )
protected

Definition at line 946 of file selected-style.cpp.

References opacity_sb.

Referenced by make_popup_opacity().

◆ setDesktop()

◆ update()

Member Data Documentation

◆ _desktop

◆ _lastselected

std::optional<Colors::Color> Inkscape::UI::Widget::SelectedStyle::_lastselected[2]

Definition at line 131 of file selected-style.h.

Referenced by on_fill_lastselected(), on_stroke_lastselected(), and update().

◆ _mode

◆ _opacity_blocked

bool Inkscape::UI::Widget::SelectedStyle::_opacity_blocked = false
protected

Definition at line 175 of file selected-style.h.

Referenced by on_opacity_changed(), and update().

◆ _paintserver_id

Glib::ustring Inkscape::UI::Widget::SelectedStyle::_paintserver_id[2]
protected

Definition at line 160 of file selected-style.h.

Referenced by update().

◆ _popup

std::unique_ptr<UI::Widget::PopoverMenu> Inkscape::UI::Widget::SelectedStyle::_popup[2]
protected

Definition at line 212 of file selected-style.h.

Referenced by make_popup(), on_fill_click(), and on_stroke_click().

◆ _popup_copy

UI::Widget::PopoverMenuItem* Inkscape::UI::Widget::SelectedStyle::_popup_copy[2] {}
protected

Definition at line 213 of file selected-style.h.

Referenced by make_popup(), and update().

◆ _popup_opacity

std::unique_ptr<UI::Widget::PopoverMenu> Inkscape::UI::Widget::SelectedStyle::_popup_opacity
protected

Definition at line 177 of file selected-style.h.

Referenced by make_popup_opacity(), and on_opacity_popup().

◆ _popup_sw

std::unique_ptr<UI::Widget::PopoverMenu> Inkscape::UI::Widget::SelectedStyle::_popup_sw
protected

Definition at line 216 of file selected-style.h.

Referenced by make_popup_units(), and on_sw_click().

◆ _sw_unit

Inkscape::Util::Unit const* Inkscape::UI::Widget::SelectedStyle::_sw_unit = nullptr

◆ _thisselected

std::optional<Colors::Color> Inkscape::UI::Widget::SelectedStyle::_thisselected[2]

◆ _unit_mis

std::vector<Gtk::CheckButton *> Inkscape::UI::Widget::SelectedStyle::_unit_mis
protected

Definition at line 217 of file selected-style.h.

Referenced by make_popup_units(), and on_sw_click().

◆ color_preview

std::unique_ptr<ColorPreview> Inkscape::UI::Widget::SelectedStyle::color_preview[2]
protected

Definition at line 150 of file selected-style.h.

Referenced by SelectedStyle(), and update().

◆ current_stroke_width

double Inkscape::UI::Widget::SelectedStyle::current_stroke_width = 0.0

◆ dragging

◆ drop

std::unique_ptr<SelectedStyleDropTracker> Inkscape::UI::Widget::SelectedStyle::drop[2]
protected

Definition at line 222 of file selected-style.h.

Referenced by SelectedStyle().

◆ dropEnabled

bool Inkscape::UI::Widget::SelectedStyle::dropEnabled[2] = {false, false}
protected

Definition at line 223 of file selected-style.h.

Referenced by SelectedStyle(), and update().

◆ gradient_preview

std::unique_ptr<GradientImage> Inkscape::UI::Widget::SelectedStyle::gradient_preview[2]
protected

Definition at line 149 of file selected-style.h.

Referenced by SelectedStyle(), and update().

◆ grid

Gtk::Grid* Inkscape::UI::Widget::SelectedStyle::grid
protected

Definition at line 143 of file selected-style.h.

Referenced by SelectedStyle().

◆ label

Gtk::Label* Inkscape::UI::Widget::SelectedStyle::label[2]
protected

Definition at line 145 of file selected-style.h.

Referenced by make_popup(), make_popup_opacity(), and SelectedStyle().

◆ opacity_adjustment

Glib::RefPtr<Gtk::Adjustment> Inkscape::UI::Widget::SelectedStyle::opacity_adjustment
protected

Definition at line 157 of file selected-style.h.

Referenced by on_opacity_changed(), SelectedStyle(), and update().

◆ opacity_label

Gtk::Label* Inkscape::UI::Widget::SelectedStyle::opacity_label
protected

Definition at line 156 of file selected-style.h.

Referenced by SelectedStyle().

◆ opacity_sb

Inkscape::UI::Widget::SpinButton* Inkscape::UI::Widget::SelectedStyle::opacity_sb
protected

◆ selection_changed_connection

sigc::scoped_connection Inkscape::UI::Widget::SelectedStyle::selection_changed_connection
protected

Definition at line 163 of file selected-style.h.

Referenced by setDesktop().

◆ selection_modified_connection

sigc::scoped_connection Inkscape::UI::Widget::SelectedStyle::selection_modified_connection
protected

Definition at line 164 of file selected-style.h.

Referenced by setDesktop().

◆ stroke_width

Gtk::Label* Inkscape::UI::Widget::SelectedStyle::stroke_width
protected

Definition at line 153 of file selected-style.h.

Referenced by on_sw_click(), SelectedStyle(), and update().

◆ stroke_width_rotateable

RotateableStrokeWidth* Inkscape::UI::Widget::SelectedStyle::stroke_width_rotateable
protected

Definition at line 154 of file selected-style.h.

Referenced by SelectedStyle().

◆ swatch

RotateableSwatch* Inkscape::UI::Widget::SelectedStyle::swatch[2]
protected

Definition at line 151 of file selected-style.h.

Referenced by on_fill_click(), on_stroke_click(), SelectedStyle(), and update().

◆ tag

Gtk::Label* Inkscape::UI::Widget::SelectedStyle::tag[2]
protected

Definition at line 146 of file selected-style.h.

Referenced by SelectedStyle(), and update().

◆ type_label

std::unique_ptr<Gtk::Label> Inkscape::UI::Widget::SelectedStyle::type_label[2]
protected

Definition at line 148 of file selected-style.h.

Referenced by SelectedStyle(), and update().


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