XfceItemListView

XfceItemListView — GtkTreeView with toolbar and ability to move elements

Functions

Properties

gboolean label-visibility Read / Write
GMenu * menu Read
XfceItemListModel * model Read / Write
GtkTreeView * tree-view Read

Signals

gboolean add-item Run Last
gboolean edit-item Run Last
gboolean remove-items Run Last
gboolean reset-items Run Last

Types and Values

Object Hierarchy

    GEnum
    ╰── XfceItemListViewColumn
    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBox
                    ╰── XfceItemListView

Implemented Interfaces

XfceItemListView implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Includes

#include <libxfce4ui/libxfce4ui.h>

Description

Functions

xfce_item_list_view_new ()

GtkWidget *
xfce_item_list_view_new (XfceItemListModel *model);

Parameters

model

Model to display

 

Returns

XfceItemListView widget.

[transfer full]

Since: 4.21.3


xfce_item_list_view_get_model ()

XfceItemListModel *
xfce_item_list_view_get_model (XfceItemListView *view);

Parameters

Returns

XfceItemListModel.

[transfer none]

Since: 4.21.3


xfce_item_list_view_set_model ()

void
xfce_item_list_view_set_model (XfceItemListView *view,
                               XfceItemListModel *model);

Parameters

view

XfceItemListView

 

model

XfceItemListModel.

[nullable]

Since: 4.21.3


xfce_item_list_view_get_menu ()

GMenu *
xfce_item_list_view_get_menu (XfceItemListView *view);

Returns a menu to which you can add your own items

Parameters

Returns

Model responsible for buttons and context menu.

[transfer none]

Since: 4.21.3


xfce_item_list_view_get_tree_view ()

GtkWidget *
xfce_item_list_view_get_tree_view (XfceItemListView *view);

Returns a GtkTreeView to which you can add your own columns, or customize the selection mode

Parameters

Returns

Internal GtkTreeView.

[transfer none]

Since: 4.21.3


xfce_item_list_view_set_label_visibility ()

void
xfce_item_list_view_set_label_visibility
                               (XfceItemListView *view,
                                gboolean visibility);

Parameters

view

XfceItemListView

 

visibility

If FALSE, then button labels will not be displayed

 

Since: 4.21.3


xfce_item_list_view_get_selected_items ()

gint
xfce_item_list_view_get_selected_items
                               (XfceItemListView *view,
                                gint **items);

Returns a GtkTreeView to which you can add your own columns, or customize the selection mode

Parameters

view

XfceItemListView

 

items

Indexes of selected items.

[out][nullable]

Returns

Number of selected items

Since: 4.21.3

Types and Values

XFCE_MENU_ATTRIBUTE_MOVEMENT

#define XFCE_MENU_ATTRIBUTE_MOVEMENT "movement"

Attribute with boolean type. If TRUE, then the menu item is responsible for changing the order of rows. Buttons with this attribute will appear on the right side of the XfceItemListView widget.

Since: 4.21.3


XFCE_MENU_ATTRIBUTE_TOOLTIP

#define XFCE_MENU_ATTRIBUTE_TOOLTIP "tooltip"

Attribute with string type. The format is the same as gtk_widget_set_tooltip_text().

Since: 4.21.3


XFCE_MENU_ATTRIBUTE_HIDE_IN_CONTEXT_MENU

#define XFCE_MENU_ATTRIBUTE_HIDE_IN_CONTEXT_MENU "hide-in-context-menu"

Attribute with boolean type. If TRUE, the menu item will not appear in context menus.

Since: 4.21.3


XfceItemListView

typedef struct _XfceItemListView XfceItemListView;

enum XfceItemListViewColumn

Indexes of standard columns attached to GtkTreeView. Using these indexes you can access the desired column to change its settings. You can add your own columns at the end, starting from the index XFCE_ITEM_LIST_VIEW_COLUMN_USER.

Members

XFCE_ITEM_LIST_VIEW_COLUMN_ACTIVE

GtkCellRendererToggle, linked to XFCE_ITEM_LIST_MODEL_COLUMN_ACTIVE.

 

XFCE_ITEM_LIST_VIEW_COLUMN_ICON

GtkCellRendererPixbuf, linked to XFCE_ITEM_LIST_MODEL_COLUMN_ICON.

 

XFCE_ITEM_LIST_VIEW_COLUMN_NAME

GtkCellRendererText, linked to XFCE_ITEM_LIST_MODEL_COLUMN_NAME.

 

XFCE_ITEM_LIST_VIEW_COLUMN_USER

First index for your custom column.

 

Since: 4.21.3

Property Details

The “label-visibility” property

  “label-visibility”         gboolean

If FALSE, then the labels on the buttons will be hidden.

Owner: XfceItemListView

Flags: Read / Write

Default value: FALSE

Since: 4.21.3


The “menu” property

  “menu”                     GMenu *

Internal GMenu.

Owner: XfceItemListView

Flags: Read


The “model” property

  “model”                    XfceItemListModel *

Internal XfceItemListViewModel.

Owner: XfceItemListView

Flags: Read / Write


The “tree-view” property

  “tree-view”                GtkTreeView *

Internal GtkTreeView.

Owner: XfceItemListView

Flags: Read

Signal Details

The “add-item” signal

gboolean
user_function (XfceItemListView *view,
               gpointer          user_data)

Parameters

view

XfceItemListView

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

Flags: Run Last

Since: 4.21.3


The “edit-item” signal

gboolean
user_function (XfceItemListView *view,
               int               item,
               gpointer          user_data)

Parameters

view

XfceItemListView

 

item

Item index

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

Flags: Run Last

Since: 4.21.3


The “remove-items” signal

gboolean
user_function (XfceItemListView *view,
               gpointer          items,
               int               n_items,
               gpointer          user_data)

Parameters

view

XfceItemListView

 

items

Item indexes.

[array length=n_items][element-type int][in]

n_items

Number of indexes

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

Flags: Run Last

Since: 4.21.3


The “reset-items” signal

gboolean
user_function (XfceItemListView *view,
               gpointer          user_data)

Parameters

view

XfceItemListView

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

Flags: Run Last

Since: 4.21.3