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

Custom widgets. More...

Classes

class  AlignmentSelector
 
class  AnchorSelector
 
class  AttrWidget
 
class  Bin
 The Bin is a widget that can hold a single child. More...
 
struct  CairoFragment
 
class  CairoGraphics
 
class  Canvas
 A widget for Inkscape's canvas. More...
 
class  CanvasGrid
 A Gtk::Grid widget that contains rulers, scrollbars, buttons, and, of course, the canvas. More...
 
class  CanvasNotice
 
class  CellRendererItemIcon
 Custom cell renderer for shapes of items in Objects dialog, w/ optional clip/mask icon overlaid. More...
 
class  ColorEntry
 
class  ColorNotebook
 
class  ColorPage
 
class  ColorPageChannel
 
class  ColorPalette
 
class  ColorPalettePreview
 A Gtk::DrawingArea to preview color palette menu items by showing a small example of the colors. More...
 
class  ColorPicker
 
class  ColorPlate
 
struct  ColorPoint
 
class  ColorPreview
 A color preview widget, used within a picker button and style indicator. More...
 
class  ColorSlider
 
class  ColorTagRenderer
 
class  ColorWheel
 
class  ColorWheelBase
 
class  ColorWheelHSL
 
class  ColorWheelHSLuv
 
class  ComboBoxEntryToolItem
 Formerly a Gtk::ToolItem that wraps a Gtk::ComboBox object. More...
 
class  ComboBoxEnum
 Simplified management of enumerations in the UI as combobox. More...
 
class  ComboToolItem
 
class  ComboToolItemColumns
 
class  CompletionPopup
 
class  CssNameClassInit
 A class that can be inherited to set the CSS name of a Gtk::Widget subclass. More...
 
class  DashSelector
 
class  DefaultValueHolder
 Very basic interface for classes that control attributes. More...
 
class  DialogPage
 
class  DocumentTemplates
 
class  DropDownList
 
class  DualSpinScale
 Contains two SpinScales for controlling number-opt-number attributes. More...
 
class  EntityEntry
 
class  EntityLineEntry
 
class  EntityMultiLineEntry
 
class  Entry
 Helperclass for Gtk::Entry widgets. More...
 
class  FillNStroke
 
class  FontButton
 A labelled font button for entering font values. More...
 
class  FontCollectionSelector
 A container of widgets for selecting font faces. More...
 
class  FontList
 
class  FontSelector
 A container of widgets for selecting font faces. More...
 
class  FontVariants
 A container for selecting font variants (OpenType Features). More...
 
class  FontVariationAxis
 A widget for a single axis: Label and Slider. More...
 
class  FontVariations
 A widget for selecting font variations (OpenType Variations). More...
 
struct  Fragment
 A "fragment" is a rectangle of drawn content at a specfic place. More...
 
class  Frame
 Creates a Gnome HIG style indented frame with bold label See http://developer.gnome.org/hig-book/stable/controls-frames.html.en. More...
 
struct  GLFragment
 
class  GLGraphics
 
class  GradientEditor
 
class  GradientImage
 
class  GradientSelector
 
class  GradientVectorSelector
 
class  GradientWithStops
 
class  Graphics
 
class  IconComboBox
 
class  IconRenderer
 
class  ImageProperties
 
class  ImageToggler
 
class  InkSpinButton
 
class  Labelled
 Adds a label with optional icon to another widget. More...
 
class  LabelledColorPicker
 
class  LabelledComboBoxEnum
 Simplified management of enumerations in the UI as combobox, plus the functionality of Labelled. More...
 
class  LayerSelector
 
class  Licensor
 Widget for specifying a document's license; part of document preferences dialog. More...
 
class  MarkerComboBox
 ComboBox-like class for selecting stroke markers. More...
 
class  MathSpinButton
 A spin button for use with builders. More...
 
class  Memory
 
class  Messages
 
class  NotebookPage
 A tabbed notebook page for dialogs. More...
 
class  ObjectCompositeSettings
 
class  OKWheel
 The color wheel used in the OKHSL picker. More...
 
class  OptGLArea
 A widget that can dynamically switch between a Gtk::DrawingArea and a Gtk::GLArea. More...
 
struct  PageInfo
 
class  PageProperties
 
class  PageSelector
 
class  PageSizePreview
 
class  PaintSelector
 Generic paint selector widget. More...
 
struct  palette_t
 
class  PatternEditor
 
class  PatternItem
 
struct  PatternStore
 
struct  PickerGeometry
 Used to represent the in RGB gamut colors polygon of the HSLuv color wheel. More...
 
class  PixelStreamer
 
class  Point
 A labelled text box, with spin buttons and optional icon, for entering arbitrary coordinate values. More...
 
class  PopoverBin
 Holds a single child widget while allowing a single popover to be displayed over it. More...
 
class  PopoverMenu
 A replacement for GTK3ʼs Gtk::Menu, as removed in GTK4. More...
 
class  PopoverMenuItem
 A replacement for GTK3ʼs Gtk::MenuItem, as removed in GTK4. More...
 
class  PrefCheckButton
 
class  PrefColorPicker
 
class  PrefCombo
 
class  PrefEditFolder
 
class  PrefEntry
 
class  PrefEntryButtonHBox
 
class  PrefEntryFile
 
class  PrefEntryFileButtonHBox
 
struct  PrefItem
 
class  PrefMultiEntry
 
class  PrefOpenFolder
 
class  PrefRadioButton
 
class  PrefRadioButtons
 
class  Prefs
 
class  PrefSlider
 
class  PrefSpinButton
 
class  PrefSpinUnit
 
class  PrefUnit
 
struct  Program
 
class  Random
 A labelled text box, with spin buttons and optional icon, for entering arbitrary number values. More...
 
class  RegisteredCheckButton
 
class  RegisteredColorPicker
 
class  RegisteredEnum
 Simplified management of enumerations in the UI as combobox. More...
 
class  RegisteredFontButton
 
class  RegisteredInteger
 
class  RegisteredRandom
 
class  RegisteredScalar
 
class  RegisteredScalarUnit
 
class  RegisteredSwitchButton
 
class  RegisteredText
 
class  RegisteredToggleButton
 
class  RegisteredTransformedPoint
 
class  RegisteredUnitMenu
 
class  RegisteredVector
 
class  RegisteredWidget
 
class  Registry
 
class  RenderingOptions
 A container for selecting rendering options. More...
 
struct  rgb_t
 
class  Rotateable
 Widget adjustable by dragging it to rotate away from a zero-change axis. More...
 
class  RotateableStrokeWidth
 
class  RotateableSwatch
 
class  Ruler
 
class  Scalar
 A labelled text box, with spin buttons and optional icon, for entering arbitrary number values. More...
 
class  ScalarUnit
 A labelled text box, with spin buttons and optional icon, for entering the values of various unit types. More...
 
class  SelectedStyle
 Selected style indicator (fill, stroke, opacity). More...
 
struct  Shader
 
class  SimpleFilterModifier
 
class  SpinButton
 SpinButton widget, that allows entry of simple math expressions (also units, when linked with UnitMenu), and allows entry of both '. More...
 
class  SpinScale
 Wrap the InkSpinScale class and attach an attribute. More...
 
class  Stack
 Like Gtk::Stack, but for holding a stack of Inkscape canvases. More...
 
class  StatusBar
 
class  Stores
 
class  StrokeStyle
 
class  StyleSubject
 
class  StyleSwatch
 
class  SwatchSelector
 
class  Synchronizer
 
class  TabStrip
 Widget that implements strip of tabs. More...
 
class  TabsWidget
 Widget that implements the document tab bar. More...
 
class  TemplateList
 
class  Text
 A labelled text box, with optional icon, for entering arbitrary number values. More...
 
class  Texture
 
class  TextureCache
 
class  UnitMenu
 A drop down menu for choosing unit types. More...
 
class  UnitTracker
 
class  Updater
 
class  VAO
 
class  WidgetVfuncsClassInit
 A class you can inherit to access GTK4ʼs Widget.css_changed & .focus vfuncs, missing in gtkmm4. More...
 
class  XmlTreeView
 
class  ZoomCorrRuler
 
class  ZoomCorrRulerSlider
 

Typedefs

using GShader = Shader< GL_GEOMETRY_SHADER >
 
using VShader = Shader< GL_VERTEX_SHADER >
 
using FShader = Shader< GL_FRAGMENT_SHADER >
 
using RenderNodePtr = std::unique_ptr< GskRenderNode, Util::Deleter< gsk_render_node_unref > >
 
using OverlayState = int
 

Enumerations

