Nebula
Loading...
Searching...
No Matches
ImGuiFileDialogConfig.h
Go to the documentation of this file.
1#pragma once
2
3// uncomment and modify defines under for customize ImGuiFileDialog
4
8
9// uncomment if you need to use your FileSystem Interface
10// if commented, you have two defualt interface, std::filesystem or dirent
11// #define USE_CUSTOM_FILESYSTEM
12// this options need c++17
13// #define USE_STD_FILESYSTEM
14
18
19// the spacing between button path's can be customized.
20// if disabled the spacing is defined by the imgui theme
21// define the space between path buttons
22// #define CUSTOM_PATH_SPACING 2
23
24// #define MAX_FILE_DIALOG_NAME_BUFFER 1024
25// #define MAX_PATH_BUFFER_SIZE 1024
26
30
31// the slash's buttons in path cna be used for quick select parallles directories
32// #define USE_QUICK_PATH_SELECT
33
37
38// #define USE_THUMBNAILS
39// the thumbnail generation use the stb_image and stb_resize lib who need to define the implementation
40// btw if you already use them in your app, you can have compiler error due to "implemntation found in double"
41// so uncomment these line for prevent the creation of implementation of these libs again
42// #define DONT_DEFINE_AGAIN__STB_IMAGE_IMPLEMENTATION
43// #define DONT_DEFINE_AGAIN__STB_IMAGE_RESIZE_IMPLEMENTATION
44// #define IMGUI_RADIO_BUTTON RadioButton
45// #define DisplayMode_ThumbailsList_ImageHeight 32.0f
46// #define tableHeaderFileThumbnailsString "Thumbnails"
47// #define DisplayMode_FilesList_ButtonString "FL"
48// #define DisplayMode_FilesList_ButtonHelp "File List"
49// #define DisplayMode_ThumbailsList_ButtonString "TL"
50// #define DisplayMode_ThumbailsList_ButtonHelp "Thumbnails List"
51// todo
52// #define DisplayMode_ThumbailsGrid_ButtonString "TG"
53// #define DisplayMode_ThumbailsGrid_ButtonHelp "Thumbnails Grid"
54
58
59// #define USE_EXPLORATION_BY_KEYS
60// this mapping by default is for GLFW but you can use another
61// #include <GLFW/glfw3.h>
62// Up key for explore to the top
63// #define IGFD_KEY_UP ImGuiKey_UpArrow
64// Down key for explore to the bottom
65// #define IGFD_KEY_DOWN ImGuiKey_DownArrow
66// Enter key for open directory
67// #define IGFD_KEY_ENTER ImGuiKey_Enter
68// BackSpace for comming back to the last directory
69// #define IGFD_KEY_BACKSPACE ImGuiKey_Backspace
70
74
75// #define SelectAllFilesKey ImGuiKey_A
76
80
81// by ex you can quit the dialog by pressing the key excape
82// #define USE_DIALOG_EXIT_WITH_KEY
83// #define IGFD_EXIT_KEY ImGuiKey_Escape
84
88
89// widget
90// begin combo widget
91// #define IMGUI_BEGIN_COMBO ImGui::BeginCombo
92// when auto resized, FILTER_COMBO_MIN_WIDTH will be considered has minimum width
93// FILTER_COMBO_AUTO_SIZE is enabled by default now to 1
94// uncomment if you want disable
95// #define FILTER_COMBO_AUTO_SIZE 0
96// filter combobox width
97// #define FILTER_COMBO_MIN_WIDTH 120.0f
98// button widget use for compose path
99// #define IMGUI_PATH_BUTTON ImGui::Button
100// standard button
101// #define IMGUI_BUTTON ImGui::Button
102
106
107// locales string
108#define createDirButtonString reinterpret_cast<const char*>(u8"\uf067")
109#define resetButtonString reinterpret_cast<const char*>(u8"\uf01e")
110// #define devicesButtonString "Devices"
111#define editPathButtonString reinterpret_cast<const char*>(u8"\uf044")
112// #define searchString "Search"
113// #define dirEntryString "[DIR] "
114// #define linkEntryString "[LINK] "
115// #define fileEntryString "[FILE] "
116// #define fileNameString "File Name : "
117// #define dirNameString "Directory Path :"
118// #define buttonResetSearchString "Reset search"
119// #define buttonDriveString "Devices"
120// #define buttonEditPathString "Edit path\nYou can also right click on path buttons"
121// #define buttonResetPathString "Reset to current directory"
122// #define buttonCreateDirString "Create Directory"
123// #define OverWriteDialogTitleString "The file Already Exist !"
124// #define OverWriteDialogMessageString "Would you like to OverWrite it ?"
125// #define OverWriteDialogConfirmButtonString "Confirm"
126// #define OverWriteDialogCancelButtonString "Cancel"
127
128// Validation buttons
129// #define okButtonString " OK"
130// #define okButtonWidth 0.0f
131// #define cancelButtonString " Cancel"
132// #define cancelButtonWidth 0.0f
133// alignement [0:1], 0.0 is left, 0.5 middle, 1.0 right, and other ratios
134// #define okCancelButtonAlignement 0.0f
135// #define invertOkAndCancelButtons 0
136
137// DateTimeFormat
138// see strftime functionin <ctime> for customize
139// "%Y/%m/%d %H:%M" give 2021:01:22 11:47
140// "%Y/%m/%d %i:%M%p" give 2021:01:22 11:45PM
141// #define DateTimeFormat "%Y/%m/%d %i:%M%p"
142
146
147// theses icons will appear in table headers
148// #define USE_CUSTOM_SORTING_ICON
149#define tableHeaderAscendingIcon reinterpret_cast<const char*>(u8"\uf062")
150#define tableHeaderDescendingIcon reinterpret_cast<const char*>(u8"\uf063")
151// #define tableHeaderFileNameString " File name"
152// #define tableHeaderFileTypeString " Type"
153// #define tableHeaderFileSizeString " Size"
154// #define tableHeaderFileDateTimeString " Date"
155// #define fileSizeBytes "o"
156// #define fileSizeKiloBytes "Ko"
157// #define fileSizeMegaBytes "Mo"
158// #define fileSizeGigaBytes "Go"
159
160// default table sort field (must be FIELD_FILENAME, FIELD_TYPE, FIELD_SIZE, FIELD_DATE or FIELD_THUMBNAILS)
161// #define defaultSortField FIELD_FILENAME
162
163// default table sort order for each field (true => Descending, false => Ascending)
164// #define defaultSortOrderFilename true
165// #define defaultSortOrderType true
166// #define defaultSortOrderSize true
167// #define defaultSortOrderDate true
168// #define defaultSortOrderThumbnails true
169
173
174// #define USE_PLACES_FEATURE
175// #define PLACES_PANE_DEFAULT_SHOWN false
176// #define placesPaneWith 150.0f
177// #define IMGUI_TOGGLE_BUTTON ToggleButton
178// #define placesButtonString "Place"
179// #define placesButtonHelpString "Places"
180// #define addPlaceButtonString "+"
181// #define removePlaceButtonString "-"
182// #define validatePlaceButtonString "ok"
183// #define editPlaceButtonString "E"
184
188
189// a group for bookmarks will be added by default, but you can also create it yourself and many more
190// #define USE_PLACES_BOOKMARKS
191// #define PLACES_BOOKMARK_DEFAULT_OPEPEND true
192// #define placesBookmarksGroupName "Bookmarks"
193// #define placesBookmarksDisplayOrder 0 // to the first
194
198
199// a group for system devices (returned by IFileSystem), but you can also add yours
200// by ex if you would like to display a specific icon for some devices
201// #define USE_PLACES_DEVICES
202// #define PLACES_DEVICES_DEFAULT_OPEPEND true
203// #define placesDevicesGroupName "Devices"
204// #define placesDevicesDisplayOrder 10 // to the end