Hymn to Beauty
C++ 3D Engine
GUI::FileSelector Class Reference

A window where a file can be selected. More...

#include <FileSelector.hpp>

Public Member Functions

 FileSelector ()
 Create new window. More...
 
void Show ()
 Show the file selector. More...
 
void SetFileSelectedCallback (const std::function< void(const std::string &)> &callback)
 Set function to call when a file has been selected. More...
 
void SetInitialPath (const char *path)
 Set the initial path. More...
 
void SetExtensions (const std::vector< std::string > &extensions)
 Set extensions to select files of. More...
 
void AddExtensions (const std::string &extension)
 Add extension to select files of. More...
 
bool IsVisible () const
 Get whether the window is visible. More...
 
void SetVisible (bool visible)
 Set whether the window should be visible. More...
 

Detailed Description

A window where a file can be selected.

Constructor & Destructor Documentation

◆ FileSelector()

FileSelector::FileSelector ( )

Create new window.

Member Function Documentation

◆ AddExtensions()

void FileSelector::AddExtensions ( const std::string &  extension)

Add extension to select files of.

Parameters
extensionAn extension of which files to show.

◆ IsVisible()

bool FileSelector::IsVisible ( ) const

Get whether the window is visible.

Returns
Whether the window is visible.

◆ SetExtensions()

void GUI::FileSelector::SetExtensions ( const std::vector< std::string > &  extensions)

Set extensions to select files of.

Parameters
extensionsExtensions of which files to show.

◆ SetFileSelectedCallback()

void FileSelector::SetFileSelectedCallback ( const std::function< void(const std::string &)> &  callback)

Set function to call when a file has been selected.

Parameters
callbackFunction to call.

◆ SetInitialPath()

void GUI::FileSelector::SetInitialPath ( const char *  path)

Set the initial path.

Parameters
pathInitial path.

◆ SetVisible()

void FileSelector::SetVisible ( bool  visible)

Set whether the window should be visible.

Parameters
visibleWhether the window should be visible.

◆ Show()

void FileSelector::Show ( )

Show the file selector.


The documentation for this class was generated from the following files: