GwyFunctionList: Gwyddion Application Library Reference Manual

## GwyFunctionList GwyFunctionList — List of program functions |

## Functions

GtkWidget * | gwy_function_list_new ()
const gchar * | gwy_function_list_get_kind ()
void | gwy_function_list_set_kind ()
const gchar * | gwy_function_list_get_selected ()
gboolean | gwy_function_list_select ()
void | gwy_function_list_refresh_row ()
void | gwy_function_list_set_show_remaning_tools ()
gboolean | gwy_function_list_get_show_remaning_tools ()

## Properties

char * | kind | Read / Write
gboolean | show-remaning-tools | Read / Write

## Types and Values

struct | GwyFunctionList
struct | GwyFunctionListClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkTreeView
                        ╰── GwyFunctionList

## Implemented Interfaces

GwyFunctionList implements AtkImplementorIface, GtkBuildable and GtkScrollable.

## Includes

    #include <libgwyapp/gwyapp.h>

## Description

## Functions

### gwy_function_list_new()

    GtkWidget *
    gwy_function_list_new (const gchar *kind);

Creates a new list of program functions

[constructor]

#### Parameters

kind | Type of functions to display. |

#### Returns

A newly created list of program functions.

[transfer full]

### gwy_function_list_get_kind()

    const gchar *
    gwy_function_list_get_kind (GwyFunctionList *flist);

Gets the kind of functions list of program functions is currently showing.

#### Parameters

flist | A list of program functions. |

#### Returns

The name of the function kind.

### gwy_function_list_set_kind()

    void
    gwy_function_list_set_kind (GwyFunctionList *flist,
                                const gchar *kind);

Switches a list of program functions to a different kind of functions.

The kind can be NULL or the empty string for an empty list, "empty" for the no-function placeholder or the name of function kind like "image", "graph", "volume" or "synth".

#### Parameters

flist | A list of program functions. |
kind | Type of functions to display. | [nullable]

### gwy_function_list_get_selected()

    const gchar *
    gwy_function_list_get_selected (GwyFunctionList *flist);

Gets the name of selected function in a list of program functions.

Combine the function with `gwy_function_list_get_kind()` to get the complete specification of the function.

The return value may be `NULL` if there are no functions. The name of the remaining tools placeholder is returned as the empty string.

#### Parameters

flist | A list of program functions. |

#### Returns

The name of selected function.

[nullable]

### gwy_function_list_select()

    gboolean
    gwy_function_list_select (GwyFunctionList *flist,
                              const gchar *name,
                              gboolean scroll_to);

Selects a function in a list of program functions.

#### Parameters

flist | A list of program functions. |
name | Function name (of the current kind). |
scroll_to | `TRUE` to scroll to the function to make it visible. |

### gwy_function_list_refresh_row()

    void
    gwy_function_list_refresh_row (GwyFunctionList *flist,
                                   const gchar *name);

Refreshes information about a function in a list of program functions.

#### Parameters

flist | A list of program functions. |
name | Function name (of the current kind). |

### gwy_function_list_set_show_remaning_tools()

    void
    gwy_function_list_set_show_remaning_tools
                                   (GwyFunctionList *flist,
                                    gboolean setting);

Sets whether a remaning tools item is shown at the end of a tool list.

The setting only affects lists of tools. The remaning tool item is a useful placeholder when editing the toolbox. It is not useful otherwise.

#### Parameters

flist | A list of program functions. |
setting | `TRUE` to show the remaning tools item; `FALSE` to not show it. |

### gwy_function_list_get_show_remaning_tools()

    gboolean
    gwy_function_list_get_show_remaning_tools
                                   (GwyFunctionList *flist);

Reports whether a remaning tools item is shown at the end of a tool list.

#### Parameters

flist | A list of program functions. |

#### Returns

`TRUE` if the remaning tools item is shown; `FALSE` if it is disabled.

## Types and Values

### struct GwyFunctionList

    struct GwyFunctionList;

### struct GwyFunctionListClass

    struct GwyFunctionListClass {
        GtkTreeViewClass parent_class;
    };

## Property Details

### The `“kind”` property

      “kind”                     char *

The kind of functions to list.

Owner: GwyFunctionList

Flags: Read / Write

Default value: ""

### The `“show-remaning-tools”` property

      “show-remaning-tools”      gboolean

Whether to show the remaning tools item for tools.

Owner: GwyFunctionList

Flags: Read / Write

Default value: FALSE