enum  DefaultValueType {
  T_NONE , T_DOUBLE , T_VECT_DOUBLE , T_BOOL ,
  T_UINT , T_CHARPTR
}
 
enum  Columns { ColID = 0 , ColName , ColIcon , ColSearch }
 
enum  {
  COMBO_COL_LABEL = 0 , COMBO_COL_STOCK = 1 , COMBO_COL_PATTERN = 2 , COMBO_COL_MESH = COMBO_COL_PATTERN ,
  COMBO_COL_SEP = 3 , COMBO_N_COLS = 4
}
 
enum  RSU_UserUnits { RSU_none , RSU_x , RSU_y }
 
enum  ui_drop_target_info { APP_OSWB_COLOR }
 
enum  PaintType {
  SS_NA , SS_NONE , SS_UNSET , SS_MANY ,
  SS_PATTERN , SS_HATCH , SS_LGRADIENT , SS_RGRADIENT ,
  SS_MGRADIENT , SS_COLOR
}
 
enum  FillOrStroke { SS_FILL , SS_STROKE }
 
enum  OverlayStates : OverlayState { OVERLAY_NONE = 0 , OVERLAY_CLIP = 1 , OVERLAY_MASK = 2 , OVERLAY_BOTH = 3 }
 

Functions

static void ruler_snap_new_guide (SPDesktop *desktop, Geom::Point &event_dt, Geom::Point &normal)
 
static void set_adjustment (Gtk::Adjustment *adj, double l, double u, double ps, double si, double pi)
 
static Geom::Point cap_length (Geom::Point const &pt, double max)
 
static double profile (double r)
 
static Geom::Point apply_profile (Geom::Point const &pt)
 
auto coarsen (const Cairo::RefPtr< Cairo::Region > &region, int min_size, int glue_size, double min_fullness)
 
static std::optional< Geom::Dim2bisect (Geom::IntRect const &rect, int tile_size)
 
static bool have_gltexstorage ()
 
static bool have_glinvalidateteximage ()
 
template<>
std::unique_ptr< UpdaterUpdater::create< Updater::Strategy::Responsive > ()
 
template<>
std::unique_ptr< UpdaterUpdater::create< Updater::Strategy::FullRedraw > ()
 
template<>
std::unique_ptr< UpdaterUpdater::create< Updater::Strategy::Multiscale > ()
 
void region_to_path (Cairo::RefPtr< Cairo::Context > const &cr, Cairo::RefPtr< Cairo::Region > const &reg)
 Turn a Cairo region into a path on a given Cairo context.
 
Cairo::RefPtr< Cairo::Region > shrink_region (Cairo::RefPtr< Cairo::Region > const &reg, int d, int t=0)
 Shrink a region by d/2 in all directions, while also translating it by (d/2 + t, d/2 + t).
 
Colors::Color checkerboard_darken (Colors::Color color)
 
auto unioned (Cairo::RefPtr< Cairo::Region > a, Cairo::RefPtr< Cairo::Region > const &b)
 
auto rgb_to_array (uint32_t rgb)
 
auto rgba_to_array (uint32_t rgba)
 
auto premultiplied (std::array< float, 4 > arr)
 
std::array< float, 3 > checkerboard_darken (uint32_t rgba)
 
static auto make_menu ()
 
static Geom::Interval get_range (Gtk::Scrollbar const &sb)
 
void circle (const Cairo::RefPtr< Cairo::Context > &ctx, const Geom::Point &center, double radius)
 
static void draw_point_indicator (const Cairo::RefPtr< Cairo::Context > &ctx, const Geom::Point &point, double size)
 
static void draw_color_plate (const Cairo::RefPtr< Cairo::Context > &ctx, const Geom::Rect &area, double radius, const Cairo::RefPtr< Cairo::ImageSurface > &preview, bool circular)
 
static Geom::Point get_color_coordinates (double val1, double val2, bool circular)
 
static void set_color_helper (Color &color, int channel1, int channel2, double x, double y, bool disc)
 
static Cairo::RefPtr< Cairo::ImageSurface > create_color_preview (int size, const std::function< void(std::vector< std::uint32_t > &, int width)> &draw)
 
static Cairo::RefPtr< Cairo::ImageSurface > create_color_plate (unsigned int resolution, const Color &base, int channel1, int channel2)
 
static Cairo::RefPtr< Cairo::ImageSurface > create_color_wheel (unsigned int resolution, const Color &base, int channel1, int channel2)
 
static Geom::Point screen_to_local (const Geom::Rect &active, Geom::Point point, bool circular, bool *inside=nullptr)
 
static Geom::Point local_to_screen (const Geom::Rect &active, Geom::Point point, bool circular)
 
Geom::Rect round_rect (const Cairo::RefPtr< Cairo::Context > &ctx, Geom::Rect rect, double radius)
 
Cairo::RefPtr< Cairo::Pattern > create_checkerboard_pattern (double tx, double ty)
 
static Geom::OptIntRect get_active_area (int full_width, int full_height)
 
static double get_value_at (Gtk::Widget const &self, double const x, double const y)
 
Glib::RefPtr< Gdk::Pixbuf > _make_checkerboard (uint32_t dark, uint32_t light, unsigned scale, std::vector< uint32_t > &buffer)
 Generate a checkerboard pattern with the given colors.
 
static void draw_slider_thumb (const Cairo::RefPtr< Cairo::Context > &ctx, const Geom::Point &location, double size, const Gdk::RGBA &fill, const Gdk::RGBA &stroke, int device_scale)
 
static std::pair< ColorWheel *, bool > create_color_wheel_helper (Type type, bool create_widget)
 
ColorWheelcreate_managed_color_wheel (Type type)
 
bool can_create_color_wheel (Type type)
 
static void strip_trailing (Glib::ustring &s, char const c)
 
void unset_recursive (const char *attribute, SPObject *object)
 
static int index_to_font_size (int index)
 
static int font_size_to_index (double size)
 
Glib::ustring get_full_name (const Inkscape::FontInfo &font_info)
 
Glib::ustring get_alt_name (const Glib::ustring &fontspec)
 
CellFontRenderer & get_renderer (Gtk::CellRenderer &renderer)
 
Glib::ustring get_font_name (Gtk::TreeIter< Gtk::TreeRow > &iter)
 
void get_cell_data_func (Gtk::CellRenderer *cell_renderer, Gtk::TreeModel::ConstRow row)
 
const char * get_sort_icon (Inkscape::FontOrder order)
 
void set_grid_cell_size (Gtk::CellRendererText *renderer, int font_size_percent)
 
Glib::ustring get_font_icon (const FontInfo &font, bool missing_font)
 
std::pair< Glib::ustring, Glib::ustring > get_axis_name (const std::string &tag, const Glib::ustring &abbr)
 
void set_icon (Gtk::Button &btn, char const *pixmap)
 
Glib::RefPtr< Gdk::Pixbuf > draw_circle (int size, Colors::Color color)
 
Glib::RefPtr< Gdk::Pixbuf > get_stop_pixmap (SPStop *stop)
 
Glib::ustring get_repeat_icon (SPGradientSpread mode)
 
double line_angle (const Geom::Line &line)
 
std::string get_stop_template_path (const char *filename)
 
static double lerp (double v0, double v1, double t0, double t1, double t)
 
static ColorPoint lerp (ColorPoint const &v0, ColorPoint const &v1, double t0, double t1, double t)
 
static double luminance (Color const &color)
 
static Geom::Point to_pixel_coordinate (Geom::Point const &point, double scale, double resize)
 Convert a point of the gamut color polygon (Luv) to pixel coordinates.
 
static Geom::Point from_pixel_coordinate (Geom::Point const &point, double scale, double resize)
 Convert a point in pixels on the widget to Luv coordinates.
 
static std::vector< Geom::Pointto_pixel_coordinate (std::vector< Geom::Point > const &points, double scale, double resize)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
static void draw_vertical_padding (ColorPoint p0, ColorPoint p1, int padding, bool pad_upwards, guint32 *buffer, int height, int stride)
 Paints padding for an edge of the triangle, using the (vertically) closest point.
 
static Geom::IntPoint _getMargin (Gtk::Allocation const &allocation)
 
static Geom::IntPoint _getAllocationDimensions (Gtk::Allocation const &allocation)
 
static int _getAllocationSize (Gtk::Allocation const &allocation)
 
static double safe_frac (double x)
 
static void trim_zeros (std::string &ret)
 
static double get_accel_factor (Gdk::ModifierType state)
 
static char const * get_text (Gtk::Editable const &editable)
 
static cairo_surface_tcreate_separator (double alpha, int width, int height, int device_scale)
 
Glib::ustring get_attrib (SPMarker *marker, const char *attrib)
 
