Gtk2::Style3pm
Wrapper for gtkstyle
Hierarchy
Glib::Object+----Gtk2::Style
Methods
style = Gtk2::Style->new
$style->apply_default_background ($window, $set_bg, $state_type, $area, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
style = $style->attach ($window)
- •
-
$window(Gtk2::Gdk::Window)
boolean = $style->attached
$style->set_background ($window, $state_type)
•
|
|
|---|---|
•
|
|
color = $style->base ($state)
- •
-
$state(Gtk2::StateType)
gc = $style->base_gc ($state)
- •
-
$state(Gtk2::StateType)
color = $style->bg ($state)
- •
-
$state(Gtk2::StateType)
gc = $style->bg_gc ($state)
- •
-
$state(Gtk2::StateType)
pixmap = $style->bg_pixmap ($state, $pixmap=undef)
•
|
|
|---|---|
•
|
|
scalar = $style->black
scalar = $style->black_gc
style = $style->copy
color = $style->dark ($state)
- •
-
$state(Gtk2::StateType)
gc = $style->dark_gc ($state)
- •
-
$state(Gtk2::StateType)
$style->detach
Gtk2->draw_insertion_cursor ($widget, $drawable, $area, $location, $is_primary, $direction, $draw_arrow)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
Since: gtk+ 2.4
color = $style->fg ($state)
- •
-
$state(Gtk2::StateType)
gc = $style->fg_gc ($state)
- •
-
$state(Gtk2::StateType)
scalar = $style->font_desc
list = $style->get (widget_package, ...)
list = $style->get_style_property (widget_package, ...)
•
|
|
|---|---|
•
|
... (list) list of property names |
Fetch and return the values for the style properties named in ... for a widget of type widget_package. get is an alias for get_style_property.
my $size = $style->get_style_property ("expander-size");
Note: The get method shadows Glib::Object::get (see "get and set" in Glib::Object). This shouldn't be a problem since Gtk2::Style defines no properties (as of gtk+ 2.16). If you have a class that's derived from Gtk2::Style and adds a property or if a new version of gtk+ adds a property to Gtk2::Style then the property can be accessed with get_property.
Since: gtk+ 2.16
color = $style->light ($state)
- •
-
$state(Gtk2::StateType)
gc = $style->light_gc ($state)
- •
-
$state(Gtk2::StateType)
color = $style->lookup_color ($color_name)
- •
-
$color_name(string)
Since: gtk+ 2.10
iconset = $style->lookup_icon_set ($stock_id)
- •
-
$stock_id(string)
color = $style->mid ($state)
- •
-
$state(Gtk2::StateType)
gc = $style->mid_gc ($state)
- •
-
$state(Gtk2::StateType)
$style->paint_arrow ($window, $state_type, $shadow_type, $area, $widget, $detail, $arrow_type, $fill, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_box ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_box_gap ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height, $gap_side, $gap_x, $gap_width)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_check ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_diamond ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_expander ($window, $state_type, $area, $widget, $detail, $x, $y, $expander_style)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_extension ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height, $gap_side)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_flat_box ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_focus ($window, $state_type, $area, $widget, $detail, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_handle ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height, $orientation)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_hline ($window, $state_type, $area, $widget, $detail, $x1, $x2, $y)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_layout ($window, $state_type, $use_text, $area, $widget, $detail, $x, $y, $layout)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_option ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_polygon ($window, $state_type, $shadow_type, $area, $widget, $detail, $fill, $x1, $y1, ...)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
... (list) pairs of x and y coordinates |
$style->paint_resize_grip ($window, $state_type, $area, $widget, $detail, $edge, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_shadow ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_shadow_gap ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height, $gap_side, $gap_x, $gap_width)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_slider ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height, $orientation)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_spinner ($window, $state_type, $area, $widget, $detail, $step, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
Since: gtk+ 2.20
$style->paint_tab ($window, $state_type, $shadow_type, $area, $widget, $detail, $x, $y, $width, $height)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->paint_vline ($window, $state_type, $area, $widget, $detail, $y1_, $y2_, $x)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
pixbuf = $style->render_icon ($source, $direction, $state, $size, $widget, $detail=undef)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
|
•
|
|
$style->get_style_property ($widget_package, ...)
•
|
|
|---|---|
•
|
... (list) |
Since: gtk+ 2.16
color = $style->text ($state)
- •
-
$state(Gtk2::StateType)
color = $style->text_aa ($state)
- •
-
$state(Gtk2::StateType)
gc = $style->text_aa_gc ($state)
- •
-
$state(Gtk2::StateType)
gc = $style->text_gc ($state)
- •
-
$state(Gtk2::StateType)
scalar = $style->white
scalar = $style->white_gc
scalar = $style->xthickness
scalar = $style->ythickness
Signals
realize(Gtk2::Style)
unrealize(Gtk2::Style)
Enums and flags
enum Gtk2::ArrowType
•
|
'up' / 'GTK_ARROW_UP' |
|---|---|
•
|
'down' / 'GTK_ARROW_DOWN' |
•
|
'left' / 'GTK_ARROW_LEFT' |
•
|
'right' / 'GTK_ARROW_RIGHT' |
•
|
'none' / 'GTK_ARROW_NONE' |
enum Gtk2::ExpanderStyle
•
|
'collapsed' / 'GTK_EXPANDER_COLLAPSED' |
|---|---|
•
|
'semi-collapsed' / 'GTK_EXPANDER_SEMI_COLLAPSED' |
•
|
'semi-expanded' / 'GTK_EXPANDER_SEMI_EXPANDED' |
•
|
'expanded' / 'GTK_EXPANDER_EXPANDED' |
enum Gtk2::Gdk::WindowEdge
•
|
'north-west' / 'GDK_WINDOW_EDGE_NORTH_WEST' |
|---|---|
•
|
'north' / 'GDK_WINDOW_EDGE_NORTH' |
•
|
'north-east' / 'GDK_WINDOW_EDGE_NORTH_EAST' |
•
|
'west' / 'GDK_WINDOW_EDGE_WEST' |
•
|
'east' / 'GDK_WINDOW_EDGE_EAST' |
•
|
'south-west' / 'GDK_WINDOW_EDGE_SOUTH_WEST' |
•
|
'south' / 'GDK_WINDOW_EDGE_SOUTH' |
•
|
'south-east' / 'GDK_WINDOW_EDGE_SOUTH_EAST' |
enum Gtk2::IconSize
•
|
'invalid' / 'GTK_ICON_SIZE_INVALID' |
|---|---|
•
|
'menu' / 'GTK_ICON_SIZE_MENU' |
•
|
'small-toolbar' / 'GTK_ICON_SIZE_SMALL_TOOLBAR' |
•
|
'large-toolbar' / 'GTK_ICON_SIZE_LARGE_TOOLBAR' |
•
|
'button' / 'GTK_ICON_SIZE_BUTTON' |
•
|
'dnd' / 'GTK_ICON_SIZE_DND' |
•
|
'dialog' / 'GTK_ICON_SIZE_DIALOG' |
enum Gtk2::Orientation
•
|
'horizontal' / 'GTK_ORIENTATION_HORIZONTAL' |
|---|---|
•
|
'vertical' / 'GTK_ORIENTATION_VERTICAL' |
enum Gtk2::PositionType
•
|
'left' / 'GTK_POS_LEFT' |
|---|---|
•
|
'right' / 'GTK_POS_RIGHT' |
•
|
'top' / 'GTK_POS_TOP' |
•
|
'bottom' / 'GTK_POS_BOTTOM' |
enum Gtk2::ShadowType
•
|
'none' / 'GTK_SHADOW_NONE' |
|---|---|
•
|
'in' / 'GTK_SHADOW_IN' |
•
|
'out' / 'GTK_SHADOW_OUT' |
•
|
'etched-in' / 'GTK_SHADOW_ETCHED_IN' |
•
|
'etched-out' / 'GTK_SHADOW_ETCHED_OUT' |
enum Gtk2::StateType
•
|
'normal' / 'GTK_STATE_NORMAL' |
|---|---|
•
|
'active' / 'GTK_STATE_ACTIVE' |
•
|
'prelight' / 'GTK_STATE_PRELIGHT' |
•
|
'selected' / 'GTK_STATE_SELECTED' |
•
|
'insensitive' / 'GTK_STATE_INSENSITIVE' |
enum Gtk2::TextDirection
•
|
'none' / 'GTK_TEXT_DIR_NONE' |
|---|---|
•
|
'ltr' / 'GTK_TEXT_DIR_LTR' |
•
|
'rtl' / 'GTK_TEXT_DIR_RTL' |
Releases
7 releases since Debian 3.1 (Sarge); the text changed 6 times.