Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
ImGuiFs Namespace Reference

Classes

struct  Dialog
 
struct  Directory
 
struct  FolderInfo
 
struct  History
 
struct  ImGuiFsDrawIconStruct
 
struct  Internal
 
class  Path
 
class  SortingHelper
 
class  String
 

Typedefs

typedef char FilenameString[MAX_FILENAME_BYTES]
 
typedef char PathString[MAX_PATH_BYTES]
 
typedef ImVector< FilenameStringFilenameStringVector
 
typedef ImVector< PathStringPathStringVector
 

Enumerations

enum  FileExtensionType {
  FET_NONE =0 , FET_HPP , FET_CPP , FET_IMAGE ,
  FET_PDF , FET_DOCUMENT , FET_TEXT , FET_DATABASE ,
  FET_SPREADSHEET , FET_PRESENTATION , FET_ARCHIVE , FET_AUDIO ,
  FET_VIDEO , FET_XML , FET_HTML , FET_COUNT
}
 
enum  Sorting {
  SORT_ORDER_ALPHABETIC =0 , SORT_ORDER_ALPHABETIC_INVERSE =1 , SORT_ORDER_LAST_MODIFICATION =2 , SORT_ORDER_LAST_MODIFICATION_INVERSE =3 ,
  SORT_ORDER_SIZE =4 , SORT_ORDER_SIZE_INVERSE =5 , SORT_ORDER_TYPE =6 , SORT_ORDER_TYPE_INVERSE =7 ,
  SORT_ORDER_COUNT
}
 

Functions

template<typename CharType >
bool FileGetContentBase (const char *path, ImVector< CharType > &bufferOut, bool openInTextMode, const char *password)
 
bool FileGetContent (const char *path, ImVector< unsigned char > &bufferOut, bool openInTextMode, const char *password)
 
bool FileGetContent (const char *path, ImVector< char > &bufferOut, bool openInTextMode, const char *password)
 
int FileGetExtensionType (const char *path)
 
void FileGetExtensionTypesFromFilenames (ImVector< int > &fileExtensionTypesOut, const FilenameStringVector &fileNames)
 
static size_t ImFormatString (char *buf, size_t buf_size, const char *fmt,...)
 
const char * ChooseFileMainMethod (Dialog &ist, const char *directory, const bool _isFolderChooserDialog, const bool _isSaveFileDialog, const char *_saveFileName, const char *fileFilterExtensionString, const char *windowTitle, const ImVec2 &windowSize, const ImVec2 &windowPos, const float windowAlpha)
 
void PathGetAbsolute (const char *path, char *rv)
 
void PathGetDirectoryName (const char *filePath, char *rv)
 
void PathGetFileName (const char *filePath, char *rv)
 
void PathGetFileNameWithoutExtension (const char *filePath, char *rv)
 
void PathGetExtension (const char *filePath, char *rv)
 
void PathChangeExtension (const char *filePath, const char *newExtension, char *rv)
 
void PathAppend (const char *directory, char *rv)
 
void PathSplit (const char *path, FilenameStringVector &rv, bool leaveIntermediateTrailingSlashes)
 
void DirectoryGetDirectories (const char *directoryName, PathStringVector &result, FilenameStringVector *pOptionalNamesOut, Sorting sorting)
 
void DirectoryGetFiles (const char *directoryName, PathStringVector &result, FilenameStringVector *pOptionalNamesOut, Sorting sorting)
 
void DirectoryCreate (const char *directoryName)
 
bool PathExists (const char *path)
 
bool DirectoryExists (const char *path)
 
bool FileExists (const char *path)
 

Variables

const int MAX_FILENAME_BYTES = 1024 *4
 
const int MAX_PATH_BYTES = 1024 *4
 

Typedef Documentation

◆ FilenameString

typedef char ImGuiFs::FilenameString[MAX_FILENAME_BYTES]

Definition at line 173 of file imguifilesystem.h.

◆ FilenameStringVector

Definition at line 176 of file imguifilesystem.h.

◆ PathString

typedef char ImGuiFs::PathString[MAX_PATH_BYTES]

Definition at line 174 of file imguifilesystem.h.

◆ PathStringVector

Definition at line 177 of file imguifilesystem.h.

Enumeration Type Documentation

◆ FileExtensionType

Enumerator
FET_NONE 
FET_HPP 
FET_CPP 
FET_IMAGE 
FET_PDF 
FET_DOCUMENT 
FET_TEXT 
FET_DATABASE 
FET_SPREADSHEET 
FET_PRESENTATION 
FET_ARCHIVE 
FET_AUDIO 
FET_VIDEO 
FET_XML 
FET_HTML 
FET_COUNT 

Definition at line 111 of file imguifilesystem.h.

◆ Sorting

Enumerator
SORT_ORDER_ALPHABETIC 
SORT_ORDER_ALPHABETIC_INVERSE 
SORT_ORDER_LAST_MODIFICATION 
SORT_ORDER_LAST_MODIFICATION_INVERSE 
SORT_ORDER_SIZE 
SORT_ORDER_SIZE_INVERSE 
SORT_ORDER_TYPE 
SORT_ORDER_TYPE_INVERSE 
SORT_ORDER_COUNT 

