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