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

NAME

6       Gtk2::Style - wrapper for GtkStyle
7

HIERARCHY

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

METHODS

13   style = Gtk2::Style->new
14   $style->apply_default_background ($window, $set_bg, $state_type, $area, $x,
15       $y, $width, $height)
16       ·   $window (Gtk2::Gdk::Window)
17
18       ·   $set_bg (boolean)
19
20       ·   $state_type (Gtk2::StateType)
21
22       ·   $area (Gtk2::Gdk::Rectangle or undef)
23
24       ·   $x (integer)
25
26       ·   $y (integer)
27
28       ·   $width (integer)
29
30       ·   $height (integer)
31
32   style = $style->attach ($window)
33       ·   $window (Gtk2::Gdk::Window)
34
35   boolean = $style->attached
36   $style->set_background ($window, $state_type)
37       ·   $window (Gtk2::Gdk::Window)
38
39       ·   $state_type (Gtk2::StateType)
40
41   color = $style->base ($state)
42       ·   $state (Gtk2::StateType)
43
44   gc = $style->base_gc ($state)
45       ·   $state (Gtk2::StateType)
46
47   color = $style->bg ($state)
48       ·   $state (Gtk2::StateType)
49
50   gc = $style->bg_gc ($state)
51       ·   $state (Gtk2::StateType)
52
53   pixmap = $style->bg_pixmap ($state, $pixmap=undef)
54       ·   $state (Gtk2::StateType)
55
56       ·   $pixmap (Gtk2::Gdk::Pixmap or undef)
57
58   scalar = $style->black
59   scalar = $style->black_gc
60   style = $style->copy
61   color = $style->dark ($state)
62       ·   $state (Gtk2::StateType)
63
64   gc = $style->dark_gc ($state)
65       ·   $state (Gtk2::StateType)
66
67   $style->detach
68   Gtk2->draw_insertion_cursor ($widget, $drawable, $area, $location,
69       $is_primary, $direction, $draw_arrow)
70       ·   $widget (Gtk2::Widget)
71
72       ·   $drawable (Gtk2::Gdk::Drawable)
73
74       ·   $area (Gtk2::Gdk::Rectangle)
75
76       ·   $location (Gtk2::Gdk::Rectangle)
77
78       ·   $is_primary (boolean)
79
80       ·   $direction (Gtk2::TextDirection)
81
82       ·   $draw_arrow (boolean)
83
84       Since: gtk+ 2.4
85
86   color = $style->fg ($state)
87       ·   $state (Gtk2::StateType)
88
89   gc = $style->fg_gc ($state)
90       ·   $state (Gtk2::StateType)
91
92   scalar = $style->font_desc
93   list = $style->get (widget_package, ...)
94   list = $style->get_style_property (widget_package, ...)
95       ·   $widget_package (string) widget package name (ex: 'Gtk2::TreeView')
96
97       ·   ... (list) list of property names
98
99       Fetch and return the values for the style properties named in ... for a
100       widget of type widget_package.  get is an alias for get_style_property.
101
102           my $size = $style->get_style_property ("expander-size");
103
104       Note: The get method shadows Glib::Object::get (see "get and set" in
105       Glib::Object).  This shouldn't be a problem since Gtk2::Style defines
106       no properties (as of gtk+ 2.16).  If you have a class that's derived
107       from Gtk2::Style and adds a property or if a new version of gtk+ adds a
108       property to Gtk2::Style then the property can be accessed with
109       get_property.
110
111       Since: gtk+ 2.16
112
113   color = $style->light ($state)
114       ·   $state (Gtk2::StateType)
115
116   gc = $style->light_gc ($state)
117       ·   $state (Gtk2::StateType)
118
119   color = $style->lookup_color ($color_name)
120       ·   $color_name (string)
121
122       Since: gtk+ 2.10
123
124   iconset = $style->lookup_icon_set ($stock_id)
125       ·   $stock_id (string)
126
127   color = $style->mid ($state)
128       ·   $state (Gtk2::StateType)
129
130   gc = $style->mid_gc ($state)
131       ·   $state (Gtk2::StateType)
132
133   $style->paint_arrow ($window, $state_type, $shadow_type, $area, $widget,
134       $detail, $arrow_type, $fill, $x, $y, $width, $height)
135       ·   $window (Gtk2::Gdk::Drawable)
136
137       ·   $state_type (Gtk2::StateType)
138
139       ·   $shadow_type (Gtk2::ShadowType)
140
141       ·   $area (Gtk2::Gdk::Rectangle or undef)
142
143       ·   $widget (Gtk2::Widget or undef)
144
145       ·   $detail (string or undef)
146
147       ·   $arrow_type (Gtk2::ArrowType)
148
149       ·   $fill (boolean)
150
151       ·   $x (integer)
152
153       ·   $y (integer)
154
155       ·   $width (integer)
156
157       ·   $height (integer)
158
159   $style->paint_box ($window, $state_type, $shadow_type, $area, $widget,
160       $detail, $x, $y, $width, $height)
161       ·   $window (Gtk2::Gdk::Drawable)
162
163       ·   $state_type (Gtk2::StateType)
164
165       ·   $shadow_type (Gtk2::ShadowType)
166
167       ·   $area (Gtk2::Gdk::Rectangle or undef)
168
169       ·   $widget (Gtk2::Widget or undef)
170
171       ·   $detail (string or undef)
172
173       ·   $x (integer)
174
175       ·   $y (integer)
176
177       ·   $width (integer)
178
179       ·   $height (integer)
180
181   $style->paint_box_gap ($window, $state_type, $shadow_type, $area, $widget,
182       $detail, $x, $y, $width, $height, $gap_side, $gap_x, $gap_width)
183       ·   $window (Gtk2::Gdk::Drawable)
184
185       ·   $state_type (Gtk2::StateType)
186
187       ·   $shadow_type (Gtk2::ShadowType)
188
189       ·   $area (Gtk2::Gdk::Rectangle or undef)
190
191       ·   $widget (Gtk2::Widget or undef)
192
193       ·   $detail (string or undef)
194
195       ·   $x (integer)
196
197       ·   $y (integer)
198
199       ·   $width (integer)
200
201       ·   $height (integer)
202
203       ·   $gap_side (Gtk2::PositionType)
204
205       ·   $gap_x (integer)
206
207       ·   $gap_width (integer)
208
209   $style->paint_check ($window, $state_type, $shadow_type, $area, $widget,
210       $detail, $x, $y, $width, $height)
211       ·   $window (Gtk2::Gdk::Drawable)
212
213       ·   $state_type (Gtk2::StateType)
214
215       ·   $shadow_type (Gtk2::ShadowType)
216
217       ·   $area (Gtk2::Gdk::Rectangle or undef)
218
219       ·   $widget (Gtk2::Widget)
220
221       ·   $detail (string or undef)
222
223       ·   $x (integer)
224
225       ·   $y (integer)
226
227       ·   $width (integer)
228
229       ·   $height (integer)
230
231   $style->paint_diamond ($window, $state_type, $shadow_type, $area, $widget,
232       $detail, $x, $y, $width, $height)
233       ·   $window (Gtk2::Gdk::Drawable)
234
235       ·   $state_type (Gtk2::StateType)
236
237       ·   $shadow_type (Gtk2::ShadowType)
238
239       ·   $area (Gtk2::Gdk::Rectangle or undef)
240
241       ·   $widget (Gtk2::Widget or undef)
242
243       ·   $detail (string or undef)
244
245       ·   $x (integer)
246
247       ·   $y (integer)
248
249       ·   $width (integer)
250
251       ·   $height (integer)
252
253   $style->paint_expander ($window, $state_type, $area, $widget, $detail, $x,
254       $y, $expander_style)
255       ·   $window (Gtk2::Gdk::Drawable)
256
257       ·   $state_type (Gtk2::StateType)
258
259       ·   $area (Gtk2::Gdk::Rectangle or undef)
260
261       ·   $widget (Gtk2::Widget)
262
263       ·   $detail (string or undef)
264
265       ·   $x (integer)
266
267       ·   $y (integer)
268
269       ·   $expander_style (Gtk2::ExpanderStyle)
270
271   $style->paint_extension ($window, $state_type, $shadow_type, $area,
272       $widget, $detail, $x, $y, $width, $height, $gap_side)
273       ·   $window (Gtk2::Gdk::Drawable)
274
275       ·   $state_type (Gtk2::StateType)
276
277       ·   $shadow_type (Gtk2::ShadowType)
278
279       ·   $area (Gtk2::Gdk::Rectangle or undef)
280
281       ·   $widget (Gtk2::Widget or undef)
282
283       ·   $detail (string or undef)
284
285       ·   $x (integer)
286
287       ·   $y (integer)
288
289       ·   $width (integer)
290
291       ·   $height (integer)
292
293       ·   $gap_side (Gtk2::PositionType)
294
295   $style->paint_flat_box ($window, $state_type, $shadow_type, $area, $widget,
296       $detail, $x, $y, $width, $height)
297       ·   $window (Gtk2::Gdk::Drawable)
298
299       ·   $state_type (Gtk2::StateType)
300
301       ·   $shadow_type (Gtk2::ShadowType)
302
303       ·   $area (Gtk2::Gdk::Rectangle or undef)
304
305       ·   $widget (Gtk2::Widget or undef)
306
307       ·   $detail (string or undef)
308
309       ·   $x (integer)
310
311       ·   $y (integer)
312
313       ·   $width (integer)
314
315       ·   $height (integer)
316
317   $style->paint_focus ($window, $state_type, $area, $widget, $detail, $x, $y,
318       $width, $height)
319       ·   $window (Gtk2::Gdk::Drawable)
320
321       ·   $state_type (Gtk2::StateType)
322
323       ·   $area (Gtk2::Gdk::Rectangle or undef)
324
325       ·   $widget (Gtk2::Widget or undef)
326
327       ·   $detail (string or undef)
328
329       ·   $x (integer)
330
331       ·   $y (integer)
332
333       ·   $width (integer)
334
335       ·   $height (integer)
336
337   $style->paint_handle ($window, $state_type, $shadow_type, $area, $widget,
338       $detail, $x, $y, $width, $height, $orientation)
339       ·   $window (Gtk2::Gdk::Drawable)
340
341       ·   $state_type (Gtk2::StateType)
342
343       ·   $shadow_type (Gtk2::ShadowType)
344
345       ·   $area (Gtk2::Gdk::Rectangle or undef)
346
347       ·   $widget (Gtk2::Widget or undef)
348
349       ·   $detail (string)
350
351       ·   $x (integer)
352
353       ·   $y (integer)
354
355       ·   $width (integer)
356
357       ·   $height (integer)
358
359       ·   $orientation (Gtk2::Orientation)
360
361   $style->paint_hline ($window, $state_type, $area, $widget, $detail, $x1,
362       $x2, $y)
363       ·   $window (Gtk2::Gdk::Drawable)
364
365       ·   $state_type (Gtk2::StateType)
366
367       ·   $area (Gtk2::Gdk::Rectangle or undef)
368
369       ·   $widget (Gtk2::Widget or undef)
370
371       ·   $detail (string or undef)
372
373       ·   $x1 (integer)
374
375       ·   $x2 (integer)
376
377       ·   $y (integer)
378
379   $style->paint_layout ($window, $state_type, $use_text, $area, $widget,
380       $detail, $x, $y, $layout)
381       ·   $window (Gtk2::Gdk::Drawable)
382
383       ·   $state_type (Gtk2::StateType)
384
385       ·   $use_text (boolean)
386
387       ·   $area (Gtk2::Gdk::Rectangle or undef)
388
389       ·   $widget (Gtk2::Widget or undef)
390
391       ·   $detail (string or undef)
392
393       ·   $x (integer)
394
395       ·   $y (integer)
396
397       ·   $layout (Pango::Layout)
398
399   $style->paint_option ($window, $state_type, $shadow_type, $area, $widget,
400       $detail, $x, $y, $width, $height)
401       ·   $window (Gtk2::Gdk::Drawable)
402
403       ·   $state_type (Gtk2::StateType)
404
405       ·   $shadow_type (Gtk2::ShadowType)
406
407       ·   $area (Gtk2::Gdk::Rectangle or undef)
408
409       ·   $widget (Gtk2::Widget)
410
411       ·   $detail (string or undef)
412
413       ·   $x (integer)
414
415       ·   $y (integer)
416
417       ·   $width (integer)
418
419       ·   $height (integer)
420
421   $style->paint_polygon ($window, $state_type, $shadow_type, $area, $widget,
422       $detail, $fill, $x1, $y1, ...)
423       ·   $window (Gtk2::Gdk::Drawable)
424
425       ·   $state_type (Gtk2::StateType)
426
427       ·   $shadow_type (Gtk2::ShadowType)
428
429       ·   $area (Gtk2::Gdk::Rectangle or undef)
430
431       ·   $widget (Gtk2::Widget or undef)
432
433       ·   $detail (string or undef)
434
435       ·   $fill (boolean)
436
437       ·   $x1 (integer) x coordinate of the first vertex
438
439       ·   $y1 (integer) y coordinate of the first vertex
440
441       ·   ... (list) pairs of x and y coordinates
442
443   $style->paint_resize_grip ($window, $state_type, $area, $widget, $detail,
444       $edge, $x, $y, $width, $height)
445       ·   $window (Gtk2::Gdk::Drawable)
446
447       ·   $state_type (Gtk2::StateType)
448
449       ·   $area (Gtk2::Gdk::Rectangle or undef)
450
451       ·   $widget (Gtk2::Widget or undef)
452
453       ·   $detail (string or undef)
454
455       ·   $edge (Gtk2::Gdk::WindowEdge)
456
457       ·   $x (integer)
458
459       ·   $y (integer)
460
461       ·   $width (integer)
462
463       ·   $height (integer)
464
465   $style->paint_shadow ($window, $state_type, $shadow_type, $area, $widget,
466       $detail, $x, $y, $width, $height)
467       ·   $window (Gtk2::Gdk::Drawable)
468
469       ·   $state_type (Gtk2::StateType)
470
471       ·   $shadow_type (Gtk2::ShadowType)
472
473       ·   $area (Gtk2::Gdk::Rectangle or undef)
474
475       ·   $widget (Gtk2::Widget or undef)
476
477       ·   $detail (string or undef)
478
479       ·   $x (integer)
480
481       ·   $y (integer)
482
483       ·   $width (integer)
484
485       ·   $height (integer)
486
487   $style->paint_shadow_gap ($window, $state_type, $shadow_type, $area,
488       $widget, $detail, $x, $y, $width, $height, $gap_side, $gap_x,
489       $gap_width)
490       ·   $window (Gtk2::Gdk::Drawable)
491
492       ·   $state_type (Gtk2::StateType)
493
494       ·   $shadow_type (Gtk2::ShadowType)
495
496       ·   $area (Gtk2::Gdk::Rectangle or undef)
497
498       ·   $widget (Gtk2::Widget or undef)
499
500       ·   $detail (string or undef)
501
502       ·   $x (integer)
503
504       ·   $y (integer)
505
506       ·   $width (integer)
507
508       ·   $height (integer)
509
510       ·   $gap_side (Gtk2::PositionType)
511
512       ·   $gap_x (integer)
513
514       ·   $gap_width (integer)
515
516   $style->paint_slider ($window, $state_type, $shadow_type, $area, $widget,
517       $detail, $x, $y, $width, $height, $orientation)
518       ·   $window (Gtk2::Gdk::Drawable)
519
520       ·   $state_type (Gtk2::StateType)
521
522       ·   $shadow_type (Gtk2::ShadowType)
523
524       ·   $area (Gtk2::Gdk::Rectangle or undef)
525
526       ·   $widget (Gtk2::Widget or undef)
527
528       ·   $detail (string or undef)
529
530       ·   $x (integer)
531
532       ·   $y (integer)
533
534       ·   $width (integer)
535
536       ·   $height (integer)
537
538       ·   $orientation (Gtk2::Orientation)
539
540   $style->paint_spinner ($window, $state_type, $area, $widget, $detail,
541       $step, $x, $y, $width, $height)
542       ·   $window (Gtk2::Gdk::Window)
543
544       ·   $state_type (Gtk2::StateType)
545
546       ·   $area (Gtk2::Gdk::Rectangle or undef)
547
548       ·   $widget (Gtk2::Widget or undef)
549
550       ·   $detail (string or undef)
551
552       ·   $step (integer)
553
554       ·   $x (integer)
555
556       ·   $y (integer)
557
558       ·   $width (integer)
559
560       ·   $height (integer)
561
562       Since: gtk+ 2.20
563
564   $style->paint_tab ($window, $state_type, $shadow_type, $area, $widget,
565       $detail, $x, $y, $width, $height)
566       ·   $window (Gtk2::Gdk::Drawable)
567
568       ·   $state_type (Gtk2::StateType)
569
570       ·   $shadow_type (Gtk2::ShadowType)
571
572       ·   $area (Gtk2::Gdk::Rectangle or undef)
573
574       ·   $widget (Gtk2::Widget)
575
576       ·   $detail (string or undef)
577
578       ·   $x (integer)
579
580       ·   $y (integer)
581
582       ·   $width (integer)
583
584       ·   $height (integer)
585
586   $style->paint_vline ($window, $state_type, $area, $widget, $detail, $y1_,
587       $y2_, $x)
588       ·   $window (Gtk2::Gdk::Drawable)
589
590       ·   $state_type (Gtk2::StateType)
591
592       ·   $area (Gtk2::Gdk::Rectangle or undef)
593
594       ·   $widget (Gtk2::Widget or undef)
595
596       ·   $detail (string or undef)
597
598       ·   $y1_ (integer)
599
600       ·   $y2_ (integer)
601
602       ·   $x (integer)
603
604   pixbuf = $style->render_icon ($source, $direction, $state, $size, $widget,
605       $detail=undef)
606       ·   $source (Gtk2::IconSource)
607
608       ·   $direction (Gtk2::TextDirection)
609
610       ·   $state (Gtk2::StateType)
611
612       ·   $size (Gtk2::IconSize)
613
614       ·   $widget (Gtk2::Widget or undef)
615
616       ·   $detail (string or undef)
617
618   $style->get_style_property ($widget_package, ...)
619       ·   $widget_package (string)
620
621       ·   ... (list)
622
623       Since: gtk+ 2.16
624
625   color = $style->text ($state)
626       ·   $state (Gtk2::StateType)
627
628   color = $style->text_aa ($state)
629       ·   $state (Gtk2::StateType)
630
631   gc = $style->text_aa_gc ($state)
632       ·   $state (Gtk2::StateType)
633
634   gc = $style->text_gc ($state)
635       ·   $state (Gtk2::StateType)
636
637   scalar = $style->white
638   scalar = $style->white_gc
639   scalar = $style->xthickness
640   scalar = $style->ythickness

