1Gtk2::Style(3)        User Contributed Perl Documentation       Gtk2::Style(3)
2
3
4

NAME

6       Gtk2::Style
7

HIERARCHY

9         Glib::Object
10         +----Gtk2::Style
11

METHODS

13       style = Gtk2::Style->new
14
15       $style->apply_default_background ($window, $set_bg, $state_type, $area,
16       $x, $y, $width, $height)
17
18           * $window (Gtk2::Gdk::Window)
19           * $set_bg (boolean)
20           * $state_type (Gtk2::StateType)
21           * $area (Gtk2::Gdk::Rectangle or undef)
22           * $x (integer)
23           * $y (integer)
24           * $width (integer)
25           * $height (integer)
26
27       style = $style->attach ($window)
28
29           * $window (Gtk2::Gdk::Window)
30
31       boolean = $style->attached
32
33       $style->set_background ($window, $state_type)
34
35           * $window (Gtk2::Gdk::Window)
36           * $state_type (Gtk2::StateType)
37
38       color = $style->base ($state)
39
40           * $state (Gtk2::StateType)
41
42       gc = $style->base_gc ($state)
43
44           * $state (Gtk2::StateType)
45
46       color = $style->bg ($state)
47
48           * $state (Gtk2::StateType)
49
50       gc = $style->bg_gc ($state)
51
52           * $state (Gtk2::StateType)
53
54       pixmap = $style->bg_pixmap ($state, $pixmap=undef)
55
56           * $state (Gtk2::StateType)
57           * $pixmap (Gtk2::Gdk::Pixmap or undef)
58
59       scalar = $style->black
60
61       scalar = $style->black_gc
62
63       style = $style->copy
64
65       color = $style->dark ($state)
66
67           * $state (Gtk2::StateType)
68
69       gc = $style->dark_gc ($state)
70
71           * $state (Gtk2::StateType)
72
73       $style->detach
74
75       Gtk2->draw_insertion_cursor ($widget, $drawable, $area, $location,
76       $is_primary, $direction, $draw_arrow)
77
78           * $widget (Gtk2::Widget)
79           * $drawable (Gtk2::Gdk::Drawable)
80           * $area (Gtk2::Gdk::Rectangle)
81           * $location (Gtk2::Gdk::Rectangle)
82           * $is_primary (boolean)
83           * $direction (Gtk2::TextDirection)
84           * $draw_arrow (boolean)
85
86       color = $style->fg ($state)
87
88           * $state (Gtk2::StateType)
89
90       gc = $style->fg_gc ($state)
91
92           * $state (Gtk2::StateType)
93
94       scalar = $style->font_desc
95
96       color = $style->light ($state)
97
98           * $state (Gtk2::StateType)
99
100       gc = $style->light_gc ($state)
101
102           * $state (Gtk2::StateType)
103
104       color = $style->lookup_color ($color_name)
105
106           * $color_name (string)
107
108       iconset = $style->lookup_icon_set ($stock_id)
109
110           * $stock_id (string)
111
112       color = $style->mid ($state)
113
114           * $state (Gtk2::StateType)
115
116       gc = $style->mid_gc ($state)
117
118           * $state (Gtk2::StateType)
119
120       $style->paint_arrow ($window, $state_type, $shadow_type, $area, $wid‐
121       get, $detail, $arrow_type, $fill, $x, $y, $width, $height)
122
123           * $window (Gtk2::Gdk::Drawable)
124           * $state_type (Gtk2::StateType)
125           * $shadow_type (Gtk2::ShadowType)
126           * $area (Gtk2::Gdk::Rectangle or undef)
127           * $widget (Gtk2::Widget or undef)
128           * $detail (string or undef)
129           * $arrow_type (Gtk2::ArrowType)
130           * $fill (boolean)
131           * $x (integer)
132           * $y (integer)
133           * $width (integer)
134           * $height (integer)
135
136       $style->paint_box ($window, $state_type, $shadow_type, $area, $widget,
137       $detail, $x, $y, $width, $height)
138
139           * $window (Gtk2::Gdk::Drawable)
140           * $state_type (Gtk2::StateType)
141           * $shadow_type (Gtk2::ShadowType)
142           * $area (Gtk2::Gdk::Rectangle or undef)
143           * $widget (Gtk2::Widget or undef)
144           * $detail (string or undef)
145           * $x (integer)
146           * $y (integer)
147           * $width (integer)
148           * $height (integer)
149
150       $style->paint_box_gap ($window, $state_type, $shadow_type, $area, $wid‐
151       get, $detail, $x, $y, $width, $height, $gap_side, $gap_x, $gap_width)
152
153           * $window (Gtk2::Gdk::Drawable)
154           * $state_type (Gtk2::StateType)
155           * $shadow_type (Gtk2::ShadowType)
156           * $area (Gtk2::Gdk::Rectangle or undef)
157           * $widget (Gtk2::Widget or undef)
158           * $detail (string or undef)
159           * $x (integer)
160           * $y (integer)
161           * $width (integer)
162           * $height (integer)
163           * $gap_side (Gtk2::PositionType)
164           * $gap_x (integer)
165           * $gap_width (integer)
166
167       $style->paint_check ($window, $state_type, $shadow_type, $area, $wid‐
168       get, $detail, $x, $y, $width, $height)
169
170           * $window (Gtk2::Gdk::Drawable)
171           * $state_type (Gtk2::StateType)
172           * $shadow_type (Gtk2::ShadowType)
173           * $area (Gtk2::Gdk::Rectangle or undef)
174           * $widget (Gtk2::Widget)
175           * $detail (string or undef)
176           * $x (integer)
177           * $y (integer)
178           * $width (integer)
179           * $height (integer)
180
181       $style->paint_diamond ($window, $state_type, $shadow_type, $area, $wid‐
182       get, $detail, $x, $y, $width, $height)
183
184           * $window (Gtk2::Gdk::Drawable)
185           * $state_type (Gtk2::StateType)
186           * $shadow_type (Gtk2::ShadowType)
187           * $area (Gtk2::Gdk::Rectangle or undef)
188           * $widget (Gtk2::Widget or undef)
189           * $detail (string or undef)
190           * $x (integer)
191           * $y (integer)
192           * $width (integer)
193           * $height (integer)
194
195       $style->paint_expander ($window, $state_type, $area, $widget, $detail,
196       $x, $y, $expander_style)
197
198           * $window (Gtk2::Gdk::Drawable)
199           * $state_type (Gtk2::StateType)
200           * $area (Gtk2::Gdk::Rectangle or undef)
201           * $widget (Gtk2::Widget)
202           * $detail (string or undef)
203           * $x (integer)
204           * $y (integer)
205           * $expander_style (Gtk2::ExpanderStyle)
206
207       $style->paint_extension ($window, $state_type, $shadow_type, $area,
208       $widget, $detail, $x, $y, $width, $height, $gap_side)
209
210           * $window (Gtk2::Gdk::Drawable)
211           * $state_type (Gtk2::StateType)
212           * $shadow_type (Gtk2::ShadowType)
213           * $area (Gtk2::Gdk::Rectangle or undef)
214           * $widget (Gtk2::Widget or undef)
215           * $detail (string or undef)
216           * $x (integer)
217           * $y (integer)
218           * $width (integer)
219           * $height (integer)
220           * $gap_side (Gtk2::PositionType)
221
222       $style->paint_flat_box ($window, $state_type, $shadow_type, $area,
223       $widget, $detail, $x, $y, $width, $height)
224
225           * $window (Gtk2::Gdk::Drawable)
226           * $state_type (Gtk2::StateType)
227           * $shadow_type (Gtk2::ShadowType)
228           * $area (Gtk2::Gdk::Rectangle or undef)
229           * $widget (Gtk2::Widget or undef)
230           * $detail (string or undef)
231           * $x (integer)
232           * $y (integer)
233           * $width (integer)
234           * $height (integer)
235
236       $style->paint_focus ($window, $state_type, $area, $widget, $detail, $x,
237       $y, $width, $height)
238
239           * $window (Gtk2::Gdk::Drawable)
240           * $state_type (Gtk2::StateType)
241           * $area (Gtk2::Gdk::Rectangle or undef)
242           * $widget (Gtk2::Widget or undef)
243           * $detail (string or undef)
244           * $x (integer)
245           * $y (integer)
246           * $width (integer)
247           * $height (integer)
248
249       $style->paint_handle ($window, $state_type, $shadow_type, $area, $wid‐
250       get, $detail, $x, $y, $width, $height, $orientation)
251
252           * $window (Gtk2::Gdk::Drawable)
253           * $state_type (Gtk2::StateType)
254           * $shadow_type (Gtk2::ShadowType)
255           * $area (Gtk2::Gdk::Rectangle or undef)
256           * $widget (Gtk2::Widget or undef)
257           * $detail (string)
258           * $x (integer)
259           * $y (integer)
260           * $width (integer)
261           * $height (integer)
262           * $orientation (Gtk2::Orientation)
263
264       $style->paint_hline ($window, $state_type, $area, $widget, $detail,
265       $x1, $x2, $y)
266
267           * $window (Gtk2::Gdk::Drawable)
268           * $state_type (Gtk2::StateType)
269           * $area (Gtk2::Gdk::Rectangle or undef)
270           * $widget (Gtk2::Widget or undef)
271           * $detail (string or undef)
272           * $x1 (integer)
273           * $x2 (integer)
274           * $y (integer)
275
276       $style->paint_layout ($window, $state_type, $use_text, $area, $widget,
277       $detail, $x, $y, $layout)
278
279           * $window (Gtk2::Gdk::Drawable)
280           * $state_type (Gtk2::StateType)
281           * $use_text (boolean)
282           * $area (Gtk2::Gdk::Rectangle or undef)
283           * $widget (Gtk2::Widget or undef)
284           * $detail (string or undef)
285           * $x (integer)
286           * $y (integer)
287           * $layout (Gtk2::Pango::Layout)
288
289       $style->paint_option ($window, $state_type, $shadow_type, $area, $wid‐
290       get, $detail, $x, $y, $width, $height)
291
292           * $window (Gtk2::Gdk::Drawable)
293           * $state_type (Gtk2::StateType)
294           * $shadow_type (Gtk2::ShadowType)
295           * $area (Gtk2::Gdk::Rectangle or undef)
296           * $widget (Gtk2::Widget)
297           * $detail (string or undef)
298           * $x (integer)
299           * $y (integer)
300           * $width (integer)
301           * $height (integer)
302
303       $style->paint_polygon ($window, $state_type, $shadow_type, $area, $wid‐
304       get, $detail, $fill, $x1, $y1, ...)
305
306           * $window (Gtk2::Gdk::Drawable)
307           * $state_type (Gtk2::StateType)
308           * $shadow_type (Gtk2::ShadowType)
309           * $area (Gtk2::Gdk::Rectangle or undef)
310           * $widget (Gtk2::Widget or undef)
311           * $detail (string or undef)
312           * $fill (boolean)
313           * $x1 (integer) x coordinate of the first vertex
314           * $y1 (integer) y coordinate of the first vertex
315           * ... (list) pairs of x and y coordinates
316
317       $style->paint_resize_grip ($window, $state_type, $area, $widget,
318       $detail, $edge, $x, $y, $width, $height)
319
320           * $window (Gtk2::Gdk::Drawable)
321           * $state_type (Gtk2::StateType)
322           * $area (Gtk2::Gdk::Rectangle or undef)
323           * $widget (Gtk2::Widget or undef)
324           * $detail (string or undef)
325           * $edge (Gtk2::Gdk::WindowEdge)
326           * $x (integer)
327           * $y (integer)
328           * $width (integer)
329           * $height (integer)
330
331       $style->paint_shadow ($window, $state_type, $shadow_type, $area, $wid‐
332       get, $detail, $x, $y, $width, $height)
333
334           * $window (Gtk2::Gdk::Drawable)
335           * $state_type (Gtk2::StateType)
336           * $shadow_type (Gtk2::ShadowType)
337           * $area (Gtk2::Gdk::Rectangle or undef)
338           * $widget (Gtk2::Widget or undef)
339           * $detail (string or undef)
340           * $x (integer)
341           * $y (integer)
342           * $width (integer)
343           * $height (integer)
344
345       $style->paint_shadow_gap ($window, $state_type, $shadow_type, $area,
346       $widget, $detail, $x, $y, $width, $height, $gap_side, $gap_x,
347       $gap_width)
348
349           * $window (Gtk2::Gdk::Drawable)
350           * $state_type (Gtk2::StateType)
351           * $shadow_type (Gtk2::ShadowType)
352           * $area (Gtk2::Gdk::Rectangle or undef)
353           * $widget (Gtk2::Widget or undef)
354           * $detail (string or undef)
355           * $x (integer)
356           * $y (integer)
357           * $width (integer)
358           * $height (integer)
359           * $gap_side (Gtk2::PositionType)
360           * $gap_x (integer)
361           * $gap_width (integer)
362
363       $style->paint_slider ($window, $state_type, $shadow_type, $area, $wid‐
364       get, $detail, $x, $y, $width, $height, $orientation)
365
366           * $window (Gtk2::Gdk::Drawable)
367           * $state_type (Gtk2::StateType)
368           * $shadow_type (Gtk2::ShadowType)
369           * $area (Gtk2::Gdk::Rectangle or undef)
370           * $widget (Gtk2::Widget or undef)
371           * $detail (string or undef)
372           * $x (integer)
373           * $y (integer)
374           * $width (integer)
375           * $height (integer)
376           * $orientation (Gtk2::Orientation)
377
378       $style->paint_tab ($window, $state_type, $shadow_type, $area, $widget,
379       $detail, $x, $y, $width, $height)
380
381           * $window (Gtk2::Gdk::Drawable)
382           * $state_type (Gtk2::StateType)
383           * $shadow_type (Gtk2::ShadowType)
384           * $area (Gtk2::Gdk::Rectangle or undef)
385           * $widget (Gtk2::Widget)
386           * $detail (string or undef)
387           * $x (integer)
388           * $y (integer)
389           * $width (integer)
390           * $height (integer)
391
392       $style->paint_vline ($window, $state_type, $area, $widget, $detail,
393       $y1_, $y2_, $x)
394
395           * $window (Gtk2::Gdk::Drawable)
396           * $state_type (Gtk2::StateType)
397           * $area (Gtk2::Gdk::Rectangle or undef)
398           * $widget (Gtk2::Widget or undef)
399           * $detail (string or undef)
400           * $y1_ (integer)
401           * $y2_ (integer)
402           * $x (integer)
403
404       pixbuf = $style->render_icon ($source, $direction, $state, $size, $wid‐
405       get, $detail=undef)
406
407           * $source (Gtk2::IconSource)
408           * $direction (Gtk2::TextDirection)
409           * $state (Gtk2::StateType)
410           * $size (Gtk2::IconSize)
411           * $widget (Gtk2::Widget or undef)
412           * $detail (string or undef)
413
414       color = $style->text ($state)
415
416           * $state (Gtk2::StateType)
417
418       color = $style->text_aa ($state)
419
420           * $state (Gtk2::StateType)
421
422       gc = $style->text_aa_gc ($state)
423
424           * $state (Gtk2::StateType)
425
426       gc = $style->text_gc ($state)
427
428           * $state (Gtk2::StateType)
429
430       scalar = $style->white
431
432       scalar = $style->white_gc
433
434       scalar = $style->xthickness
435
436       scalar = $style->ythickness
437

