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