double get_attrib_num (SPMarker *marker, const char *attrib)
 
SPMarkerfind_marker (SPDocument *document, const Glib::ustring &marker_id)
 
static void dialogLoggingCallback (char const *, GLogLevelFlags, char const *messageText, gpointer user_data)
 
static std::tuple< int, Glib::ustring, std::string > get_sorter (PaperSize const &page)
 
void rounded_rectangle (const Cairo::RefPtr< Cairo::Context > &cr, double x, double y, double w, double h, double r)
 
void set_source_rgba (const Cairo::RefPtr< Cairo::Context > &ctx, unsigned int rgba)
 
static bool isPaintModeGradient (PaintSelector::Mode mode)
 
static std::vector< SPMeshGradient * > ink_mesh_list_get (SPDocument *source)
 Returns a list of meshes in the defs of the given source document as a vector.
 
static void sp_mesh_menu_build (GtkWidget *combo, std::vector< SPMeshGradient * > &mesh_list, SPDocument *)
 Adds menu items for mesh list.
 
static void sp_mesh_list_from_doc (GtkWidget *combo, SPDocument *, SPDocument *source, SPDocument *)
 Pick up all meshes from source, except those that are in current_doc (if non-NULL), and add items to the mesh menu.
 
static void ink_mesh_menu_populate_menu (GtkWidget *combo, SPDocument *doc)
 
static GtkWidget * ink_mesh_menu (GtkWidget *combo)
 
static double slider_to_gap (double index, double upper)
 
static double gap_to_slider (double gap, double upper)
 
static int slider_to_tile (double index)
 
static double tile_to_slider (int tile)
 
Glib::ustring get_attrib (SPPattern *pattern, const char *attrib)
 
double get_attrib_num (SPPattern *pattern, const char *attrib)
 
void sort_patterns (std::vector< Glib::RefPtr< PatternItem > > &list)
 
Glib::RefPtr< PatternItemcreate_pattern_item (PatternManager &manager, SPPattern *pattern, int tile_size, double scale)
 
std::vector< Glib::RefPtr< PatternItem > > create_pattern_items (PatternManager &manager, const std::vector< SPPattern * > &list, int tile_size, double device_scale)
 
SPPatternget_pattern (const PatternItem &item, SPDocument *document)
 
void regenerate_tile_images (PatternManager &manager, PatternStore &pat_store, int tile_size, double device_scale, SPDocument *current)
 
static void draw_text (cairo_t *cr, Geom::Point loc, const char *txt, bool bottom=false, double fontsize=ZoomCorrRuler::textsize, std::string fontdesc="Sans")
 
static void draw_number (cairo_t *cr, Geom::Point pos, double num)
 
Gtk::Widget * get_scrollable_ancestor (Gtk::Widget *widget)
 Get the first ancestor which is scrollable.
 
Gtk::Widget const * get_scrollable_ancestor (Gtk::Widget const *const widget)
 Get the first ancestor which is scrollable.
 
static Dialog::FillAndStrokeget_fill_and_stroke_panel (SPDesktop *desktop)
 
template<typename Slot , typename ... Args>
static UI::Widget::PopoverMenuItemmake_menu_item (Glib::ustring const &label, Slot slot, Args &&...args)
 
static Gtk::Label * spw_label (Gtk::Grid *table, const gchar *label_text, int col, int row, Gtk::Widget *target)
 Creates a label widget with the given text, at the given col, row position in the table.
 
static Gtk::Box * spw_hbox (Gtk::Grid *table, int width, int col, int row)
 Creates a horizontal layout manager with 4-pixel spacing between children and space for 'width' columns.
 
std::vector< double > parse_pattern (const Glib::ustring &input)
 
static double calcScaleLineWidth (const double width_typed, SPItem *const item, Inkscape::Util::Unit const *const unit)
 
static void buildGroupedItemList (SPObject *element, std::vector< SPObject * > &simple_list)
 Recursively builds a simple list from an arbitrarily complex selection of items and grouped items.
 
void style_obs_callback (StyleSwatch &_style_swatch, Preferences::Entry const &val)
 Watches for changes in the observed style pref.
 
void tool_obs_callback (StyleSwatch &_style_swatch, Preferences::Entry const &val)
 Watches whether the tool uses the current style.
 
static std::shared_ptr< TabWidgetDrag > get_tab_drag (Gtk::DropTarget &droptarget)
 
static std::shared_ptr< TabDrag > get_tab_drag (Gtk::DropTarget &droptarget)
 
static SPDesktopconsume_tab_return_desktop (std::shared_ptr< Tab > tab)
 

Variables

static const auto grid_types
 
static unsigned int MAX_COMPONENTS = 6
 
static constexpr int height = 2
 
static constexpr int dx = 1
 
constexpr bool TEST_TIMING = false
 
static gchar const * undo_F_label_1 = "fill:flatcolor:1"
 
static gchar const * undo_F_label_2 = "fill:flatcolor:2"
 
static gchar const * undo_S_label_1 = "stroke:flatcolor:1"
 
static gchar const * undo_S_label_2 = "stroke:flatcolor:2"
 
static gchar const * undo_F_label = undo_F_label_1
 
static gchar const * undo_S_label = undo_S_label_1
 
FontListColumnModel g_column_model
 
static std::array< int, 38 > g_font_sizes
 
static constexpr int const SIZE = 400
 
static constexpr int const OUTER_CIRCLE_RADIUS = 190
 
static constexpr double MAX_HUE = 360.0
 
static constexpr double MAX_SATURATION = 100.0
 
static constexpr double MAX_LIGHTNESS = 100.0
 
static constexpr double MIN_HUE = 0.0
 
static constexpr double MIN_SATURATION = 0.0
 
static constexpr double MIN_LIGHTNESS = 0.0
 
static constexpr double OUTER_CIRCLE_DASH_SIZE = 10.0
 
static constexpr double VERTEX_EPSILON = 0.01
 
static constexpr double marker_radius = 4.0
 
static constexpr double focus_line_width = 1.0
 
static constexpr double focus_padding = 3.0
 
static auto const focus_dash = std::vector{1.5}
 
constexpr double half_width = 5.0
 
auto ink_spinbutton_css
 
constexpr int timeout_click = 500
 
constexpr int timeout_repeat = 50
 
static Glib::RefPtr< Gdk::Cursor > g_resizing_cursor
 
static Glib::RefPtr< Gdk::Cursor > g_text_cursor
 
static constexpr auto cssName = "LayerSelector"
 
const struct rdf_license_t _proprietary_license
 
const struct rdf_license_t _other_license
 
static Cairo::RefPtr< Cairo::Surface > g_image_none
 
static Cairo::RefPtr< Cairo::Surface > g_bad_marker
 
const char * g_linked = "entries-linked-symbolic"
 
const char * g_unlinked = "entries-unlinked-symbolic"
 
const char * s_linked = "scale-linked-symbolic"
 
const char * s_unlinked = "scale-unlinked-symbolic"
 
static constexpr int ITEM_WIDTH = 45
 
const double ANGLE_STEP = 15.0
 
static Glib::ustring all_templates = "All templates"
 

Detailed Description

Custom widgets.

Pattern editor widget for "Fill and Stroke" dialog.

Image properties widget for "Fill and Stroke" dialog.

A simple gradient preview.

Gradient editor widget for "Fill and Stroke" dialog.

This namespace contains custom user interface widgets used thorough Inkscape.

Author: Michael Kowalski

Copyright (C) 2020-2021 Michael Kowalski

Released under GNU GPL v2+, read the file 'COPYING' for more information.

Author: Lauris Kaplinski lauri.nosp@m.s@ka.nosp@m.plins.nosp@m.ki.c.nosp@m.om

Copyright (C) 2001-2002 Lauris Kaplinski Copyright (C) 2001 Ximian, Inc.

Released under GNU GPL v2+, read the file 'COPYING' for more information.

Copyright (C) 2023 Michael Kowalski

Released under GNU GPL v2+, read the file 'COPYING' for more information.

Copyright (C) 2022 Michael Kowalski

Released under GNU GPL v2+, read the file 'COPYING' for more information.

Typedef Documentation

◆ FShader

using Inkscape::UI::Widget::FShader = typedef Shader<GL_FRAGMENT_SHADER>

Definition at line 34 of file glgraphics.h.

◆ GShader

using Inkscape::UI::Widget::GShader = typedef Shader<GL_GEOMETRY_SHADER>

Definition at line 32 of file glgraphics.h.

◆ OverlayState

Definition at line 27 of file shapeicon.h.

◆ RenderNodePtr

