You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><p>@list-item; list item strings. The bind and unbind callback routines will receive these strings to properly fill in the data or remove it.</p></li>
44
+
<li><p>@items; item strings. The bind and unbind callback routines will receive these strings to properly fill in the data or remove it.</p></li>
43
45
</ul>
44
46
45
47
<h2id="find"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">find</a></h2>
46
-
<p>Find the position of the list item in the list.</p><preclass="pod-block-code">method find ( Str $list-item --> UInt )
48
+
<p>Find the position of the list item in the list.</p><preclass="pod-block-code">method find ( Str $item --> UInt )
47
49
</pre><ul>
48
-
<li><p>$list-item; the string to look for.</p></li>
50
+
<li><p>$item; the string to look for.</p></li>
49
51
</ul>
50
-
52
+
<p>Returns the position of the string if found.</p>
53
+
<h2id="get-n-items"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">get-n-items</a></h2>
54
+
<p>Get the number of items in the list.</p><preclass="pod-block-code">method get-n-items ( --> UInt )
55
+
</pre><p>Returns the number of items in the list.</p>
51
56
<h2id="get-selection"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">get-selection</a></h2>
52
-
<p>Get the list of currently selected items</p><preclass="pod-block-code">method get-selection ( Bool :$rows = False --> List )
57
+
<p>Get the list of currently selected items.</p><preclass="pod-block-code">method get-selection ( Bool :$rows = False --> List )
53
58
</pre><ul>
54
59
<li><p>$rows; When set, return the positions in the list, otherwise return a list of item strings.</p></li>
55
60
</ul>
56
-
61
+
<p>Returns the list of currently selected items.</p>
57
62
<h2id="get-string"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">get-string</a></h2>
58
63
<p>Get the list item string given the position in the list.</p><preclass="pod-block-code">method get-string ( UInt $pos --> Str )
59
64
</pre><ul>
60
65
<li><p>$pos; the position in the list</p></li>
61
66
</ul>
62
-
67
+
<preclass="pod-block-code">Returns the item string given the position in the list.</pre>
63
68
<h2id="remove"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">remove</a></h2>
64
-
<p>Remove the list item given its position in the list.</p><preclass="pod-block-code">method remove ( @pos )
69
+
<p>Remove the item given its position in the list.</p><preclass="pod-block-code">method remove ( *@pos )
65
70
</pre><ul>
66
71
<li><p>@pos; a list of positions to be removed</p></li>
67
72
</ul>
@@ -83,6 +88,12 @@ <h2 id="set-bind"><a href="#GnomeTools::Gtk::R-ListModel" class="u" title="go to
83
88
<h2id="set-events"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">set-events</a></h2>
84
89
<p>Register a series of events defined in the <strong>Gnome::Gtk4::SignalListItemFactory</strong> class. The purpose of this method is to register a series of events at once without the need of user methods to capture the events. The entries in the list are populated with <strong>Gnome::Gtk4::Label</strong>s. The text in the labels are set with user text from <code>.append()</code>.</p><preclass="pod-block-code">method set-events ( )
85
90
</pre>
91
+
<h2id="set-selection"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">set-selection</a></h2>
<li><p>@pos; one or more positions in the list to select. If the model uses single selection, only one item is selected.</p></li>
95
+
</ul>
96
+
86
97
<h2id="set-selection-changed"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">set-selection-changed</a></h2>
87
98
<p>The <code>selection-changed</code> event is emitted when the selection state of some of the items in the model changes.</p><preclass="pod-block-code">method set-selection-changed ( Any:D $object, Str:D $method, *%options )
88
99
</pre><ul>
@@ -108,7 +119,7 @@ <h2 id="set-setup"><a href="#GnomeTools::Gtk::R-ListModel" class="u" title="go t
108
119
</pre><ul>
109
120
<li><p>%options. Any named arguments provided to <code>.set-setup()</code>.</p></li>
110
121
</ul>
111
-
122
+
<p>The callback routine must return the top leve widget.</p>
112
123
<h2id="set-teardown"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">set-teardown</a></h2>
113
124
<p>The <code>teardown</code> event is emitted to undo the effects of the <code>setup</code> event. After this signal was emitted on a listitem, the listitem will be destroyed and not be used again. No <code>$item</code> is provided because the item is already destroyed. Any named arguments in <code>*%options</code> given to <code>.new()</code> are given to the method.</p><preclass="pod-block-code">method set-teardown ( Any:D $object, Str:D $method, *%options )
<h2id="splice"><ahref="#GnomeTools::Gtk::R-ListModel" class="u" title="go to top of document">splice</a></h2>
140
-
<p>Remove list items at given position in the list. Then insert new items at that position.</p><preclass="pod-block-code">method splice ( UInt $pos, UInt $nremove, @str-array )
151
+
<p>Remove list items at given position in the list. Then insert new items at that position.</p><preclass="pod-block-code">method splice ( UInt $pos, UInt $nremove, *@str-array )
141
152
</pre><ul>
142
153
<li><p>$pos; position in the list</p></li>
143
154
<li><p>$nremove; number of list items to remove</p></li>
144
-
<li><p>@str-array; list items to insert at position</p></li>
155
+
<li><p>@str-array; list items to insert at the position</p></li>
145
156
</ul>
146
157
</section></div>
147
-
</div><footer><div>Rendered from <spanclass="path">/home/marcel/Languages/Raku/Projects/GnomeTools/lib/GnomeTools/Gtk/R-ListModel.rakudoc</span></div><div>at <spanclass="time">2026-01-28T21:20:03Z</span></div></footer>
158
+
</div><footer><div>Rendered from <spanclass="path">/home/marcel/Languages/Raku/Projects/GnomeTools/lib/GnomeTools/Gtk/R-ListModel.rakudoc</span></div><div>at <spanclass="time">2026-02-25T13:45:31Z</span></div></footer>
0 commit comments