## ThunarComponent ThunarComponent |

## Functions

GList * | thunar_component_get_selected_files ()
void | thunar_component_set_selected_files ()
void | thunar_component_restore_selection ()

## Properties

ThunarxFileInfoList * | selected-files | Read / Write

## Object Hierarchy

        GInterface
        ╰── ThunarComponent

## Description

## Functions

### thunar_component_get_selected_files ()

    GList *
    thunar_component_get_selected_files (ThunarComponent *component);

Returns the set of selected ThunarFiles. Check the description of the :selected-files property for details.

#### Parameters

component | a ThunarComponent instance. |

#### Returns

the set of selected ThunarFiles.

### thunar_component_set_selected_files ()

    void
    thunar_component_set_selected_files (ThunarComponent *component,
                                         GList *selected_files);

Sets the selected files for `component` to `selected_files` . Check the description of the :selected-files property for details.

#### Parameters

component | a ThunarComponent instance. |
selected_files | a GList of ThunarFiles. |

### thunar_component_restore_selection ()

    void
    thunar_component_restore_selection (ThunarComponent *component);

Make sure that the `selected_files` stay selected when a `component` updates. This may be necessary on row changes etc.

#### Parameters

component | a ThunarComponent instance. |

## Property Details

### The `“selected-files”` property

      “selected-files”           ThunarxFileInfoList *

The list of currently selected files for the ThunarWindow to which this ThunarComponent belongs.

The exact semantics of this property depend on the implementor of this interface. For example, ThunarComponents will update the property depending on the users selection with the GtkTreeComponent or ExoIconComponent. While other components in a window, like the ThunarShortcutsPane, will not update this property on their own, but rely on ThunarWindow to synchronize the selected files list with the selected files list from the active ThunarComponent.

This way all components can behave properly depending on the set of selected files even though they don't have direct access to the ThunarComponent.

Owner: ThunarComponent

Flags: Read / Write