SIGNALS

642       realize (Gtk2::Style)
643       unrealize (Gtk2::Style)
644

ENUMS AND FLAGS

646   enum Gtk2::ArrowType
647       ·   'up' / 'GTK_ARROW_UP'
648
649       ·   'down' / 'GTK_ARROW_DOWN'
650
651       ·   'left' / 'GTK_ARROW_LEFT'
652
653       ·   'right' / 'GTK_ARROW_RIGHT'
654
655       ·   'none' / 'GTK_ARROW_NONE'
656
657   enum Gtk2::ExpanderStyle
658       ·   'collapsed' / 'GTK_EXPANDER_COLLAPSED'
659
660       ·   'semi-collapsed' / 'GTK_EXPANDER_SEMI_COLLAPSED'
661
662       ·   'semi-expanded' / 'GTK_EXPANDER_SEMI_EXPANDED'
663
664       ·   'expanded' / 'GTK_EXPANDER_EXPANDED'
665
666   enum Gtk2::Gdk::WindowEdge
667       ·   'north-west' / 'GDK_WINDOW_EDGE_NORTH_WEST'
668
669       ·   'north' / 'GDK_WINDOW_EDGE_NORTH'
670
671       ·   'north-east' / 'GDK_WINDOW_EDGE_NORTH_EAST'
672
673       ·   'west' / 'GDK_WINDOW_EDGE_WEST'
674
675       ·   'east' / 'GDK_WINDOW_EDGE_EAST'
676
677       ·   'south-west' / 'GDK_WINDOW_EDGE_SOUTH_WEST'
678
679       ·   'south' / 'GDK_WINDOW_EDGE_SOUTH'
680
681       ·   'south-east' / 'GDK_WINDOW_EDGE_SOUTH_EAST'
682
683   enum Gtk2::IconSize
684       ·   'invalid' / 'GTK_ICON_SIZE_INVALID'
685
686       ·   'menu' / 'GTK_ICON_SIZE_MENU'
687
688       ·   'small-toolbar' / 'GTK_ICON_SIZE_SMALL_TOOLBAR'
689
690       ·   'large-toolbar' / 'GTK_ICON_SIZE_LARGE_TOOLBAR'
691
692       ·   'button' / 'GTK_ICON_SIZE_BUTTON'
693
694       ·   'dnd' / 'GTK_ICON_SIZE_DND'
695
696       ·   'dialog' / 'GTK_ICON_SIZE_DIALOG'
697
698   enum Gtk2::Orientation
699       ·   'horizontal' / 'GTK_ORIENTATION_HORIZONTAL'
700
701       ·   'vertical' / 'GTK_ORIENTATION_VERTICAL'
702
703   enum Gtk2::PositionType
704       ·   'left' / 'GTK_POS_LEFT'
705
706       ·   'right' / 'GTK_POS_RIGHT'
707
708       ·   'top' / 'GTK_POS_TOP'
709
710       ·   'bottom' / 'GTK_POS_BOTTOM'
711
712   enum Gtk2::ShadowType
713       ·   'none' / 'GTK_SHADOW_NONE'
714
715       ·   'in' / 'GTK_SHADOW_IN'
716
717       ·   'out' / 'GTK_SHADOW_OUT'
718
719       ·   'etched-in' / 'GTK_SHADOW_ETCHED_IN'
720
721       ·   'etched-out' / 'GTK_SHADOW_ETCHED_OUT'
722
723   enum Gtk2::StateType
724       ·   'normal' / 'GTK_STATE_NORMAL'
725
726       ·   'active' / 'GTK_STATE_ACTIVE'
727
728       ·   'prelight' / 'GTK_STATE_PRELIGHT'
729
730       ·   'selected' / 'GTK_STATE_SELECTED'
731
732       ·   'insensitive' / 'GTK_STATE_INSENSITIVE'
733
734   enum Gtk2::TextDirection
735       ·   'none' / 'GTK_TEXT_DIR_NONE'
736
737       ·   'ltr' / 'GTK_TEXT_DIR_LTR'
738
739       ·   'rtl' / 'GTK_TEXT_DIR_RTL'
740

SEE ALSO

742       Gtk2, Glib::Object
743
745       Copyright (C) 2003-2011 by the gtk2-perl team.
746
747       This software is licensed under the LGPL.  See Gtk2 for a full notice.
748
749
750
751perl v5.30.1                      2020-01-30                    Gtk2::Style(3)
Impressum