1Gtk2::Label(3)        User Contributed Perl Documentation       Gtk2::Label(3)
2
3
4

NAME

6       Gtk2::Label
7

HIERARCHY

9         Glib::Object
10         +----Glib::InitiallyUnowned
11              +----Gtk2::Object
12                   +----Gtk2::Widget
13                        +----Gtk2::Misc
14                             +----Gtk2::Label
15

INTERFACES

17         Glib::Object::_Unregistered::AtkImplementorIface
18         Gtk2::Buildable
19

METHODS

21   widget = Gtk2::Label->new ($str=undef)
22           ·   $str (string or undef)
23
24   widget = Gtk2::Label->new_with_mnemonic ($str)
25           ·   $str (string)
26
27   double = $label->get_angle
28           Since: gtk+ 2.6
29
30   $label->set_angle ($angle)
31           ·   $angle (double)
32
33           Since: gtk+ 2.6
34
35   attrlist = $label->get_attributes
36   $label->set_attributes ($attrs)
37           ·   $attrs (Gtk2::Pango::AttrList)
38
39   ellipsizemode = $label->get_ellipsize
40           Since: gtk+ 2.6
41
42   $label->set_ellipsize ($mode)
43           ·   $mode (Gtk2::Pango::EllipsizeMode)
44
45           Since: gtk+ 2.6
46
47   justification = $label->get_justify
48   $label->set_justify ($jtype)
49           ·   $jtype (Gtk2::Justification)
50
51   string = $label->get_label
52   $label->set_label ($str)
53           ·   $str (string)
54
55   layout = $label->get_layout
56   (x, y) = $label->get_layout_offsets
57   boolean = $label->get_line_wrap
58   wrapmode = $label->get_line_wrap_mode
59           Since: gtk+ 2.9
60
61   $label->set_line_wrap_mode ($wrap_mode)
62           ·   $wrap_mode (Gtk2::Pango::WrapMode)
63
64           Since: gtk+ 2.9
65
66   $label->set_line_wrap ($wrap)
67           ·   $wrap (boolean)
68
69   $label->set_markup ($str)
70           ·   $str (string)
71
72   $label->set_markup_with_mnemonic ($str)
73           ·   $str (string)
74
75   integer = $label->get_max_width_chars
76           Since: gtk+ 2.6
77
78   $label->set_max_width_chars ($n_chars)
79           ·   $n_chars (integer)
80
81           Since: gtk+ 2.6
82
83   integer = $label->get_mnemonic_keyval
84   widget or undef = $label->get_mnemonic_widget
85   $label->set_mnemonic_widget ($widget)
86           ·   $widget (Gtk2::Widget or undef)
87
88   $label->set_pattern ($pattern)
89           ·   $pattern (string)
90
91   $label->select_region ($start_offset=-1, $end_offset=-1)
92           ·   $start_offset (integer)
93
94           ·   $end_offset (integer)
95
96   boolean = $label->get_selectable
97   $label->set_selectable ($setting)
98           ·   $setting (boolean)
99
100   (start, end) = $label->get_selection_bounds
101           Returns integers, start and end.
102
103   boolean = $label->get_single_line_mode
104           Since: gtk+ 2.6
105
106   $label->set_single_line_mode ($single_line_mode)
107           ·   $single_line_mode (boolean)
108
109           Since: gtk+ 2.6
110
111   string or undef = $label->get_text
112   $label->set_text ($str)
113           ·   $str (string or undef)
114
115   $label->set_text_with_mnemonic ($str)
116           ·   $str (string)
117
118   boolean = $label->get_use_markup
119   $label->set_use_markup ($setting)
120           ·   $setting (boolean)
121
122   boolean = $label->get_use_underline
123   $label->set_use_underline ($setting)
124           ·   $setting (boolean)
125
126   integer = $label->get_width_chars
127           Since: gtk+ 2.6
128
129   $label->set_width_chars ($n_chars)
130           ·   $n_chars (integer)
131
132           Since: gtk+ 2.6
133

PROPERTIES

