]> Pileus Git - ~andy/gtk/blob - tests/testgtkrc
abc738257b6771980469d63ae49863c7e638524f
[~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 #include "/usr/local/share/themes/Pixmap/gtk/gtkrc"
17 #include "/usr/local/share/themes/Redmond95/gtk/gtkrc"
18 #include "/usr/local/share/themes/Metal/gtk/gtkrc"
19 #include "/usr/local/share/themes/Notif/gtk/gtkrc"
20 #include "/usr/local/share/themes/Default/gtk/gtkrc"
21
22 # On Windows, if you have installed gtk-engines, try this for instance:
23 #include "\\windows\\gtk\\themes\\Pixmap\\gtk\\gtkrc"
24
25 pixmap_path "."
26
27 style "defaultfont"
28 {
29 #  fontset = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*,*"
30   font = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*"
31 }
32
33 # common default
34 class "GtkWidget" style "defaultfont"
35
36 style "window"
37 {
38 # bg_pixmap[NORMAL] = "marble.xpm"
39 }
40
41 style "scale"
42 {
43   fg[NORMAL] = { 1.0, 0, 0 }
44   bg_pixmap[NORMAL] = "<parent>"
45 }
46
47 style "button" = "default"
48 {
49 #  fg[PRELIGHT] = { 1.0, 1.0, 1.0 }
50 #  bg[PRELIGHT] = { 0, 0, 0.75 }
51 #  bg[PRELIGHT] = { 0.75, 0, 0x00 }
52 }
53
54 style "toggle_button" = "button"
55 {
56   fg[NORMAL] = { 1.0, 0, 0 }
57   fg[ACTIVE] = { 1.0, 0, 0 }
58 #  bg_pixmap[ACTIVE] = "check-y.xpm"
59 #  bg_pixmap[NORMAL] = "check-n.xpm"
60 }
61
62 style "text"
63 {
64   bg_pixmap[NORMAL] = "marble.xpm"
65   text[NORMAL] = { 1.0, 1.0, 1.0 }
66   fg[NORMAL] = { 1.0, 1.0, 1.0 }
67   base[NORMAL] = { 0.0, 0.0, 0.0 }
68 }
69
70 style "slider"
71 {
72   fg[NORMAL] = { 1.0, 1.0, 1.0 }
73   bg[NORMAL] = { 0.0, 0.0, 1.0 }
74   bg[ACTIVE] = { 0.0 ,0.0, 0.5 }
75   bg[PRELIGHT] = { 0.75 ,0.75, 1.0 }
76 }
77
78 style "ruler"
79 {
80   font = '-adobe-helvetica-medium-r-normal--*-80-*-*-*-*-*-*'
81 }
82
83 style "curve"
84 {
85   fg[NORMAL] = { 58000, 0, 0 }                  # red
86 }
87
88 style "red-bar"
89 {
90   bg[PRELIGHT] = { 0.95, .55, 0.55 }
91 }
92
93 # override testgtk2, introduce the green color in the button list
94 style 'button_list' = 'button'
95 {
96   font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
97   bg[PRELIGHT] = { 0, 0.75, 0x00 }
98 }
99 widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list"
100
101
102 class "GtkScrollbar" style "red-bar"
103
104 widget_class "GtkWindow" style "window"
105 widget_class "GtkDialog" style "window"
106 widget_class "GtkFileSelection" style "window"
107 widget_class "*Gtk*Scale" style "scale"
108 widget_class "*GtkCheckButton*" style "toggle_button"
109 widget_class "*GtkRadioButton*" style "toggle_button"
110 widget_class "*GtkButton*" style "button"
111 widget_class "*Ruler" style "ruler"
112 widget_class "*GtkText" style "text"
113 widget "*GtkCurve" style "curve"
114
115 binding "test1"
116 {
117   bind "<ctrl>1" {
118     "debug-msg" ("jup!")
119   }
120 }
121
122 binding "test2"
123 {
124   bind "<ctrl>1" {
125     "debug-msg" ("hallo and")
126     "debug-msg" ("huhu")
127   }
128 }
129
130 # possible priorities are (in ascending order):
131 # lowest
132 # gtk         (used by gtk for internal class bindings)
133 # application (for hard coded bindings on application basis)
134 # rc          (used implicitel by rc files)
135 # highest
136 class "GtkCList" binding  "test1"           # implicit : rc
137 #class "GtkWindow" binding : highest "test2" # override "rc" priority
138
139 binding "clist-test"
140 {
141   bind "j" {
142     "scroll-vertical" (step-backward, 0.0)
143   }
144   bind "k" {
145     "scroll-vertical" (step-forward, 0.0)
146   }
147 }
148
149 class "GtkCList" binding "clist-test"