using Inkscape::UI::Widget::RenderNodePtr = typedef std::unique_ptr<GskRenderNode, Util::Deleter<gsk_render_node_unref> >

Definition at line 38 of file ink-ruler.h.

◆ VShader

using Inkscape::UI::Widget::VShader = typedef Shader<GL_VERTEX_SHADER>

Definition at line 33 of file glgraphics.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
COMBO_COL_LABEL 
COMBO_COL_STOCK 
COMBO_COL_PATTERN 
COMBO_COL_MESH 
COMBO_COL_SEP 
COMBO_N_COLS 

Definition at line 206 of file paint-selector.h.

◆ Columns

Enumerator
ColID 
ColName 
ColIcon 
ColSearch 

Definition at line 18 of file completion-popup.cpp.

◆ DefaultValueType

Enumerator
T_NONE 
T_DOUBLE 
T_VECT_DOUBLE 
T_BOOL 
T_UINT 
T_CHARPTR 

Definition at line 23 of file attr-widget.h.

◆ FillOrStroke

Enumerator
SS_FILL 
SS_STROKE 

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

◆ OverlayStates

Enumerator
OVERLAY_NONE 
OVERLAY_CLIP 
OVERLAY_MASK 
OVERLAY_BOTH 

Definition at line 28 of file shapeicon.h.

◆ PaintType

Enumerator
SS_NA 
SS_NONE 
SS_UNSET 
SS_MANY 
SS_PATTERN 
SS_HATCH 
SS_LGRADIENT 
SS_RGRADIENT 
SS_MGRADIENT 
SS_COLOR 

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

◆ RSU_UserUnits

Enumerator
RSU_none 
RSU_x 
RSU_y 

Definition at line 226 of file registered-widget.h.

◆ ui_drop_target_info

Enumerator
APP_OSWB_COLOR 

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

Function Documentation

◆ _getAllocationDimensions()

static Geom::IntPoint Inkscape::UI::Widget::_getAllocationDimensions ( Gtk::Allocation const &  allocation)
inlinestatic

◆ _getAllocationSize()

static int Inkscape::UI::Widget::_getAllocationSize ( Gtk::Allocation const &  allocation)
inlinestatic

◆ _getMargin()

◆ _make_checkerboard()

Glib::RefPtr< Gdk::Pixbuf > Inkscape::UI::Widget::_make_checkerboard ( uint32_t  dark,
uint32_t  light,
unsigned  scale,
std::vector< uint32_t > &  buffer 
)

Generate a checkerboard pattern with the given colors.

  • dark - The RGBA dark color
  • light - The RGBA light color
  • scale - The scale factor of the cairo surface
  • buffer - The memory to populate with this pattern
Returns
A Gdk::Pixbuf of the buffer memory.

Definition at line 117 of file color-slider.cpp.

References scale.

Referenced by Inkscape::UI::Widget::ColorSlider::draw_func().

◆ apply_profile()

static Geom::Point Inkscape::UI::Widget::apply_profile ( Geom::Point const &  pt)
static

Definition at line 853 of file canvas.cpp.

References Geom::EPSILON, Geom::Point::length(), and profile().

◆ bisect()

static std::optional< Geom::Dim2 > Inkscape::UI::Widget::bisect ( Geom::IntRect const &  rect,
int  tile_size 
)
static

◆ buildGroupedItemList()

static void Inkscape::UI::Widget::buildGroupedItemList ( SPObject element,
std::vector< SPObject * > &  simple_list 
)
static

Recursively builds a simple list from an arbitrarily complex selection of items and grouped items.

Definition at line 1195 of file stroke-style.cpp.

References buildGroupedItemList(), and SPObject::firstChild().

Referenced by buildGroupedItemList(), and Inkscape::UI::Widget::StrokeStyle::updateAllMarkers().

◆ calcScaleLineWidth()

static double Inkscape::UI::Widget::calcScaleLineWidth ( const double  width_typed,
SPItem *const  item,
Inkscape::Util::Unit const *const  unit 
)
inlinestatic

◆ can_create_color_wheel()

bool Inkscape::UI::Widget::can_create_color_wheel ( Type  type)

◆ cap_length()

static Geom::Point Inkscape::UI::Widget::cap_length ( Geom::Point const &  pt,
double  max 
)
static

Definition at line 840 of file canvas.cpp.

References Geom::Point::length().

◆ checkerboard_darken() [1/2]

Colors::Color Inkscape::UI::Widget::checkerboard_darken ( Colors::Color  color)

◆ checkerboard_darken() [2/2]

std::array< float, 3 > Inkscape::UI::Widget::checkerboard_darken ( uint32_t  rgba)
inline

Definition at line 57 of file util.h.

References checkerboard_darken().

◆ circle()

void Inkscape::UI::Widget::circle ( const Cairo::RefPtr< Cairo::Context > &  ctx,
const Geom::Point center,
double  radius 
)

Definition at line 23 of file color-plate.cpp.

References Geom::Point::x(), and Geom::Point::y().

Referenced by draw_color_plate(), and draw_point_indicator().

◆ coarsen()

auto Inkscape::UI::Widget::coarsen ( const Cairo::RefPtr< Cairo::Region > &  region,
int  min_size,
int  glue_size,
double  min_fullness 
)

◆ consume_tab_return_desktop()

static SPDesktop * Inkscape::UI::Widget::consume_tab_return_desktop ( std::shared_ptr< Tab >  tab)
static

Definition at line 490 of file tabs-widget.cpp.

Referenced by Inkscape::UI::Widget::TabsWidget::TabsWidget().

◆ create_checkerboard_pattern()

Cairo::RefPtr< Cairo::Pattern > Inkscape::UI::Widget::create_checkerboard_pattern ( double  tx,
double  ty 
)

◆ create_color_plate()

static Cairo::RefPtr< Cairo::ImageSurface > Inkscape::UI::Widget::create_color_plate ( unsigned int  resolution,
const Color base,
int  channel1,
int  channel2 
)
static

◆ create_color_preview()

static Cairo::RefPtr< Cairo::ImageSurface > Inkscape::UI::Widget::create_color_preview ( int  size,
const std::function< void(std::vector< std::uint32_t > &, int width)> &  draw 
)
static

Definition at line 125 of file color-plate.cpp.

References data, draw(), fmt, Inkscape::size, stride, and width.

Referenced by create_color_plate(), and create_color_wheel().

◆ create_color_wheel()

static Cairo::RefPtr< Cairo::ImageSurface > Inkscape::UI::Widget::create_color_wheel ( unsigned int  resolution,
const Color base,
int  channel1,
int  channel2 
)
static

◆ create_color_wheel_helper()

static std::pair< ColorWheel *, bool > Inkscape::UI::Widget::create_color_wheel_helper ( Type  type,
bool  create_widget 
)
static

◆ create_managed_color_wheel()

ColorWheel * Inkscape::UI::Widget::create_managed_color_wheel ( Type  type)

◆ create_pattern_item()

Glib::RefPtr< PatternItem > Inkscape::UI::Widget::create_pattern_item ( PatternManager manager,
SPPattern pattern,
int  tile_size,
double  scale 
)

◆ create_pattern_items()

std::vector< Glib::RefPtr< PatternItem > > Inkscape::UI::Widget::create_pattern_items ( PatternManager manager,
const std::vector< SPPattern * > &  list,
int  tile_size,
double  device_scale 
)

◆ create_separator()

static cairo_surface_t * Inkscape::UI::Widget::create_separator ( double  alpha,
int  width,
int  height,
int  device_scale 
)
static

◆ dialogLoggingCallback()

static void Inkscape::UI::Widget::dialogLoggingCallback ( char const *  ,
GLogLevelFlags  ,
char const *  messageText,
gpointer  user_data 
)
static

◆ draw_circle()

◆ draw_color_plate()

static void Inkscape::UI::Widget::draw_color_plate ( const Cairo::RefPtr< Cairo::Context > &  ctx,
const Geom::Rect area,
double  radius,
const Cairo::RefPtr< Cairo::ImageSurface > &  preview,
bool  circular 
)
static

◆ draw_number()

static void Inkscape::UI::Widget::draw_number ( cairo_t cr,
Geom::Point  pos,
double  num 
)
static

Definition at line 379 of file preferences-widget.cpp.

References draw_text(), and num.

Referenced by Inkscape::UI::Widget::ZoomCorrRuler::draw_marks().

◆ draw_point_indicator()

static void Inkscape::UI::Widget::draw_point_indicator ( const Cairo::RefPtr< Cairo::Context > &  ctx,
const Geom::Point point,
double  size 
)
static

◆ draw_slider_thumb()

