Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/images/gui/rc @ 3120

Last change on this file since 3120 was 2595, checked in by bensch, 20 years ago

orxonox/trunk/gui: Generalized plugins (returning Widget* now). Enumerator for isOption added

File size: 4.1 KB
Line 
1# pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
2#
3pixmap_path "/usr/include/X11R6/pixmaps:/home/imain/pixmaps"
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# Here is a list of all the possible states.  Note that some do not apply to
14# certain widgets.
15#
16# NORMAL - The normal state of a widget, without the mouse over top of
17# it, and not being pressed, etc.
18#
19# PRELIGHT - When the mouse is over top of the widget, colors defined
20# using this state will be in effect.
21#
22# ACTIVE - When the widget is pressed or clicked it will be active, and
23# the attributes assigned by this tag will be in effect.
24#
25# INSENSITIVE - When a widget is set insensitive, and cannot be
26# activated, it will take these attributes.
27#
28# SELECTED - When an object is selected, it takes these attributes.
29#
30# Given these states, we can set the attributes of the widgets in each of
31# these states using the following directives.
32#
33# fg - Sets the foreground color of a widget.
34# bg - Sets the background color of a widget.
35# bg_pixmap - Sets the background of a widget to a tiled pixmap.
36# font - Sets the font to be used with the given widget.
37#
38
39# This sets a style called "button".  The name is not really important, as
40# it is assigned to the actual widgets at the bottom of the file.
41
42style "window"
43{
44  #This sets the padding around the window to the pixmap specified.
45  #bg_pixmap[<STATE>] = "<pixmap filename>"
46  #bg_pixmap[NORMAL] = "warning.xpm"
47  bg[NORMAL] = { 0, 0, 0 }
48  fg[NORMAL] = { 0, 1.0, 0 }
49  base[NORMAL] = { 0, 0, 0 }
50  base[INSENSITIVE] = { 0, 0, 0 }
51}
52
53style "scale"
54{
55  #Sets the foreground color (font color) to red when in the "NORMAL"
56  #state.
57 
58  fg[NORMAL] = { 0, 1.0, 0 }
59  bg[NORMAL] = { 0, 1.0, 0 }
60  bg[INSENSITIVE] = { 0, 1.0, 0 }
61  bg[PRELIGHT] = { 0, 1.0, 0 }
62  bg[ACTIVE] =   {0.2, 0.2, 0.2 }
63 
64  #Sets the background pixmap of this widget to that of its parent.
65  bg_pixmap[NORMAL] = "<parent>"
66}
67
68style "button"
69{
70  # This shows all the possible states for a button.  The only one that
71  # doesn't apply is the SELECTED state.
72 
73  fg[PRELIGHT] = { 0, 0, 0 }
74  bg[PRELIGHT] = { 0, 1.0, 0 }
75  bg[ACTIVE] = { 0, 1.0, 0 }
76  fg[ACTIVE] = { 0, 1.0, 0 }
77  bg[NORMAL] = { 0, 0, 0 }
78  fg[NORMAL] = { 0, 1.0, 0 }
79  bg[INSENSITIVE] = { 1.0, 0, 1.0 }
80  fg[INSENSITIVE] = { 1.0, 0, 1.0 }
81  base[NORMAL] = { 0, 1.0, 0 }
82  base[PRELIGHT] = { 0, 1.0, 0 }
83}
84
85# In this example, we inherit the attributes of the "button" style and then
86# override the font and background color when prelit to create a new
87# "main_button" style.
88
89style "main_button" = "button"
90{
91  font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
92  bg[PRELIGHT] = { 0, 0.75, 0 }
93}
94
95style "toggle_button" = "button"
96{
97  fg[NORMAL] = { 0, 1.0, 0 }
98  fg[ACTIVE] = { 0, 1.0, 0 }
99  text[NORMAL] = { 0, 0, 0}
100  # This sets the background pixmap of the toggle_button to that of its
101  # parent widget (as defined in the application).
102  #bg_pixmap[NORMAL] = "<parent>"
103}
104
105style "text"
106{
107  #bg_pixmap[NORMAL] = "marble.xpm"
108  fg[NORMAL] = { 0, 1.0, 0 }
109}
110
111style "ruler"
112{
113  font = "-adobe-helvetica-medium-r-normal--*-20-*-*-*-*-*-*"
114}
115
116# pixmap_path "~/.pixmaps"
117
118# These set the widget types to use the styles defined above.
119# The widget types are listed in the class hierarchy, but could probably be
120# just listed in this document for the users reference.
121
122widget_class "GtkWindow" style "window"
123widget_class "GtkFrame" style "window"
124widget_class "Gtk*EventBox" style "window"
125widget_class "GtkDialog" style "window"
126widget_class "GtkFileSelection" style "window"
127widget_class "*Gtk*Scale" style "scale"
128widget_class "*GtkCheckButton*" style "toggle_button"
129widget_class "*Gtk*Menu*" style "toggle_button"
130widget_class "*GtkRadioButton*" style "toggle_button"
131widget_class "*GtkButton*" style "button"
132widget_class "*Ruler" style "ruler"
133widget_class "*GtkText" style "text"
134widget_class "*GtkLabel" style "text"
135
136
137# This sets all the buttons that are children of the "main window" to
138# the main_button style.  These must be documented to be taken advantage of.
139widget "main window.*GtkButton*" style "main_button"
Note: See TracBrowser for help on using the repository browser.