1Gtk2::Label(3) User Contributed Perl Documentation Gtk2::Label(3)
2
3
4
6 Gtk2::Label
7
9 Glib::Object
10 +----Glib::InitiallyUnowned
11 +----Gtk2::Object
12 +----Gtk2::Widget
13 +----Gtk2::Misc
14 +----Gtk2::Label
15
17 Glib::Object::_Unregistered::AtkImplementorIface
18
20 widget = Gtk2::Label->new ($str=undef)
21
22 * $str (string or undef)
23
24 widget = Gtk2::Label->new_with_mnemonic ($str)
25
26 * $str (string)
27
28 double = $label->get_angle
29
30 $label->set_angle ($angle)
31
32 * $angle (double)
33
34 attrlist = $label->get_attributes
35
36 $label->set_attributes ($attrs)
37
38 * $attrs (Gtk2::Pango::AttrList)
39
40 ellipsizemode = $label->get_ellipsize
41
42 $label->set_ellipsize ($mode)
43
44 * $mode (Gtk2::Pango::EllipsizeMode)
45
46 justification = $label->get_justify
47
48 $label->set_justify ($jtype)
49
50 * $jtype (Gtk2::Justification)
51
52 string = $label->get_label
53
54 $label->set_label ($str)
55
56 * $str (string)
57
58 layout = $label->get_layout
59
60 (x, y) = $label->get_layout_offsets
61
62 boolean = $label->get_line_wrap
63
64 wrapmode = $label->get_line_wrap_mode
65
66 $label->set_line_wrap_mode ($wrap_mode)
67
68 * $wrap_mode (Gtk2::Pango::WrapMode)
69
70 $label->set_line_wrap ($wrap)
71
72 * $wrap (boolean)
73
74 $label->set_markup ($str)
75
76 * $str (string)
77
78 $label->set_markup_with_mnemonic ($str)
79
80 * $str (string)
81
82 integer = $label->get_max_width_chars
83
84 $label->set_max_width_chars ($n_chars)
85
86 * $n_chars (integer)
87
88 integer = $label->get_mnemonic_keyval
89
90 widget or undef = $label->get_mnemonic_widget
91
92 $label->set_mnemonic_widget ($widget)
93
94 * $widget (Gtk2::Widget or undef)
95
96 $label->set_pattern ($pattern)
97
98 * $pattern (string)
99
100 $label->select_region ($start_offset=-1, $end_offset=-1)
101
102 * $start_offset (integer)
103 * $end_offset (integer)
104
105 boolean = $label->get_selectable
106
107 $label->set_selectable ($setting)
108
109 * $setting (boolean)
110
111 (start, end) = $label->get_selection_bounds
112
113 Returns integers, start and end.
114
115 boolean = $label->get_single_line_mode
116
117 $label->set_single_line_mode ($single_line_mode)
118
119 * $single_line_mode (boolean)
120
121 string or undef = $label->get_text
122
123 $label->set_text ($str)
124
125 * $str (string or undef)
126
127 $label->set_text_with_mnemonic ($str)
128
129 * $str (string)
130
131 boolean = $label->get_use_markup
132
133 $label->set_use_markup ($setting)
134
135 * $setting (boolean)
136
137 boolean = $label->get_use_underline
138
139 $label->set_use_underline ($setting)
140
141 * $setting (boolean)
142
143 integer = $label->get_width_chars
144
145 $label->set_width_chars ($n_chars)
146
147 * $n_chars (integer)
148
150 'angle' (double : readable / writable / private)
151 Angle at which the label is rotated
152
153 'attributes' (Gtk2::Pango::AttrList : readable / writable / private)
154 A list of style attributes to apply to the text of the label
155
156 'cursor-position' (integer : readable / private)
157 The current position of the insertion cursor in chars
158
159 'ellipsize' (Gtk2::Pango::EllipsizeMode : readable / writable / pri‐
160 vate)
161 The preferred place to ellipsize the string, if the label does not
162 have enough room to display the entire string
163
164 'justify' (Gtk2::Justification : readable / writable / private)
165 The alignment of the lines in the text of the label relative to
166 each other. This does NOT affect the alignment of the label within
167 its allocation. See GtkMisc::xalign for that
168
169 'label' (string : readable / writable / private)
170 The text of the label
171
172 'max-width-chars' (integer : readable / writable / private)
173 The desired maximum width of the label, in characters
174
175 'mnemonic-keyval' (Glib::UInt : readable / private)
176 The mnemonic accelerator key for this label
177
178 'mnemonic-widget' (Gtk2::Widget : readable / writable / private)
179 The widget to be activated when the label's mnemonic key is pressed
180
181 'pattern' (string : writable / private)
182 A string with _ characters in positions correspond to characters in
183 the text to underline
184
185 'selectable' (boolean : readable / writable / private)
186 Whether the label text can be selected with the mouse
187
188 'selection-bound' (integer : readable / private)
189 The position of the opposite end of the selection from the cursor
190 in chars
191
192 'single-line-mode' (boolean : readable / writable / private)
193 Whether the label is in single line mode
194
195 'use-markup' (boolean : readable / writable / private)
196 The text of the label includes XML markup. See pango_parse_markup()
197
198 'use-underline' (boolean : readable / writable / private)
199 If set, an underline in the text indicates the next character
200 should be used for the mnemonic accelerator key
201
202 'width-chars' (integer : readable / writable / private)
203 The desired width of the label, in characters
204
205 'wrap' (boolean : readable / writable / private)
206 If set, wrap lines if the text becomes too wide
207
208 'wrap-mode' (Gtk2::Pango::WrapMode : readable / writable / private)
209 If wrap is set, controls how linewrapping is done
210
212 move-cursor (Gtk2::Label, Gtk2::MovementStep, integer, boolean)
213 populate-popup (Gtk2::Label, Gtk2::Menu)
214 copy-clipboard (Gtk2::Label)
215
217 enum Gtk2::Justification
218
219 * 'left' / 'GTK_JUSTIFY_LEFT'
220 * 'right' / 'GTK_JUSTIFY_RIGHT'
221 * 'center' / 'GTK_JUSTIFY_CENTER'
222 * 'fill' / 'GTK_JUSTIFY_FILL'
223
224 enum Gtk2::MovementStep
225
226 * 'logical-positions' / 'GTK_MOVEMENT_LOGICAL_POSITIONS'
227 * 'visual-positions' / 'GTK_MOVEMENT_VISUAL_POSITIONS'
228 * 'words' / 'GTK_MOVEMENT_WORDS'
229 * 'display-lines' / 'GTK_MOVEMENT_DISPLAY_LINES'
230 * 'display-line-ends' / 'GTK_MOVEMENT_DISPLAY_LINE_ENDS'
231 * 'paragraphs' / 'GTK_MOVEMENT_PARAGRAPHS'
232 * 'paragraph-ends' / 'GTK_MOVEMENT_PARAGRAPH_ENDS'
233 * 'pages' / 'GTK_MOVEMENT_PAGES'
234 * 'buffer-ends' / 'GTK_MOVEMENT_BUFFER_ENDS'
235 * 'horizontal-pages' / 'GTK_MOVEMENT_HORIZONTAL_PAGES'
236
237 enum Gtk2::Pango::EllipsizeMode
238
239 * 'none' / 'PANGO_ELLIPSIZE_NONE'
240 * 'start' / 'PANGO_ELLIPSIZE_START'
241 * 'middle' / 'PANGO_ELLIPSIZE_MIDDLE'
242 * 'end' / 'PANGO_ELLIPSIZE_END'
243
244 enum Gtk2::Pango::WrapMode
245
246 * 'word' / 'PANGO_WRAP_WORD'
247 * 'char' / 'PANGO_WRAP_CHAR'
248 * 'word-char' / 'PANGO_WRAP_WORD_CHAR'
249
251 Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
252 Gtk2::Misc
253
255 Copyright (C) 2003-2007 by the gtk2-perl team.
256
257 This software is licensed under the LGPL. See Gtk2 for a full notice.
258
259
260
261perl v5.8.8 2007-03-18 Gtk2::Label(3)