Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_FileDialog

File dialog component
Contained in: global
Derived from: CL_Window
Derived by: none
Group: GUI (Controls)

#include <ClanLib/gui.h>

### public function member index:
### Construction:
`` | `CL_FileDialog` | `(`CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;
`` | `CL_FileDialog` | `(`const` `std::string`& `title`, `const` `std::string`& `file`, `const` `std::string`& `filter`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;
``virtual`` | `~CL_FileDialog` | `()`;
``static` `const` `std::string`` | `open` | `(`CL_Component`* `parent`)`;
``static` `const` `std::string`` | `open` | `(`const` `std::string`& `file`, `const` `std::string`& `filter`, `CL_Component`* `parent`)`;
``static` `const` `std::string`` | `save` | `(`CL_Component`* `parent`)`;
``static` `const` `std::string`` | `save` | `(`const` `std::string`& `file`, `const` `std::string`& `filter`, `CL_Component`* `parent`)`;
### Attributes:
``const` `std::string`&` | `get_file` | `() `const``;
``const` `std::string`&` | `get_filter` | `() `const``;
``const` `std::string`&` | `get_dir` | `() `const``;
``const` `std::string`&` | `get_path` | `() `const``;
``bool`` | `is_hidden_files_visible` | `() `const``;
### Operations:
``void`` | `set_file` | `(`const` `std::string`& `filename`)`;
``void`` | `set_dir` | `(`const` `std::string`& `dir`)`;
``void`` | `set_filter` | `(`const` `std::string`& `filter`)`;
``void`` | `show_hidden_files` | `(`bool` `enable` = true)`;
``void`` | `refresh` | `()`;
### Signals:
``CL_Signal_v1`<`const` `std::string`& >&` | `sig_file_highlighted` | `()`;
``CL_Signal_v1`<`const` `std::string`& >&` | `sig_file_selected` | `()`;
``CL_Signal_v1`<`const` `std::string`& >&` | `sig_dir_entered` | `()`;

## Description:

## Function Member Descriptions:

CL_FileDialog::CL_FileDialog - File dialog constructor
`` `CL_FileDialog``(`CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;

CL_FileDialog::CL_FileDialog - File dialog constructor
`` `CL_FileDialog``(`const` `std::string`& `title`, `const` `std::string`& `file`, `const` `std::string`& `filter`, `CL_Component`* `parent`, `CL_StyleManager`* `style` = NULL)`;

CL_FileDialog::get_dir - Returns the active directory in the file dialog.
``const` `std::string`&` `get_dir``() `const``;

CL_FileDialog::get_file - Returns the selected file name.
``const` `std::string`&` `get_file``() `const``;

CL_FileDialog::get_filter - Returns the filter which the user has chosen in the file dialog.
``const` `std::string`&` `get_filter``() `const``;

CL_FileDialog::get_path - Returns the active directory path in the file dialog.
``const` `std::string`&` `get_path``() `const``;

CL_FileDialog::is_hidden_files_visible - Returns true if hidden files are shown in the filedialog, else false.
``bool`` `is_hidden_files_visible``() `const``;

CL_FileDialog::open - Open
``static` `const` `std::string`` `open``(`CL_Component`* `parent`)`;

CL_FileDialog::open - Open
``static` `const` `std::string`` `open``(`const` `std::string`& `file`, `const` `std::string`& `filter`, `CL_Component`* `parent`)`;

CL_FileDialog::refresh - Re-reads the active directory in the file dialog.
It is seldom necessary to call this function. It is provided in case the directory contents change and you want to refresh the directory listbox.
``void`` `refresh``()`;

CL_FileDialog::save - Save
``static` `const` `std::string`` `save``(`CL_Component`* `parent`)`;

CL_FileDialog::save - Save
``static` `const` `std::string`` `save``(`const` `std::string`& `file`, `const` `std::string`& `filter`, `CL_Component`* `parent`)`;

CL_FileDialog::set_dir - Sets a directory path for the file dialog.
``void`` `set_dir``(`const` `std::string`& `dir`)`;

CL_FileDialog::set_file - Sets the default selection to filename.
If filename is absolute, set_dir() is also called.
``void`` `set_file``(`const` `std::string`& `filename`)`;

CL_FileDialog::set_filter - Sets the filter to filter.
``void`` `set_filter``(`const` `std::string`& `filter`)`;

CL_FileDialog::show_hidden_files - If enable is true, hidden files are shown in the filedialog, else no hidden files are shown.
``void`` `show_hidden_files``(`bool` `enable` = true)`;

CL_FileDialog::sig_dir_entered - This signal is emitted when the user has selected a new directory.
``CL_Signal_v1`<`const` `std::string`& >&` `sig_dir_entered``()`;

CL_FileDialog::sig_file_highlighted - This signal is emitted when the user highlights a file.
``CL_Signal_v1`<`const` `std::string`& >&` `sig_file_highlighted``()`;

CL_FileDialog::sig_file_selected - This signal is emitted when the user selects a file.
``CL_Signal_v1`<`const` `std::string`& >&` `sig_file_selected``()`;

CL_FileDialog::~CL_FileDialog - File dialog destructor
``virtual`` `~CL_FileDialog``()`;

## Variable Member Descriptions: