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

A class you can inherit to access GTK4ʼs Widget.css_changed & .focus vfuncs, missing in gtkmm4. More...

#include <widget-vfuncs-class-init.h>

Inheritance diagram for Inkscape::UI::Widget::WidgetVfuncsClassInit:
Inkscape::UI::Dialog::FilterEffectsDialog::PrimitiveList Inkscape::UI::Widget::ColorWheelHSL Inkscape::UI::Widget::GradientWithStops Inkscape::UI::Widget::ImageProperties Inkscape::UI::Widget::MarkerComboBox Inkscape::UI::Widget::Ruler

Classes

struct  CFuncs
 Holds pointers to C vfunc implementations. More...
 

Protected Member Functions

 WidgetVfuncsClassInit ()
 
 ~WidgetVfuncsClassInit () override
 
virtual void css_changed (GtkCssStyleChange *change)
 Called after gtk_widget_css_changed(): when a CSS widget node is validated & style changed.
 
virtual std::optional< bool > focus (Gtk::DirectionType direction)
 Called before gtk_widget_focus(): return true if moving in direction keeps focus w/in self, false if moving left focus outside widget, or nullopt for no decision & to call base vfunc.
 

Static Private Attributes

static CFuncs::CssChanged _css_changed
 
static CFuncs::Focus _focus
 
static constexpr CFuncs cfuncs
 

Detailed Description

A class you can inherit to access GTK4ʼs Widget.css_changed & .focus vfuncs, missing in gtkmm4.

Use this if in gtkmm 3, you were connecting to ::style-updated or overriding on_style_updated() – or overriding on_focus() in a way that needs to change the result from that of the base vfunc See https://gitlab.gnome.org/GNOME/gtkmm/-/issues/147 The subclass must also inherit from Gtk::Widget or a subclass thereof.

Definition at line 29 of file widget-vfuncs-class-init.h.

Constructor & Destructor Documentation

◆ WidgetVfuncsClassInit()

Inkscape::UI::Widget::WidgetVfuncsClassInit::WidgetVfuncsClassInit ( )
protected

Definition at line 85 of file widget-vfuncs-class-init.cpp.

◆ ~WidgetVfuncsClassInit()

Inkscape::UI::Widget::WidgetVfuncsClassInit::~WidgetVfuncsClassInit ( )
overrideprotected

Definition at line 94 of file widget-vfuncs-class-init.cpp.

Member Function Documentation

◆ css_changed()

virtual void Inkscape::UI::Widget::WidgetVfuncsClassInit::css_changed ( GtkCssStyleChange *  change)
inlineprotectedvirtual

Called after gtk_widget_css_changed(): when a CSS widget node is validated & style changed.

Reimplemented in Inkscape::UI::Widget::Ruler, Inkscape::UI::Widget::GradientWithStops, Inkscape::UI::Widget::ImageProperties, Inkscape::UI::Dialog::FilterEffectsDialog::PrimitiveList, and Inkscape::UI::Widget::MarkerComboBox.

Definition at line 45 of file widget-vfuncs-class-init.h.

◆ focus()

virtual std::optional< bool > Inkscape::UI::Widget::WidgetVfuncsClassInit::focus ( Gtk::DirectionType  direction)
inlineprotectedvirtual

Called before gtk_widget_focus(): return true if moving in direction keeps focus w/in self, false if moving left focus outside widget, or nullopt for no decision & to call base vfunc.

Reimplemented in Inkscape::UI::Widget::GradientWithStops, and Inkscape::UI::Widget::ColorWheelHSL.

Definition at line 49 of file widget-vfuncs-class-init.h.

Member Data Documentation

◆ _css_changed

void Inkscape::UI::Widget::WidgetVfuncsClassInit::_css_changed
staticprivate

Definition at line 53 of file widget-vfuncs-class-init.h.

◆ _focus

gboolean Inkscape::UI::Widget::WidgetVfuncsClassInit::_focus
staticprivate

Definition at line 54 of file widget-vfuncs-class-init.h.

◆ cfuncs

constexpr CFuncs Inkscape::UI::Widget::WidgetVfuncsClassInit::cfuncs
staticconstexprprivate
Initial value:

Definition at line 56 of file widget-vfuncs-class-init.h.


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