SIGNALS

439       realize (Gtk2::Style)
440       unrealize (Gtk2::Style)
441

ENUMS AND FLAGS

443       enum Gtk2::ArrowType
444
445       * 'up' / 'GTK_ARROW_UP'
446       * 'down' / 'GTK_ARROW_DOWN'
447       * 'left' / 'GTK_ARROW_LEFT'
448       * 'right' / 'GTK_ARROW_RIGHT'
449       * 'none' / 'GTK_ARROW_NONE'
450
451       enum Gtk2::ExpanderStyle
452
453       * 'collapsed' / 'GTK_EXPANDER_COLLAPSED'
454       * 'semi-collapsed' / 'GTK_EXPANDER_SEMI_COLLAPSED'
455       * 'semi-expanded' / 'GTK_EXPANDER_SEMI_EXPANDED'
456       * 'expanded' / 'GTK_EXPANDER_EXPANDED'
457
458       enum Gtk2::Gdk::WindowEdge
459
460       * 'north-west' / 'GDK_WINDOW_EDGE_NORTH_WEST'
461       * 'north' / 'GDK_WINDOW_EDGE_NORTH'
462       * 'north-east' / 'GDK_WINDOW_EDGE_NORTH_EAST'
463       * 'west' / 'GDK_WINDOW_EDGE_WEST'
464       * 'east' / 'GDK_WINDOW_EDGE_EAST'
465       * 'south-west' / 'GDK_WINDOW_EDGE_SOUTH_WEST'
466       * 'south' / 'GDK_WINDOW_EDGE_SOUTH'
467       * 'south-east' / 'GDK_WINDOW_EDGE_SOUTH_EAST'
468
469       enum Gtk2::IconSize
470
471       * 'invalid' / 'GTK_ICON_SIZE_INVALID'
472       * 'menu' / 'GTK_ICON_SIZE_MENU'
473       * 'small-toolbar' / 'GTK_ICON_SIZE_SMALL_TOOLBAR'
474       * 'large-toolbar' / 'GTK_ICON_SIZE_LARGE_TOOLBAR'
475       * 'button' / 'GTK_ICON_SIZE_BUTTON'
476       * 'dnd' / 'GTK_ICON_SIZE_DND'
477       * 'dialog' / 'GTK_ICON_SIZE_DIALOG'
478
479       enum Gtk2::Orientation
480
481       * 'horizontal' / 'GTK_ORIENTATION_HORIZONTAL'
482       * 'vertical' / 'GTK_ORIENTATION_VERTICAL'
483
484       enum Gtk2::PositionType
485
486       * 'left' / 'GTK_POS_LEFT'
487       * 'right' / 'GTK_POS_RIGHT'
488       * 'top' / 'GTK_POS_TOP'
489       * 'bottom' / 'GTK_POS_BOTTOM'
490
491       enum Gtk2::ShadowType
492
493       * 'none' / 'GTK_SHADOW_NONE'
494       * 'in' / 'GTK_SHADOW_IN'
495       * 'out' / 'GTK_SHADOW_OUT'
496       * 'etched-in' / 'GTK_SHADOW_ETCHED_IN'
497       * 'etched-out' / 'GTK_SHADOW_ETCHED_OUT'
498
499       enum Gtk2::StateType
500
501       * 'normal' / 'GTK_STATE_NORMAL'
502       * 'active' / 'GTK_STATE_ACTIVE'
503       * 'prelight' / 'GTK_STATE_PRELIGHT'
504       * 'selected' / 'GTK_STATE_SELECTED'
505       * 'insensitive' / 'GTK_STATE_INSENSITIVE'
506
507       enum Gtk2::TextDirection
508
509       * 'none' / 'GTK_TEXT_DIR_NONE'
510       * 'ltr' / 'GTK_TEXT_DIR_LTR'
511       * 'rtl' / 'GTK_TEXT_DIR_RTL'
512

SEE ALSO

514       Gtk2, Glib::Object
515
517       Copyright (C) 2003-2007 by the gtk2-perl team.
518
519       This software is licensed under the LGPL.  See Gtk2 for a full notice.
520
521
522
523perl v5.8.8                       2007-03-18                    Gtk2::Style(3)
Impressum