## ThunarxPropertyPage

ThunarxPropertyPage — The base class for pages added to the properties dialog

## Functions

GtkWidget * | thunarx_property_page_new ()
GtkWidget * | thunarx_property_page_new_with_label_widget ()
const gchar * | thunarx_property_page_get_label ()
void | thunarx_property_page_set_label ()
GtkWidget * | thunarx_property_page_get_label_widget ()
void | thunarx_property_page_set_label_widget ()

## Properties

char * | label | Read / Write
GtkWidget * | label-widget | Read / Write

## Types and Values

struct | ThunarxPropertyPage

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── ThunarxPropertyPage

## Implemented Interfaces

ThunarxPropertyPage implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <thunarx/thunarx.h>

## Description

The class for pages that can be added to Thunar's file properties dialog by extensions implementing the ThunarxPropertyPageProvider interface. The pages returned by extensions from `thunarx_property_page_provider_get_pages()` method are instances of this class or a derived class. Note that extensions do not need to subclass ThunarxPropertyPage, but may also instantiate it directly and add widgets to it, but I strongly suggest to create a subclass as it usually leads to better modularization and thereby better maintainability in the code.

To pick up the TagPage example from the `thunarx_property_page_provider_get_pages()` description again, you'd create a new class TagPage, that inherits ThunarxPropertyPage (using the THUNARX_DEFINE_TYPE macro), which provides several user interface elements in the property, and defines atleast one property named `"file"`, which is the ThunarxFileInfo whose tags are displayed in the property page. For example, the `tag-page.h` header file would look like this (this is really just an example of the suggested way to implement property pages, you may of course choose a different way)

## Functions

### thunarx_property_page_new ()

    GtkWidget *
    thunarx_property_page_new (const gchar *label);

Allocates a new ThunarxPropertyPage widget and sets its label to the specified `label` . If `label` is `NULL`, the label is omitted.

#### Parameters

label | the text to use as the label of the page. |

#### Returns

the newly allocated ThunarxPropertyPage widget.

### thunarx_property_page_new_with_label_widget ()

    GtkWidget *
    thunarx_property_page_new_with_label_widget
                                   (GtkWidget *label_widget);

Allocates a new ThunarxPropertyPage widget and sets its label to the specified `label_widget` .

#### Parameters

label_widget | a GtkWidget, which should be used as label. |

#### Returns

the newly allocated ThunarxPropertyPage widget.

### thunarx_property_page_get_label ()

    const gchar *
    thunarx_property_page_get_label (ThunarxPropertyPage *property_page);

If the `property_page` 's label widget is a GtkLabel, returns the text in the label widget (the `property_page` will have a GtkLabel for the label widget if a non-`NULL` argument was passed to `thunarx_property_page_new()`).

#### Parameters

property_page | a ThunarxPropertyPage. |

#### Returns

the text in the label or `NULL` if there was no label widget or the label widget was not a GtkLabel. The returned string is owned by the `property_page` and must not be modified or freed.

### thunarx_property_page_set_label ()

    void
    thunarx_property_page_set_label (ThunarxPropertyPage *property_page,
                                     const gchar *label);

Sets the text of the label. If `label` is `NULL`, the current label is removed.

#### Parameters

property_page | a ThunarxPropertyPage. |
label | the text to use as the label of the page. |

### thunarx_property_page_get_label_widget ()

    GtkWidget *
    thunarx_property_page_get_label_widget
                                   (ThunarxPropertyPage *property_page);

Returns the label widget for the `property_page` . See `thunarx_property_page_set_label_widget()`.

#### Parameters

property_page | a ThunarxPropertyPage. |

#### Returns

the label widget or `NULL` if there is none.

[transfer none]

### thunarx_property_page_set_label_widget ()

    void
    thunarx_property_page_set_label_widget
                                   (ThunarxPropertyPage *property_page,
                                    GtkWidget *label_widget);

Sets the label widget for the `property_page` . This is the widget that will appear in the notebook header for the `property_page` .

#### Parameters

property_page | a ThunarxPropertyPage. |
label_widget | the new label widget. |

## Types and Values

### struct ThunarxPropertyPage

    struct ThunarxPropertyPage;

## Property Details

### The `“label”` property

      “label”                    char *

Text of the page's label.

Owner: ThunarxPropertyPage

Flags: Read / Write

Default value: NULL

### The `“label-widget”` property

      “label-widget”             GtkWidget *

A widget to display in place of the usual page label.

Owner: ThunarxPropertyPage

Flags: Read / Write