MenuModelImpl

class MenuModelImpl(pointer: <Error class: unknown class><<Error class: unknown class>>) : MenuModel

The MenuModelImpl type represents a native instance of the abstract MenuModel class.

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Creates a new instance of MenuModel for the provided CPointer.

Properties

Link copied to clipboard
val gioMenuModelPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun emitItemsChanged(position: <Error class: unknown class>, removed: <Error class: unknown class>, added: <Error class: unknown class>)

Emits the "items-changed" signal. See onItemsChanged.

Link copied to clipboard
open fun getItemAttributeValue(itemIndex: <Error class: unknown class>, attribute: String, expectedType: <Error class: unknown class>? = null): <Error class: unknown class>?

Queries the item at position @item_index in @model for the attribute specified by @attribute.

Link copied to clipboard
open fun getItemLink(itemIndex: <Error class: unknown class>, link: String): MenuModel?

Queries the item at position @item_index in @model for the link specified by @link.

Link copied to clipboard
open fun getNItems(): <Error class: unknown class>

Query the number of items in @model.

Link copied to clipboard
open fun isMutable(): Boolean

Queries if @model is mutable.

Link copied to clipboard
open fun itemsChanged(position: <Error class: unknown class>, removed: <Error class: unknown class>, added: <Error class: unknown class>)

Requests emission of the #GMenuModel::items-changed signal on @model.

Link copied to clipboard
open fun iterateItemAttributes(itemIndex: <Error class: unknown class>): MenuAttributeIter

Creates a #GMenuAttributeIter to iterate over the attributes of the item at position @item_index in @model.

Link copied to clipboard
open fun iterateItemLinks(itemIndex: <Error class: unknown class>): MenuLinkIter

Creates a #GMenuLinkIter to iterate over the links of the item at position @item_index in @model.

Link copied to clipboard
fun onItemsChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>, <Error class: unknown class>, <Error class: unknown class>) -> Unit): <Error class: unknown class>

Emitted when a change has occurred to the menu.