Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SliceListModel

[15:7] extends: object

A list model that presents a slice of another model. This is useful when implementing paging by setting the size to the number of elements per page and updating the offset whenever a different page is opened. GtkSliceListModel passes through sections from the underlying model.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • SliceListModel (model = null, offset = null, size = null)

    Creates a new slice model. It presents the slice from @offset to offset +

    • @size of the given @model.
    • @p model is The model to use.
    • @p offset is the offset of the slice.
    • @p size is maximum size of the slice.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asListModel ()

    Wraps this handle as ListModel.

    • @r A ListModel object.
  • asSectionModel ()

    Wraps this handle as SectionModel.

    • @r A SectionModel object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setModel (object Value)

    Child model to take slice from.

    • @p Value is the new property value.
    • @r None.
  • setOffset (int Value)

    Offset of slice.

    • @p Value is the new property value.
    • @r None.
  • setSize (int Value)

    Maximum size of slice.

    • @p Value is the new property value.
    • @r None.
  • get_model ()

    Gets the model that is currently being used or %NULL if none.

  • get_offset ()

    Gets the offset set via gtk_slice_list_model_set_offset().

  • get_size ()

    Gets the size set via gtk_slice_list_model_set_size().

  • set_model (object model)

    Sets the model to show a slice of. The model's item type must conform to

    • @self's item type.
    • @p model is The model to be sliced.
    • @r None.
  • set_offset (int offset)

    Sets the offset into the original model for this slice. If the offset is too large for the sliced model, @self will end up empty.

    • @p offset is the new offset to use.
    • @r None.
  • set_size (int size)

    Sets the maximum size. @self will never have more items than @size. It can however have fewer items if the offset is too large or the model sliced from doesn't have enough items.

    • @p size is the maximum size.
    • @r None.
  • model ()

    Returns get_model as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use get_model() when lazy or change-notify access is required.

    • @r An Aussom list of elements.

class: SliceListModelMeta

[270:14] static extends: object

Generated metadata helpers for SliceListModel class surfaces.

Methods

  • properties ()

    Returns property metadata for SliceListModel.

    • @r A list.