~gdesklets-desklet-team/gdesklets/0.36

« back to all changes in this revision

Viewing changes to doc/book/prefs-tag-unit.xml

  • Committer: Robert Pastierovic
  • Date: 2007-10-07 10:08:42 UTC
  • Revision ID: pastierovic@gmail.com-20071007100842-fdvp2vzmqgh1j87k
merged 0.3x branch and basic documentation and some other changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<section id="prefs-tag-unit" xmlns:xi="http://www.w3.org/2001/XInclude">
 
2
  <title>&lt;unit&gt;</title>
 
3
 
 
4
  <para>A configuration item for setting geometry values. The user can enter
 
5
    a value and select from the supported measurement units.
 
6
    </para>
 
7
 
 
8
  <!--
 
9
  <screenshot>
 
10
    <mediaobject>
 
11
      <imageobject>
 
12
        <imagedata fileref="gfx/prefs-float" format="PNG"/>
 
13
      </imageobject>
 
14
    </mediaobject>
 
15
  </screenshot>
 
16
  -->
 
17
 
 
18
  <section><title>Attributes</title>
 
19
 
 
20
    <informaltable frame="topbot">
 
21
    <tgroup>
 
22
 
 
23
    <thead>
 
24
      <row>
 
25
        <entry>Name</entry>
 
26
        <entry>Type</entry>
 
27
        <entry>Default Value</entry>
 
28
        <entry>Description</entry>
 
29
      </row>
 
30
    </thead>
 
31
 
 
32
    <tbody>
 
33
      <row>
 
34
        <entry valign="top">as_cm()</entry>
 
35
        <entry valign="top">string</entry>
 
36
        <entry valign="top"></entry>
 
37
        <entry valign="top">The value of the unit in centimeters.</entry>
 
38
      </row>
 
39
      <row>
 
40
        <entry valign="top">as_in()</entry>
 
41
        <entry valign="top">string</entry>
 
42
        <entry valign="top"></entry>
 
43
        <entry valign="top">The value of the unit in inches.</entry>
 
44
      </row>
 
45
      <row>
 
46
        <entry valign="top">as_percent()</entry>
 
47
        <entry valign="top">string</entry>
 
48
        <entry valign="top"></entry>
 
49
        <entry valign="top">The value of the unit as a percentage of it's 
 
50
          parent container's size.</entry>
 
51
      </row>
 
52
      <row>
 
53
        <entry valign="top">as_pt()</entry>
 
54
        <entry valign="top">string</entry>
 
55
        <entry valign="top"></entry>
 
56
        <entry valign="top">The value of the unit in DTP points (1 pt = 1/72 inch).</entry>
 
57
      </row>
 
58
      <row>
 
59
        <entry valign="top">as_px()</entry>
 
60
        <entry valign="top">string</entry>
 
61
        <entry valign="top"></entry>
 
62
        <entry valign="top">The value of the unit in pixels.</entry>
 
63
      </row>
 
64
      <row>
 
65
        <entry valign="top">bind</entry>
 
66
        <entry valign="top">string</entry>
 
67
        <entry valign="top"></entry>
 
68
        <entry valign="top">The name of the variable or property to which the
 
69
          configuration element is bound.</entry>
 
70
      </row>
 
71
      <row>
 
72
        <entry valign="top">digits</entry>
 
73
        <entry valign="top">integer</entry>
 
74
        <entry valign="top">2</entry>
 
75
        <entry valign="top">The number of decimal digits.</entry>
 
76
      </row>
 
77
      <row>
 
78
        <entry valign="top">callback</entry>
 
79
        <entry valign="top">function</entry>
 
80
        <entry valign="top"></entry>
 
81
        <entry valign="top"> A callback function which is called every time
 
82
          the value changes. The callback takes the name of the bound
 
83
          property and the new value as arguments.</entry>
 
84
      </row>
 
85
      <row>
 
86
        <entry valign="top">enabled</entry>
 
87
        <entry valign="top">boolean</entry>
 
88
        <entry valign="top">true</entry>
 
89
        <entry valign="top">Whether the config item is enabled.
 
90
          Disabled items appear greyed out.</entry>
 
91
      </row>
 
92
      <row>
 
93
        <entry valign="top">help</entry>
 
94
        <entry valign="top">string</entry>
 
95
        <entry valign="top"></entry>
 
96
        <entry valign="top">The tooltip text for the element in the
 
97
          configuration dialog.</entry>
 
98
      </row>
 
99
      <row>
 
100
        <entry valign="top">label</entry>
 
101
        <entry valign="top">string</entry>
 
102
        <entry valign="top"></entry>
 
103
        <entry valign="top">The label text for the element in the
 
104
          configuration dialog.</entry>
 
105
      </row>
 
106
      <row>
 
107
        <entry valign="top">min</entry>
 
108
        <entry valign="top">float</entry>
 
109
        <entry valign="top">0.0</entry>
 
110
        <entry valign="top">The minimal value allowed.</entry>
 
111
      </row>
 
112
      <row>
 
113
        <entry valign="top">max</entry>
 
114
        <entry valign="top">float</entry>
 
115
        <entry valign="top">9999.0</entry>
 
116
        <entry valign="top">The maximal value allowed.</entry>
 
117
      </row>
 
118
    </tbody>
 
119
 
 
120
    </tgroup>
 
121
    </informaltable>
 
122
 
 
123
  </section>
 
124
 
 
125
 
 
126
 
 
127
  <section><title>Examples</title>
 
128
 
 
129
    <programlisting><![CDATA[
 
130
<unit label="Width:" bind="Dsp.win.width" min="0.5" max="50.0"
 
131
      help="The width of the display."/>
 
132
    ]]></programlisting>
 
133
 
 
134
  </section>
 
135
 
 
136
</section>