static void Inkscape::UI::Widget::draw_slider_thumb ( const Cairo::RefPtr< Cairo::Context > &  ctx,
const Geom::Point location,
double  size,
const Gdk::RGBA &  fill,
const Gdk::RGBA &  stroke,
int  device_scale 
)
static

◆ draw_text()

static void Inkscape::UI::Widget::draw_text ( cairo_t cr,
Geom::Point  loc,
const char *  txt,
bool  bottom = false,
double  fontsize = ZoomCorrRuler::textsize,
std::string  fontdesc = "Sans" 
)
static

Definition at line 359 of file preferences-widget.cpp.

References cairo_move_to(), Geom::X, and Geom::Y.

Referenced by draw_number().

◆ draw_vertical_padding()

void Inkscape::UI::Widget::draw_vertical_padding ( ColorPoint  p0,
ColorPoint  p1,
int  padding,
bool  pad_upwards,
guint32 buffer,
int  height,
int  stride 
)
static

Paints padding for an edge of the triangle, using the (vertically) closest point.

Parameters
p0A corner of the triangle. Not the same corner as p1
p1A corner of the triangle. Not the same corner as p0
paddingThe height of the padding
pad_upwardsTrue if padding is above the line
bufferArray that the triangle is painted to
heightHeight of buffer
strideStride of buffer

Definition at line 1199 of file ink-color-wheel.cpp.

References Inkscape::UI::Widget::ColorPoint::color, height, lerp(), offset, stride, Inkscape::Colors::Color::toARGB(), Inkscape::UI::Widget::ColorPoint::x, and Inkscape::UI::Widget::ColorPoint::y.

Referenced by Inkscape::UI::Widget::ColorWheelHSL::update_triangle_source().

◆ find_marker()

SPMarker * Inkscape::UI::Widget::find_marker ( SPDocument document,
const Glib::ustring &  marker_id 
)

◆ font_size_to_index()

static int Inkscape::UI::Widget::font_size_to_index ( double  size)
static

◆ from_pixel_coordinate()

static Geom::Point Inkscape::UI::Widget::from_pixel_coordinate ( Geom::Point const &  point,
double  scale,
double  resize 
)
static

Convert a point in pixels on the widget to Luv coordinates.

Parameters
pointThe point in pixel coordinates.
scaleZoom amount to fit polygon to outer circle.
resizeZoom amount to fit wheel in widget.

Definition at line 1160 of file ink-color-wheel.cpp.

References resize(), scale, SIZE, Geom::X, and Geom::Y.

Referenced by Inkscape::UI::Widget::ColorWheelHSLuv::_set_from_xy(), and Inkscape::UI::Widget::ColorWheelHSLuv::_updatePolygon().

◆ gap_to_slider()

static double Inkscape::UI::Widget::gap_to_slider ( double  gap,
double  upper 
)
static

◆ get_accel_factor()

static double Inkscape::UI::Widget::get_accel_factor ( Gdk::ModifierType  state)
static

◆ get_active_area()

static Geom::OptIntRect Inkscape::UI::Widget::get_active_area ( int  full_width,
int  full_height 
)
static

◆ get_alt_name()

Glib::ustring Inkscape::UI::Widget::get_alt_name ( const Glib::ustring &  fontspec)

Definition at line 106 of file font-list.cpp.

References Inkscape::UI::end.

Referenced by get_cell_data_func(), and get_font_name().

◆ get_attrib() [1/2]

Glib::ustring Inkscape::UI::Widget::get_attrib ( SPMarker marker,
const char *  attrib 
)

◆ get_attrib() [2/2]

Glib::ustring Inkscape::UI::Widget::get_attrib ( SPPattern pattern,
const char *  attrib 
)

Definition at line 66 of file pattern-editor.cpp.

References SPObject::getAttribute().

◆ get_attrib_num() [1/2]

double Inkscape::UI::Widget::get_attrib_num ( SPMarker marker,
const char *  attrib 
)

◆ get_attrib_num() [2/2]

double Inkscape::UI::Widget::get_attrib_num ( SPPattern pattern,
const char *  attrib 
)

Definition at line 71 of file pattern-editor.cpp.

References get_attrib().

◆ get_axis_name()

std::pair< Glib::ustring, Glib::ustring > Inkscape::UI::Widget::get_axis_name ( const std::string &  tag,
const Glib::ustring &  abbr 
)

Definition at line 46 of file font-variations.cpp.

References Inkscape::UI::end.

Referenced by Inkscape::UI::Widget::FontVariations::build_ui().

◆ get_cell_data_func()

void Inkscape::UI::Widget::get_cell_data_func ( Gtk::CellRenderer *  cell_renderer,
Gtk::TreeModel::ConstRow  row 
)

◆ get_color_coordinates()

static Geom::Point Inkscape::UI::Widget::get_color_coordinates ( double  val1,
double  val2,
bool  circular 
)
static

Definition at line 96 of file color-plate.cpp.

Referenced by Inkscape::UI::Widget::ColorPlate::move_indicator_to().

◆ get_fill_and_stroke_panel()

◆ get_font_icon()

Glib::ustring Inkscape::UI::Widget::get_font_icon ( const FontInfo font,
bool  missing_font 
)

◆ get_font_name()

Glib::ustring Inkscape::UI::Widget::get_font_name ( Gtk::TreeIter< Gtk::TreeRow > &  iter)

◆ get_full_name()

Glib::ustring Inkscape::UI::Widget::get_full_name ( const Inkscape::FontInfo font_info)

◆ get_pattern()

SPPattern * Inkscape::UI::Widget::get_pattern ( const PatternItem item,
SPDocument document 
)

Definition at line 694 of file pattern-editor.cpp.

References get_pattern(), SPObject::id, and item.

Referenced by get_pattern(), and regenerate_tile_images().

◆ get_range()

static Geom::Interval Inkscape::UI::Widget::get_range ( Gtk::Scrollbar const &  sb)
static

◆ get_renderer()

CellFontRenderer & Inkscape::UI::Widget::get_renderer ( Gtk::CellRenderer &  renderer)

Definition at line 132 of file font-list.cpp.

Referenced by get_cell_data_func().

◆ get_repeat_icon()

◆ get_scrollable_ancestor() [1/2]

Gtk::Widget * Inkscape::UI::Widget::get_scrollable_ancestor ( Gtk::Widget *  widget)

Get the first ancestor which is scrollable.

Definition at line 19 of file scroll-utils.cpp.

References Inkscape::UI::_break, Inkscape::UI::_continue, Inkscape::UI::for_each_parent(), and parent.

Referenced by Inkscape::UI::Widget::SpinButton::defocus(), and get_scrollable_ancestor().

◆ get_scrollable_ancestor() [2/2]

Gtk::Widget const * Inkscape::UI::Widget::get_scrollable_ancestor ( Gtk::Widget const *const  widget)

Get the first ancestor which is scrollable.

Definition at line 33 of file scroll-utils.cpp.

References get_scrollable_ancestor().

◆ get_sort_icon()

const char * Inkscape::UI::Widget::get_sort_icon ( Inkscape::FontOrder  order)

◆ get_sorter()

static std::tuple< int, Glib::ustring, std::string > Inkscape::UI::Widget::get_sorter ( PaperSize const &  page)
static

Definition at line 62 of file page-properties.cpp.

References name, and page.

◆ get_stop_pixmap()

Glib::RefPtr< Gdk::Pixbuf > Inkscape::UI::Widget::get_stop_pixmap ( SPStop stop)

◆ get_stop_template_path()

std::string Inkscape::UI::Widget::get_stop_template_path ( const char *  filename)

◆ get_tab_drag() [1/2]

static std::shared_ptr< TabWidgetDrag > Inkscape::UI::Widget::get_tab_drag ( Gtk::DropTarget &  droptarget)
static

Definition at line 508 of file tab-strip.cpp.

◆ get_tab_drag() [2/2]

static std::shared_ptr< TabDrag > Inkscape::UI::Widget::get_tab_drag ( Gtk::DropTarget &  droptarget)
static

Definition at line 474 of file tabs-widget.cpp.

◆ get_text()

◆ get_value_at()

static double Inkscape::UI::Widget::get_value_at ( Gtk::Widget const &  self,
double const  x,
double const  y 
)
static

Definition at line 75 of file color-slider.cpp.

References get_active_area().

Referenced by Inkscape::UI::Widget::ColorSlider::update_component().

◆ have_glinvalidateteximage()

static bool Inkscape::UI::Widget::have_glinvalidateteximage ( )
static

Definition at line 13 of file texture.cpp.

References result.

Referenced by Inkscape::UI::Widget::Texture::invalidate().

◆ have_gltexstorage()

