Panel.WorkbenchClass.install_property_action
Description: Reference for Panel.WorkbenchClass.install_property_action

### Class method

# Panel WorkbenchClassinstall_property_action

since: 1.4

#### Declaration [src]

    void
    panel_workbench_class_install_property_action (
      PanelWorkbenchClass* workbench_class,
      const char* action_name,
      const char* property_name
    )

#### Description [src]

Installs an action called `action_name` on `workbench_class` and binds its state to the value of the `property_name` property.

This function will perform a few santity checks on the property selected via `property_name`. Namely, the property must exist, must be readable, writable and must not be construct-only. There are also restrictions on the type of the given property, it must be boolean, int, unsigned int, double or string. If any of these conditions are not met, a critical warning will be printed and no action will be added.

The state type of the action matches the property type.

If the property is boolean, the action will have no parameter and toggle the property value. Otherwise, the action will have a parameter of the same type as the property.

Available since: 1.4

#### Parameters

`action_name`

  Type: `const char*`

  Name of the action.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`property_name`

  Type: `const char*`

  Name of the property in instances of `workbench_class` or any parent class.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.