~gdesklets-desklet-team/gdesklets/0.36

« back to all changes in this revision

Viewing changes to doc/book/dsp-tag-label.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="dsp-tag-label" xmlns:xi="http://www.w3.org/2001/XInclude">
 
2
  <title>&lt;label&gt;</title>
 
3
 
 
4
  <para>A label for displaying one or more lines of text. The Pango markup
 
5
    language can be used for marking up passages of text.</para>
 
6
 
 
7
  <screenshot>
 
8
    <mediaobject>
 
9
      <imageobject>
 
10
        <imagedata fileref="gfx/dsp-label" format="PNG"/>
 
11
      </imageobject>
 
12
    </mediaobject>
 
13
  </screenshot>
 
14
 
 
15
 
 
16
  <section><title>Attributes</title>
 
17
 
 
18
    <informaltable frame="topbot">
 
19
    <tgroup>
 
20
 
 
21
    <thead>
 
22
      <row>
 
23
        <entry>Name</entry>
 
24
        <entry>Type</entry>
 
25
        <entry>Default Value</entry>
 
26
        <entry>Description</entry>
 
27
      </row>
 
28
    </thead>
 
29
 
 
30
    <tbody>
 
31
      <row>
 
32
        <entry valign="top">color</entry>
 
33
        <entry valign="top">color</entry>
 
34
        <entry valign="top">(system default)</entry>
 
35
        <entry valign="top">The text color. You cannot use an alpha channel for
 
36
          colors here. The text color can also be changed with markup tags in
 
37
          the running text.
 
38
          (<emph>[new in 0.35]</emph> the alpha channel can be used!)</entry>
 
39
      </row>
 
40
      <row>
 
41
        <entry valign="top">font</entry>
 
42
        <entry valign="top">font</entry>
 
43
        <entry valign="top">(system default)</entry>
 
44
        <entry valign="top">The text font. The font can also be changed with
 
45
          markup tags in the running text.</entry>
 
46
      </row>
 
47
      <row>
 
48
        <entry valign="top">value</entry>
 
49
        <entry valign="top">string</entry>
 
50
        <entry valign="top"></entry>
 
51
        <entry valign="top">The text to display. It has to be in valid UTF-8
 
52
          encoding and has to escape characters which are reserved in XML by
 
53
          using the usual XML entities.</entry>
 
54
      </row>
 
55
      <row>
 
56
        <entry valign="top">wrap-at</entry>
 
57
        <entry valign="top">unit</entry>
 
58
        <entry valign="top"></entry>
 
59
        <entry valign="top">The width at which the label should wrap to the
 
60
          next line.  Wrapping is disabled by default.</entry>
 
61
      </row>
 
62
    </tbody>
 
63
 
 
64
    </tgroup>
 
65
    </informaltable>
 
66
 
 
67
  </section>
 
68
 
 
69
 
 
70
 
 
71
  <section><title>Examples</title>
 
72
 
 
73
    <programlisting><![CDATA[
 
74
<display>
 
75
 
 
76
  <label value="gDesklets rocks!" font="Sans 3cm" color="red"/>
 
77
  
 
78
  <label id="line2" 
 
79
    value="This is a really long line, but it will be
 
80
    wrapped at 1 CM because I'm going to tell it to!  
 
81
    I'll wrap it to 1/2 an inch in the script though..." 
 
82
    wrap-at="1cm"/>
 
83
 
 
84
</display>
 
85
 
 
86
<script>
 
87
  
 
88
  # The following will change the wrapping to 0.5 inches
 
89
  Dsp.line2.wrap_at = Unit( 0.5, IN )
 
90
 
 
91
</script>
 
92
    ]]></programlisting>
 
93
 
 
94
  </section>
 
95
 
 
96
</section>