Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::Widget::DashSelector Class Referencefinal

#include <dash-selector.h>

Inheritance diagram for Inkscape::UI::Widget::DashSelector:

Public Member Functions

 DashSelector ()
 
 ~DashSelector () final
 
void set_dash_pattern (const std::vector< double > &dash, double offset)
 
const std::vector< double > & get_dash_pattern ()
 
double get_offset ()
 

Public Attributes

sigc::signal< void()> changed_signal
 

Private Member Functions

void update (int position)
 
void activate (Gtk::GridView *grid, unsigned int position)
 
void setup_listitem_cb (const Glib::RefPtr< Gtk::ListItem > &list_item)
 
void bind_listitem_cb (const Glib::RefPtr< Gtk::ListItem > &list_item)
 
void draw_pattern (const Cairo::RefPtr< Cairo::Context > &cr, int width, int height, const std::vector< double > &pattern)
 
void draw_text (const Cairo::RefPtr< Cairo::Context > &cr, int width, int height)
 

Private Attributes

std::vector< double > dash_pattern
 
double offset = 0
 
Glib::RefPtr< Gtk::SingleSelection > selection
 
Gtk::DrawingArea * drawing_area = nullptr
 
Gtk::Popover * popover = nullptr
 
Glib::RefPtr< Gtk::Adjustment > adjustment
 

Detailed Description

Definition at line 36 of file dash-selector.h.

Constructor & Destructor Documentation

◆ DashSelector()

◆ ~DashSelector()

Inkscape::UI::Widget::DashSelector::~DashSelector ( )
finaldefault

Member Function Documentation

◆ activate()

void Inkscape::UI::Widget::DashSelector::activate ( Gtk::GridView *  grid,
unsigned int  position 
)
private

Definition at line 209 of file dash-selector.cpp.

References changed_signal, dash_pattern, item, popover, and update().

Referenced by DashSelector().

◆ bind_listitem_cb()

void Inkscape::UI::Widget::DashSelector::bind_listitem_cb ( const Glib::RefPtr< Gtk::ListItem > &  list_item)
private

Definition at line 230 of file dash-selector.cpp.

References dash_pattern, draw_pattern(), draw_text(), and drawing_area.

Referenced by DashSelector().

◆ draw_pattern()

void Inkscape::UI::Widget::DashSelector::draw_pattern ( const Cairo::RefPtr< Cairo::Context > &  cr,
int  width,
int  height,
const std::vector< double > &  pattern 
)
private

Definition at line 243 of file dash-selector.cpp.

References Inkscape::UI::Widget::height, and width.

Referenced by bind_listitem_cb(), DashSelector(), and update().

◆ draw_text()

void Inkscape::UI::Widget::DashSelector::draw_text ( const Cairo::RefPtr< Cairo::Context > &  cr,
int  width,
int  height 
)
private

Definition at line 256 of file dash-selector.cpp.

References Inkscape::UI::Widget::height.

Referenced by bind_listitem_cb(), and update().

◆ get_dash_pattern()

const std::vector< double > & Inkscape::UI::Widget::DashSelector::get_dash_pattern ( )
inline

◆ get_offset()

double Inkscape::UI::Widget::DashSelector::get_offset ( )
inline

◆ set_dash_pattern()

void Inkscape::UI::Widget::DashSelector::set_dash_pattern ( const std::vector< double > &  dash,
double  offset 
)

◆ setup_listitem_cb()

void Inkscape::UI::Widget::DashSelector::setup_listitem_cb ( const Glib::RefPtr< Gtk::ListItem > &  list_item)
private

Definition at line 222 of file dash-selector.cpp.

References drawing_area.

Referenced by DashSelector().

◆ update()

void Inkscape::UI::Widget::DashSelector::update ( int  position)
private

Definition at line 194 of file dash-selector.cpp.

References adjustment, dash_pattern, draw_pattern(), draw_text(), drawing_area, and offset.

Referenced by activate(), and set_dash_pattern().

Member Data Documentation

◆ adjustment

Glib::RefPtr<Gtk::Adjustment> Inkscape::UI::Widget::DashSelector::adjustment
private

Definition at line 69 of file dash-selector.h.

Referenced by DashSelector(), and update().

◆ changed_signal

sigc::signal<void ()> Inkscape::UI::Widget::DashSelector::changed_signal

◆ dash_pattern

std::vector<double> Inkscape::UI::Widget::DashSelector::dash_pattern
private

◆ drawing_area

Gtk::DrawingArea* Inkscape::UI::Widget::DashSelector::drawing_area = nullptr
private

Definition at line 67 of file dash-selector.h.

Referenced by bind_listitem_cb(), DashSelector(), setup_listitem_cb(), and update().

◆ offset

double Inkscape::UI::Widget::DashSelector::offset = 0
private

Definition at line 63 of file dash-selector.h.

Referenced by DashSelector(), get_offset(), set_dash_pattern(), and update().

◆ popover

Gtk::Popover* Inkscape::UI::Widget::DashSelector::popover = nullptr
private

Definition at line 68 of file dash-selector.h.

Referenced by activate(), and DashSelector().

◆ selection

Glib::RefPtr<Gtk::SingleSelection> Inkscape::UI::Widget::DashSelector::selection
private

Definition at line 66 of file dash-selector.h.

Referenced by DashSelector(), and set_dash_pattern().


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