]> Pileus Git - ~andy/gtk/blob - tests/testgtkrc
Destroy widgets _after_ propagating unrealize signals through the widget
[~andy/gtk] / tests / testgtkrc
1 # pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
2 #
3 # include "rc-file"
4 #
5 # style <name> [= <name>]
6 # {
7 #   <option>
8 # }
9 #
10 # widget <widget_set> style <style_name>
11 # widget_class <widget_class_set> style <style_name>
12
13 # testgtkrc2 sets all the buttons in the main window to blue by default
14 include "testgtkrc2"
15
16 pixmap_path "."
17
18 style "defaultfont"
19 {
20   fontset = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*"
21 #  font = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*"
22 }
23
24 # common default
25 class "GtkWidget" style "defaultfont"
26
27 style "window"
28 {
29 #  bg_pixmap[NORMAL] = "warning.xpm"
30 }
31
32 style "scale"
33 {
34   fg[NORMAL] = { 1.0, 0, 0 }
35   bg_pixmap[NORMAL] = "<parent>"
36 }
37
38 style "button" = "default"
39 {
40 #  fg[PRELIGHT] = { 1.0, 1.0, 1.0 }
41 #  bg[PRELIGHT] = { 0, 0, 0.75 }
42 #  bg[PRELIGHT] = { 0.75, 0, 0x00 }
43 }
44
45 style "toggle_button" = "button"
46 {
47   fg[NORMAL] = { 1.0, 0, 0 }
48   fg[ACTIVE] = { 1.0, 0, 0 }
49   bg_pixmap[NORMAL] = "<parent>"
50 }
51
52 style "text"
53 {
54   bg_pixmap[NORMAL] = "marble.xpm"
55   text[NORMAL] = { 1.0, 1.0, 1.0 }
56   fg[NORMAL] = { 1.0, 1.0, 1.0 }
57   base[NORMAL] = { 0.0, 0.0, 0.0 }
58 }
59
60 style "slider"
61 {
62   fg[NORMAL] = { 1.0, 1.0, 1.0 }
63   bg[NORMAL] = { 0.0, 0.0, 1.0 }
64   bg[ACTIVE] = { 0.0 ,0.0, 0.5 }
65   bg[PRELIGHT] = { 0.75 ,0.75, 1.0 }
66 }
67
68 style "ruler"
69 {
70   font = '-adobe-helvetica-medium-r-normal--*-80-*-*-*-*-*-*'
71 }
72
73 style "curve"
74 {
75   fg[NORMAL] = { 58000, 0, 0 }                  # red
76 }
77
78 style "red-bar"
79 {
80   bg[PRELIGHT] = { 0.95, .55, 0.55 }
81 }
82
83 # override testgtk2, introduce the green color in the button list
84 style 'button_list' = 'button'
85 {
86   font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
87   bg[PRELIGHT] = { 0, 0.75, 0x00 }
88 }
89 widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list"
90
91
92 class "GtkScrollbar" style "red-bar"
93
94 widget_class "GtkWindow" style "window"
95 widget_class "GtkDialog" style "window"
96 widget_class "GtkFileSelection" style "window"
97 widget_class "*Gtk*Scale" style "scale"
98 widget_class "*GtkCheckButton*" style "toggle_button"
99 widget_class "*GtkRadioButton*" style "toggle_button"
100 widget_class "*GtkButton*" style "button"
101 widget_class "*Ruler" style "ruler"
102 widget_class "*GtkText" style "text"
103 widget "*GtkCurve" style "curve"
104
105 binding "test1"
106 {
107   bind "<ctrl>1" {
108     "debug-msg" ("jup!")
109   }
110 }
111
112 binding "test2"
113 {
114   bind "<ctrl>1" {
115     "debug-msg" ("hallo and")
116     "debug-msg" ("huhu")
117   }
118 }
119
120 # possible priorities are (in ascending order):
121 # lowest
122 # gtk         (used by gtk for internal class bindings)
123 # application (for hard coded bindings on application basis)
124 # rc          (used implicitel by rc files)
125 # highest
126 class "GtkWindow" binding "test1"           # implicit : rc
127 class "GtkWindow" binding : highest "test2" # override "rc" priority
128
129 binding "clist-test"
130 {
131   bind "j" {
132     "scroll-vertical" (step-backward, 0.0)
133   }
134   bind "k" {
135     "scroll-vertical" (step-forward, 0.0)
136   }
137 }
138
139 class "GtkCList" binding "clist-test"