Definition at line 190 of file imguifilesystem.h.

Function Documentation

◆ ChooseFileMainMethod()

const char * ImGuiFs::ChooseFileMainMethod ( Dialog ist,
const char *  directory,
const bool  _isFolderChooserDialog,
const bool  _isSaveFileDialog,
const char *  _saveFileName,
const char *  fileFilterExtensionString,
const char *  windowTitle,
const ImVec2 &  windowSize,
const ImVec2 &  windowPos,
const float  windowAlpha 
)

Definition at line 1917 of file imguifilesystem.cpp.

◆ DirectoryCreate()

void ImGuiFs::DirectoryCreate ( const char *  directoryName)

Definition at line 2877 of file imguifilesystem.cpp.

◆ DirectoryExists()

bool ImGuiFs::DirectoryExists ( const char *  path)

Definition at line 2881 of file imguifilesystem.cpp.

◆ DirectoryGetDirectories()

void ImGuiFs::DirectoryGetDirectories ( const char *  directoryName,
PathStringVector result,
FilenameStringVector pOptionalNamesOut,
Sorting  sorting 
)

Definition at line 2875 of file imguifilesystem.cpp.

◆ DirectoryGetFiles()

void ImGuiFs::DirectoryGetFiles ( const char *  directoryName,
PathStringVector result,
FilenameStringVector pOptionalNamesOut,
Sorting  sorting 
)

Definition at line 2876 of file imguifilesystem.cpp.

◆ FileExists()

bool ImGuiFs::FileExists ( const char *  path)

Definition at line 2882 of file imguifilesystem.cpp.

◆ FileGetContent() [1/2]

bool ImGuiFs::FileGetContent ( const char *  path,
ImVector< char > &  bufferOut,
bool  openInTextMode,
const char *  password 
)

Definition at line 1405 of file imguifilesystem.cpp.

◆ FileGetContent() [2/2]

bool ImGuiFs::FileGetContent ( const char *  path,
ImVector< unsigned char > &  bufferOut,
bool  openInTextMode,
const char *  password 
)

Definition at line 1404 of file imguifilesystem.cpp.

◆ FileGetContentBase()

template<typename CharType >
bool ImGuiFs::FileGetContentBase ( const char *  path,
ImVector< CharType > &  bufferOut,
bool  openInTextMode,
const char *  password 
)

Definition at line 1365 of file imguifilesystem.cpp.

◆ FileGetExtensionType()

int ImGuiFs::FileGetExtensionType ( const char *  path)

Definition at line 1496 of file imguifilesystem.cpp.

◆ FileGetExtensionTypesFromFilenames()

void ImGuiFs::FileGetExtensionTypesFromFilenames ( ImVector< int > &  fileExtensionTypesOut,
const FilenameStringVector fileNames 
)

Definition at line 1499 of file imguifilesystem.cpp.

◆ ImFormatString()

static size_t ImGuiFs::ImFormatString ( char *  buf,
size_t  buf_size,
const char *  fmt,
  ... 
)
static

Definition at line 1905 of file imguifilesystem.cpp.

◆ PathAppend()

void ImGuiFs::PathAppend ( const char *  directory,
char *  rv 
)

Definition at line 2873 of file imguifilesystem.cpp.

◆ PathChangeExtension()

void ImGuiFs::PathChangeExtension ( const char *  filePath,
const char *  newExtension,
char *  rv 
)

Definition at line 2872 of file imguifilesystem.cpp.

◆ PathExists()

bool ImGuiFs::PathExists ( const char *  path)

Definition at line 2878 of file imguifilesystem.cpp.

◆ PathGetAbsolute()

void ImGuiFs::PathGetAbsolute ( const char *  path,
char *  rv 
)

Definition at line 2867 of file imguifilesystem.cpp.

◆ PathGetDirectoryName()

void ImGuiFs::PathGetDirectoryName ( const char *  filePath,
char *  rv 
)

Definition at line 2868 of file imguifilesystem.cpp.

◆ PathGetExtension()

void ImGuiFs::PathGetExtension ( const char *  filePath,
char *  rv 
)

Definition at line 2871 of file imguifilesystem.cpp.

◆ PathGetFileName()

void ImGuiFs::PathGetFileName ( const char *  filePath,
char *  rv 
)

Definition at line 2869 of file imguifilesystem.cpp.

◆ PathGetFileNameWithoutExtension()

void ImGuiFs::PathGetFileNameWithoutExtension ( const char *  filePath,
char *  rv 
)

Definition at line 2870 of file imguifilesystem.cpp.

◆ PathSplit()

void ImGuiFs::PathSplit ( const char *  path,
FilenameStringVector rv,
bool  leaveIntermediateTrailingSlashes 
)

Definition at line 2874 of file imguifilesystem.cpp.

Variable Documentation

◆ MAX_FILENAME_BYTES

const int ImGuiFs::MAX_FILENAME_BYTES = 1024 *4

Definition at line 97 of file imguifilesystem.h.

◆ MAX_PATH_BYTES

const int ImGuiFs::MAX_PATH_BYTES = 1024 *4

Definition at line 98 of file imguifilesystem.h.