Overload  1.1
Game engine with editor
Public Member Functions | Protected Attributes | List of all members
OvWindowing::Dialogs::FileDialog Class Reference

#include <FileDialog.h>

Inheritance diagram for OvWindowing::Dialogs::FileDialog:
OvWindowing::Dialogs::OpenFileDialog OvWindowing::Dialogs::SaveFileDialog

Public Member Functions

 FileDialog (std::function< int(tagOFNA *)> p_callback, const std::string &p_dialogTitle)
 
void SetInitialDirectory (const std::string &p_initialDirectory)
 
virtual void Show (EExplorerFlags p_flags=EExplorerFlags::DONTADDTORECENT|EExplorerFlags::FILEMUSTEXIST|EExplorerFlags::HIDEREADONLY|EExplorerFlags::NOCHANGEDIR)
 
bool HasSucceeded () const
 
std::string GetSelectedFileName ()
 
std::string GetSelectedFilePath ()
 
std::string GetErrorInfo ()
 
bool IsFileExisting () const
 

Protected Attributes

std::function< int(tagOFNA *)> m_callback
 
const std::string m_dialogTitle
 
std::string m_initialDirectory
 
std::string m_filter
 
std::string m_error
 
std::string m_filename
 
std::string m_filepath
 
bool m_succeeded
 

Detailed Description

FileDialog is the base class for any dialog window that asks the user to select/save a file from/to the disk

Constructor & Destructor Documentation

◆ FileDialog()

OvWindowing::Dialogs::FileDialog::FileDialog ( std::function< int(tagOFNA *)>  p_callback,
const std::string &  p_dialogTitle 
)

Constructor

Parameters
p_callback
p_dialogTitle@project: Overload
Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

Member Function Documentation

◆ GetErrorInfo()

std::string OvWindowing::Dialogs::FileDialog::GetErrorInfo ( )

Returns some information about the last error (Make sur that HasSucceeded() returned false before calling this method)

◆ GetSelectedFileName()

std::string OvWindowing::Dialogs::FileDialog::GetSelectedFileName ( )

Returns the selected file name (Make sur that HasSucceeded() returned true before calling this method)

◆ GetSelectedFilePath()

std::string OvWindowing::Dialogs::FileDialog::GetSelectedFilePath ( )

Returns the selected file path (Make sur that HasSucceeded() returned true before calling this method)

◆ HasSucceeded()

bool OvWindowing::Dialogs::FileDialog::HasSucceeded ( ) const

Returns true if the file action succeeded

◆ IsFileExisting()

bool OvWindowing::Dialogs::FileDialog::IsFileExisting ( ) const

Returns true if the selected file exists

◆ SetInitialDirectory()

void OvWindowing::Dialogs::FileDialog::SetInitialDirectory ( const std::string &  p_initialDirectory)

Defines the initial directory (Where the FileDialog will open)

Parameters
p_initalDirectory

◆ Show()

Show the file dialog

Parameters
p_flags

Reimplemented in OvWindowing::Dialogs::SaveFileDialog.

Member Data Documentation

◆ m_callback

std::function<int(tagOFNA*)> OvWindowing::Dialogs::FileDialog::m_callback
protected

◆ m_dialogTitle

const std::string OvWindowing::Dialogs::FileDialog::m_dialogTitle
protected

◆ m_error

std::string OvWindowing::Dialogs::FileDialog::m_error
protected

◆ m_filename

std::string OvWindowing::Dialogs::FileDialog::m_filename
protected

◆ m_filepath

std::string OvWindowing::Dialogs::FileDialog::m_filepath
protected

◆ m_filter

std::string OvWindowing::Dialogs::FileDialog::m_filter
protected

◆ m_initialDirectory

std::string OvWindowing::Dialogs::FileDialog::m_initialDirectory
protected

◆ m_succeeded

bool OvWindowing::Dialogs::FileDialog::m_succeeded
protected

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