static bool Inkscape::UI::Widget::have_gltexstorage ( )
static

Definition at line 7 of file texture.cpp.

References result.

Referenced by Inkscape::UI::Widget::Texture::Texture().

◆ index_to_font_size()

static int Inkscape::UI::Widget::index_to_font_size ( int  index)
static

Definition at line 83 of file font-list.cpp.

References g_font_sizes, and index.

Referenced by Inkscape::UI::Widget::FontList::FontList().

◆ ink_mesh_list_get()

static std::vector< SPMeshGradient * > Inkscape::UI::Widget::ink_mesh_list_get ( SPDocument source)
static

Returns a list of meshes in the defs of the given source document as a vector.

Definition at line 612 of file paint-selector.cpp.

References SPDocument::getResourceList().

Referenced by sp_mesh_list_from_doc().

◆ ink_mesh_menu()

static GtkWidget * Inkscape::UI::Widget::ink_mesh_menu ( GtkWidget *  combo)
static

◆ ink_mesh_menu_populate_menu()

static void Inkscape::UI::Widget::ink_mesh_menu_populate_menu ( GtkWidget *  combo,
SPDocument doc 
)
static

Definition at line 669 of file paint-selector.cpp.

References sp_mesh_list_from_doc().

Referenced by ink_mesh_menu().

◆ isPaintModeGradient()

◆ lerp() [1/2]

static ColorPoint Inkscape::UI::Widget::lerp ( ColorPoint const &  v0,
ColorPoint const &  v1,
double  t0,
double  t1,
double  t 
)
static

◆ lerp() [2/2]

static double Inkscape::UI::Widget::lerp ( double  v0,
double  v1,
double  t0,
double  t1,
double  t 
)
static

◆ line_angle()

double Inkscape::UI::Widget::line_angle ( const Geom::Line line)

◆ local_to_screen()

static Geom::Point Inkscape::UI::Widget::local_to_screen ( const Geom::Rect active,
Geom::Point  point,
bool  circular 
)
static

◆ luminance()

double Inkscape::UI::Widget::luminance ( Color const &  color)
static

◆ make_menu()

static auto Inkscape::UI::Widget::make_menu ( )
static

Definition at line 44 of file color-palette.cpp.

Referenced by Inkscape::UI::Widget::ColorPalette::ColorPalette().

◆ make_menu_item()

template<typename Slot , typename ... Args>
static UI::Widget::PopoverMenuItem * Inkscape::UI::Widget::make_menu_item ( Glib::ustring const &  label,
Slot  slot,
Args &&...  args 
)
static

◆ parse_pattern()

std::vector< double > Inkscape::UI::Widget::parse_pattern ( const Glib::ustring &  input)

Definition at line 169 of file stroke-style.cpp.

Referenced by Inkscape::UI::Widget::StrokeStyle::StrokeStyle().

◆ premultiplied()

auto Inkscape::UI::Widget::premultiplied ( std::array< float, 4 >  arr)
inline

Definition at line 47 of file util.h.

◆ profile()

static double Inkscape::UI::Widget::profile ( double  r)
static

◆ regenerate_tile_images()

void Inkscape::UI::Widget::regenerate_tile_images ( PatternManager manager,
PatternStore pat_store,
int  tile_size,
double  device_scale,
SPDocument current 
)

◆ region_to_path()

void Inkscape::UI::Widget::region_to_path ( Cairo::RefPtr< Cairo::Context > const &  cr,
Cairo::RefPtr< Cairo::Region > const &  reg 
)

◆ rgb_to_array()

auto Inkscape::UI::Widget::rgb_to_array ( uint32_t  rgb)
inline

Definition at line 37 of file util.h.

References rgb, SP_RGBA32_B_U(), SP_RGBA32_G_U(), and SP_RGBA32_R_U().

◆ rgba_to_array()

auto Inkscape::UI::Widget::rgba_to_array ( uint32_t  rgba)
inline

Definition at line 42 of file util.h.

References SP_RGBA32_A_U(), SP_RGBA32_B_U(), SP_RGBA32_G_U(), and SP_RGBA32_R_U().

◆ round_rect()

Geom::Rect Inkscape::UI::Widget::round_rect ( const Cairo::RefPtr< Cairo::Context > &  ctx,
Geom::Rect  rect,
double  radius 
)

◆ rounded_rectangle()

void Inkscape::UI::Widget::rounded_rectangle ( const Cairo::RefPtr< Cairo::Context > &  cr,
double  x,
double  y,
double  w,
double  h,
double  r 
)

Definition at line 29 of file page-size-preview.cpp.

References w.

Referenced by Inkscape::UI::Widget::PageSizePreview::draw_func().

◆ ruler_snap_new_guide()

◆ safe_frac()

static double Inkscape::UI::Widget::safe_frac ( double  x)
static

Definition at line 168 of file ink-ruler.cpp.

Referenced by Inkscape::UI::Widget::Ruler::draw_ruler().

◆ screen_to_local()

static Geom::Point Inkscape::UI::Widget::screen_to_local ( const Geom::Rect active,
Geom::Point  point,
bool  circular,
bool *  inside = nullptr 
)
static

◆ set_adjustment()

static void Inkscape::UI::Widget::set_adjustment ( Gtk::Adjustment *  adj,
double  l,
double  u,
double  ps,
double  si,
double  pi 
)
static

Definition at line 727 of file canvas-grid.cpp.

Referenced by Inkscape::UI::Widget::CanvasGrid::updateScrollbars().

◆ set_color_helper()

static void Inkscape::UI::Widget::set_color_helper ( Color color,
int  channel1,
int  channel2,
double  x,
double  y,
bool  disc 
)
static

◆ set_grid_cell_size()

void Inkscape::UI::Widget::set_grid_cell_size ( Gtk::CellRendererText *  renderer,
int  font_size_percent 
)

Definition at line 235 of file font-list.cpp.

References Inkscape::size.

Referenced by Inkscape::UI::Widget::FontList::FontList().

◆ set_icon()

void Inkscape::UI::Widget::set_icon ( Gtk::Button &  btn,
char const *  pixmap 
)

◆ set_source_rgba()

void Inkscape::UI::Widget::set_source_rgba ( const Cairo::RefPtr< Cairo::Context > &  ctx,
unsigned int  rgba 
)

◆ shrink_region()

Cairo::RefPtr< Cairo::Region > Inkscape::UI::Widget::shrink_region ( Cairo::RefPtr< Cairo::Region > const &  reg,
int  d,
int  t 
)

◆ slider_to_gap()

static double Inkscape::UI::Widget::slider_to_gap ( double  index,
double  upper 
)
static

◆ slider_to_tile()

static int Inkscape::UI::Widget::slider_to_tile ( double  index)
static

Definition at line 59 of file pattern-editor.cpp.

References index.

Referenced by Inkscape::UI::Widget::PatternEditor::PatternEditor().

◆ sort_patterns()

void Inkscape::UI::Widget::sort_patterns ( std::vector< Glib::RefPtr< PatternItem > > &  list)

◆ sp_mesh_list_from_doc()

static void Inkscape::UI::Widget::sp_mesh_list_from_doc ( GtkWidget *  combo,
SPDocument ,
SPDocument source,
SPDocument  
)
static

Pick up all meshes from source, except those that are in current_doc (if non-NULL), and add items to the mesh menu.

Definition at line 661 of file paint-selector.cpp.

References ink_mesh_list_get(), and sp_mesh_menu_build().

Referenced by ink_mesh_menu_populate_menu().

◆ sp_mesh_menu_build()

static void Inkscape::UI::Widget::sp_mesh_menu_build ( GtkWidget *  combo,
std::vector< SPMeshGradient * > &  mesh_list,
SPDocument  
)
static

Adds menu items for mesh list.

Definition at line 632 of file paint-selector.cpp.

References Inkscape::XML::Node::attribute(), COMBO_COL_LABEL, COMBO_COL_MESH, COMBO_COL_SEP, COMBO_COL_STOCK, label, and store.

Referenced by sp_mesh_list_from_doc().

◆ spw_hbox()

static Gtk::Box * Inkscape::UI::Widget::spw_hbox ( Gtk::Grid *  table,
int  width,
int  col,
int  row 
)
static

Creates a horizontal layout manager with 4-pixel spacing between children and space for 'width' columns.

Definition at line 127 of file stroke-style.cpp.

References width.

Referenced by Inkscape::UI::Widget::StrokeStyle::StrokeStyle().

◆ spw_label()

static Gtk::Label * Inkscape::UI::Widget::spw_label ( Gtk::Grid *  table,
const gchar *  label_text,
int  col,
int  row,
Gtk::Widget *  target 
)
static

