~ubuntu-branches/ubuntu/trusty/gmusicbrowser/trusty-proposed

« back to all changes in this revision

Viewing changes to layout_doc.html

  • Committer: Package Import Robot
  • Author(s): Jackson Doak
  • Date: 2014-03-08 06:19:26 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20140308061926-853dpa53gr1yy8lu
Tags: 1.1.12-1
* New upstream release
* debian/rules: Use make distclean rather than make clean
* debian/control:
  - Add myself to uploaders
  - Add build-depends on markdown

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<h1>Layout documentation</h1>
2
 
 
3
 
<h2>Introduction</h2>
4
 
 
5
 
<p>Gmusicbrowser's interface is defined by layouts. Each layout define a window that contain several containers, each containing widgets. <br />
6
 
Layouts are used in many places in gmusicbrowser : the main window, the "traytip" popup, the fullscreen mode, the search and browser windows, pages that can be inserted as a tab, desktop widgets (plugin), the titlebar overlays (plugin), as well as some internal windows (such as the queue, equalizer).</p>
7
 
 
8
 
<p>Note that this documentation is likely incomplete, and could be improved. Don't hesitate to suggest improvements, ask for clarification, or point out missing informations.</p>
9
 
 
10
 
<h2>Advice for testing layouts</h2>
11
 
 
12
 
<p>Experimenting with layouts is highly encouraged. When doing so, it is recommended to launch gmusicbrowser from the command-line as some layout errors can be printed on the terminal. A good way to do that is launch gmusicbrowser with the <code>-layout</code> (or <code>-l</code>) followed by the layout identifier, this will directly open the desired layout.
13
 
  You can then easily quit without saving by pressing ctrl-c in the terminal, an advantage of this exit method is that it always works (no matter what your layout contains) and that no setting for the layout will be saved, so that you can see it each time as a new user would. Note that the auto-save plugin might still save the options, the <code>-demo</code> option will prevent any writing of the gmbrc. You can also use a copy of your gmbrc file and use the <code>-cfg</code> option to tell gmb to use the copy.</p>
14
 
 
15
 
<h2>Layout files</h2>
16
 
 
17
 
<p>Layouts are defined using text files, each file can contain one or more layout. <br />
18
 
Layout files use the <code>.layout</code> extension, they are found in 2 places:</p>
19
 
 
20
 
<ul>
21
 
<li>the default layouts included with gmusicbrowser are in installed <code>/usr/share/gmusicbrowser/layouts/</code></li>
22
 
<li>custom layouts can be added by putting them in <code>~/.config/gmusicbrowser/layouts</code>, which can be either a file or a folder containing multiple <code>.layout</code> files (read in alphabetical order)</li>
23
 
</ul>
24
 
 
25
 
<h2>Layout syntax</h2>
26
 
 
27
 
<p>A layout definition begins with a line containing a layout identifier enclosed in square brackets (<code>[]</code>) such as: <code>[some_layout_id]</code>.</p>
28
 
 
29
 
<p>(Layouts files may also contain group and column definition for the SongTree widget (see the <a href="http://wiki.gmusicbrowser.org/customization/songtree">SongTree documentation</a> for details). These group and column definitions begin with lines between <code>{}</code>. The definitions include all the following lines up to the next <code>[]</code> or <code>{}</code> line, or to the end of the file.)</p>
30
 
 
31
 
<p>layout definition syntax :</p>
32
 
 
33
 
<pre><code>[layout_id]
34
 
key1 = value
35
 
key2 = value
36
 
...
37
 
</code></pre>
38
 
 
39
 
<p><code>layout_id</code> is the string used to identify the layout. It can contain spaces or other special characters but it is recommended that only alphanumeric characters (<code>A-Z</code>, <code>a-z</code>, <code>0-9</code> and <code>_</code>) be used, otherwise it may harder or impossible to use the layout with some advanced features. If you want to give the layout a nice name use the <a href="#layoutname">Name</a> property explained below.</p>
40
 
 
41
 