135       'angle' (double : readable / writable / private)
136           Angle at which the label is rotated
137
138       'attributes' (Gtk2::Pango::AttrList : readable / writable / private)
139           A list of style attributes to apply to the text of the label
140
141       'cursor-position' (integer : readable / private)
142           The current position of the insertion cursor in chars
143
144       'ellipsize' (Gtk2::Pango::EllipsizeMode : readable / writable /
145       private)
146           The preferred place to ellipsize the string, if the label does not
147           have enough room to display the entire string
148
149       'justify' (Gtk2::Justification : readable / writable / private)
150           The alignment of the lines in the text of the label relative to
151           each other. This does NOT affect the alignment of the label within
152           its allocation. See GtkMisc::xalign for that
153
154       'label' (string : readable / writable / private)
155           The text of the label
156
157       'max-width-chars' (integer : readable / writable / private)
158           The desired maximum width of the label, in characters
159
160       'mnemonic-keyval' (Glib::UInt : readable / private)
161           The mnemonic accelerator key for this label
162
163       'mnemonic-widget' (Gtk2::Widget : readable / writable / private)
164           The widget to be activated when the label's mnemonic key is pressed
165
166       'pattern' (string : writable / private)
167           A string with _ characters in positions correspond to characters in
168           the text to underline
169
170       'selectable' (boolean : readable / writable / private)
171           Whether the label text can be selected with the mouse
172
173       'selection-bound' (integer : readable / private)
174           The position of the opposite end of the selection from the cursor
175           in chars
176
177       'single-line-mode' (boolean : readable / writable / private)
178           Whether the label is in single line mode
179
180       'track-visited-links' (boolean : readable / writable / private)
181           Whether visited links should be tracked
182
183       'use-markup' (boolean : readable / writable / private)
184           The text of the label includes XML markup. See pango_parse_markup()
185
186       'use-underline' (boolean : readable / writable / private)
187           If set, an underline in the text indicates the next character
188           should be used for the mnemonic accelerator key
189
190       'width-chars' (integer : readable / writable / private)
191           The desired width of the label, in characters
192
193       'wrap' (boolean : readable / writable / private)
194           If set, wrap lines if the text becomes too wide
195
196       'wrap-mode' (Gtk2::Pango::WrapMode : readable / writable / private)
197           If wrap is set, controls how linewrapping is done
198

SIGNALS

200       move-cursor (Gtk2::Label, Gtk2::MovementStep, integer, boolean)
201       copy-clipboard (Gtk2::Label)
202       populate-popup (Gtk2::Label, Gtk2::Menu)
203       activate-current-link (Gtk2::Label)
204       boolean = activate-link (Gtk2::Label, string)
205

ENUMS AND FLAGS

207   enum Gtk2::Justification
208       ·   'left' / 'GTK_JUSTIFY_LEFT'
209
210       ·   'right' / 'GTK_JUSTIFY_RIGHT'
211
212       ·   'center' / 'GTK_JUSTIFY_CENTER'
213
214       ·   'fill' / 'GTK_JUSTIFY_FILL'
215
216   enum Gtk2::MovementStep
217       ·   'logical-positions' / 'GTK_MOVEMENT_LOGICAL_POSITIONS'
218
219       ·   'visual-positions' / 'GTK_MOVEMENT_VISUAL_POSITIONS'
220
221       ·   'words' / 'GTK_MOVEMENT_WORDS'
222
223       ·   'display-lines' / 'GTK_MOVEMENT_DISPLAY_LINES'
224
225       ·   'display-line-ends' / 'GTK_MOVEMENT_DISPLAY_LINE_ENDS'
226
227       ·   'paragraphs' / 'GTK_MOVEMENT_PARAGRAPHS'
228
229       ·   'paragraph-ends' / 'GTK_MOVEMENT_PARAGRAPH_ENDS'
230
231       ·   'pages' / 'GTK_MOVEMENT_PAGES'
232
233       ·   'buffer-ends' / 'GTK_MOVEMENT_BUFFER_ENDS'
234
235       ·   'horizontal-pages' / 'GTK_MOVEMENT_HORIZONTAL_PAGES'
236
237   enum Gtk2::Pango::EllipsizeMode
238       ·   'none' / 'PANGO_ELLIPSIZE_NONE'
239
240       ·   'start' / 'PANGO_ELLIPSIZE_START'
241
242       ·   'middle' / 'PANGO_ELLIPSIZE_MIDDLE'
243
244       ·   'end' / 'PANGO_ELLIPSIZE_END'
245
246   enum Gtk2::Pango::WrapMode
247       ·   'word' / 'PANGO_WRAP_WORD'
248
249       ·   'char' / 'PANGO_WRAP_CHAR'
250
251       ·   'word-char' / 'PANGO_WRAP_WORD_CHAR'
252

SEE ALSO

254       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
255       Gtk2::Misc
256
258       Copyright (C) 2003-2008 by the gtk2-perl team.
259
260       This software is licensed under the LGPL.  See Gtk2 for a full notice.
261
262
263
264perl v5.12.0                      2010-05-02                    Gtk2::Label(3)
Impressum