1Gtk2::Ex::FormFactory::UCsheerckCBountttroinbGurtoeGudtpk(P23e:)r:lExD:o:cFuomremnFtaacttioorny::CheckButtonGroup(3)
2
3
4
6 Gtk2::Ex::FormFactory::CheckButtonGroup - A group of checkbuttons
7
9 Gtk2::Ex::FormFactory::CheckButtonGroup->new (
10 max_columns => Maximum number of columns,
11 max_rows => Maximum number of rows,
12 column_labels => Array of column label strings,
13 row_labels => Array of row label strings,
14
15 attr_max_columns => Object attribute for number of columns,
16 attr_max_rows => Object attribute for number of rows,
17 attr_column_labels => Object attribute for column labels,
18 attr_row_labels => Object attribute for row labels,
19
20 homogeneous => Force homogeneous layout of underlying table?
21 ...
22 Gtk2::Ex::FormFactory::Widget attributes
23 );
24
26 This class implements a group of check buttons which allow a multiple
27 selection out of a set from predefined values. It's arranged in a two
28 dimensional table. You can specify either the maximum number of rows or
29 columns, the actual dimensions are calculated automatically.
30
31 Optionally you can add column and/or row labels, extending the
32 corresponding table accordingly.
33
34 You can pass the configuration data statically or specify application
35 object attributes controlling them, so the checkbutton group builds
36 dynamically at runtime.
37
38 The value of a CheckBoxGroup is a hash. The value of each selected
39 checkbox will result in a correspondent hash key with a true value
40 assigned.
41
43 Gtk2::Ex::FormFactory::Intro
44
45 Gtk2::Ex::FormFactory::Widget
46 +--- Gtk2::Ex::FormFactory::CheckButtonGroup
47
48 Gtk2::Ex::FormFactory::Layout
49 Gtk2::Ex::FormFactory::Rules
50 Gtk2::Ex::FormFactory::Context
51 Gtk2::Ex::FormFactory::Proxy
52
54 Attributes are handled through the common get_ATTR(), set_ATTR() style
55 accessors, but they are mostly passed once to the object constructor
56 and must not be altered after the associated FormFactory was built.
57
58 max_columns = SCALAR [optional]
59 Maximum number of columns the table should have. You must not set
60 max_rows when you specify max_columns.
61
62 max_rows = SCALAR [optional]
63 Maximum number of rows the table should have. You must not set
64 max_columns when you specify max_rows. If you omit both attributes
65 max_rows defaults to 1, so all buttons will appear in one row.
66
67 column_labels = ARRAY [optional]
68 You can add column labels by setting an array of strings to the
69 column_labels attribute. The number of entries should correspond to
70 the max_columns setting.
71
72 row_labels = ARRAY [optional]
73 You can add row labels by setting an array of strings to the
74 row_labels attribute. The number of entries should correspond to
75 the max_rows setting.
76
77 attr_max_columns = "object.attr" [optional]
78 As an alternative to max_columns the maximum number of columns may
79 be controlled by an application object attribute which needs to be
80 passed here in "object.attr" notation.
81
82 attr_max_rows = "object.attr" [optional]
83 As an alternative to max_rows the maximum number of rows may be
84 controlled by an application object attribute which needs to be
85 passed here in "object.attr" notation.
86
87 attr_column_labels = "object.attr" [optional]
88 As an alternative to column_labels the column labels may be
89 controlled by an application object attribute which needs to be
90 passed here in "object.attr" notation.
91
92 attr_row_labels = "object.attr" [optional]
93 As an alternative to row_labels the row labels may be controlled by
94 an application object attribute which needs to be passed here in
95 "object.attr" notation.
96
97 homogeneous = BOOL [optional]
98 Defaults to 1 forcing the underlying table to homogeneous layout.
99
101 Application objects represented by a
102 Gtk2::Ex::FormFactory::CheckButtonGroup must define additional methods.
103 The naming of the methods listed beyond uses the standard get_ prefix
104 for the attribute read accessor. ATTR needs to be replaced by the
105 actual name of the attribute associated with the widget.
106
107 get_ATTR_list
108 This method must return a two dimensional array resp. a list of
109 lists which represent the values the user can select from.
110
111 Example:
112
113 [
114 [ 0, "Sun" ],
115 [ 1, "Mon" ],
116 [ 2, "Tue" ],
117 ...
118 ]
119
120 Each entry in the list consists of a list ref with two elements.
121 The first is the value associated with the checkbox (which will
122 become a hash key in the associated object attribute), the second
123 the label of the checkbox on the GUI.
124
125 For more attributes refer to Gtk2::Ex::FormFactory::Widget.
126
128 Jörn Reder <joern at zyn dot de>
129
131 Copyright 2004-2006 by Jörn Reder.
132
133 This library is free software; you can redistribute it and/or modify it
134 under the terms of the GNU Library General Public License as published
135 by the Free Software Foundation; either version 2.1 of the License, or
136 (at your option) any later version.
137
138 This library is distributed in the hope that it will be useful, but
139 WITHOUT ANY WARRANTY; without even the implied warranty of
140 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
141 Library General Public License for more details.
142
143 You should have received a copy of the GNU Library General Public
144 License along with this library; if not, write to the Free Software
145 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
146 USA.
147
149 Hey! The above document had some coding errors, which are explained
150 below:
151
152 Around line 379:
153 Non-ASCII character seen before =encoding in 'Jörn'. Assuming UTF-8
154
155
156
157perl v5.30.0 201G9t-k027:-:2E6x::FormFactory::CheckButtonGroup(3)