Inkscape
Vector Graphics Editor
|
User interface code. More...
Namespaces | |
namespace | Cache |
namespace | Controller |
Utilities to more easily use Gtk::EventController & subclasses like Gesture. | |
namespace | Detail |
namespace | Dialog |
Dialog code. | |
namespace | Preview |
namespace | Syntax |
namespace | Toolbar |
namespace | Tools |
namespace | View |
namespace | Widget |
Custom widgets. | |
Classes | |
class | ClipboardManager |
System-wide clipboard manager. More... | |
class | ColumnMenuBuilder |
class | ControlPoint |
Draggable point, the workhorse of on-canvas editing. More... | |
class | ControlPointSelection |
Group of selected control points. More... | |
class | CurveDragPoint |
An invisible point used to drag curves. More... | |
class | DefocusTarget |
Interface for objects that would like to be informed when another widget loses focus. More... | |
struct | GetShapeIconResult |
A pair containing an icon name & a CSS class to set an RGBA color. More... | |
class | Handle |
class | IconViewItemFactory |
struct | ListNode |
class | Manipulator |
Tool component that processes events and does something in response to them. More... | |
class | ModifierTracker |
class | MultiPathManipulator |
Manipulator that manages multiple path manipulators active at the same time. More... | |
class | NewFromTemplate |
class | Node |
class | NodeIterator |
Iterator for editable nodes. More... | |
class | NodeList |
struct | NodeSharedData |
class | PathManipulator |
Manipulator that edits a single path using nodes with handles. More... | |
struct | PathSharedData |
class | PointManipulator |
Tool component that edits something on the canvas using selectable control points. More... | |
struct | PopupMenuClick |
Information from a GestureClick if a popup menu was opened by click. More... | |
class | QueryFileInfo |
class | SelectableControlPoint |
Desktop-bound selectable control object. More... | |
class | ShapeEditor |
struct | ShapeRecord |
class | SimplePrefPusher |
A simple mediator class that sets the state of a Gtk::ToggleButton when a preference is changed. More... | |
class | SubpathList |
List of node lists. More... | |
class | TextMatchingFilter |
class | ThemeContext |
class | TransformHandle |
Base class for node transform handles to simplify implementation. More... | |
class | TransformHandleSet |
Typedefs | |
using | BoxChildren = std::unordered_map< Gtk::Widget *, sigc::scoped_connection > |
using | PopupMenuOptionalClick = std::optional< PopupMenuClick > |
Optional: not present if popup wasnʼt triggered by click. | |
using | PopupMenuSlot = sigc::slot< bool(PopupMenuOptionalClick)> |
Return whether a popup was activated. | |
Functions | |
Glib::RefPtr< Gtk::Builder > | create_builder (const char *filename) |
bool | hide_widget (const Glib::RefPtr< Gtk::Builder > &builder, std::string const &id) |
template<class W > | |
W & | get_widget (const Glib::RefPtr< Gtk::Builder > &builder, const char *id) |
template<class W , typename... Args> | |
W & | get_derived_widget (const Glib::RefPtr< Gtk::Builder > &builder, const char *id, Args &&... args) |
template<class Ob > | |
Glib::RefPtr< Ob > | get_object (Glib::RefPtr< Gtk::Builder > const &builder, char const *id) |
template<class Ob > | |
Ob & | get_object_raw (Glib::RefPtr< Gtk::Builder > &builder, const char *id) |
This version of get_object is needed for Gtk::CellRenderer objects which can not be put into Glib::RefPtr by the compiler, but are somehow passed to us as RefPtrs anyway. | |
void | containerize (Gtk::Widget &widget) |
Make a custom widget implement sensible memory management for its children. | |
int | dialog_run (Gtk::Dialog &dialog) |
This is a GTK4 porting aid meant to replace the removal of the Gtk::Dialog synchronous API. | |
void | dialog_show_modal_and_selfdestruct (std::unique_ptr< Gtk::Dialog > dialog, Gtk::Root *root=nullptr) |
Show a dialog modally, destroying it when the user dismisses it. | |
static Glib::ustring const & | get_color_class (std::uint32_t const rgba_color, Glib::RefPtr< Gdk::Display > const &display) |
GetShapeIconResult | get_shape_icon (Glib::ustring const &shape_type, std::uint32_t const rgba_color) |
Get the shape icon for this named shape type. | |
Gtk::Image * | get_shape_image (Glib::ustring const &shape_type, std::uint32_t const rgba_color, Gtk::IconSize const icon_size) |
As get_shape_icon(), but returns a ready-made, managed Image having that icon name & CSS class. | |
template<typename T , typename F > | |
void | foreach (GPtrArray *arr, F &&f) |
template<typename F > | |
void | foreach (char **strs, F &&f) |
template<typename F > | |
void | list_language_names_and_codes (SpellingProvider *provider, F &&cb) |
auto | list_corrections_c (SpellingChecker *checker, char const *word) |
auto | list_corrections (SpellingChecker *checker, char const *word) |
auto | spelling_text_buffer_adapter_create (GtkSourceBuffer *buffer, SpellingChecker *checker) |
auto | get_menu_model (SpellingTextBufferAdapter &adapter) |
auto | as_action_group (SpellingTextBufferAdapter &adapter) |
void | set_enabled (SpellingTextBufferAdapter &adapter, bool enabled) |
Gdk::Rectangle | get_monitor_geometry_primary () |
get monitor geometry of primary monitor | |
Gdk::Rectangle | get_monitor_geometry_at_surface (Glib::RefPtr< Gdk::Surface > const &surface) |
get monitor geometry of monitor containing largest part of surface | |
Gdk::Rectangle | get_monitor_geometry_at_point (int x, int y) |
get monitor geometry of monitor at (or closest to) point on combined screen area | |
static void | set_expand (Gtk::Widget &widget, Gtk::Orientation const orientation, bool const expand) |
static void | set_align (Gtk::Widget &widget, Gtk::Orientation const orientation, Gtk::Align const align) |
static auto | to_align (PackType const pack_type) |
static void | set_fill (Gtk::Widget &widget, Gtk::Orientation const orientation, bool const fill, PackType const pack_type) |
static void | set_padding (Gtk::Widget &widget, Gtk::Orientation const orientation, int const margin_start, int const margin_end) |
static void | add (Gtk::Box &box, PackType const pack_type, Gtk::Widget &child) |
static void | pack (PackType const pack_type, Gtk::Box &box, Gtk::Widget &child, bool const expand, bool const fill, unsigned const padding) |
static void | pack (PackType const pack_type, Gtk::Box &box, Gtk::Widget &child, PackOptions const options, unsigned const padding) |
void | pack_start (Gtk::Box &box, Gtk::Widget &child, bool expand, bool fill, unsigned padding=0) |
Adds child to box, packed with reference to the start of box. | |
void | pack_start (Gtk::Box &box, Gtk::Widget &child, PackOptions options=PackOptions::expand_widget, unsigned padding=0) |
Adds child to box, packed with reference to the start of box. | |
void | pack_end (Gtk::Box &box, Gtk::Widget &child, bool expand, bool fill, unsigned padding=0) |
Adds child to box, packed with reference to the end of box. | |
void | pack_end (Gtk::Box &box, Gtk::Widget &child, PackOptions options=PackOptions::expand_widget, unsigned padding=0) |
Adds child to box, packed with reference to the end of box. | |
static bool | on_key_pressed (unsigned const keyval, unsigned, Gdk::ModifierType state, PopupMenuSlot const &slot) |
static void | on_click_pressed (int n_press, double x, double y, Gtk::GestureClick &click, PopupMenuSlot const &slot) |
void | on_popup_menu (Gtk::Widget &widget, PopupMenuSlot slot) |
Connect slot to a widgetʼs key and button events that traditionally trigger a popup menu, i.e.: | |
static void | popup_at (Gtk::Popover &popover, Gtk::Widget &widget, double const x_offset, double const y_offset, int width, int height) |
void | popup_at (Gtk::Popover &popover, Gtk::Widget &widget, double x_offset=0.0, double y_offset=0.0) |
Replace Gtk::Menu::popup_at_pointer. | |
void | popup_at (Gtk::Popover &popover, Gtk::Widget &widget, std::optional< Geom::Point > const &offset) |
void | popup_at_center (Gtk::Popover &popover, Gtk::Widget &widget) |
As popup_at() but point to center of widget. | |
void | popup_at (Gtk::Popover &popover, Gtk::Widget &widget, Gdk::Rectangle const &rect) |
As popup_at() but point to center of rect rect must be valid within the coords of @widget, & @awidget must be a descendant of @parent. | |
std::unique_ptr< KnotHolder > | create_knot_holder (SPItem *item, SPDesktop *desktop, double edit_rotation, int edit_marker_mode) |
std::unique_ptr< KnotHolder > | create_LPE_knot_holder (SPItem *item, SPDesktop *desktop) |
std::string | sp_tweak_background_colors (std::string cssstring, double crossfade, double contrast, bool dark) |
static void | show_parsing_error (const Glib::RefPtr< const Gtk::CssSection > §ion, const Glib::Error &error) |
std::ostream & | operator<< (std::ostream &out, NodeType type) |
static Geom::Point | direction (Geom::Point const &first, Geom::Point const &second) |
Computes an unit vector of the direction from first to second control point. | |
static double | snap_increment_degrees () |
void | build_segment (Geom::PathBuilder &, Node *, Node *) |
static void | add_or_replace_if_extremum (std::vector< std::pair< NodeList::iterator, double > > &vec, double &extrvalue, double testvalue, NodeList::iterator const &node, double t) |
double | get_angle (const Geom::Point &p0, const Geom::Point &p1, const Geom::Point &p2) |
void | set_icon_sizes (Gtk::Widget *parent, int pixel_size) |
Recursively set all the icon sizes inside this parent widget. | |
void | set_icon_sizes (GtkWidget *parent, int pixel_size) |
void | gui_warning (const std::string &msg, Gtk::Window *parent_window) |
void | system_open (const Glib::ustring &path) |
Opens the given path with platform-specific tools. | |
std::vector< Gtk::Widget * > | get_children (Gtk::Widget &widget) |
Get a vector of the widgetʼs children, from get_first_child() through each get_next_sibling(). | |
Gtk::Widget & | get_nth_child (Gtk::Widget &widget, std::size_t index) |
Get the widgetʼs child at the given position. Throws std::out_of_range if the index is invalid. | |
Gtk::Widget * | find_widget_by_name (Gtk::Widget &parent, Glib::ustring const &name, bool visible_only) |
Returns a named descendent of parent, which has the given name, or nullptr if there's none. | |
Gtk::Widget * | find_focusable_widget (Gtk::Widget &parent) |
This function traverses a tree of widgets searching for first focusable widget. | |
bool | is_descendant_of (Gtk::Widget const &descendant, Gtk::Widget const &ancestor) |
Returns if widget is a descendant of given ancestor, i.e.: itself, a child, or a childʼs child. | |
bool | contains_focus (Gtk::Widget &widget) |
Returns if widget or one of its descendants has focus. | |
int | get_font_size (Gtk::Widget &widget) |
Get the relative font size as determined by a widgetʼs style/Pango contexts. | |
void | ellipsize (Gtk::Label &label, int const max_width_chars, Pango::EllipsizeMode const mode) |
template<typename Widget > | |
void | remove_all_children (Widget &widget) |
For each child in get_children(widget), call widget.remove(*child). May not cause delete child! | |
template<typename Func > | |
Gtk::Widget * | for_each_child (Gtk::Widget &widget, Func &&func, bool const plus_self=false, bool const recurse=false, int const level=0) |
Call Func with a reference to each child of parent, until it returns _break. | |
template<typename Func > | |
Gtk::Widget * | for_each_descendant (Gtk::Widget &widget, Func &&func) |
Like for_each_child() but also tests the initial widget & recurses through childrenʼs children. | |
template<typename Func > | |
Gtk::Widget * | for_each_parent (Gtk::Widget &widget, Func &&func) |
Call Func with a reference to successive parents, until Func returns _break. | |
template<typename Func > | |
Gtk::Widget * | for_each_page (Gtk::Notebook ¬ebook, Func &&func) |
Similar to for_each_child, but only iterates over pages in a notebook. | |
Variables | |
static std::unordered_set< QueryFileInfo * > | pending_operations |
static auto | s_box_children = std::unordered_map<Gtk::Box *, BoxChildren>{} |
static constexpr auto | grab_event_mask |
Events which should be captured when a handle is being dragged. | |
const double | BSPLINE_TOL = 0.001 |
const double | NO_POWER = 0.0 |
const double | DEFAULT_START_POWER = 1.0 / 3.0 |
User interface code.
This namespace contains everything related to the user interface of Inkscape.
using Inkscape::UI::BoxChildren = typedef std::unordered_map<Gtk::Widget *, sigc::scoped_connection> |
using Inkscape::UI::PopupMenuOptionalClick = typedef std::optional<PopupMenuClick> |
Optional: not present if popup wasnʼt triggered by click.
Definition at line 41 of file popup-menu.h.
using Inkscape::UI::PopupMenuSlot = typedef sigc::slot<bool (PopupMenuOptionalClick)> |
Return whether a popup was activated.
Click param is nullopt if popup wasnʼt triggered by a click.
Definition at line 45 of file popup-menu.h.
|
strong |
Enumerator | |
---|---|
LAST_NODE | |
FIRST_NODE | |
MID_NODE | |
MIN_NODE | |
MAX_NODE |
Definition at line 35 of file node-types.h.
This is used to provide sensible messages on the undo stack.
Definition at line 19 of file commit-events.h.
|
strong |
|
strong |
Enumerator | |
---|---|
automatic | |
inverse_auto | |
curve_fit | |
line_segment | |
gap_nodes | |
gap_lines |
Definition at line 51 of file path-manipulator.h.
Types of nodes supported in the node tool.
Definition at line 20 of file node-types.h.
|
strong |
|
strong |
Types of segments supported in the node tool.
Enumerator | |
---|---|
SEGMENT_STRAIGHT | Straight linear segment. |
SEGMENT_CUBIC_BEZIER | Bezier curve with two control points. |
Definition at line 30 of file node-types.h.
Role of the shape in the drawing - affects outline display and color.
Enumerator | |
---|---|
SHAPE_ROLE_NORMAL | |
SHAPE_ROLE_CLIPPING_PATH | |
SHAPE_ROLE_MASK | |
SHAPE_ROLE_LPE_PARAM |
Definition at line 26 of file shape-record.h.
|
static |
Definition at line 94 of file pack.cpp.
References add(), child, get_nth_child(), s_box_children, and start.
|
static |
Definition at line 297 of file path-manipulator.cpp.
References Geom::are_near(), and node.
Referenced by Inkscape::UI::PathManipulator::insertNodeAtExtremum().
|
inline |
Definition at line 92 of file libspelling-wrapper.h.
Referenced by Inkscape::UI::Dialog::TextEdit::TextEdit().
|
related |
|
inline |
Make a custom widget implement sensible memory management for its children.
This frees the implementer of a custom widget from having to manually unparent() children added with set_parent() both in the destructor and on signal_destroy(), a memory management detail from C that has no business leaking into C++.
Upon destruction, or for managed widgets just before, all children are unparented. Managed children are also deleted if they have no other references.
This function is typically called in the constructor of a custom widget that derives from an intrinsically childless Gtk widget, e.g. Gtk::Widget, Gtk::DrawingArea.
It must not be used with any intrinsically child-containing Gtk widget, e.g. Gtk::Box, Gtk::SpinButton.
Definition at line 25 of file containerize.h.
References c.
Referenced by Inkscape::UI::Widget::Bin::_construct(), Inkscape::UI::Dialog::ColorItem::common_setup(), Inkscape::UI::Widget::InkSpinButton::construct(), Inkscape::UI::Widget::PopoverBin::PopoverBin(), Inkscape::UI::Widget::Ruler::Ruler(), Inkscape::UI::Widget::Stack::Stack(), Inkscape::UI::Widget::TabStrip::TabStrip(), and Inkscape::UI::Widget::TabsWidget::TabsWidget().
bool Inkscape::UI::contains_focus | ( | Gtk::Widget & | widget | ) |
Returns if widget or one of its descendants has focus.
widget | The widget of interest. |
Definition at line 219 of file util.cpp.
References root.
Referenced by Inkscape::UI::Widget::StrokeStyle::update_dash_entry().
Glib::RefPtr< Gtk::Builder > Inkscape::UI::create_builder | ( | const char * | filename | ) |
Definition at line 36 of file builder-utils.cpp.
References builder, create_builder(), Inkscape::IO::Resource::get_filename(), and Inkscape::IO::Resource::UIS.
Referenced by Inkscape::UI::Dialog::AlignAndDistribute::AlignAndDistribute(), Inkscape::UI::Dialog::CommandPalette::append_recent_file_operation(), Inkscape::UI::Toolbar::ArcToolbar::ArcToolbar(), Inkscape::UI::Dialog::AttrDialog::AttrDialog(), Inkscape::UI::Toolbar::BooleansToolbar::BooleansToolbar(), Inkscape::UI::Toolbar::Box3DToolbar::Box3DToolbar(), Inkscape::UI::Toolbar::CalligraphyToolbar::CalligraphyToolbar(), Inkscape::UI::Widget::CanvasGrid::CanvasGrid(), Inkscape::UI::Widget::ColorPage::ColorPage(), Inkscape::UI::Widget::ColorPalette::ColorPalette(), Inkscape::UI::Dialog::CommandPalette::CommandPalette(), Inkscape::UI::Toolbar::CommandToolbar::CommandToolbar(), Inkscape::UI::Widget::CompletionPopup::CompletionPopup(), Inkscape::UI::Toolbar::ConnectorToolbar::ConnectorToolbar(), Inkscape::Application::crash_handler(), Inkscape::UI::Widget::CanvasNotice::create(), create_builder(), Inkscape::UI::Dialog::DocumentResources::DocumentResources(), Inkscape::UI::Toolbar::DropperToolbar::DropperToolbar(), Inkscape::UI::Dialog::LivePathEffectEditor::effect_list_reload(), Inkscape::UI::Toolbar::EraserToolbar::EraserToolbar(), Inkscape::UI::Dialog::Export::Export(), Inkscape::UI::Dialog::ExtensionsGallery::ExtensionsGallery(), Inkscape::UI::Dialog::FilterEffectsDialog::FilterEffectsDialog(), Inkscape::UI::Dialog::FontCollectionsManager::FontCollectionsManager(), Inkscape::UI::Widget::FontList::FontList(), Inkscape::UI::Dialog::CommandPalette::generate_action_operation(), Inkscape::UI::Widget::TemplateList::generate_category(), Inkscape::UI::Widget::GradientEditor::GradientEditor(), Inkscape::UI::Toolbar::GradientToolbar::GradientToolbar(), Inkscape::UI::Widget::ImageProperties::ImageProperties(), Inkscape::UI::Dialog::ExtensionList::init(), Inkscape::UI::Dialog::LivePathEffectEditor::LivePathEffectEditor(), Inkscape::UI::Toolbar::LPEToolbar::LPEToolbar(), Inkscape::UI::Widget::MarkerComboBox::MarkerComboBox(), Inkscape::UI::Toolbar::MarkerToolbar::MarkerToolbar(), Inkscape::UI::Toolbar::MeasureToolbar::MeasureToolbar(), Inkscape::UI::Dialog::MeasureToolSettingsDialog::MeasureToolSettingsDialog(), Inkscape::UI::Toolbar::MeshToolbar::MeshToolbar(), Inkscape::UI::Toolbar::NodeToolbar::NodeToolbar(), Inkscape::UI::Dialog::ObjectAttributes::ObjectAttributes(), Inkscape::UI::Toolbar::ObjectPickerToolbar::ObjectPickerToolbar(), Inkscape::UI::Dialog::ObjectsPanel::ObjectsPanel(), Inkscape::UI::Toolbar::PageToolbar::PageToolbar(), Inkscape::UI::Toolbar::PaintbucketToolbar::PaintbucketToolbar(), Inkscape::UI::Widget::PatternEditor::PatternEditor(), Inkscape::Extension::Internal::PdfImportDialog::PdfImportDialog(), Inkscape::UI::Toolbar::PencilToolbar::PencilToolbar(), Inkscape::UI::Dialog::StyleDialog::readStyleElement(), Inkscape::UI::Toolbar::RectToolbar::RectToolbar(), Inkscape::UI::Toolbar::SelectToolbar::SelectToolbar(), Inkscape::UI::Dialog::show_about(), InkviewWindow::show_control(), Inkscape::UI::Dialog::StartScreen::show_welcome(), Inkscape::UI::Toolbar::SnapToolbar::SnapToolbar(), Inkscape::UI::Dialog::SpellCheck::SpellCheck(), Inkscape::UI::Toolbar::SpiralToolbar::SpiralToolbar(), Inkscape::UI::Toolbar::SprayToolbar::SprayToolbar(), Inkscape::UI::Toolbar::StarToolbar::StarToolbar(), Inkscape::UI::Dialog::StartScreen::StartScreen(), Inkscape::UI::Widget::StatusBar::StatusBar(), Inkscape::UI::Dialog::SwatchesPanel::SwatchesPanel(), Inkscape::UI::Dialog::TextEdit::TextEdit(), Inkscape::UI::Toolbar::TextToolbar::TextToolbar(), Inkscape::UI::Toolbar::ToolToolbar::ToolToolbar(), Inkscape::UI::Toolbar::TweakToolbar::TweakToolbar(), Inkscape::UI::Dialog::XmlTree::XmlTree(), and Inkscape::UI::Toolbar::ZoomToolbar::ZoomToolbar().
std::unique_ptr< KnotHolder > Inkscape::UI::create_knot_holder | ( | SPItem * | item, |
SPDesktop * | desktop, | ||
double | edit_rotation, | ||
int | edit_marker_mode | ||
) |
Definition at line 118 of file shape-editor-knotholders.cpp.
References desktop, SPStyle::fill, SPStyle::getFillPaintServer(), SPStyle::getStrokePaintServer(), item, SPStyle::stroke, and SPObject::style.
Referenced by Inkscape::UI::ShapeEditor::set_item().
std::unique_ptr< KnotHolder > Inkscape::UI::create_LPE_knot_holder | ( | SPItem * | item, |
SPDesktop * | desktop | ||
) |
Definition at line 163 of file shape-editor-knotholders.cpp.
Referenced by Inkscape::UI::ShapeEditor::set_item().
int Inkscape::UI::dialog_run | ( | Gtk::Dialog & | dialog | ) |
This is a GTK4 porting aid meant to replace the removal of the Gtk::Dialog synchronous API.
It is intended as a temporary measure, although experience suggests it will be anything but.
Todo: Attempt to port code that uses this function to the asynchronous API.
Definition at line 13 of file dialog-run.cpp.
References result.
Referenced by Inkscape::UI::Dialog::SelectorsDialog::_addSelector(), gui_request_dpi_fix_method(), gui_warning(), Inkscape::UI::NewFromTemplate::load_new_from_template(), InkscapeApplication::on_activate(), InkviewApplication::on_activate(), Inkscape::UI::Dialog::BatchExport::onExport(), Inkscape::UI::Dialog::InkscapePreferences::onKBTreeEdited(), Inkscape::Extension::Extension::prefs(), run_dialog(), Inkscape::UI::Dialog::SaveTemplate::save_document_as_template(), Inkscape::UI::Dialog::CalligraphicProfileRename::show(), Inkscape::Extension::Internal::PdfImportDialog::showDialog(), Inkscape::Extension::Internal::RvngImportDialog::showDialog(), SPDesktopWidget::showInfoDialog(), Inkscape::Extension::Implementation::Script::showPopupError(), sp_ui_error_dialog(), sp_ui_overwrite_file(), and SPDesktopWidget::warnDialog().
void Inkscape::UI::dialog_show_modal_and_selfdestruct | ( | std::unique_ptr< Gtk::Dialog > | dialog, |
Gtk::Root * | root = nullptr |
||
) |
Show a dialog modally, destroying it when the user dismisses it.
If toplevel is not null, the dialog is shown as a transient for toplevel.
Definition at line 41 of file dialog-run.cpp.
References root.
Referenced by Inkscape::UI::Widget::FontCollectionSelector::deletion_warning_message_dialog(), image_edit(), Inkscape::UI::Dialog::InkscapePreferences::initPageUI(), and Inkscape::UI::Toolbar::MeshToolbar::warning_popup().
|
staticprivate |
Computes an unit vector of the direction from first to second control point.
Definition at line 164 of file node.cpp.
References Geom::unit_vector().
Referenced by Inkscape::UI::Toolbar::TextToolbar::align_mode_changed(), Inkscape::UI::Widget::GradientWithStops::focus(), Inkscape::UI::Widget::ColorWheelHSL::focus(), Inkscape::UI::Handle::move(), Inkscape::UI::Dialog::AlignAndDistribute::on_align_node_clicked(), Inkscape::UI::Node::setType(), and Inkscape::UI::Toolbar::text_align_to_side().
void Inkscape::UI::ellipsize | ( | Gtk::Label & | label, |
int const | max_width_chars, | ||
Pango::EllipsizeMode const | mode | ||
) |
Definition at line 251 of file util.cpp.
Referenced by Inkscape::UI::Dialog::make_selector_item().
Gtk::Widget * Inkscape::UI::find_focusable_widget | ( | Gtk::Widget & | parent | ) |
This function traverses a tree of widgets searching for first focusable widget.
[in] | parent | The widget to start traversal from - top of the tree |
Definition at line 200 of file util.cpp.
References _break, _continue, for_each_descendant(), and parent.
Referenced by Inkscape::UI::Dialog::DialogBase::focus_dialog().
Gtk::Widget * Inkscape::UI::find_widget_by_name | ( | Gtk::Widget & | parent, |
Glib::ustring const & | name, | ||
bool | visible_only | ||
) |
Returns a named descendent of parent, which has the given name, or nullptr if there's none.
[in] | parent | The widget to search |
[in] | name | The name of the desired child widget |
Definition at line 184 of file util.cpp.
References _break, _continue, _skip, for_each_descendant(), name, and parent.
Referenced by SPDesktopWidget::get_toolbar_by_name(), SPDesktopWidget::isToolboxButtonActive(), SPDesktopWidget::setToolboxAdjustmentValue(), and SPDesktopWidget::setToolboxFocusTo().
Gtk::Widget * Inkscape::UI::for_each_child | ( | Gtk::Widget & | widget, |
Func && | func, | ||
bool const | plus_self = false , |
||
bool const | recurse = false , |
||
int const | level = 0 |
||
) |
Call Func with a reference to each child of parent, until it returns _break.
Accessing children changes between GTK3 & GTK4, so best consolidate it here.
widget | The initial widget at the top of the hierarchy, to start at |
func | The widget-testing predicate, returning whether to continue |
plus_self | Whether to call the predicate func on the initial widget |
recurse | Whether to recurse also calling func for nested children |
Definition at line 103 of file util.h.
References _break, _skip, child, for_each_child(), and get_children().
Referenced by Inkscape::UI::Dialog::DialogNotebook::add_page(), Inkscape::UI::Toolbar::TextToolbar::configure_mode_buttons(), Inkscape::UI::Toolbar::EraserToolbar::EraserToolbar(), find_label(), for_each_child(), for_each_descendant(), Inkscape::UI::Toolbar::GradientToolbar::GradientToolbar(), SPDesktopWidget::layoutWidgets(), Inkscape::UI::Toolbar::LPEToolbar::LPEToolbar(), Inkscape::UI::Toolbar::MeshToolbar::MeshToolbar(), Inkscape::UI::Toolbar::PencilToolbar::PencilToolbar(), Inkscape::UI::Dialog::SingleExport::selectPage(), Inkscape::UI::Widget::MarkerComboBox::set_active(), Inkscape::UI::Widget::PatternEditor::set_active(), Inkscape::UI::Widget::ColorPalette::set_colors(), set_tooltips_and_shift_icons(), Inkscape::UI::Dialog::SingleExport::setPagesMode(), Inkscape::UI::Toolbar::SprayToolbar::SprayToolbar(), and Inkscape::UI::Toolbar::TweakToolbar::TweakToolbar().
Gtk::Widget * Inkscape::UI::for_each_descendant | ( | Gtk::Widget & | widget, |
Func && | func | ||
) |
Like for_each_child() but also tests the initial widget & recurses through childrenʼs children.
widget | The initial widget at the top of the hierarchy, to start at |
func | The widget-testing predicate, returning whether to continue |
Definition at line 132 of file util.h.
References for_each_child().
Referenced by find_focusable_widget(), find_widget_by_name(), set_icon_sizes(), Inkscape::UI::Toolbar::ToolToolbar::set_visible_buttons(), and show_all_images().
Gtk::Widget * Inkscape::UI::for_each_page | ( | Gtk::Notebook & | notebook, |
Func && | func | ||
) |
Similar to for_each_child, but only iterates over pages in a notebook.
Definition at line 152 of file util.h.
Referenced by Inkscape::UI::Dialog::get_notebook_dialogs(), and Inkscape::UI::Dialog::DialogNotebook::on_size_allocate_scroll().
Gtk::Widget * Inkscape::UI::for_each_parent | ( | Gtk::Widget & | widget, |
Func && | func | ||
) |
Call Func with a reference to successive parents, until Func returns _break.
Definition at line 139 of file util.h.
References _break, and parent.
Referenced by Inkscape::UI::Widget::PopoverMenuItem::get_menu(), Inkscape::UI::Widget::get_scrollable_ancestor(), and is_descendant_of().
void Inkscape::UI::foreach | ( | char ** | strs, |
F && | f | ||
) |
Definition at line 31 of file libspelling-wrapper.h.
void Inkscape::UI::foreach | ( | GPtrArray * | arr, |
F && | f | ||
) |
Definition at line 21 of file libspelling-wrapper.h.
References data.
double Inkscape::UI::get_angle | ( | const Geom::Point & | p0, |
const Geom::Point & | p1, | ||
const Geom::Point & | p2 | ||
) |
Definition at line 687 of file path-manipulator.cpp.
Referenced by Inkscape::UI::PathManipulator::_deleteStretch().
std::vector< Gtk::Widget * > Inkscape::UI::get_children | ( | Gtk::Widget & | widget | ) |
Get a vector of the widgetʼs children, from get_first_child() through each get_next_sibling().
Definition at line 156 of file util.cpp.
References child.
Referenced by Inkscape::UI::Widget::ColorNotebook::_addPageForSpace(), Inkscape::Shortcuts::_dump_all_recursive(), Inkscape::UI::Toolbar::ToolbarWidget::_initMenuBtns(), Inkscape::UI::Widget::ColorNotebook::_setCurrentPage(), Inkscape::UI::Widget::PopoverMenu::activate(), Inkscape::UI::Dialog::align(), Inkscape::LivePathEffect::align_widgets(), Inkscape::UI::Dialog::StartScreen::banner_switch(), Inkscape::UI::Widget::FontVariations::build_ui(), Inkscape::UI::Dialog::can_collapse(), Inkscape::UI::Dialog::LivePathEffectEditor::effect_list_reload(), for_each_child(), Inkscape::UI::Dialog::get_children_or_mnemonic_labels(), Inkscape::UI::Dialog::CommandPalette::get_full_action_name(), Inkscape::UI::Widget::TemplateList::get_iconview(), Inkscape::UI::Dialog::CommandPalette::get_name_desc(), Inkscape::UI::Dialog::DialogNotebook::get_scrolledwindow(), Inkscape::UI::Widget::ColorNotebook::getPageIndex(), InkscapeWindow::InkscapeWindow(), Inkscape::LivePathEffect::LPEPerspectiveEnvelope::newWidget(), Inkscape::UI::Dialog::CommandPalette::operate_recent_file(), Inkscape::Extension::PrefDialog::PrefDialog(), Inkscape::UI::Dialog::StyleDialog::readStyleElement(), Inkscape::LivePathEffect::ToggleButtonParam::refresh_button(), Inkscape::UI::Dialog::SingleExport::refreshPreview(), remove_all_children(), SPDesktopWidget::repack_snaptoolbar(), Inkscape::UI::Dialog::CloneTiler::reset_recursive(), Inkscape::UI::Widget::TemplateList::reset_selection(), run_dialog(), Inkscape::UI::Dialog::LivePathEffectEditor::selection_info(), Inkscape::UI::Toolbar::SelectToolbar::SelectToolbar(), Inkscape::UI::Toolbar::EraserToolbar::set_eraser_mode_visibility(), Inkscape::UI::Widget::ColorPalette::set_filter(), Inkscape::UI::Dialog::CommandPalette::set_mode(), Inkscape::UI::Widget::ColorPalette::set_up_scrolling(), Inkscape::UI::Dialog::LivePathEffectEditor::showParams(), Inkscape::UI::Dialog::FilterEffectsDialog::update_filter_general_settings_view(), Inkscape::Shortcuts::update_gui_text_recursive(), and Inkscape::UI::Dialog::FilterEffectsDialog::update_settings_view().
|
static |
W & Inkscape::UI::get_derived_widget | ( | const Glib::RefPtr< Gtk::Builder > & | builder, |
const char * | id, | ||
Args &&... | args | ||
) |
Definition at line 42 of file builder-utils.h.
References builder, and Inkscape::UI::Detail::throw_missing().
int Inkscape::UI::get_font_size | ( | Gtk::Widget & | widget | ) |
Get the relative font size as determined by a widgetʼs style/Pango contexts.
Definition at line 239 of file util.cpp.
Referenced by Inkscape::UI::Widget::Ruler::css_changed().
|
inline |
Definition at line 87 of file libspelling-wrapper.h.
Referenced by Inkscape::UI::Dialog::TextEdit::TextEdit().
Gdk::Rectangle Inkscape::UI::get_monitor_geometry_at_point | ( | int | x, |
int | y | ||
) |
get monitor geometry of monitor at (or closest to) point on combined screen area
Definition at line 82 of file monitor.cpp.
References Geom::distance(), and monitor.
Referenced by sp_namedview_window_from_document().
Gdk::Rectangle Inkscape::UI::get_monitor_geometry_at_surface | ( | Glib::RefPtr< Gdk::Surface > const & | surface | ) |
get monitor geometry of monitor containing largest part of surface
Definition at line 71 of file monitor.cpp.
References monitor, and surface.
Referenced by sp_namedview_window_from_document().
Gdk::Rectangle Inkscape::UI::get_monitor_geometry_primary | ( | ) |
get monitor geometry of primary monitor
Definition at line 61 of file monitor.cpp.
References monitor.
Referenced by add_actions_view_mode(), SPDesktopWidget::layoutWidgets(), and InkviewWindow::show_document().
Gtk::Widget & Inkscape::UI::get_nth_child | ( | Gtk::Widget & | widget, |
std::size_t const | index | ||
) |
Glib::RefPtr< Ob > Inkscape::UI::get_object | ( | Glib::RefPtr< Gtk::Builder > const & | builder, |
char const * | id | ||
) |
Definition at line 50 of file builder-utils.h.
References builder, and Inkscape::UI::Detail::throw_missing().
Ob & Inkscape::UI::get_object_raw | ( | Glib::RefPtr< Gtk::Builder > & | builder, |
const char * | id | ||
) |
This version of get_object is needed for Gtk::CellRenderer objects which can not be put into Glib::RefPtr by the compiler, but are somehow passed to us as RefPtrs anyway.
Definition at line 65 of file builder-utils.h.
References builder, and Inkscape::UI::Detail::throw_missing().
GetShapeIconResult Inkscape::UI::get_shape_icon | ( | Glib::ustring const & | shape_type, |
std::uint32_t const | rgba_color | ||
) |
Get the shape icon for this named shape type.
For example 'rect'. These icons are always symbolic icons no matter the theme in order to be coloured by the highlight color.
This function returns a struct containing the icon name you should use in a GtkImage/GtkCellRenderer, & a CSS class that will apply the requested color.
shape_type | - A string id for the shape from SPItem->typeName() |
rgba_color | - The fg color of the shape icon, in 32-bit unsigned int RGBA format. |
Definition at line 92 of file icon-loader.cpp.
References get_color_class().
Referenced by get_shape_image(), and Inkscape::UI::Widget::CellRendererItemIcon::set_icon_name().
Gtk::Image * Inkscape::UI::get_shape_image | ( | Glib::ustring const & | shape_type, |
std::uint32_t const | rgba_color, | ||
Gtk::IconSize const | icon_size | ||
) |
As get_shape_icon(), but returns a ready-made, managed Image having that icon name & CSS class.
Definition at line 109 of file icon-loader.cpp.
References get_shape_icon(), and image.
Referenced by Inkscape::UI::Dialog::LivePathEffectEditor::selection_info().
W & Inkscape::UI::get_widget | ( | const Glib::RefPtr< Gtk::Builder > & | builder, |
const char * | id | ||
) |
Definition at line 33 of file builder-utils.h.
References builder, get_widget(), and Inkscape::UI::Detail::throw_missing().
Referenced by Inkscape::UI::Dialog::AlignAndDistribute::AlignAndDistribute(), Inkscape::UI::Toolbar::ArcToolbar::ArcToolbar(), Inkscape::UI::Dialog::AttrDialog::AttrDialog(), Inkscape::UI::Dialog::BatchExport::BatchExport(), Inkscape::UI::Toolbar::BooleansToolbar::BooleansToolbar(), Inkscape::UI::Toolbar::Box3DToolbar::Box3DToolbar(), Inkscape::UI::Toolbar::CalligraphyToolbar::CalligraphyToolbar(), Inkscape::UI::Widget::CanvasNotice::CanvasNotice(), Inkscape::UI::Widget::ColorPage::ColorPage(), Inkscape::UI::Widget::ColorPalette::ColorPalette(), Inkscape::UI::Dialog::CommandPalette::CommandPalette(), Inkscape::UI::Toolbar::CommandToolbar::CommandToolbar(), Inkscape::UI::Widget::CompletionPopup::CompletionPopup(), Inkscape::UI::Toolbar::ConnectorToolbar::ConnectorToolbar(), Inkscape::UI::Dialog::DocumentResources::DocumentResources(), Inkscape::UI::Toolbar::DropperToolbar::DropperToolbar(), Inkscape::UI::Toolbar::EraserToolbar::EraserToolbar(), Inkscape::UI::Dialog::Export::Export(), Inkscape::UI::Dialog::ExtensionsGallery::ExtensionsGallery(), Inkscape::UI::Dialog::FilterEffectsDialog::FilterEffectsDialog(), Inkscape::UI::Dialog::FilterEffectsDialog::FilterModifier::FilterModifier(), Inkscape::UI::Dialog::FontCollectionsManager::FontCollectionsManager(), Inkscape::UI::Widget::FontList::FontList(), get_widget(), Inkscape::UI::Widget::GradientEditor::GradientEditor(), Inkscape::UI::Toolbar::GradientToolbar::GradientToolbar(), Inkscape::UI::Widget::ImageProperties::ImageProperties(), Inkscape::UI::Dialog::LivePathEffectEditor::LivePathEffectEditor(), Inkscape::UI::Toolbar::LPEToolbar::LPEToolbar(), Inkscape::UI::Widget::MarkerComboBox::MarkerComboBox(), Inkscape::UI::Toolbar::MarkerToolbar::MarkerToolbar(), Inkscape::UI::Toolbar::MeasureToolbar::MeasureToolbar(), Inkscape::UI::Dialog::MeasureToolSettingsDialog::MeasureToolSettingsDialog(), Inkscape::UI::Toolbar::MeshToolbar::MeshToolbar(), Inkscape::UI::Toolbar::NodeToolbar::NodeToolbar(), Inkscape::UI::Dialog::ObjectAttributes::ObjectAttributes(), Inkscape::UI::Toolbar::ObjectPickerToolbar::ObjectPickerToolbar(), Inkscape::UI::Dialog::ObjectsPanel::ObjectsPanel(), Inkscape::UI::Toolbar::PageToolbar::PageToolbar(), Inkscape::UI::Toolbar::PaintbucketToolbar::PaintbucketToolbar(), Inkscape::UI::Widget::PatternEditor::PatternEditor(), Inkscape::Extension::Internal::PdfImportDialog::PdfImportDialog(), Inkscape::UI::Toolbar::PencilToolbar::PencilToolbar(), Inkscape::UI::Toolbar::RectToolbar::RectToolbar(), Inkscape::UI::Toolbar::SelectToolbar::SelectToolbar(), Inkscape::UI::Dialog::SingleExport::SingleExport(), Inkscape::UI::Toolbar::SnapToolbar::SnapToolbar(), Inkscape::UI::Toolbar::SpiralToolbar::SpiralToolbar(), Inkscape::UI::Toolbar::SprayToolbar::SprayToolbar(), Inkscape::UI::Toolbar::StarToolbar::StarToolbar(), Inkscape::UI::Dialog::StartScreen::StartScreen(), Inkscape::UI::Dialog::SwatchesPanel::SwatchesPanel(), Inkscape::UI::Dialog::TextEdit::TextEdit(), Inkscape::UI::Toolbar::TextToolbar::TextToolbar(), Inkscape::UI::Toolbar::TweakToolbar::TweakToolbar(), Inkscape::UI::Dialog::XmlTree::XmlTree(), and Inkscape::UI::Toolbar::ZoomToolbar::ZoomToolbar().
void Inkscape::UI::gui_warning | ( | const std::string & | msg, |
Gtk::Window * | parent_window | ||
) |
Definition at line 134 of file util.cpp.
References dialog_run(), and msg.
Referenced by Inkscape::Extension::Implementation::Script::_change_extension().
bool Inkscape::UI::hide_widget | ( | const Glib::RefPtr< Gtk::Builder > & | builder, |
std::string const & | id | ||
) |
Definition at line 48 of file builder-utils.cpp.
References builder.
Referenced by Inkscape::UI::Widget::ColorPage::ColorPage().
bool Inkscape::UI::is_descendant_of | ( | Gtk::Widget const & | descendant, |
Gtk::Widget const & | ancestor | ||
) |
Returns if widget is a descendant of given ancestor, i.e.: itself, a child, or a childʼs child.
descendant | The widget of interest |
ancestor | The potential ancestor |
Definition at line 210 of file util.cpp.
References _break, _continue, for_each_parent(), and parent.
Referenced by Inkscape::UI::Widget::PopoverMenu::check_child_invariants(), and popup_at().
|
inline |
Definition at line 71 of file libspelling-wrapper.h.
References list_corrections_c(), and result.
Referenced by Inkscape::UI::Dialog::SpellCheck::nextWord().
|
inline |
Definition at line 66 of file libspelling-wrapper.h.
Referenced by list_corrections().
|
inline |
Definition at line 42 of file libspelling-wrapper.h.
References name.
Referenced by Inkscape::UI::Dialog::SpellCheck::SpellCheck().
|
static |
Definition at line 46 of file popup-menu.cpp.
Referenced by Inkscape::UI::Toolbar::ToolToolbar::attachHandlers(), and on_popup_menu().
|
static |
Definition at line 31 of file popup-menu.cpp.
References Inkscape::UI::Controller::has_flag().
Referenced by on_popup_menu().
void Inkscape::UI::on_popup_menu | ( | Gtk::Widget & | widget, |
PopupMenuSlot | slot | ||
) |
Connect slot to a widgetʼs key and button events that traditionally trigger a popup menu, i.e.:
Definition at line 57 of file popup-menu.cpp.
References key, on_click_pressed(), and on_key_pressed().
Referenced by Inkscape::UI::Widget::SpinButton::_construct(), Inkscape::UI::Dialog::connect_remove_popup_menu(), Inkscape::UI::Widget::SelectedStyle::SelectedStyle(), and Inkscape::UI::Widget::StatusBar::StatusBar().
|
private |
Definition at line 141 of file node.cpp.
References NODE_AUTO, NODE_CUSP, NODE_SMOOTH, and NODE_SYMMETRIC.
|
static |
Definition at line 121 of file pack.cpp.
References add(), child, set_expand(), set_fill(), and set_padding().
Referenced by Inkscape::UI::Dialog::IconPreviewPanel::IconPreviewPanel(), pack(), pack_end(), pack_end(), pack_start(), and pack_start().
|
static |
void Inkscape::UI::pack_end | ( | Gtk::Box & | box, |
Gtk::Widget & | child, | ||
bool | expand, | ||
bool | fill, | ||
unsigned | padding = 0 |
||
) |
Adds child to box, packed with reference to the end of box.
The child is packed after (away from end of) any other child packed with reference to the end of box. See the documentation of pack_start() for details of the parameters.
Definition at line 153 of file pack.cpp.
References child, end, and pack().
Referenced by Inkscape::UI::Widget::ColorNotebook::_initUI(), Inkscape::UI::Dialog::SelectorsDialog::_showWidgets(), Inkscape::UI::Dialog::ArrangeDialog::ArrangeDialog(), Inkscape::UI::Widget::PatternEditor::bind_store(), Inkscape::UI::Dialog::DocumentProperties::build_metadata(), Inkscape::UI::Dialog::CloneTiler::CloneTiler(), Inkscape::UI::Dialog::DialogWindow::DialogWindow(), Inkscape::UI::Dialog::FillAndStroke::FillAndStroke(), Inkscape::UI::Dialog::Find::Find(), Inkscape::Extension::ParamColor::get_widget(), Inkscape::Extension::ParamOptionGroup::get_widget(), Inkscape::Extension::ParamPath::get_widget(), Inkscape::UI::Dialog::SvgFontsDialog::glyphs_tab(), Inkscape::UI::Dialog::GlyphsPanel::GlyphsPanel(), Inkscape::UI::Widget::Scalar::hide_label(), Inkscape::UI::Widget::PrefEditFolder::init(), Inkscape::UI::Widget::PrefOpenFolder::init(), Inkscape::UI::Widget::PrefEntryFileButtonHBox::init(), Inkscape::UI::Dialog::InkscapePreferences::initKeyboardShortcuts(), InkSpinScale::InkSpinScale(), Inkscape::UI::Widget::Memory::Memory(), Inkscape::UI::Widget::Messages::Messages(), Inkscape::LivePathEffect::LPETiling::newWidget(), Inkscape::UI::Widget::PaintSelector::PaintSelector(), Inkscape::LivePathEffect::PathArrayParam::param_newWidget(), Inkscape::LivePathEffect::SatelliteArrayParam::param_newWidget(), and Inkscape::Extension::Internal::RvngImportDialog::RvngImportDialog().
void Inkscape::UI::pack_end | ( | Gtk::Box & | box, |
Gtk::Widget & | child, | ||
PackOptions | options = PackOptions::expand_widget , |
||
unsigned | padding = 0 |
||
) |
Adds child to box, packed with reference to the end of box.
The child is packed after (away from end of) any other child packed with reference to the end of box.
options | The PackOptions to use, which are decomposed into booleans of whether to expand or fill and passed to the other overload; see its doc. |
void Inkscape::UI::pack_start | ( | Gtk::Box & | box, |
Gtk::Widget & | child, | ||
bool | expand, | ||
bool | fill, | ||
unsigned | padding = 0 |
||
) |
Adds child to box, packed with reference to the start of box.
The child is packed after any other child packed with reference to the start of box.
Our pack_*() functions aim to replace GTKʼs Box.pack_start() in a GTK4-ready way, so code built against GTK3 can swap to our functions and afterward will not have need rewritten in migrating to GTK4. If writing new code you should probably avoid using these if you can, as they cannot be converted from C++ to .ui for instance. Instead, set properties on child widgets (not using the GTK3-only child properties!) and use Box.add() in GTK3 or .append() in GTK4.
Internally, the list of children in the Box is maintained in the order of:
The expand, fill and padding are implemented by setting relevant [hv]expand, [hv]align and margin-* properties on the child, instead of GTK3 child props.
child | The Gtk::Widget to be added to the box. |
expand | TRUE if the new child is to be given extra space allocated to box. The extra space will be divided evenly between all children that use this option. This is implemented by setting the childʼs relevant [hv]expand property. Note that there’s a subtle but important difference between GtkBox‘s expand and fill child properties and the ones in GtkWidget: setting GtkWidget:hexpand or GtkWidget:vexpand to TRUE will propagate up the widget hierarchy, so a pixel-perfect port might require you to reset the expansion flags to FALSE in a parent widget higher up the hierarchy, or to set the child to not expand (shrink). Our pack_*() functions do not attempt to do workaround this for you, as that might cause NEW problems. |
fill | TRUE if space given to child by the expand option is actually allocated to child, rather than just padding it. This parameter has no effect if expand is set to FALSE. A child is always allocated the full height of a horizontal GtkBox and the full width of a vertical GtkBox. This option affects the other dimension. This is implemented by setting the childʼs relevant [hv]align prop to ALIGN_FILL if fill is TRUE, else to START or END to match the pack type. |
padding | Extra space in pixels to put between this child and its neighbors, over and above the global amount specified by GtkBox:spacing property. If child is a widget at one of the reference ends of box, then padding pixels are also put between child and the reference edge of box. This is implemented by adding to the childʼs relevant margin-* props. |
Definition at line 141 of file pack.cpp.
References child, pack(), and start.
Referenced by Inkscape::UI::Dialog::SelectorsDialog::_addSelector(), Inkscape::UI::Dialog::ObjectProperties::_init(), Inkscape::UI::Widget::ColorNotebook::_initUI(), Inkscape::UI::Dialog::SelectorsDialog::_showWidgets(), Inkscape::UI::Widget::DialogPage::add_line(), Inkscape::UI::Widget::Random::addReseedButton(), Inkscape::UI::Widget::Scalar::addSlider(), Inkscape::UI::Dialog::ArrangeDialog::ArrangeDialog(), Inkscape::UI::Dialog::AttrDialog::AttrDialog(), Inkscape::UI::Widget::PatternEditor::bind_store(), Inkscape::UI::Dialog::DocumentProperties::build_gridspage(), Inkscape::UI::Dialog::CloneTiler::checkbox(), Inkscape::UI::Dialog::CloneTiler::CloneTiler(), Inkscape::UI::Widget::ComboToolItem::ComboToolItem(), Inkscape::UI::Dialog::create_tab_label(), Inkscape::UI::Widget::DualSpinScale::DualSpinScale(), Inkscape::UI::Dialog::FillAndStroke::FillAndStroke(), Inkscape::UI::Dialog::FilterEffectsDialog::FilterEffectsDialog(), Inkscape::UI::Dialog::Find::Find(), Inkscape::UI::Widget::FontVariants::FontVariants(), Inkscape::LivePathEffect::LPETiling::generate_buttons(), Inkscape::Extension::Extension::get_info_widget(), Inkscape::Extension::Extension::get_params_widget(), Inkscape::Extension::ParamBool::get_widget(), Inkscape::Extension::ParamColor::get_widget(), Inkscape::Extension::ParamFloat::get_widget(), Inkscape::Extension::ParamInt::get_widget(), Inkscape::Extension::ParamNotebook::ParamNotebookPage::get_widget(), Inkscape::Extension::ParamOptionGroup::get_widget(), Inkscape::Extension::ParamPath::get_widget(), Inkscape::Extension::ParamString::get_widget(), Inkscape::Extension::WidgetBox::get_widget(), Inkscape::Extension::WidgetLabel::get_widget(), Inkscape::UI::Dialog::SvgFontsDialog::global_settings_tab(), Inkscape::UI::Dialog::SvgFontsDialog::glyphs_tab(), Inkscape::UI::Dialog::GlyphsPanel::GlyphsPanel(), Inkscape::UI::Widget::GradientSelector::GradientSelector(), Inkscape::UI::Dialog::GridArrangeTab::GridArrangeTab(), gui_request_dpi_fix_method(), Inkscape::UI::Widget::ImageProperties::ImageProperties(), Inkscape::UI::Widget::PrefEditFolder::init(), Inkscape::UI::Widget::PrefOpenFolder::init(), Inkscape::UI::Widget::PrefEntryFileButtonHBox::init(), Inkscape::UI::Widget::PrefEntryButtonHBox::init(), Inkscape::UI::Widget::PrefSlider::init(), Inkscape::UI::Widget::ZoomCorrRulerSlider::init(), Inkscape::UI::Widget::Licensor::init(), Inkscape::UI::Dialog::FilterEffectsDialog::init_settings_widgets(), Inkscape::UI::Dialog::InkscapePreferences::initKeyboardShortcuts(), Inkscape::UI::Dialog::InkscapePreferences::initPageRendering(), Inkscape::UI::Dialog::InkscapePreferences::initPageSystem(), Inkscape::UI::Dialog::InkscapePreferences::initPageUI(), Inkscape::UI::Dialog::InkscapePreferences::InkscapePreferences(), Inkscape::UI::Dialog::SvgFontsDialog::kerning_tab(), Inkscape::UI::Widget::Labelled::Labelled(), Inkscape::UI::Widget::LayerSelector::LayerSelector(), Inkscape::UI::Dialog::Transformation::layoutPageRotate(), Inkscape::UI::Dialog::LivePathEffectEditor::LivePathEffectEditor(), Inkscape::UI::Widget::StrokeStyle::makeRadioButton(), Inkscape::UI::Widget::Memory::Memory(), Inkscape::UI::Widget::Messages::Messages(), Inkscape::LivePathEffect::Effect::newWidget(), Inkscape::LivePathEffect::LPETiling::newWidget(), Inkscape::LivePathEffect::LPEBSpline::newWidget(), Inkscape::LivePathEffect::LPECloneOriginal::newWidget(), Inkscape::LivePathEffect::LPECopyRotate::newWidget(), Inkscape::LivePathEffect::LPEFilletChamfer::newWidget(), Inkscape::LivePathEffect::LPELattice2::newWidget(), Inkscape::LivePathEffect::LPEMeasureSegments::newWidget(), Inkscape::LivePathEffect::LPEMirrorSymmetry::newWidget(), Inkscape::LivePathEffect::LPEPerspectiveEnvelope::newWidget(), Inkscape::LivePathEffect::LPERoughen::newWidget(), Inkscape::LivePathEffect::LPESimplify::newWidget(), Inkscape::LivePathEffect::LPESlice::newWidget(), Inkscape::LivePathEffect::LPETransform2Pts::newWidget(), Inkscape::UI::Widget::NotebookPage::NotebookPage(), Inkscape::UI::Widget::ObjectCompositeSettings::ObjectCompositeSettings(), Inkscape::UI::Widget::PageSelector::PageSelector(), Inkscape::UI::Widget::PaintSelector::PaintSelector(), Inkscape::LivePathEffect::PointParam::param_newWidget(), Inkscape::LivePathEffect::ColorPickerParam::param_newWidget(), Inkscape::LivePathEffect::OriginalPathParam::param_newWidget(), Inkscape::LivePathEffect::OriginalSatelliteParam::param_newWidget(), Inkscape::LivePathEffect::PathParam::param_newWidget(), Inkscape::LivePathEffect::PathArrayParam::param_newWidget(), Inkscape::LivePathEffect::SatelliteParam::param_newWidget(), Inkscape::LivePathEffect::SatelliteArrayParam::param_newWidget(), Inkscape::LivePathEffect::TextParam::param_newWidget(), Inkscape::LivePathEffect::ToggleButtonParam::param_newWidget(), Inkscape::LivePathEffect::TransformedPointParam::param_newWidget(), Inkscape::LivePathEffect::VectorParam::param_newWidget(), Inkscape::UI::Widget::PatternEditor::PatternEditor(), Inkscape::Extension::Internal::PdfImportDialog::PdfImportDialog(), Inkscape::UI::Dialog::PolarArrangeTab::PolarArrangeTab(), Inkscape::Extension::PrefDialog::PrefDialog(), Inkscape::UI::Dialog::StyleDialog::readStyleElement(), Inkscape::Extension::Internal::RvngImportDialog::RvngImportDialog(), Inkscape::UI::Widget::ScalarUnit::ScalarUnit(), Inkscape::UI::Dialog::LivePathEffectEditor::selection_info(), Inkscape::UI::Widget::PaintSelector::set_mode_color(), Inkscape::UI::Widget::PaintSelector::set_mode_mesh(), Inkscape::Extension::Implementation::Script::showPopupError(), Inkscape::UI::Widget::SimpleFilterModifier::SimpleFilterModifier(), Inkscape::UI::Toolbar::SnapToolbar::SnapToolbar(), sp_query_custom_tooltip(), Inkscape::UI::Dialog::CloneTiler::spinbox(), Inkscape::UI::Widget::SpinScale::SpinScale(), Inkscape::UI::Widget::SpinScale::SpinScale(), Inkscape::UI::Widget::StrokeStyle::StrokeStyle(), Inkscape::UI::Widget::PaintSelector::style_button_add(), Inkscape::UI::Dialog::StyleDialog::StyleDialog(), Inkscape::UI::Widget::StyleSwatch::StyleSwatch(), Inkscape::UI::Dialog::SvgFontsDialog::SvgFontsDialog(), Inkscape::UI::Widget::SwatchSelector::SwatchSelector(), Inkscape::UI::Dialog::CloneTiler::table_x_y_rand(), Inkscape::UI::Dialog::TextEdit::TextEdit(), Inkscape::UI::Dialog::UndoHistory::UndoHistory(), Inkscape::UI::Widget::ComboToolItem::use_group_label(), and Inkscape::UI::Dialog::ObjectAttributes::widget_setup().
void Inkscape::UI::pack_start | ( | Gtk::Box & | box, |
Gtk::Widget & | child, | ||
PackOptions | options = PackOptions::expand_widget , |
||
unsigned | padding = 0 |
||
) |
|
static |
Definition at line 70 of file popup-menu.cpp.
References height, is_descendant_of(), parent, and width.
Referenced by Inkscape::UI::Dialog::ObjectsPanel::blendModePopup(), Inkscape::UI::Dialog::ObjectsPanel::colorTagPopup(), Inkscape::UI::Widget::PrefEditFolder::init(), Inkscape::UI::Tools::ToolBase::menu_popup(), Inkscape::UI::Dialog::ObjectsPanel::on_click(), Inkscape::UI::Widget::Ruler::on_click_pressed(), Inkscape::UI::Toolbar::PageToolbar::PageToolbar(), popup_at(), popup_at(), popup_at(), Inkscape::UI::Widget::PopoverMenu::popup_at(), popup_at_center(), Inkscape::UI::Dialog::AttrDialog::startValueEdit(), Inkscape::UI::Widget::TabStrip::TabStrip(), and Inkscape::UI::Widget::TabsWidget::TabsWidget().
void Inkscape::UI::popup_at | ( | Gtk::Popover & | popover, |
Gtk::Widget & | widget, | ||
double | x_offset = 0.0 , |
||
double | y_offset = 0.0 |
||
) |
Replace Gtk::Menu::popup_at_pointer.
If x or y offsets != 0, :pointing-to is set to {x,y,1,1} else it is set to the full allocation of widget, translated into the coordinate space of the popoverʼs parent (:relative-to) widget. Hence, the widget must be the popoverʼs parent (:relative-to) widget or a descendant thereof.
Definition at line 93 of file popup-menu.cpp.
References popup_at().
void Inkscape::UI::popup_at | ( | Gtk::Popover & | popover, |
Gtk::Widget & | widget, | ||
Gdk::Rectangle const & | rect | ||
) |
As popup_at() but point to center of rect rect must be valid within the coords of @widget, & @awidget must be a descendant of @parent.
Definition at line 114 of file popup-menu.cpp.
References popup_at().
void Inkscape::UI::popup_at | ( | Gtk::Popover & | popover, |
Gtk::Widget & | widget, | ||
std::optional< Geom::Point > const & | offset | ||
) |
Definition at line 99 of file popup-menu.cpp.
References offset, and popup_at().
void Inkscape::UI::popup_at_center | ( | Gtk::Popover & | popover, |
Gtk::Widget & | widget | ||
) |
As popup_at() but point to center of widget.
Definition at line 107 of file popup-menu.cpp.
References popup_at().
Referenced by Inkscape::UI::Widget::PopoverMenu::popup_at_center(), Inkscape::UI::Widget::StatusBar::rotate_popup(), and Inkscape::UI::Widget::StatusBar::zoom_popup().
void Inkscape::UI::remove_all_children | ( | Widget & | widget | ) |
For each child in get_children(widget), call widget.remove(*child). May not cause delete child!
Definition at line 88 of file util.h.
References child, and get_children().
Referenced by Inkscape::UI::Dialog::LivePathEffectEditor::clear_lpe_list(), Inkscape::UI::Dialog::TextEdit::display_font_collections(), Inkscape::UI::Toolbar::TextToolbar::display_font_collections(), Inkscape::UI::Dialog::StyleDialog::readStyleElement(), Inkscape::UI::Widget::ColorPalette::rebuild_widgets(), Inkscape::UI::Widget::StyleSwatch::setStyle(), and Inkscape::UI::Widget::FontVariants::update_opentype().
|
static |
Definition at line 52 of file pack.cpp.
Referenced by set_fill().
|
inline |
Definition at line 97 of file libspelling-wrapper.h.
Referenced by Inkscape::UI::Dialog::TextEdit::TextEdit().
|
static |
Definition at line 42 of file pack.cpp.
Referenced by Inkscape::UI::Widget::DocumentTemplates::DocumentTemplates(), pack(), and Inkscape::UI::View::SVGViewWidget::SVGViewWidget().
|
static |
Definition at line 71 of file pack.cpp.
References set_align(), and to_align().
Referenced by pack().
void Inkscape::UI::set_icon_sizes | ( | Gtk::Widget * | parent, |
int | pixel_size | ||
) |
Recursively set all the icon sizes inside this parent widget.
Any GtkImage will be changed so only call this on widget stacks where all children have the same expected sizes.
parent | - The parent widget to traverse |
pixel_size | - The new pixel size of the images it contains |
Definition at line 113 of file util.cpp.
References _continue, _skip, for_each_descendant(), and parent.
Referenced by Inkscape::UI::Dialog::AlignAndDistribute::AlignAndDistribute(), SPDesktopWidget::apply_ctrlbar_settings(), set_icon_sizes(), and SPDesktopWidget::SPDesktopWidget().
void Inkscape::UI::set_icon_sizes | ( | GtkWidget * | parent, |
int | pixel_size | ||
) |
Definition at line 129 of file util.cpp.
References parent, and set_icon_sizes().
|
static |
Definition at line 78 of file pack.cpp.
Referenced by Inkscape::UI::Widget::ImageToggler::ImageToggler(), and pack().
|
static |
Definition at line 235 of file themes.cpp.
Referenced by Inkscape::UI::ThemeContext::add_gtk_css().
|
staticprivate |
Definition at line 612 of file node.cpp.
References Inkscape::Preferences::get(), Inkscape::Preferences::getIntLimited(), and snap_increment_degrees().
Referenced by Inkscape::UI::Handle::_getTip(), and snap_increment_degrees().
std::string Inkscape::UI::sp_tweak_background_colors | ( | std::string | cssstring, |
double | crossfade, | ||
double | contrast, | ||
bool | dark | ||
) |
Definition at line 206 of file themes.cpp.
References Inkscape::ustring::format_classic().
Referenced by Inkscape::UI::ThemeContext::add_gtk_css().
|
inline |
Definition at line 82 of file libspelling-wrapper.h.
Referenced by Inkscape::UI::Dialog::TextEdit::TextEdit().
void Inkscape::UI::system_open | ( | const Glib::ustring & | path | ) |
Opens the given path with platform-specific tools.
Definition at line 143 of file util.cpp.
Referenced by Inkscape::UI::Widget::PrefEditFolder::onOpenButtonClickedCallback(), and Inkscape::UI::Widget::PrefOpenFolder::onRelatedButtonClickedCallback().
|
static |
|
constexprprivate |
Definition at line 137 of file node.cpp.
Referenced by Inkscape::UI::PathManipulator::_bsplineHandlePosition(), Inkscape::UI::PathManipulator::_bsplineHandleReposition(), and Inkscape::UI::Node::setType().
|
constexprprivate |
Definition at line 139 of file node.cpp.
Referenced by Inkscape::UI::Handle::handle_2button_press(), Inkscape::UI::Node::setType(), and Inkscape::UI::PathManipulator::subdivideSegment().
|
staticconstexpr |
Events which should be captured when a handle is being dragged.
Definition at line 36 of file control-point.cpp.
Referenced by Inkscape::UI::ControlPoint::transferGrab().
|
constexprprivate |
Definition at line 138 of file node.cpp.
Referenced by Inkscape::UI::PathManipulator::_bsplineHandlePosition(), Inkscape::UI::PathManipulator::_bsplineHandleReposition(), Inkscape::UI::Node::move(), Inkscape::UI::Node::setType(), and Inkscape::UI::Node::transform().
|
static |
Definition at line 14 of file query-file-info.cpp.
Referenced by Inkscape::UI::QueryFileInfo::QueryFileInfo(), Inkscape::UI::QueryFileInfo::results_callback(), and Inkscape::UI::QueryFileInfo::~QueryFileInfo().
|
static |