Package: gtk

Class gtk:string-list

Superclasses

gio:list-model, gtk:buildable, gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

item-type
The item-type property of type g:type-t (read)
The type of items contained in the string list. Since 4.14
n-items
The n-items property of type :uint (read)
The number of items contained in the string list. Since 4.14
Default value: 0
strings
The strings property of type :string (Construct only)
An array of strings. Since 4.10
Note: This property is not readable and not writable. You cannot initialize it in a make-instance method. Therefore, no accessor is exported.

Details

The gtk:string-list class is a list model that wraps an array of strings. The objects in the model have a string property. The gtk:string-list object is well-suited for any place where you would typically use a string, but need a list model.

GtkStringList as GtkBuildable

The gtk:string-list implementation of the gtk:buildable interface supports adding items directly using the <items> element and specifying <item> elements for each item. Each <item> element supports the regular translation attributes "translatable", "context" and "comments". Here is a UI definition fragment specifying a gtk:string-list object:
<object class="GtkStringList">
  <items>
    <item translatable="yes">Factory</item>
    <item translatable="yes">Home</item>
    <item translatable="yes">Subway</item>
  </items>
</object>    

Examples

Create a list of strings with the external symbols of the GTK library:
(create-list-of-gtk-symbols ()
  (let ((model (gtk:string-list-new '())))
    (do-external-symbols (symbol (find-package "GTK"))
      (gtk:string-list-append model
                              (string-downcase (format nil "~a" symbol))))
    ...))    
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2025-3-29