@@ -572,6 +572,9 @@ enum ImGuiFileDialogFlags_
572572 ImGuiFileDialogFlags_HideColumnType = (1 << 3 ), // hide column file type
573573 ImGuiFileDialogFlags_HideColumnSize = (1 << 4 ), // hide column file size
574574 ImGuiFileDialogFlags_HideColumnDate = (1 << 5 ), // hide column file date
575+ #ifdef USE_THUMBNAILS
576+ ImGuiFileDialogFlags_DisableThumbnailMode = (1 << 6 ), // disable the thumbnail mode
577+ #endif
575578 ImGuiFileDialogFlags_Default = ImGuiFileDialogFlags_ConfirmOverwrite
576579};
577580
@@ -1042,6 +1045,11 @@ namespace IGFD
10421045 bool puDLGmodal = false ;
10431046 bool puNeedToExitDialog = false ;
10441047
1048+ bool puUseCustomLocale = false ;
1049+ int puLocaleCategory = LC_ALL; // locale category to use
1050+ std::string puLocaleBegin; // the locale who will be applied at start of the display dialog
1051+ std::string puLocaleEnd; // the locale who will be applaied at end of the display dialog
1052+
10451053 public:
10461054 void NewFrame (); // new frame, so maybe neded to do somethings, like reset events
10471055 void EndFrame (); // end frame, so maybe neded to do somethings fater all
@@ -1172,20 +1180,20 @@ namespace IGFD
11721180 void Close (); // close dialog
11731181
11741182 // queries
1175- bool WasOpenedThisFrame (const std::string& vKey) const ; // say if the dialog key was already opened this frame
1176- bool WasOpenedThisFrame () const ; // say if the dialog was already opened this frame
1177- bool IsOpened (const std::string& vKey) const ; // say if the key is opened
1178- bool IsOpened () const ; // say if the dialog is opened somewhere
1179- std::string GetOpenedKey () const ; // return the dialog key who is opened, return nothing if not opened
1183+ bool WasOpenedThisFrame (const std::string& vKey) const ; // say if the dialog key was already opened this frame
1184+ bool WasOpenedThisFrame () const ; // say if the dialog was already opened this frame
1185+ bool IsOpened (const std::string& vKey) const ; // say if the key is opened
1186+ bool IsOpened () const ; // say if the dialog is opened somewhere
1187+ std::string GetOpenedKey () const ; // return the dialog key who is opened, return nothing if not opened
11801188
11811189 // get result
1182- bool IsOk () const ; // true => Dialog Closed with Ok result / false : Dialog closed with cancel result
1190+ bool IsOk () const ; // true => Dialog Closed with Ok result / false : Dialog closed with cancel result
11831191 std::map<std::string, std::string> GetSelection (); // Open File behavior : will return selection via a map<FileName, FilePathName>
11841192 std::string GetFilePathName (); // Save File behavior : will always return the content of the field with current filter extention and current path
11851193 std::string GetCurrentFileName (); // Save File behavior : will always return the content of the field with current filter extention
11861194 std::string GetCurrentPath (); // will return current path
11871195 std::string GetCurrentFilter (); // will return selected filter
1188- UserDatas GetUserDatas () const ; // will return user datas send with Open Dialog/Modal
1196+ UserDatas GetUserDatas () const ; // will return user datas send with Open Dialog/Modal
11891197
11901198 // extentions displaying
11911199 void SetExtentionInfos ( // SetExtention datas for have custom display of particular file type
@@ -1201,13 +1209,19 @@ namespace IGFD
12011209 std::string* vOutIcon = 0 ); // icon or text to retrieve
12021210 void ClearExtentionInfos (); // clear extentions setttings
12031211
1212+ void SetLocales ( // set locales to use before and after the dialog display
1213+ const int & vLocaleCategory, // set local category
1214+ const std::string& vLocaleBegin, // locale to use at begining of the dialog display
1215+ const std::string& vLocaleEnd); // locale to use at the end of the dialog display
1216+
12041217 protected:
12051218 void NewFrame (); // new frame just at begining of display
12061219 void EndFrame (); // end frame just at end of display
12071220 void QuitFrame (); // quit frame when qui quit the dialog
12081221
12091222 // others
1210- bool prConfirm_Or_OpenOverWriteFileDialog_IfNeeded (bool vLastAction, ImGuiWindowFlags vFlags); // treatment of the result, start the confirm to overwrite dialog if needed (if defined with flag)
1223+ bool prConfirm_Or_OpenOverWriteFileDialog_IfNeeded (
1224+ bool vLastAction, ImGuiWindowFlags vFlags); // treatment of the result, start the confirm to overwrite dialog if needed (if defined with flag)
12111225
12121226 public:
12131227 // dialog parts
@@ -1217,7 +1231,9 @@ namespace IGFD
12171231
12181232 // widgets components
12191233 virtual void prDrawSidePane (float vHeight); // draw side pane
1220- virtual bool prSelectableItem (int vidx, std::shared_ptr<FileInfos> vInfos, bool vSelected, const char * vFmt, ...);
1234+ virtual bool prSelectableItem (int vidx,
1235+ std::shared_ptr<FileInfos> vInfos,
1236+ bool vSelected, const char * vFmt, ...); // draw a custom selectable behavior item
12211237 virtual void prDrawFileListView (ImVec2 vSize); // draw file list view (default mode)
12221238
12231239#ifdef USE_THUMBNAILS
@@ -1451,6 +1467,12 @@ IMGUIFILEDIALOG_API bool IGFD_GetExtentionInfos(
14511467IMGUIFILEDIALOG_API void IGFD_ClearExtentionInfos ( // clear extentions setttings
14521468 ImGuiFileDialog* vContext); // ImGuiFileDialog context
14531469
1470+ IMGUIFILEDIALOG_API void SetLocales ( // set locales to use before and after display
1471+ ImGuiFileDialog* vContext, // ImGuiFileDialog context
1472+ const int vCategory, // set local category
1473+ const char * vBeginLocale, // locale to use at begining of the dialog display
1474+ const char * vEndLocale); // locale to set at end of the dialog display
1475+
14541476#ifdef USE_EXPLORATION_BY_KEYS
14551477IMGUIFILEDIALOG_API void IGFD_SetFlashingAttenuationInSeconds ( // set the flashing time of the line in file list when use exploration keys
14561478 ImGuiFileDialog* vContext, // ImGuiFileDialog context
0 commit comments