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

#include <drop-down-list.h>

Inheritance diagram for Inkscape::UI::Widget::DropDownList:
Inkscape::UI::Widget::ComboBoxEnum< T > Inkscape::UI::Widget::ComboBoxEnum< Inkscape::Filters::FilterPrimitiveType > Inkscape::UI::Widget::ComboBoxEnum< FilterComponentTransferType > Inkscape::UI::Widget::ComboBoxEnum< LightSource > Inkscape::UI::Widget::ComboBoxEnum< SPBlendMode > Inkscape::UI::Widget::ComboBoxEnum< E > Inkscape::UI::Widget::PrefCombo Inkscape::UI::Widget::UnitMenu

Public Member Functions

 DropDownList ()
 
 DropDownList (BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &builder)
 
unsigned int append (const Glib::ustring &item)
 
Glib::ustring get_string (unsigned int position) const
 
unsigned int get_item_count () const
 
void remove_all ()
 
Glib::SignalProxyProperty signal_changed ()
 
void enable_search (bool enable=true)
 
void set_row_separator_func (std::function< bool(unsigned int)> callback)
 

Private Member Functions

void _init ()
 

Private Attributes

Glib::RefPtr< Gtk::StringList > _model = Gtk::StringList::create({})
 
Glib::RefPtr< Gtk::SignalListItemFactory > _factory = Gtk::SignalListItemFactory::create()
 
std::function< bool(unsigned int)> _separator_callback
 

Detailed Description

Definition at line 26 of file drop-down-list.h.

Constructor & Destructor Documentation

◆ DropDownList() [1/2]

Inkscape::UI::Widget::DropDownList::DropDownList ( )

Definition at line 10 of file drop-down-list.cpp.

References _init().

◆ DropDownList() [2/2]

Inkscape::UI::Widget::DropDownList::DropDownList ( BaseObjectType *  cobject,
const Glib::RefPtr< Gtk::Builder > &  builder 
)

Definition at line 14 of file drop-down-list.cpp.

References _init().

Member Function Documentation

◆ _init()

void Inkscape::UI::Widget::DropDownList::_init ( )
private

Definition at line 21 of file drop-down-list.cpp.

References _factory, _model, _separator_callback, item, and label.

Referenced by DropDownList(), and DropDownList().

◆ append()

◆ enable_search()

void Inkscape::UI::Widget::DropDownList::enable_search ( bool  enable = true)

Definition at line 54 of file drop-down-list.cpp.

References _factory, and item.

◆ get_item_count()

unsigned int Inkscape::UI::Widget::DropDownList::get_item_count ( ) const
inline

Definition at line 38 of file drop-down-list.h.

References _model.

Referenced by Inkscape::UI::Widget::UnitMenu::setUnit().

◆ get_string()

Glib::ustring Inkscape::UI::Widget::DropDownList::get_string ( unsigned int  position) const
inline

◆ remove_all()

void Inkscape::UI::Widget::DropDownList::remove_all ( )
inline

Definition at line 40 of file drop-down-list.h.

References _model.

Referenced by Inkscape::UI::Widget::UnitMenu::resetUnitType().

◆ set_row_separator_func()

void Inkscape::UI::Widget::DropDownList::set_row_separator_func ( std::function< bool(unsigned int)>  callback)

◆ signal_changed()

Glib::SignalProxyProperty Inkscape::UI::Widget::DropDownList::signal_changed ( )
inline

Member Data Documentation

◆ _factory

Glib::RefPtr<Gtk::SignalListItemFactory> Inkscape::UI::Widget::DropDownList::_factory = Gtk::SignalListItemFactory::create()
private

Definition at line 55 of file drop-down-list.h.

Referenced by _init(), and enable_search().

◆ _model

Glib::RefPtr<Gtk::StringList> Inkscape::UI::Widget::DropDownList::_model = Gtk::StringList::create({})
private

Definition at line 54 of file drop-down-list.h.

Referenced by _init(), append(), get_item_count(), get_string(), and remove_all().

◆ _separator_callback

std::function<bool (unsigned int)> Inkscape::UI::Widget::DropDownList::_separator_callback
private

Definition at line 56 of file drop-down-list.h.

Referenced by _init(), and set_row_separator_func().


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