ngscopeclient 0.1-dev+51fbda87c
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NFDFileBrowser Class Reference

File browser backed by NativeFileDialog-extended. More...

#include <NFDFileBrowser.h>

Inheritance diagram for NFDFileBrowser:
Inheritance graph
[legend]
Collaboration diagram for NFDFileBrowser:
Collaboration graph
[legend]

Public Member Functions

 NFDFileBrowser (const std::string &initialPath, const std::string &title, const std::string &filterName, const std::string &filterMask, bool saveDialog, MainWindow *parent)
 
virtual void Render ()
 Run imgui tasks (if needed) for the dialog. More...
 
virtual bool IsClosed ()
 Returns true if the dialog has been closed. More...
 
virtual bool IsClosedOK ()
 Returns true if the dialog has been closed with an "OK" response. More...
 
virtual std::string GetFileName ()
 Gets the filename the user selected. More...
 
virtual void Render ()=0
 Run imgui tasks (if needed) for the dialog. More...
 
virtual bool IsClosed ()=0
 Returns true if the dialog has been closed. More...
 
virtual bool IsClosedOK ()=0
 Returns true if the dialog has been closed with an "OK" response. More...
 
virtual std::string GetFileName ()=0
 Gets the filename the user selected. More...
 

Protected Member Functions

std::optional< std::string > ThreadProc ()
 
std::optional< std::string > GetCachedResult ()
 

Protected Attributes

MainWindowm_parent
 
std::string m_initialPath
 
std::string m_title
 
std::string m_filterName
 
std::string m_filterMask
 
bool m_saveDialog
 
std::future< std::optional< std::string > > m_future
 
bool m_cachedResultValid
 
std::optional< std::string > m_cachedResult
 

Detailed Description

File browser backed by NativeFileDialog-extended.

Member Function Documentation

◆ GetFileName()

string NFDFileBrowser::GetFileName ( )
virtual

Gets the filename the user selected.

Implements FileBrowser.

◆ IsClosed()

bool NFDFileBrowser::IsClosed ( )
virtual

Returns true if the dialog has been closed.

Implements FileBrowser.

◆ IsClosedOK()

bool NFDFileBrowser::IsClosedOK ( )
virtual

Returns true if the dialog has been closed with an "OK" response.

Implements FileBrowser.

◆ Render()

void NFDFileBrowser::Render ( )
virtual

Run imgui tasks (if needed) for the dialog.

Implements FileBrowser.


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