Creates a label widget with the given text, at the given col, row position in the table.

Definition at line 100 of file stroke-style.cpp.

Referenced by Inkscape::UI::Widget::StrokeStyle::StrokeStyle().

◆ strip_trailing()

static void Inkscape::UI::Widget::strip_trailing ( Glib::ustring &  s,
char const  c 
)
static

Definition at line 31 of file combo-tool-item.cpp.

References c.

Referenced by Inkscape::UI::Widget::ComboToolItem::ComboToolItem().

◆ style_obs_callback()

void Inkscape::UI::Widget::style_obs_callback ( StyleSwatch _style_swatch,
Preferences::Entry const &  val 
)

Watches for changes in the observed style pref.

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

References css, Inkscape::Preferences::Entry::getInheritedStyle(), Inkscape::UI::Widget::StyleSwatch::setStyle(), and sp_repr_css_attr_unref().

◆ tile_to_slider()

static double Inkscape::UI::Widget::tile_to_slider ( int  tile)
static

◆ to_pixel_coordinate() [1/2]

static Geom::Point Inkscape::UI::Widget::to_pixel_coordinate ( Geom::Point const &  point,
double  scale,
double  resize 
)
static

Convert a point of the gamut color polygon (Luv) to pixel coordinates.

Parameters
pointThe point in Luv coordinates.
scaleZoom amount to fit polygon to outer circle.
resizeZoom amount to fit wheel in widget.

Definition at line 1145 of file ink-color-wheel.cpp.

References resize(), scale, SIZE, Geom::X, and Geom::Y.

Referenced by Inkscape::UI::Widget::ColorWheelHSLuv::_updatePolygon(), Inkscape::UI::Widget::ColorWheelHSLuv::on_drawing_area_draw(), and to_pixel_coordinate().

◆ to_pixel_coordinate() [2/2]

static std::vector< Geom::Point > Inkscape::UI::Widget::to_pixel_coordinate ( std::vector< Geom::Point > const &  points,
double  scale,
double  resize 
)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
pointA vector of points in Luv coordinates.
scaleZoom amount to fit polygon to outer circle.
resizeZoom amount to fit wheel in widget.

Definition at line 1174 of file ink-color-wheel.cpp.

References resize(), result, scale, and to_pixel_coordinate().

◆ tool_obs_callback()

void Inkscape::UI::Widget::tool_obs_callback ( StyleSwatch _style_swatch,
Preferences::Entry const &  val 
)

Watches whether the tool uses the current style.

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

◆ trim_zeros()

static void Inkscape::UI::Widget::trim_zeros ( std::string &  ret)
static

Definition at line 414 of file ink-spin-button.cpp.

References trim_zeros().

Referenced by Inkscape::UI::Widget::InkSpinButton::format(), and trim_zeros().

◆ unioned()

auto Inkscape::UI::Widget::unioned ( Cairo::RefPtr< Cairo::Region >  a,
Cairo::RefPtr< Cairo::Region > const &  b 
)
inline

Definition at line 29 of file util.h.

◆ unset_recursive()

void Inkscape::UI::Widget::unset_recursive ( const char *  attribute,
SPObject object 
)

Definition at line 379 of file fill-style.cpp.

References child, and unset_recursive().

Referenced by unset_recursive(), and Inkscape::UI::Widget::FillNStroke::updateFromPaint().

◆ Updater::create< Updater::Strategy::FullRedraw >()

◆ Updater::create< Updater::Strategy::Multiscale >()

Definition at line 1 of file updaters.cpp.

◆ Updater::create< Updater::Strategy::Responsive >()

Definition at line 1 of file updaters.cpp.

Variable Documentation

◆ _other_license

const struct rdf_license_t Inkscape::UI::Widget::_other_license
Initial value:
=
{Q_("MetadataLicence|Other"), "", nullptr}

Definition at line 40 of file licensor.cpp.

Referenced by Inkscape::UI::Widget::Licensor::init().

◆ _proprietary_license

const struct rdf_license_t Inkscape::UI::Widget::_proprietary_license
Initial value:
=
{_("Proprietary"), "", nullptr}

Definition at line 37 of file licensor.cpp.

Referenced by Inkscape::UI::Widget::Licensor::init().

◆ all_templates

Glib::ustring Inkscape::UI::Widget::all_templates = "All templates"
static

Definition at line 80 of file template-list.cpp.

Referenced by Inkscape::UI::Widget::TemplateList::init().

◆ ANGLE_STEP

const double Inkscape::UI::Widget::ANGLE_STEP = 15.0

◆ cssName

constexpr auto Inkscape::UI::Widget::cssName = "LayerSelector"
staticconstexpr

◆ dx

◆ focus_dash

auto const Inkscape::UI::Widget::focus_dash = std::vector{1.5}
static

◆ focus_line_width

constexpr double Inkscape::UI::Widget::focus_line_width = 1.0
staticconstexpr

◆ focus_padding

constexpr double Inkscape::UI::Widget::focus_padding = 3.0
staticconstexpr

◆ g_bad_marker

Cairo::RefPtr<Cairo::Surface> Inkscape::UI::Widget::g_bad_marker
static

◆ g_column_model

◆ g_font_sizes

std::array<int, 38> Inkscape::UI::Widget::g_font_sizes
static
Initial value:
= {
4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36,
44, 56, 64, 72, 80, 96, 112, 128, 144, 160, 192, 224, 256,
300, 350, 400, 450, 500, 550, 600, 700, 800
}

Definition at line 77 of file font-list.cpp.

Referenced by font_size_to_index(), Inkscape::UI::Widget::FontList::FontList(), and index_to_font_size().

◆ g_image_none

Cairo::RefPtr<Cairo::Surface> Inkscape::UI::Widget::g_image_none
static

◆ g_linked

const char* Inkscape::UI::Widget::g_linked = "entries-linked-symbolic"

Definition at line 57 of file page-properties.cpp.

◆ g_resizing_cursor

Glib::RefPtr<Gdk::Cursor> Inkscape::UI::Widget::g_resizing_cursor
static

◆ g_text_cursor

Glib::RefPtr<Gdk::Cursor> Inkscape::UI::Widget::g_text_cursor
static

◆ g_unlinked

const char* Inkscape::UI::Widget::g_unlinked = "entries-unlinked-symbolic"

Definition at line 58 of file page-properties.cpp.

◆ grid_types

const auto Inkscape::UI::Widget::grid_types
static
Initial value:
= std::to_array({std::tuple
{C_("Grid", "Rectangular"), GridType::RECTANGULAR, "grid-rectangular"},
{C_("Grid", "Axonometric"), GridType::AXONOMETRIC, "grid-axonometric"},
{C_("Grid", "Modular"), GridType::MODULAR, "grid-modular"}
})

Definition at line 1690 of file document-properties.cpp.

◆ half_width

constexpr double Inkscape::UI::Widget::half_width = 5.0
constexpr

Definition at line 40 of file ink-ruler.cpp.

Referenced by Inkscape::UI::Widget::Ruler::draw_marker().

◆ height

constexpr int Inkscape::UI::Widget::height = 2
staticconstexpr

Definition at line 23 of file color-palette-preview.cpp.

