SimpleAction

open class SimpleAction(pointer: <Error class: unknown class><<Error class: unknown class>>) : Action

A #GSimpleAction is the obvious simple implementation of the #GAction interface. This is the easiest way to create an action for purposes of adding it to a #GSimpleActionGroup.

See also #GtkAction.

Skipped during bindings generation

  • method enabled: Property has no getter

  • method name: Property has no getter nor setter

  • method parameter-type: Property has no getter nor setter

  • method state: Property has no getter

  • method state-type: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor(name: String, parameterType: <Error class: unknown class>? = null)

Creates a new action.

constructor(name: String, parameterType: <Error class: unknown class>? = null, state: <Error class: unknown class>)

Creates a new stateful action.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val enabled: Boolean

If @action is currently enabled.

Link copied to clipboard
open override val gioActionPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gioSimpleActionPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val name: String

The name of the action. This is mostly meaningful for identifying the action once it has been added to a #GActionGroup. It is immutable.

Link copied to clipboard
open val parameterType: <Error class: unknown class>?

The type of the parameter that must be given when activating the action. This is immutable, and may be null if no parameter is needed when activating the action.

Link copied to clipboard
open val state: <Error class: unknown class>?

The state of the action, or null if the action is stateless.

Link copied to clipboard
open val stateType: <Error class: unknown class>?

The #GVariantType of the state that the action has, or null if the action is stateless. This is immutable.

Functions

Link copied to clipboard
open fun activate(parameter: <Error class: unknown class>? = null)

Activates the action.

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

Request for the state of @action to be changed to @value.

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

Indicates that the action was just activated.

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

Indicates that the action just received a request to change its state.

Link copied to clipboard
open fun getEnabled(): Boolean

Checks if @action is currently enabled.

Link copied to clipboard
open fun getName(): String

Queries the name of @action.

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

Queries the type of the parameter that must be given when activating

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

Queries the current state of @action.

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

Requests a hint about the valid range of values for the state of

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

Queries the type of the state of @action.

Link copied to clipboard
open fun setEnabled(enabled: Boolean)

Sets the action as enabled or not.

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

Sets the state of the action.

Link copied to clipboard
open fun setStateHint(stateHint: <Error class: unknown class>? = null)

Sets the state hint for the action.