[1998] | 1 | # pixmap_path "<dir 1>:<dir 2>:<dir 3>:..." |
---|
| 2 | # |
---|
| 3 | pixmap_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 | # fg - 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 | |
---|
| 42 | style "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] = { 1.0, 0, 0 } |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | style "scale" |
---|
| 52 | { |
---|
| 53 | #Sets the foreground color (font color) to red when in the "NORMAL" |
---|
| 54 | #state. |
---|
| 55 | |
---|
| 56 | fg[NORMAL] = { 1.0, 0, 0 } |
---|
| 57 | bg[NORMAL] = { 1.0, 0, 0 } |
---|
| 58 | bg[PRELIGHT] = { 1.0, 0, 0 } |
---|
| 59 | |
---|
| 60 | #Sets the background pixmap of this widget to that of its parent. |
---|
| 61 | bg_pixmap[NORMAL] = "<parent>" |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | style "button" |
---|
| 65 | { |
---|
| 66 | # This shows all the possible states for a button. The only one that |
---|
| 67 | # doesn't apply is the SELECTED state. |
---|
| 68 | |
---|
| 69 | fg[PRELIGHT] = { 0, 0, 0 } |
---|
| 70 | bg[PRELIGHT] = { 1.0, 0, 0 } |
---|
| 71 | bg[ACTIVE] = { 1.0, 0, 0 } |
---|
| 72 | fg[ACTIVE] = { 0, 1.0, 0 } |
---|
| 73 | bg[NORMAL] = { 0, 0, 0 } |
---|
| 74 | fg[NORMAL] = { 1.0, 0, 0 } |
---|
| 75 | bg[INSENSITIVE] = { 1.0, 1.0, 1.0 } |
---|
| 76 | fg[INSENSITIVE] = { 1.0, 0, 1.0 } |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | # In this example, we inherit the attributes of the "button" style and then |
---|
| 80 | # override the font and background color when prelit to create a new |
---|
| 81 | # "main_button" style. |
---|
| 82 | |
---|
| 83 | style "main_button" = "button" |
---|
| 84 | { |
---|
| 85 | font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" |
---|
| 86 | bg[PRELIGHT] = { 0.75, 0, 0 } |
---|
| 87 | } |
---|
| 88 | |
---|
| 89 | style "toggle_button" = "button" |
---|
| 90 | { |
---|
| 91 | fg[NORMAL] = { 1.0, 0, 0 } |
---|
| 92 | fg[ACTIVE] = { 1.0, 0, 0 } |
---|
| 93 | text[NORMAL] = { 0, 0, 0} |
---|
| 94 | # This sets the background pixmap of the toggle_button to that of its |
---|
| 95 | # parent widget (as defined in the application). |
---|
| 96 | #bg_pixmap[NORMAL] = "<parent>" |
---|
| 97 | } |
---|
| 98 | |
---|
| 99 | style "text" |
---|
| 100 | { |
---|
| 101 | #bg_pixmap[NORMAL] = "marble.xpm" |
---|
| 102 | fg[NORMAL] = { 1.0, 0, 0 } |
---|
| 103 | } |
---|
| 104 | |
---|
| 105 | style "ruler" |
---|
| 106 | { |
---|
| 107 | font = "-adobe-helvetica-medium-r-normal--*-20-*-*-*-*-*-*" |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | # pixmap_path "~/.pixmaps" |
---|
| 111 | |
---|
| 112 | # These set the widget types to use the styles defined above. |
---|
| 113 | # The widget types are listed in the class hierarchy, but could probably be |
---|
| 114 | # just listed in this document for the users reference. |
---|
| 115 | |
---|
| 116 | widget_class "GtkWindow" style "window" |
---|
| 117 | widget_class "GtkFrame" style "window" |
---|
| 118 | widget_class "GtkDialog" style "window" |
---|
| 119 | widget_class "GtkFileSelection" style "window" |
---|
| 120 | widget_class "*Gtk*Scale" style "scale" |
---|
| 121 | widget_class "*GtkCheckButton*" style "toggle_button" |
---|
| 122 | widget_class "*Gtk*Menu*" style "toggle_button" |
---|
| 123 | widget_class "*GtkRadioButton*" style "toggle_button" |
---|
| 124 | widget_class "*GtkButton*" style "button" |
---|
| 125 | widget_class "*Ruler" style "ruler" |
---|
| 126 | widget_class "*GtkText" style "text" |
---|
| 127 | widget_class "*GtkLabel" style "text" |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | # This sets all the buttons that are children of the "main window" to |
---|
| 131 | # the main_button style. These must be documented to be taken advantage of. |
---|
| 132 | widget "main window.*GtkButton*" style "main_button" |
---|