Interface to provide style information to Gtk::StyleContext.
More...
#include <gtkmm/styleprovider.h>
Interface to provide style information to Gtk::StyleContext.
Gtk::StyleProvider is an interface used to provide style information to a Gtk::StyleContext. See StyleContext::add_provider() and add_provider_for_display().
GTK uses the Gtk::StyleProvider implementation for CSS in Gtk::CssProvider.
- See also
- Gtk::StyleContext, Gtk::CssProvider
- Since gtkmm 3.0:
◆ StyleProvider() [1/2]
Gtk::StyleProvider::StyleProvider |
( |
| ) |
|
|
protected |
You should derive from this class to use it.
◆ StyleProvider() [2/2]
◆ ~StyleProvider()
Gtk::StyleProvider::~StyleProvider |
( |
| ) |
|
|
overridenoexcept |
◆ add_interface()
static void Gtk::StyleProvider::add_interface |
( |
GType |
gtype_implementer | ) |
|
|
static |
◆ add_provider_for_display()
Adds a global style provider to display, which will be used in style construction for all Gtk::StyleContexts
under display.
GTK uses this to make styling information from Gtk::Settings
available.
- Note
- If both priorities are the same, A
Gtk::StyleProvider
added through add_provider() takes precedence over another added through this function.
- Since gtkmm 4.10:
- Parameters
-
display | A Gdk::Display . |
provider | A Gtk::StyleProvider . |
priority | The priority of the style provider. The lower it is, the earlier it will be used in the style construction. Typically this will be in the range between GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and GTK_STYLE_PROVIDER_PRIORITY_USER. |
◆ get_type()
static GType Gtk::StyleProvider::get_type |
( |
| ) |
|
|
static |
Get the GType for this class, for use with the underlying GObject type system.
◆ gobj() [1/2]
Provides access to the underlying C GObject.
◆ gobj() [2/2]
Provides access to the underlying C GObject.
◆ operator=()
◆ remove_provider_for_display()
Removes provider from the global style providers list in display.
- Since gtkmm 4.10:
- Parameters
-
◆ wrap()
A Glib::wrap() method for this object.
- Parameters
-
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
- Returns
- A C++ instance that wraps this C instance.