Referenced by Inkscape::UI::Widget::ColorPicker::_construct(), _getMargin(), Inkscape::UI::Widget::ColorWheelHSL::_is_in_ring(), Inkscape::UI::Widget::ColorWheelHSLuv::_set_from_xy(), Inkscape::UI::Widget::ColorWheelHSL::_set_from_xy(), Inkscape::UI::Widget::ColorWheelHSL::_update_ring_color(), Inkscape::UI::Widget::OKWheel::_updateDimensions(), Inkscape::UI::Dialog::add_shadow(), Inkscape::UI::Dialog::AttrDialog::adjust_popup_edit_size(), Inkscape::UI::Dialog::Transformation::applyPageSkew(), Inkscape::UI::Dialog::SingleExport::areaYChange(), Inkscape::UI::Dialog::GridArrangeTab::arrange(), Inkscape::UI::Widget::PopoverMenu::attach(), Inkscape::UI::Widget::ColorPalettePreview::ColorPalettePreview(), create_separator(), Inkscape::UI::Dialog::DialogWindow::DialogWindow(), Inkscape::UI::Dialog::dm_get_window_position(), Inkscape::UI::Dialog::SingleExport::dpiChange(), draw_circle(), Inkscape::UI::Widget::ColorPreview::draw_func(), Inkscape::UI::Widget::GradientImage::draw_func(), Inkscape::UI::Widget::PageSizePreview::draw_func(), Inkscape::UI::Widget::ColorPalettePreview::draw_func(), Inkscape::UI::Widget::DashSelector::draw_pattern(), Inkscape::UI::Widget::DashSelector::draw_text(), draw_vertical_padding(), Inkscape::UI::Dialog::Export::exportRaster(), Inkscape::UI::Widget::FontSelector::FontSelector(), Inkscape::UI::Widget::GradientWithStops::get_layout(), Inkscape::UI::Widget::ColorWheelHSL::get_radii(), Inkscape::UI::Dialog::get_thumbnail_size(), Inkscape::UI::Dialog::CloneTiler::get_transform(), Inkscape::UI::Widget::ColorWheelHSL::get_triangle_corners(), Inkscape::UI::Widget::PrefMultiEntry::init(), Inkscape::UI::Dialog::DialogContainer::load_container_state(), Inkscape::UI::Widget::MarkerComboBox::MarkerComboBox(), Inkscape::UI::Widget::ColorWheelHSL::on_drawing_area_draw(), Inkscape::UI::Widget::ColorWheelHSL::on_drawing_area_size(), Inkscape::UI::Widget::Bin::on_size_allocate(), Inkscape::UI::Dialog::BatchExport::onExport(), Inkscape::UI::Dialog::SingleExport::onExport(), Inkscape::UI::Dialog::overlayPixels(), Inkscape::UI::Widget::ColorPalette::resize(), round_rect(), Inkscape::UI::Dialog::set_document_dimensions(), Inkscape::UI::Widget::GradientSelector::set_gradient_size(), Inkscape::UI::Widget::PageSizePreview::set_page_size(), Inkscape::UI::Widget::GradientVectorSelector::set_pixmap_size(), Inkscape::UI::Dialog::DocumentProperties::set_viewbox_size(), Inkscape::UI::Dialog::Print::setup_page(), Inkscape::UI::Dialog::DialogMultipaned::size_allocate_vfunc(), Inkscape::UI::Widget::Canvas::size_allocate_vfunc(), Inkscape::UI::Dialog::ColorItem::size_allocate_vfunc(), Inkscape::UI::Widget::Bin::size_allocate_vfunc(), Inkscape::UI::Widget::CanvasGrid::size_allocate_vfunc(), Inkscape::UI::Dialog::sp_icon_doc_icon(), Inkscape::UI::Dialog::FilterEffectsDialog::PrimitiveList::update(), Inkscape::UI::Widget::ImageProperties::update(), Inkscape::UI::Widget::ColorWheelHSL::update_ring_source(), Inkscape::UI::Widget::ColorWheelHSL::update_triangle_source(), Inkscape::UI::Dialog::DialogWindow::update_window_size_to_fit_children(), Inkscape::UI::Dialog::XmlTree::XmlTree(), and Inkscape::UI::Widget::ZoomCorrRuler::ZoomCorrRuler().

◆ ink_spinbutton_css

auto Inkscape::UI::Widget::ink_spinbutton_css
Initial value:
= R"=====(
@define-color border-color @unfocused_borders;
@define-color bgnd-color alpha(@theme_base_color, 1.0);
@define-color focus-color alpha(@theme_selected_bg_color, 0.5);
/* :root { --border-color: lightgray; } - this is not working yet, so using nonstandard @define-color */
#InkSpinButton { border: 0 solid @border-color; border-radius: 2px; background-color: @bgnd-color; }
#InkSpinButton.frame { border: 1px solid @border-color; }
#InkSpinButton:hover button { opacity: 1; }
#InkSpinButton:focus-within { outline: 2px solid @focus-color; outline-offset: -2px; }
#InkSpinButton label#InkSpinButton-Label { opacity: 0.5; margin-left: 3px; margin-right: 3px; }
#InkSpinButton button { border: 0 solid alpha(@border-color, 0.30); border-radius: 2px; padding: 1px; min-width: 6px; min-height: 8px; -gtk-icon-size: 10px; background-image: none; }
#InkSpinButton button.left { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-width: 1px; }
#InkSpinButton button.right { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-width: 1px; }
#InkSpinButton entry#InkSpinButton-Entry { border: none; border-radius: 3px; padding: 0; min-height: 13px; background-color: @bgnd-color; outline-width: 0; }
)====="

Definition at line 20 of file ink-spin-button.cpp.

Referenced by Inkscape::UI::Widget::InkSpinButton::construct().

◆ ITEM_WIDTH

◆ marker_radius

constexpr double Inkscape::UI::Widget::marker_radius = 4.0
staticconstexpr

◆ MAX_COMPONENTS

unsigned int Inkscape::UI::Widget::MAX_COMPONENTS = 6
static

Definition at line 30 of file color-page.cpp.

Referenced by Inkscape::UI::Widget::ColorPage::ColorPage().

◆ MAX_HUE

constexpr double Inkscape::UI::Widget::MAX_HUE = 360.0
staticconstexpr

◆ MAX_LIGHTNESS

constexpr double Inkscape::UI::Widget::MAX_LIGHTNESS = 100.0
staticconstexpr

Definition at line 50 of file ink-color-wheel.cpp.

◆ MAX_SATURATION

constexpr double Inkscape::UI::Widget::MAX_SATURATION = 100.0
staticconstexpr

Definition at line 49 of file ink-color-wheel.cpp.

◆ MIN_HUE

constexpr double Inkscape::UI::Widget::MIN_HUE = 0.0
staticconstexpr

Definition at line 51 of file ink-color-wheel.cpp.

◆ MIN_LIGHTNESS

constexpr double Inkscape::UI::Widget::MIN_LIGHTNESS = 0.0
staticconstexpr

Definition at line 53 of file ink-color-wheel.cpp.

◆ MIN_SATURATION

constexpr double Inkscape::UI::Widget::MIN_SATURATION = 0.0
staticconstexpr

Definition at line 52 of file ink-color-wheel.cpp.

◆ OUTER_CIRCLE_DASH_SIZE

constexpr double Inkscape::UI::Widget::OUTER_CIRCLE_DASH_SIZE = 10.0
staticconstexpr

◆ OUTER_CIRCLE_RADIUS

constexpr int const Inkscape::UI::Widget::OUTER_CIRCLE_RADIUS = 190
staticconstexpr

Definition at line 47 of file ink-color-wheel.cpp.

Referenced by Inkscape::UI::Widget::ColorWheelHSLuv::setColor().

◆ s_linked

const char* Inkscape::UI::Widget::s_linked = "scale-linked-symbolic"

Definition at line 59 of file page-properties.cpp.

◆ s_unlinked

const char* Inkscape::UI::Widget::s_unlinked = "scale-unlinked-symbolic"

Definition at line 60 of file page-properties.cpp.

◆ SIZE

◆ TEST_TIMING

constexpr bool Inkscape::UI::Widget::TEST_TIMING = false
constexpr

Definition at line 15 of file color-wheel-factory.cpp.

Referenced by create_color_wheel_helper().

◆ timeout_click

constexpr int Inkscape::UI::Widget::timeout_click = 500
constexpr

◆ timeout_repeat

constexpr int Inkscape::UI::Widget::timeout_repeat = 50
constexpr

◆ undo_F_label

gchar const* Inkscape::UI::Widget::undo_F_label = undo_F_label_1
static

◆ undo_F_label_1

gchar const* Inkscape::UI::Widget::undo_F_label_1 = "fill:flatcolor:1"
static

Definition at line 298 of file fill-style.cpp.

Referenced by Inkscape::UI::Widget::FillNStroke::updateFromPaint().

◆ undo_F_label_2

gchar const* Inkscape::UI::Widget::undo_F_label_2 = "fill:flatcolor:2"
static

Definition at line 299 of file fill-style.cpp.

Referenced by Inkscape::UI::Widget::FillNStroke::updateFromPaint().

◆ undo_S_label

gchar const* Inkscape::UI::Widget::undo_S_label = undo_S_label_1
static

◆ undo_S_label_1

gchar const* Inkscape::UI::Widget::undo_S_label_1 = "stroke:flatcolor:1"
static

Definition at line 301 of file fill-style.cpp.

Referenced by Inkscape::UI::Widget::FillNStroke::updateFromPaint().

◆ undo_S_label_2

gchar const* Inkscape::UI::Widget::undo_S_label_2 = "stroke:flatcolor:2"
static

Definition at line 302 of file fill-style.cpp.

Referenced by Inkscape::UI::Widget::FillNStroke::updateFromPaint().

◆ VERTEX_EPSILON

constexpr double Inkscape::UI::Widget::VERTEX_EPSILON = 0.01
staticconstexpr

Definition at line 55 of file ink-color-wheel.cpp.

Referenced by Inkscape::UI::Widget::ColorWheelHSLuv::_vertex().