<p>Long lines can be be split into multiple lines by ending them with a backslash (the backslash is optional as long as the next line doesn't begin with something like <code>word=</code>). <br />
42
 
Keys define either containers or properties, they only use simple alphanumeric characters : <code>A-Z a-z _ 0-9</code> . <br />
43
 
Keys are unique for a layout, duplicate key definitions replace the previous one.</p>
44
 
 
45
 
<p>If the name of the key begins with one of : HB, VB, HP, VP, MB, EB, TB, FR, NB (and some others, see below) the key is the name of a container that will contain widgets (also called layout elements or controls) or other containers. <br />
46
 
For containers the value is a list of children (widgets and/or other containers), separated by a space and preceded by optional packing options. The widget names can be followed by a number (to have multiple widgets of the same name) and its options between parentheses.</p>
47
 
 
48
 
<p>There must be one, and only one, container which has no parent, this container will be put in the layout window.</p>
49
 
 
50
 
<h3>Simple examples</h3>
51
 
 
52
 
<p>Very simple example, with 3 buttons (settings, play/pause, and open browser window) and the current song title :</p>
53
 
 
54
 
<pre><code>[very_simple]
55
 
Type = G
56
 
HBox = Pref Play OpenBrowser _Title
57
 
</code></pre>
58
 
 
59
 
<p>Type=G (G for generic) is used to make it appear in the player layouts list in the settings dialog. The <code>_</code> before Title is used to make the Title use all the available space in the horizontal box (HBox) it is packed in. The 4 widgets are put into a HB (= horizontal box) container, so they will be placed in a line.</p>
60
 
 
61
 
<pre><code>[simple]
62
 
Type=G
63
 
VBmain = MBmenu HBbuttons Title Text(markup="&lt;i&gt;by&lt;/i&gt; $artist &lt;i&gt;in&lt;/i&gt; $album")
64
 
MBmenu = MainMenuItem
65
 
HBbuttons= Prev Play Next
66
 
</code></pre>
67
 
 
68
 
<p>This layout has 3 containers, <code>VBMain</code> being the parent widget for <code>MBmenu</code> and <code>HBbuttons</code>. The <code>Title</code> widget displays the current song's title and <code>Text</code> has an option that defines what it should display, complete with <a href="http://developer.gnome.org/pango/stable/PangoMarkupFormat.html">pango markup</a> and <a href="#songvar">$-words</a>. This layout will show, vertically : a menu, buttons, title, and the text widget showing artist and album.</p>
69
 
 
70
 
<p>Look in the layouts files (installed in <code>/usr/share/gmusicbrowser/layouts/</code>) for more examples.</p>
71
 
 
72
 
<h2>Normal containers</h2>
73
 
 
74
 
<p>Containers are used to organize the widgets inside the window. They accept options that must be specified in parenthesis before the child widgets list. For example :</p>
75
 
 
76
 
<pre><code>HBname = (option1=value1,option2=value2) widget1 widget2
77
 
</code></pre>
78
 
 
79
 
<p>All containers accept the option <code>border</code> to specify the amount of padding around the container.</p>
80
 
 
81
 
<h4>HB/VB : Horizontal/Vertical Boxes (based on <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkBox.html">GtkBox</a>)</h4>
82
 
 
83
 
<p>These containers group widgets horizontally or vertically. Optional packing options are :</p>
84
 
 
85
 
<ul>
86
 
<li>a number : padding (in pixels)</li>
87
 
<li>an underscore <code>_</code> : expand (the widget will use all remaining space in the container)</li>
88
 
<li>a dash <code>-</code> : right aligned</li>
89
 
<li><p>a dot <code>.</code> : fill (rarely needed)</p>
90
 
 
91
 
<p>Example : <br />
92
 
<code>HBname = 2_-widget1(opt1=val,opt2=val) -widget2 2container3</code></p>
93
 
 
94
 
<p>Cover and ArtistPic widgets are treated specially, they ignore the expand mode, and expand until they reach a square size. For instance, in a HBox which has a height of 30, a Cover widget will use available space to expand if it has a width less than 30. <br />
95
 
Note that the maxwidth and maxheight widgets options only work inside a HB and a VB respectively.</p></li>
96
 
</ul>
97
 
 
98
 
<h4>HP/VP : Horizontal/Vertical Panes (based on <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkPaned.html">GtkPaned</a>)</h4>
99
 
 
100
 
<p>Same as HB/VB but they contain only 2 widgets <br />
101
 
  They only have one packing option, the underscore <code>_</code>. It sets the expand propriety that tells the container that this widget should give or receive space when the container is resized. <br />
102
 
  If both children have the expand propriety, they will both give or receive space when the container is resized.  </p>
103
 
 
104
 
<h4>TB : Notebook (based on <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkNotebook.html">GtkNotebook</a>)  <em>(deprecated)</em></h4>
105
 
 
106
 
<p>Each widget is in a tab, no packing options but the syntax is a bit different, each widget is preceded by the tab title. <br />
107
 
  The title can have spaces by using quotes, for example :</p>
108
 
 
109
 
<pre><code>TBname = title1 widget1(options) "title with spaces" widget2(options) title3 container3
110
 
</code></pre>
111
 
 
112
 
<h4>NB : Notebook (based on <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkNotebook.html">GtkNotebook</a>) <em>(new version)</em></h4>
113
 
 
114
 
<p>No packing options, syntax is simply the list of children.</p>
115
 
 
116
 
<p>A title and an optional icon is given by children options <code>tabtitle</code> and <code>tabicon</code>. For example :</p>
117
 
 
118
 
<pre><code>NBname = widget1(tabtitle="a title",other_option=value) widget2(tabtitle="other tab",tabicon=gmb-list) widget3(tabtitle=third)
119
 
</code></pre>
120
 
 
121
 
<p>Tab position and rotation can be set by using <code>tabpos</code> option, which can be one of left, right, top, or bottom, optionally followed by an angle : 0, 90, 180 or 270 <br />
122
 
  Example : <br />
123
 
  <code>NBname = (tabpos=left90) children1 children2</code></p>
124
 
 
125
 
<p>The <code>hidetabs=1</code> container option can be used to hide the tabs, this is meant to be used with commands that use SetFocusOn to change the visible page/child</p>
126
 
 
127
 
<p>As this container is in fact a TabbedLists/Context with different default options, it also accept the TabbedLists/Context widget options.</p>
128
 
 
129
 
<h4>EB : Expander (based on <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkExpander.html">GtkExpander</a>)</h4>
130
 
 
131
 
<p>Contains only one child, that child can be shown/hidden by clicking on the expander
132
 
  Option : <code>label</code> sets the text that will be displayed next to the expander. <br />
133
 
  Examples :</p>
134
 
 
135
 
<pre><code>EBname = (label="optional label") widget1`  
136
 
EBsimple = widget2`
137
 
</code></pre>
138
 
 
139
 
<h4>FB : Fixed (based on <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkFixed.html">GtkFixed</a>)</h4>
140
 
 
141
 
<p>Each widget is positioned at precise coordinates <br />
142
 
  Syntax : <code>FBname = x1,y1 widget1 x2,y2,w2,h2 widget2 ...</code> <br />
143
 
  The widget is positioned at the x,y coordinate. <br />
144
 
  An optional width and height can follow the coordinates, to specify how much space the widget should use. An height or width of 0 means leave it as default. <br />
145
 
  x,y,w,h can be relative to the width/height of the container by preceding the number with a dot (<code>.</code>) <br />
146
 
  x,y can be relative to the right/bottom border by prefixing it with minus (<code>-</code>).</p>
147
 
 
148
 
<h4>MB : Menu Bar</h4>
149
 
 
150
 
<p>They can only contain MenuItem widgets or SM containers, no packing options</p>
151
 
 
152
 
<h4>SM : Submenu</h4>
153
 
 
154
 
<p>They can only contain MenuItem widgets or SM containers, no packing options, label is set with the <code>label</code> container option</p>
155
 
 
156
 
<h4>BM : Button menu</h4>
157
 
 
158
 
<p>They can only contain MenuItem widgets or SM containers, no packing options. <br />
159
 
  Container options :</p>
160
 
 
161
 
<ul>
162
 
<li>label : set the button label</li>
163
 
<li>icon : set an icon</li>
164
 
<li>relief : (default to none) button relief</li>
165
 
<li>size : (default to menu) size of the icon</li>
166
 
</ul>
167
 
 
168
 
<h4>FR : Frame (based on <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkFrame.html">GtkFrame</a>)</h4>
169
 
 
170
 
<p>Draw a border around its child, with an optional label. (Can only contain one child) <br />
171
 
  Container options :</p>
172
 
 
173
 
<ul>
174
 
<li>shadow : one of <code>none</code>, <code>in</code>, <code>out</code>, <code>etched-in</code> (default), <code>etched-out</code></li>
175
 
<li>label   : optional text of the frame label</li>
176
 
</ul>
177
 
 
178
 
<h4>SB : Scrolled window (based on <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkScrolledWindow.html">GtkScrolledWindow</a>)</h4>
179
 
 
180
 
<p>Adds scrollbars to its child. (Can only contain one child)</p>
181
 
 
182
 
<h4>AB : Alignment (based on <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkAlignment.html">GtkAlignment</a>)</h4>
183
 
 
184
 
<p>Controls the alignment and size of its child. (Can only contain one child) <br />
185
 
  Container options :</p>
186
 
 
187
 
<ul>
188
 
<li>xalign : Horizontal position of child in available space, value between 0(left) and 1(right), default to .5 (center)</li>
189
 
<li>yalign : Vertical position of child in available space, value between 0(top) and 1(bottom), default to .5 (center)</li>
190
 
<li>xscale : If available horizontal space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all (default to 1)</li>
191
 
<li>yscale : If available vertical space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all (default to 1)</li>
192
 
</ul>
193
 
 
194
 
<h4>WB : Event window</h4>
195
 
 
196
 
<p>This container is used to have control over the background or mouse events on its child. (Can only contain one child)
197
 
  Some containers and widgets (like HB/VB) do not have their own gdkwindow and thus can't control their background or mouse events. Putting them inside a WB allows working around that.
198
 
  For example for having a window pop-up when the mouse is above a HB container, using the <code>hover_layout</code> option on the HB won't work, but putting the HB inside a WB and using the <code>hover_layout</code> option on the WB will work. It's also a way to paint the background of a HB using a custom gtk theme.</p>
199
 
 
200
 
<h2>Special containers</h2>
201
 
 
202
 
<p>There is also 2 special containers, widgets in these containers must belong to a normal container, and as the widget is defined elsewhere, widgets options can not be set here. These containers can be viewed as layout properties that take a list of widgets as value.</p>
203
 
 
204
 
<h4>HSize/VSize : Size groups (see <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkSizeGroup.html">GtkSizeGroup</a>)</h4>
205
 
 
206
 
<p>Force all widgets to have the same Horizontal/Vertical size, if the list of widgets begin with a number, the first widget Horizontal/Vertical size will be set to this number (in pixels) <br />
207
 
  Example :</p>
208
 
 
209
 
<pre><code>HSize0 = 20 widget1 widget2
210
 
HSize1 = widget3 widget4
211
 
</code></pre>
212
 
 
213
 
<h4>VolumeScroll :</h4>
214
 
 
215
 
<p>A unique virtual container (must be the exact name). For all widgets or containers inside, the scroll wheel will modify the volume (unless the scroll event is intercepted, like in a scrollable list). <br />
216
 
  Example :</p>
217
 
 
218
 
<pre><code>VBmain= Title HBbuttons TimeBar
219
 
HBbuttons= Pref Play
220
 
VolumeScroll= Title HBbuttons
221
 
</code></pre>
222
 
 
223
 
<h2>Layout properties</h2>
224
 
 
225
 
<h4>Title</h4>
226
 
 
227
 
<p>Set a title for the window. If not set, the window title defaults to <em>Song Title by Artist</em> (<code>%S by %a</code>) (see <a href="#songvar">%-letters and $-words</a>)  </p>
228
 
 
229
 
<pre><code>Title = gmusicbrowser playing %S by %a from %l
230
 
</code></pre>
231
 
 
232
 
<h4>Type</h4>
233
 
 
234
 
<p>A String of letters (most of the time only one letter) defining the type(s) of a layout, possible types :</p>
235
 
 
236
 
<ul>
237
 
<li>G Generic or player window</li>
238
 
<li>B Browser window</li>
239
 
<li>T Tray window</li>
240
 
<li>F Fullscreen</li>
241
 
<li>S Search</li>
242
 
<li>P Page for use in TabbedLists/NB/Context</li>
243
 
<li>O titlebar Overlay used by the titlebar plugin</li>
244
 
<li>D Desktop widget used by the "Desktop widgets" plugin</li>
245
 
<li><p>K for Karaoke plugin <em>(there is not yet an option to change the layout in the plugin)</em></p>
246
 
 
247
 
<p>Layouts of type G may optionally be followed a plus sign <code>+</code> that will make the layout appear in the LayoutItem sub-menu. This should only be used by layouts that include a LayoutItem. The idea is that users must be able to switch between the different '+' layouts easily.</p>
248
 
 
249
 
<p>Layouts work perfectly fine without a type, layouts without a type just won't be listed anywhere in the GUI. But they can for be opened with the <code>OpenCustom</code> command or with the <code>-layout</code> command-line option.</p></li>
250
 
</ul>
251
 
 
252
 
<h4><a id=layoutname> Name </a></h4>
253
 
 
254
 
<p>Set the name of the layout displayed in the settings dialog. The default Name is the layout id. <br />
255
 
  Contrary to the layout id, the Name can be changed without losing the layout's saved settings (window size, ...). <br />
256
 
  The name can be marked as translatable by using the syntax <code>Name= _"name of the layout"</code></p>
257
 
 
258
 
<h4>Title and Icon</h4>
259
 
 
260
 
<p>Used to define a tab title and a tab icon if the layout is used as a page in a NB/TabbedLists/Context</p>
261
 
 
262
 
<h4>Default <em>(mostly deprecated)</em></h4>
263
 
 
264
 
<p>Default options used when the layout has no saved state, contains a space-separated list of keys and values, by pair, <code>widget_or_container_name widget_or_container_variable_options</code>.</p>
265
 
 
266
 
<p>There is a special key : Window, for the window properties, see the Window layout property below.</p>
267
 
 
268
 
<p>Example :</p>
269
 
 
270
 
<pre><code>Default = Window size=1120x820,sticky=0 HPbig 780 FPane0 page=artist
271
 
</code></pre>
272
 
 
273
 
<p>This is mostly deprecated as now default options can be specified among the normal widget options, but it is still used a bit, in particular for HP/VP containers.</p>
274
 
 
275
 
<h4>KeyBindings</h4>
276
 
 
277
 
<p>Pairs of keys and action, example :</p>
278
 
 
279
 
<pre><code>KeyBindings = Insert OpenSearch c-q EnqueueSelected c-Insert OpenCustom(a_layout_id)
280
 
</code></pre>
281
 
 
282
 
<p>Key names are as shown in the key binding tab in the settings dialog. <br />
283
 
  Commands can be found by running gmusicbrowser with command-line option <code>-listcmd</code>.</p>
284
 
 
285
 
<h4>DefaultFocus</h4>
286
 
 
287
 
<p>Set which widget gets the initial focus in the window.
288
 
  It might not work with some complex widgets though it is easy to fix, just ask me if you'd like to enable it for a widget that currently doesn't support it. <br />
289
 
Example :</p>
290
 
 
291
 
<pre><code>HBmain= Pref Play _Title
292
 
DefaultFocus= Play
293
 
</code></pre>
294
 
 
295
 
<h4>DefaultFont and DefaultFontColor</h4>
296
 
 
297
 
<p>Set a default font and font color for widgets that use a font or a color option.</p>
298
 
 
299
 
<h4>SkinPath and SkinFile</h4>
300
 
 
301
 
<p>Used to set a picture file to be used as a skin, that can be used to set a window background, see the <a href="http://wiki.gmusicbrowser.org/customization/skins">skin documentation</a>.</p>
302
 
 
303
 
<h4>Window</h4>
304
 
 
305
 
<p>Set some window options :</p>
306
 
 
307
 
<ul>
308
 
<li><p><code>pos</code> and <code>size</code> : set the default size and position of the window, format is numberxnumber, values can be relative by using a %. For example : <code>pos=0x20</code> or <code>pos=50%x20%</code>. <br />
309
 
If a percentage is used for <code>pos</code>, the window will be centered on this position by default. This can be changed by appending a percentage relative to the size of the window. <br />
310
 
For example <code>pos=50%-50%x0+10%</code> will put the window at  <code>x= screenwidth/2 - windowwidth/2</code> and <code>y= 0 + windowheight/10</code></p></li>
311
 
<li><p><code>fixedsize</code>: set a fixed size for the window, -1 means the normal minimum width/height of the window. Example: <code>fixedsize=200x-1</code></p></li>
312
 
<li><p><code>sticky</code>, <code>ontop</code>, <code>below</code> and <code>fullscreen</code> : can be set to 1 (true) ot 0 (false). Note that it only sets the default, if this window property is changed by the user it will be saved.</p></li>
313
 
<li><p><code>insensitive</code>: if set to 1, makes the window completely insensitive to mouse or keyboard.</p></li>
314
 
<li><p><code>transparent</code>: if set to 1, makes the window background transparent (requires Cairo perl module and a compositing window manager to work).</p></li>
315
 
<li><p><code>shape</code>: when used with a background skin and with the transparent=1 option, it will make the window "transparent to input" where the alpha value is inferior to the shape option. Example : <code>Window = transparent=1, shape=10</code></p></li>
316
 
<li><p><code>opacity</code>: value is a number between 0 and 1, requires a compositing window manager</p></li>
317
 
<li><p><code>dragtomove</code>: if set to 1 the window can be moved by clicking on an empty area of the window</p></li>
318
 
<li><p><code>uniqueid</code>: a string, default to layout id, used by the option <code>ifexist</code>. Note that this option is overridden for the usual windows (player, browser, search ...), but can be used at least with the <code>OpenCustom</code> command</p></li>
319
 
<li><p><code>ifexist</code>: define the action to take when attempting to create a window with the same <code>uniqueid</code> as an existing window, it can be one of toggle(close existing window), present(bring the existing window to the front), replace(close the existing window and open a new window)</p></li>
320
 
</ul>
321
 
 
322
 
<h2>Derived layouts</h2>
323
 
 
324
 
<p>A layout can be derived from a previously defined layout by adding <code>based on</code>, followed by the layout id of the layout it is based on:</p>
325
 
 
326
 
<pre><code>[layout_id] based on this_other_layout_id
327
 
</code></pre>
328
 
 
329
 
<p>In this case the layout starts with all the key definitions of the other layout, each key can be re-defined or deleted (if nothing follows the <code>=</code>). <br />
330
 
This method of deriving layouts is only recommended for very small variants where only one or two line changes, as it might easily break if the original layout changes.</p>
331
 
 
332
 
<h2>Widgets</h2>
333
 
 
334
 
<h3>Widgets options</h3>
335
 
 
336
 
<p>Widget options are specified in the layout definition, in parentheses, after the name of the widget. Options are a list of keywords and values, separated by commas (with optional spaces). For example :</p>
337
 
 
338
 
<pre><code>VBmain= widget1(key1=value1,key2=value2, key3=value3) widget2(anotherkey=somevalue)
339
 
</code></pre>
340
 
 
341
 
<p>There are 2 kind of widget options. The first one (let's call them <strong>layout-set</strong> options) are the options that can only be set in the layout definition, most of the options described in this document are of this kind. The second kind (let's call them <strong>user-set</strong> options) are the options that the user can change in the GUI and are saved when the window is closed. The layout definition can change the default value of the user-set options, but if the user has already used the layout once, the user-set options will use their last recorded value and ignore the value set in the layout definition. As mentioned earlier, you can use the <code>-demo</code> command-line option to prevent the user-set options from having a recorded value and be able to test the value set in the layout definition.</p>
342
 
 
343
 
<p>Most of these user-set options are not documented here. To discover them you just need to use the widget in a layout and then look at the file containing the saved options (~/.config/gmusicbrowser/gmbrc) for the line containing the layout id, then for the line containing the widget name, the following lines contain the saved widget options. Some of these options may contain sub-options (for example a FilterPane has a set of sub-options for each of its page), a default for these sub-options can be set in the layout by using a slash (<code>/</code>) to separate option and sub-option. Example : <code>FilterPane(page_album/mode=mosaic)</code></p>
344
 
 
345
 
<p>In the future, some of the layout-set options may become user-set options, as more options are exposed to the GUI.</p>
346
 
 
347
 
<h3>Generic widget options</h3>
348
 
 
349
 
<p>A number of options work on a lot of widgets and containers</p>
350
 
 
351
 
<h4>size options</h4>
352
 
 
353
 
<ul>
354
 
<li><code>minwidth</code> and <code>minheight</code> : specify a minimum width or height, will not work on some widget</li>
355
 
<li><code>maxwidth</code> and <code>maxheight</code> : only works if the widget is inside of a HB/VB container, specify a maximum expansion width or height</li>
356
 
<li><code>expand_weight</code>: default to 1, used to specify a higher priority to get extra space from a HB/VB</li>
357
 
</ul>
358
 
 
359
 
<h4>click options</h4>
360
 
 
361
 
<p>A lot of widgets, in particular text labels, indicators and buttons can use the option <code>click1</code> (or <code>click2</code> ...) to (re)define the action executed when the widget is clicked with mouse button 1 (or 2 ...). <br />
362
 
Example : <code>Play(click2=OpenSongProp)</code> <br />
363
 
Button widgets also accept the option <code>activate</code> to (re)define the action executed when the button is activated with a mouse click or keyboard</p>
364
 
 
365
 
<h4><code>tip</code> option</h4>
366
 
 
367
 
<p>A lot of widgets, in particular labels, indicators and buttons can use the option <code>tip</code> to define a tool-tip for the widget. The tip may contain <a href="#songvar">%-letters and $-words</a> to display informations on the current song. <br />
368
 
Example : <code>Title(tip="last played : $lastplay")</code></p>
369
 
 
370
 
<h4><code>cursor</code> option</h4>
371
 
 
372
 
<p>Another common option, it is used to change the mouse cursor when it hovers over the widget. <br />
373
 
Example : <code>Play(cursor=hand2)</code> <br />
374
 
See <a href="http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/Gdk/Cursor.html#enum_Gtk2_Gdk_Cursor">this page</a> for a list of cursor names.</p>
375
 
 
376
 
<h4><code>hover_layout</code> option</h4>
377
 
 
378
 
<p>Many widgets and containers can use the <code>hover_layout=ALayoutName</code> option. It causes a window using the ALayoutName layout to pop-up when the mouse hover on the widget (for more than 1000ms, or the value set by the hover_delay option, use 1000ms if set to 0). The popped-up window disappear when the mouse exit the window. <br />
379
 
Only the widget or container that have their own gdkwindow can use this option. For the other widgets/containers, they can be placed inside a WB and use the <code>hover_layout</code> option on this EW. <br />
380
 
The <code>hover_layout_pos</code> option can used to control the position of the popped window, see <a href="http://git.gmusicbrowser.org/commit/41b0c69b45">this commit</a> <br />
381
 
Simple example of the <code>hover_layout</code> option to popup a big cover when the mouse hover on a Cover widget, by defining the Cover widget with this option : <code>Cover(hover_layout=CoverPopup)</code>, where CoverPopup is the the layout :</p>
382
 
 
383
 
<pre><code>[CoverPopup]
384
 
VBmain= Cover(minsize=800,maxsize=800,click1=CloseWindow)
385
 
</code></pre>
386
 
 
387
 
<p>To make the layout popup when the Cover widget is clicked rather than hovered, use this option :   <code>Cover(click1=PopupCustom(CoverPopup))</code></p>
388
 
 
389
 
<h4><code>group</code> option</h4>
390
 
 
391
 
<p>The <code>group</code> option is used to link a widget to a songlist (or equivalent widget) or to a song or set of songs. There are 2 type of links associated with the group option (they will be separable in the future), links to 1 song (like the current song or the last clicked song in a songlist), and the links to a set of songs (like the playlist or the content of a songlist), most widgets only use one type of links, some use both.</p>
392
 
 
393
 
<p>If the group option is not specified, most filter-oriented widgets (like songlist and FilterPane) will use a default group, local to the window. The song-oriented widget will often default to the group Play (like the Title/Artist/... widgets) to follow the current song. <br />
394
 
Group names that begin with an upper-case letter are global, the others are local to the window. <br />
395
 
There are a few special predefined groups :  </p>
396
 
 
397
 
<ul>
398
 
<li>Play : links to the current song or the playlist  </li>
399
 
<li>Next or NextN : link to the next song or the (N+1)th next song. The next song can be undefined, in particular when in a random weighted mode  </li>
400
 
<li>Recent or RecentN : link to the previously played song or the (N+1)th previously played song  </li>
401
 
</ul>
402
 
 
403
 
<p>Examples :  </p>
404
 
 
405
 
<ul>
406
 
<li><p>linking 2 FilterPane a SimpleSearch and a Total widget with a SongList (if there is no other songlist-like widget in the layout, using the group option is not needed as the default group will do fine) :</p>
407
 
 
408
 
<pre><code>VBmain= HPfilterpanes SimpleSearch(group=1) _SongList(group=1) Total(group=1)
409
 
HPfilterpanes= FilterPane1(group=1,nb=1) FilterPane2(group=1,nb=2)
410
 
</code></pre></li>
411
 
<li><p>Title widget that display the next song's title :</p>
412
 
 
413
 
<pre><code>Title2(group=Next, markup_empty="&lt;i&gt;no next song&lt;/i&gt;")
414
 
</code></pre></li>
415
 
<li><p>making a Text widget display the title and artist of the song selected in a SongList :</p>
416
 
 
417
 
<pre><code>VBox= Text0(group=mygroup, markup="$title by $artist", markup_empty="&lt;i&gt;no selected song&lt;/i&gt;") _SongList(group=mygroup)
418
 
</code></pre></li>
419
 
</ul>
420
 
 
421
 
<h4>Options common to the text widgets</h4>
422
 
 
423
 
<p>The text widgets (sometimes called label widgets) include : Title, Title_by, Album, Artist, Comment, Year, Length, PlayingTime, Pos, and Text</p>
424
 
 
425
 
<ul>
426
 
<li>font : change the default font, the value use the <a href="http://developer.gnome.org/pango/stable/pango-Fonts.html#pango-font-description-from-string">pango font syntax</a>, for example : <code>12</code>, <code>Sans Italic 12</code>, <code>Monospace</code>. (Note that the font for a part of the string can be set in pango markup)</li>
427
 
<li>color : set the default font color, value is an RGB color specification such as <code>#00FF00</code> or a color name such as <code>red</code>. (Note that the color for a part of the string can be set in pango markup)</li>
428
 
<li>minsize : if set (it is set by default for Album, Artist, Comment, Title, Title_by), the label will request a minimum width (it can have more if packed with the expand option in a container), if the width is not enough to display the text, the text will scroll on mouse-over. The value of the <code>minsize</code> option is the width it will request, the unit is in pixels if followed by a <code>p</code> or in the width of the <code>X</code> character if it is only a number
429
 
markup : can be used to re-define the text displayed, you can use <a href="#songvar">%-letters and $-words</a> (like <code>%t</code>, <code>%a</code>, ...) for current-song dependent text, and <a href="http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html">pango markup</a> (like <code>&lt;b&gt;...&lt;/b&gt;</code>)for formatting.</li>
430
 
<li><code>markup_empty</code> : for Text/Title/Artist/... widgets, define what to display if there is no current song (or if there is no selected song in the group they are linked to). Most of time this default to an empty string, Title defaults to <code>&lt;Empty playlist&gt;</code></li>
431
 
<li>xalign : horizontal alignement as a value between 0 (left) and 1 (right), .5 being center</li>
432
 
<li>yalign : vertical alignement as a value between 0 (up) and 1 (bottom), .5 being center</li>
433
 
<li>expand_max : same as the maxwidth option (specify a maximum expand width when inside a HB) but the widget will never grow wider than what is needed to display the string (replace the maxwidth value, so using the maxwidth with it will have no effect)</li>
434
 
</ul>
435
 
 
436
 
<h3>Text widgets</h3>
437
 
 
438
 
<ul>
439
 
<li>Title : Display currently playing Title</li>
440
 
<li>Title_by : Display currently playing Title and Artist</li>
441
 
<li>Album : Display currently playing Album</li>
442
 
<li>Artist : Display currently playing Artist</li>
443
 
<li>Comment : Display comment of currently playing song</li>
444
 
<li>Year : Display year of currently playing song</li>
445
 
<li>Length   : Display length of currently playing song</li>
446
 
<li>Pos : Display position of currently playing song in the playlist</li>
447
 
<li><p>Text : Display custom text (other text widgets can use these options too to change their defaults)</p>
448
 
 
449
 
<ul>
450
 
<li>text : label text</li>
451
 
<li>markup : text than can include <a href="#songvar">%-letters and $-words</a> and <a href="http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html">pango markup</a></li>
452
 
<li>ellipsize : can be none, start, middle, or end. Default is none. Note that enabling ellipsize will make the widget require very little width, so you need to either force a bigger width request (option minwidth), or pack the widget in a way that will give it additional width (such as using the expand option in a HB, provided the HB gets enough width)</li>
453
 
</ul>
454
 
 
455
 
<p><p>Many of these widgets are simply a Text widget with a set of default options, in particular the options : <code>markup</code>, <code>click1</code>, <code>click3</code>, <code>minsize</code>.</p></li>
456
 
</ul></p>
457
 
 
458
 
<h3>Buttons widgets</h3>
459
 
 
460
 
<ul>
461
 
<li>Next : Next button</li>
462
 
<li>Play : Play/Pause button</li>
463
 
<li>Prev : Previous button</li>
464
 
<li>Stop : Stop button</li>
465
 
<li>Quit : Quit button</li>
466
 
<li>Repeat : Button to change repeat mode</li>
467
 
<li>OpenContext : Button to open context window</li>
468
 
<li>OpenBrowser : Button to open Browser window</li>
469
 
<li>Pref : Button to open Settings window</li>
470
 
<li>ChooseAlbum : Open a window to select an album</li>
471
 
<li>OpenQueue : Open a queue window</li>
472
 
<li>Fullscreen : Button to switch to/from fullscreen mode</li>
473
 
<li>ChooseRandAlbum : Button to select an album at random, option <code>action</code> can be playlist, addplay, insertplay, queue, replacequeue, ... see action option in SongList</li>
474
 
<li>Choose : Button to open a search window</li>
475
 
<li>Button   : custom button (other buttons can use these options too)
476
 
<ul>
477
 
<li>text or label : text in the button</li>
478
 
<li>stock : icon name, see <code>/usr/share/gmusicbrowser/pix/</code> or <a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk-Stock-Items.html">Gtk2 Stock-Items</a> or <code>~/.config/gmusicbrowser/icons/</code> (without filename extension)</li>
479
 
</ul></li>
480
 
<li>ExtraButtons : placeholder for extra buttons provided by plugins or activated in the preferences. Options are passed to the buttons, generic button options such as size and relief should work, example: <code>HButtons= Play Stop ExtraButtons</code> or <code>HButtons= Play(size=menu) Stop(size=menu) ExtraButtons(size=menu)</code></li>
481
 
</ul>
482
 
 
483
 
<p>The OpenContext, OpenBrowser and OpenQueue buttons accept the option 'toggle', if true (=1) the button will close the opened window if it is already opened</p>
484
 
 
485
 
<p>All buttons can be changed to an indicator(no button border, smaller) with the option <code>button=0</code></p>
486
 
 
487
 
<p>Relief can be changed for buttons by using the option <code>relief=none</code> (default), <code>half</code> or <code>normal</code>.</p>
488
 
 
489
 
<p>Size of buttons and indicators can be set by setting the option <code>size</code> to <code>menu</code>, <code>small-toolbar</code>, <code>large-toolbar</code>, <code>button</code>, <code>dialog</code>, <code>dnd</code> (the actual size depends on gtk settings)</p>
490
 
 
491
 
<h3>Indicators widgets</h3>
492
 
 
493
 
<ul>
494
 
<li>Filter : Playing filter indicator</li>
495
 
<li>Queue : Queue indicator</li>
496
 
<li>Sort : Sort mode indicator</li>
497
 
<li>LockAlbum : Album lock</li>
498
 
<li>LockArtist : Artist lock</li>
499
 
<li>LockSong : Song lock</li>
500
 
<li>EventBox : same as Button with default option <code>button=0</code></li>
501
 
</ul>
502
 
 
503
 
<p>All indicators can be changed to buttons with the option <code>button=1</code>.
504
 
Size can be changed same as buttons, see above.</p>
505
 
 
506
 
<p>indicators (Filter Queue Sort ...) and some buttons (Play Next Prev Stop Quit ...) have a few common options:</p>
507
 
 
508
 
<ul>
509
 
<li><code>with_text</code>: set to 1 to activate icon-with-text mode</li>
510
 
<li><code>text</code> : to change the default text</li>
511
 
<li><code>ellipsize</code> : set to start/middle/end to activate ellipsize mode, better used with a minwidth option or when packed in expand mode</li>
512
 
<li><code>markup</code> : can be used to set the pango markup that will be used to display the text, and also add text to the default text. %s is replaced by the default text. Default to <code>&lt;small&gt;%s&lt;/small&gt;</code> for widgets with <code>size=menu</code>, else to <code>%s</code></li>
513
 
<li><code>stock</code>: option to change the default icons, see <a href="http://git.gmusicbrowser.org/commit/9287bb273a">this commit</a></li>
514
 
</ul>
515
 
 
516
 
<h3>Time widgets</h3>
517
 
 
518
 
<ul>
519
 
<li>PlayingTime : Display position of currently playing song
520
 
<ul>
521
 
<li>markup_stopped : markup to use when stopped (default is <code>--:--</code>)</li>
522
 
</ul></li>
523
 
<li>Time : displays XX:XX of XX:XX, format can be redefined with options markup and markup_empty (and initsize to request enough size from the start). %s is replaced by the current playtime, <br />
524
 
example : <code>LabelTime(markup="%s / $length", initsize="XX:XX / -XX:XX")</code></li>
525
 
<li>TimeSlider : Playing position slider
526
 
<ul>
527
 
<li>step_mode : if 1, clicking on the slider advance or or move back the position by one step, rather than jumping to the clicked position</li>
528
 
</ul></li>
529
 
<li>TimeBar : Playing position progress bar
530
 
<ul>
531
 
<li>text : specify a text to display inside the bar, it can contain %-letters and $-words, in addition these variables are available : $percent, $current, $left, $total</li>
532
 
<li>text_empty : used instead of text when no song is selected</li>
533
 
<li>ellipsize : used to ellipsize the text, default to <code>end</code>, can be none, start, middle, or end</li>
534
 
<li>font : set the font</li>
535
 
</ul></li>
536
 
</ul>
537
 
 
538
 
<h3>Volume widgets</h3>
539
 
 
540
 
<ul>
541
 
<li>VolumeIcon : Volume indicator</li>
542
 
<li>VolumeSlider : Volume slider
543
 
<ul>
544
 
<li>hide : hide the value if true (=1)</li>
545
 
<li>horizontal : vertical slider if true (=1)</li>
546
 
<li>step_mode : if 1, clicking on the slider increase or decrease the volume by one step, rather than setting it to the corresponding value</li>
547
 
</ul></li>
548
 
<li>VolumeBar : Volume bar</li>
549
 
<li>Volume : current volume as text</li>
550
 
</ul>
551
 
 
552
 
<h3>Other widgets related to the playing song</h3>
553
 
 
554
 
<p>By default, all these widgets show information on the currently playing song, some allow the edition of a property of the current song. By using the <code>group</code> option (see above), these widgets should be able to follow for example the selected song in a songlist rather than the current song. Example : <code>VBexample= _SongList(group=example) Cover(group=example)</code></p>
555
 
 
556
 
<ul>
557
 
<li>Cover : Album cover of currently playing song
558
 
<ul>
559
 
<li>forceratio : 1 or 0, if 1 always request a square size, useful for tray tip windows as they can't be resized</li>
560
 
<li>minsize : minimum size</li>
561
 
<li>maxsize : maximum size (default is 500)</li>
562
 
<li>default : set a default file to use if there is no cover/artist picture</li>
563
 
<li>overlay : set an overlay which is drawn on top of the picture, format is <code>XxY:WIDTHxHEIGHT:FILE</code>, where X, Y, WIDTH and HEIGHT define a rectangle in the overlay file where the album/artist picture will be drawn</li>
564
 
<li>reflection : enable a reflection effect below the picture, (requires Cairo perl module) The value can be 0-100, used to define the height of the reflection in percentage of the picture (the value 1 set it to the default value of 25)</li>
565
 
<li>r<em>alpha1 and r</em>alpha2 : can be used to set the starting (default=80) and ending (default=0) transparency percentage (0-100) of the reflection</li>
566
 
<li>r_scale : (0-100, default=90) to configure the vertical scaling of the reflection</li>
567
 
<li>(the filename in the <code>default</code> and <code>overlay</code> option can be absolute or relative to the layout folder)</li>
568
 
</ul></li>
569
 
<li>ArtistPic : Artist picture of currently playing song. Same options as Cover. With multiple artists, displays only one picture unless the option <code>multiple</code> was given, which can be set to <code>v</code> (vertical) or <code>h</code> (horizontal)</li>
570
 
<li>Stars : Display currently playing rating as a picture (default to stars), clicking on the stars change the rating
571
 
<ul>
572
 
<li>xalign and yalign : value between 0 and 1. Used to align the stars in the widget if the widget has more space than needed. Default to .5</li>
573
 
</ul></li>
574
 
<li>LabelsIcons : Icons for currently playing labels for which an icon is defined in <code>~/.config/gmusicbrowser/icons/</code> (by a .png or .svg named <code>label-</code> followed by the label name.)</li>
575
 
<li>SongInfo : display the song properties (like the info tab of the song properties window)
576
 
<ul>
577
 
<li>expander: 1 or 0, defaults to 1, show expanders for each field category if 1</li>
578
 
<li>hide<em>empty: 1 or 0, default to 1, hide empty fields if 1</li>
579
 
<li>font : default font</li>
580
 
<li>group : group that determine current song, defaults to Play</li>
581
 
<li>markup</em>cat : markup for categories name, defaults to <code>&lt;u&gt;%s&lt;/u&gt;</code></li>
582
 
<li>markup<em>field : markup for fields name, defaults to <code>&lt;small&gt;%s :&lt;/small&gt;</code></li>
583
 
<li>markup</em>value : markup for values, defaults to <code>&lt;small&gt;&lt;b&gt;%s&lt;/b&gt;&lt;/small&gt;</code></li>
584
 
</ul></li>
585
 
<li>PictureBrowser : display pictures in folder of the current album, click to change picture, many options are planned</li>
586
 
<li>AddLabelEntry : Entry to add labels to the current song</li>
587
 
<li>LabelToggleButtons : displays list of labels with toggle buttons to edit current song's labels
588
 
<ul>
589
 
<li>hide_unset: if true(=1), hide labels that not set for the song</li>
590
 
</ul></li>
591
 
<li>Context : Context view, in fact this widget is a TabbedLists with a few different default options, in particular <code>match=context page</code> that automatically add context pages provided by plugins, and <code>typesubmenu=C</code> that  limit the context menu to context_pages-related entries</li>
592
 
</ul>
593
 
 
594
 
<h4>Miscellaneous widgets</h4>
595
 
 
596
 
<ul>
597
 
<li>AASearch
598
 
<ul>
599
 
<li>aa : artist or album</li>
600
 
<li>activate : addplay or other action, see activate option of SongList</li>
601
 
</ul></li>
602
 
<li>ArtistSearch : same as AASearch(aa=artists)</li>
603
 
<li>AlbumSearch : same as AASearch(aa=album)</li>
604
 
<li>SongSearch</li>
605
 
<li>ConnectionsList : the active connections when in gstreamer-server mode (very rough for now, mostly for testing)</li>
606
 
<li>Visuals : Display a sound visualisation, only with gstreamer</li>
607
 
<li>QueueActions : combobox to change the queued action</li>
608
 
<li>ToggleButton : Show/Hide other widget(s)
609
 
<ul>
610
 
<li>icon : icon name, see <code>/usr/share/gmusicbrowser/pix/</code> or <a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk-Stock-Items.html">Gtk2 Stock-Items</a> or <code>~/.config/gmusicbrowser/icons/</code> (without filename extension)</li>
611
 
<li>text : button text</li>
612
 
<li>widget : list of widgets/containers separated by <code>|</code></li>
613
 
<li>resize : String of <code>h</code>,<code>v</code> or <code>_</code>, one by hidden widget : shrink the window vertically (v) or horizontally (h) when each widget is hidden</li>
614
 
<li>togglegroup : activating a ToggleButton or MenuItem with a togglegroup will deactivate all the TogButton or MenuItem of the same togglegroup</li>
615
 
<li>size : can be <code>menu</code>, <code>small-toolbar</code>, <code>large-toolbar</code>, <code>button</code>, <code>dialog</code>, <code>dnd</code>. (the actual size depends on gtk settings)</li>
616
 
<li>relief</li>
617
 
</ul></li>
618
 
<li>Filler : empty widget to add space, for use with H/VSize</li>
619
 
<li>HSeparator : Horizontal separator</li>
620
 
<li>VSeparator : Vertical separator</li>
621
 
<li>PlayOrderCombo : Combo box to change play order, the option minwidth set the requested width, it defaults to 100, -1 to let it grow, but it can grow much to wide, so it's best to set a minimum width and pack it with the expand option</li>
622
 
<li>Equalizer : Equalizer, only active with gstreamer currently
623
 
<ul>
624
 
<li>preamp : whether to show the preamp, default to 1</li>
625
 
<li>labels : pango attribute used to display labels, default to <code>x-small</code></li>
626
 
</ul></li>
627
 
<li>Progress : widget to display progress of current operations, hidden if no operations in progress
628
 
<ul>
629
 
<li>compact: make it more compact, less verbose, default to 1</li>
630
 
</ul></li>
631
 
<li>VProgress : same as Progress, but the widget use more vertical space and less horizontal space, and the compact option is 0 (false) by default</li>
632
 
</ul>
633
 
 
634
 
<h4>Songlist widgets</h4>
635
 
 
636
 
<p>When there is more than one SongList/TabbedLists/... in a layout, they must each but one be assigned a group number though the group option. The one without a group number will be the default with which other widgets interact with. <br />
637
 
All the other widgets which interact with a SongList/TabbedLists/... accept the option 'group' to specify which one they interact with, it is only needed when the layout contain more than one SongList/TabbedLists/...</p>
638
 
 
639
 
<ul>
640
 
<li>QueueList : Display queue (and edit it), accept the same options as SongList</li>
641
 
<li>PlayList : SongList in playlist mode</li>
642
 
<li>SongList :
643
 
<ul>
644
 
<li>hideif : can be <code>nofilter</code> or <code>empty</code>. Other values disable this. Conditions that will make the songlist hide itself or the widgets specified by hidewidget</li>
645
 
<li>hidewidget : List of widgets separated with <code>|</code>. When the hide conditions are met, these widgets will be hidden, by default the songlist is hidden</li>
646
 
<li>shrinkonhide : String of <code>h</code>,<code>v</code> or <code>_</code>, one by hidden widget : shrink vertically (<code>v</code>) or horizontally (<code>h</code>) the window when hidden. When multiple widgets are hidden, a direction or no direction (<code>_</code>) can be specified for each widget by using a string of <code>h/v/_</code></li>
647
 
<li>mode : if set to <code>playlist</code>, the songlist and the playlist are synchronized</li>
648
 
<li>activate : Action when double-clicking on a song : <code>play</code>(play now), <code>queue</code>(enqueue), <code>queueinsert</code>(insert at the top of the queue), <code>replacequeue</code>, <code>playlist</code>(set this list as the playlist and play this song), <code>addplay</code>(add to playlist), <code>insertplay</code>(insert in playlist after current position), <code>filter_and_play</code>, <code>filter_sort_and_play</code>, or <code>properties</code>(open song property window). The action can  be followed by a command like this : <code>activate=play&amp;CloseWindow</code></li>
649
 
<li>activateX : where X is a mouse button number, defines the action used when the button X is double-clicked</li>
650
 
<li>headers : hide the headers if set to <code>off</code></li>
651
 
<li>songypad : change the default number of pixels between rows</li>
652
 
<li>no_typeahead : if 1, disable automatic searching when a letter/digit is pressed and the SongList has focus</li>
653
 
<li>rowtip : default tip to show when the mouse is above a row, can use %-letters and $-words</li>
654
 
<li>autoupdate ; if 1 (default) keep list sorted and filtered (ignored in playlist, queue, or static list mode). User can toggle this option, so only affect newly created songlists</li>
655
 
</ul></li>
656
 
<li>TabbedLists : Songlists in tabs, can contain playlist, static lists and the queue. layouts of type 'P' can be opened in TabbedLists (use the layout property key <code>stockicon</code> to set the tab icon), context pages can also be opened (the Context widget is a TabbedLists with a different set of options)
657
 
<ul>
658
 
<li>tablist : if 1, show the list of tabs in the tab context-menu</li>
659
 
<li>closebuttons : if 1, display close buttons in the tab of tabs that can be closed</li>
660
 
<li>newbutton : if 1 (default) show a "new page" button next to the tabs</li>
661
 
<li>tabpos : select tab position (left, right, top, bottom), optionally followed by the rotation angle : 0, 90, 180 or 270, example : <code>tabpos=left90</code></li>
662
 
<li>default_child : widget type that will be opened by default when closing the last page. default to <code>PlayList</code></li>
663
 
<li>match : set of keywords that define which dynamic widget should be added automatically? Default to empty, which means nothing will be added automatically. The Context widget has the is option set to <code>context page</code></li>
664
 
</ul></li>
665
 
<li>SongTree : Very customizable Songlist replacement. (drag and dropping columns is not yet implemented). See this <a href="http://wiki.gmusicbrowser.org/customization/songtree">wiki page</a> for some documentation. Many SongList options work, including these : activate activateX headers songxpad songypad rowtip autoupdate</li>
666
 
</ul>
667
 
 
668
 
<h4>Widgets related to songlists</h4>
669
 
 
670
 
<p>(filter# is a number between 0-9, 0 is meant for FilterLock, when a filter is set all filters with a higher number are reset) <br />
671
 
All these widgets accept the option <code>group</code> to specify which SongList/TabbedLists/... they interact with, it is only needed when the layout contain more than one SongList/TabbedLists/...  </p>
672
 
 
673
 
<ul>
674
 
<li>AABox : Artist or Album box (name, picture and stats of selected album/artist)
675
 
<ul>
676
 
<li>aa : artist or album</li>
677
 
</ul></li>
678
 
<li>ArtistBox : same as AABox(aa=artists)</li>
679
 
<li>AlbumBox : same as AABox(aa=album)</li>
680
 
<li><p>EditListButtons : buttons to remove/move the selected song(s) in the songlist and clear the list</p>
681
 
 
682
 
<ul>
683
 
<li>small : if true(=1) hide the label of the remove and clear buttons</li>
684
 
<li>orientation : vertical buttons if set to <code>vertical</code></li>
685
 
</ul></li>
686
 
<li><p>FilterBox : advanced search box (set filter#1)</p></li>
687
 
<li>FilterLock : Lock/unlock : current songlist filter is put in filter#0
688
 
<ul>
689
 
<li>relief</li>
690
 
</ul></li>
691
 
<li>FilterPane : Filter pane
692
 
<ul>
693
 
<li>nb : filter#, filter number to set, the artist/album/genre/date/label/folder/... pages only show the artist/... for songs matching all filters with a lower number </li>
694
 
<li>hidebb : hide bottom buttons if true(=1)</li>
695
 
<li>pages : set the default list of pages, value is names of pages separated by <code>|</code>, among savedtree,artist,album,genre,date,label,folder,filesys,lastplay,added,modif,rating...</li>
696
 
<li>activate : play, queue, queueinsert, replacequeue, insertplay, playlist, addplay or properties (see <code>activate</code> option of SongList)</li>
697
 
<li>activateX : where X is a mouse button number, defines the action used when the button X is double-clicked</li>
698
 
<li>searchbox : if true(=1) add a search box to artist/album,genre,label pages</li>
699
 
<li>no_typeahead : if true(=1) disable automatic searching when a letter/digit is pressed and the FilterPane has focus</li>
700
 
<li>hidetabs : if true(=1) tabs are hidden</li>
701
 
<li>tabmode : value can be <code>text</code> (default), <code>icon</code> or <code>both</code>. When <code>icon</code> or <code>both</code>, it will try to use icons named <code>gmb-tab-</code> followed by the internal page name</li>
702
 
<li>hscrollbar : show horizontal scrollbar if 1, hide it if 0</li>
703
 
</ul></li>
704
 
<li>PlayFilter : Button to Play current songlist filter</li>
705
 
<li>QueueFilter : Button to Enqueue current songlist filter</li>
706
 
<li>Refresh : Button to re-filter songlist</li>
707
 
<li>ResetFilter : Button to reset songlist filter</li>
708
 
<li>SimpleSearch : search entry, search title/album/artist (set filter#1), support powerful syntax (example title:sometitle and lots more, the documentation has not be written yet, see git logs for examples)
709
 
<ul>
710
 
<li>noselector : if set to 1 hide the selector icon, not recommended as it makes the widget much less powerful</li>
711
 
<li>activate : can be used to set a command to run after enter is pressed</li>
712
 
</ul></li>
713
 
<li>Total : Total number/length/size of selected/filter/library
714
 
<ul>
715
 
<li>size : change text size, value can be xx-small, x-small, small, medium, large, x-large, xx-large, or see <a href="http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html">pango markup</a></li>
716
 
<li>format : short or long (default)</li>
717
 
<li>button : default to 1, if 0 a click-able label is used instead of a button</li>
718
 
<li>relief : relief of the button, default to <code>none</code></li>
719
 
</ul></li>
720
 
</ul>
721
 
 
722
 
<h4>MenuItem widgets (can only be put in a MB/SM)</h4>
723
 
 
724
 
<ul>
725
 
<li>HistItem : Filter history (set filter#1)</li>
726
 
<li>LSortItem : Sort order for songlist</li>
727
 
<li>MainMenuItem : main menu</li>
728
 
<li>LayoutItem : layout menu (allows the user to switch to an other layout of type G+)</li>
729
 
<li>MenuItem : Custom menu item
730
 
<ul>
731
 
<li>text : text of the menu item</li>
732
 
<li>icon : name of the icon</li>
733
 
<li>command : gmusicbrowser command to execute</li>
734
 
<li>togglewidget : list of widgets/containers separated by <code>|</code></li>
735
 
<li>resizeonly : with the togglewidget option, see the resize option of the ToggleButton</li>
736
 
<li>togglegroup : activating a ToggleButton or MenuItem with a togglegroup will deactivate all the TogButton or MenuItem of the same togglegroup</li>
737
 
<li>button : if set to 1 and has a submenu, the menuitem is turned into a button (same as BM)</li>
738
 
</ul></li>
739
 
<li>PFilterItem : playing filter menu</li>
740
 
<li>PSortItem : playing sort order</li>
741
 
<li>PlayItem : choose a Filter based on playing title/artist/album/filter (set filter#1) and follow playing songlist option</li>
742
 
<li>QueueItem : queue menu</li>
743
 
<li>SeparatorMenuItem : separator</li>
744
 
</ul>
745
 
 
746
 
<h3>Widget aliases</h3>
747
 
 
748
 
<p>Some widgets have been renamed, the old names are deprecated but can be found in old layouts. <br />
749
 
old name => new name :</p>
750
 
 
751
 
<pre><code>Playlist    =&gt; OpenBrowser
752
 
BContext    =&gt; OpenContext
753
 
Date        =&gt; Year
754
 
Label       =&gt; Text
755
 
Vol         =&gt; VolumeIcon
756
 
LabelVol    =&gt; Volume
757
 
FLock       =&gt; FilterLock
758
 
TogButton   =&gt; ToggleButton
759
 
ProgressV   =&gt; VProgress
760
 
FBox        =&gt; FilterBox
761
 
Scale       =&gt; TimeSlider
762
 
VolSlider   =&gt; VolumeSlider
763
 
VolBar      =&gt; VolumeBar
764
 
FPane       =&gt; FilterPane
765
 
LabelTime   =&gt; PlayingTime
766
 
</code></pre>
767
 
 
768
 
<h2>Embedded layouts (experimental)</h2>
769
 
 
770
 
<p>Layouts can be embedded inside an other layout by simply adding <code>\@id_of_embedded_layout</code> to a container (not all characters are
771
 
supported in embedded layouts identifier) <br />
772
 
example :</p>
773
 
 
774
 
<pre><code>[example_layout]
775
 
HBmain = Play Stop Pref
776
 
VBmain = HBmain Title _@embedded_example
777
 
 
778
 
[embedded_example]
779
 
VBmain = Title _SongTree
780
 
</code></pre>
781
 
 
782
 
<h2><a id="songvar"> %-letters and $-words</a></h2>
783
 
 
784
 
<p>Some options accept %-letters and $-words variables that are replaced by a field/property of the currently playing song.
785
 
For example in <code>%t by %a</code>, %t is replaced by the song title and %a by the artist name. It is equivalent to <code>$title by $artist</code> <br />
786
 
Note that %c and %f are not meant to be used for displaying.</p>
787
 
 
788
 
<p>$-words : the word can be any of the activated field name, see the fields tab of the settings dialog.</p>
789
 
 
790
 
<p>%-letters :</p>
791
 
 
792
 
<pre><code>t   title
793
 
a   artist
794
 
l   album
795
 
d   disc
796
 
n   track
797
 
y   year
798
 
C   comment
799
 
p   play count
800
 
P   last play
801
 
k   skip count
802
 
K   last skip
803
 
g   genres
804
 
L   labels
805
 
m   length
806
 
V   version or nothing if song doesn't have a version/subtitle tag
807
 
S   title or filename if no title
808
 
f   filename (with path) (raw filename, may not display correctly)
809
 
u   filename (with path) (in utf8, used for display, might not be convertible back to the real filename)
810
 
c   cover file
811
 
Y   album year(s)
812
 
A   album artist or artist
813
 
</code></pre>