Package ch.bailu.gtk.gio
Klasse ListStore
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gio.ListStore
- Alle implementierten Schnittstellen:
PointerInterface
`GListStore` is a simple implementation of [iface@Gio.ListModel] that stores
all items in memory.
It provides insertions, deletions, and lookups in logarithmic time
with a fast path for the common case of iterating the list linearly.
all items in memory.
It provides insertions, deletions, and lookups in logarithmic time
with a fast path for the common case of iterating the list linearly.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenVon Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungListStore
(long item_type) Creates a new #GListStore with items of type @item_type.ListStore
(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Appends @item to @store.Implements interfaceListModel
.static ClassHandler
static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
void
Inserts @item into @store at @position.int
insertSorted
(Pointer item, ListStore.OnCompareDataFunc compare_func, Pointer user_data) Inserts @item into @store at a position to be determined by the
@compare_func.void
remove
(int position) Removes the item from @store that is at @position.void
Removes all items from @store.void
sort
(ListStore.OnCompareDataFunc compare_func, Pointer user_data) Sort the items in @store according to @compare_func.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
ListStore
-
ListStore
public ListStore(long item_type) Creates a new #GListStore with items of type @item_type. @item_type
must be a subclass of #GObject.- Parameter:
item_type
- the #GType of items in the list
-
-
Methodendetails
-
getClassHandler
-
append
Appends @item to @store. @item must be of type #GListStore:item-type.
This function takes a ref on @item.
Use g_list_store_splice() to append multiple items at the same time
efficiently.- Parameter:
item
- the new item
-
insert
Inserts @item into @store at @position. @item must be of type
#GListStore:item-type or derived from it. @position must be smaller
than the length of the list, or equal to it to append.
This function takes a ref on @item.
Use g_list_store_splice() to insert multiple items at the same time
efficiently.- Parameter:
position
- the position at which to insert the new itemitem
- the new item
-
insertSorted
public int insertSorted(@Nonnull Pointer item, ListStore.OnCompareDataFunc compare_func, @Nullable Pointer user_data) Inserts @item into @store at a position to be determined by the
@compare_func.
The list must already be sorted before calling this function or the
result is undefined. Usually you would approach this by only ever
inserting items by way of this function.
This function takes a ref on @item.- Parameter:
item
- the new itemcompare_func
- pairwise comparison function for sortinguser_data
- user data for @compare_func- Gibt zurück:
- the position at which @item was inserted
-
remove
public void remove(int position) Removes the item from @store that is at @position. @position must be
smaller than the current length of the list.
Use g_list_store_splice() to remove multiple items at the same time
efficiently.- Parameter:
position
- the position of the item that is to be removed
-
removeAll
public void removeAll()Removes all items from @store. -
sort
Sort the items in @store according to @compare_func.- Parameter:
compare_func
- pairwise comparison function for sortinguser_data
- user data for @compare_func
-
asListModel
Implements interfaceListModel
. Call this to get access to interface functions.- Gibt zurück:
ListModel
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-