public final class ImGuiFileDialog
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
close()
close dialog
|
static boolean |
display(java.lang.String vKey,
int vFlags,
float vMinSizeX,
float vMinSizeY,
float vMaxSizeX,
float vMaxSizeY)
Display / Close dialog form
Display the dialog.
|
static java.lang.String |
getCurrentFileName()
Save File behavior : will always return the content of the field with current filter extension
|
static java.lang.String |
getCurrentFilter()
will return selected filter
|
static java.lang.String |
getCurrentPath()
will return current path
|
static java.lang.String |
getFilePathName()
Save File behavior : will always return the content of the field with current filter extention and current path
|
static java.lang.String |
getOpenedKey()
return the dialog key who is opened, return nothing if not opened
|
static java.util.HashMap<java.lang.String,java.lang.String> |
getSelection()
Open File behavior : will return selection via a map<FileName, FilePathName>
|
static long |
getUserDatas()
will return user datas sent with Open Dialog/Modal
|
static boolean |
isOk()
true: Dialog Closed with Ok result / false: Dialog closed with cancel result
|
static boolean |
isOpened()
say if the dialog is opened somewhere
|
static boolean |
isOpened(java.lang.String vKey)
say if the key is opened
|
static void |
openDialog(java.lang.String vKey,
java.lang.String vTitle,
java.lang.String vFilters,
java.lang.String vPath,
java.lang.String vFileName,
int vCountSelectionMax,
long vUserDatas,
int vFlags)
open simple dialog (path and fileName can be specified)
|
static void |
openModal(java.lang.String vKey,
java.lang.String vTitle,
java.lang.String vFilters,
java.lang.String vFilePathName,
ImGuiFileDialogPaneFun vSidePane,
float vSidePaneWidth,
int vCountSelectionMax,
long vUserDatas,
int vFlags)
open modal with custom right pane (path and filename are obtained from filePathName)
|
static void |
openModal(java.lang.String vKey,
java.lang.String vTitle,
java.lang.String vFilters,
java.lang.String vFilePathName,
int vCountSelectionMax,
long vUserDatas,
int vFlags)
open simple modal (path and filename are obtained from filePathName)
|
static void |
openModal(java.lang.String vKey,
java.lang.String vTitle,
java.lang.String vFilters,
java.lang.String vPath,
java.lang.String vFileName,
ImGuiFileDialogPaneFun vSidePane,
float vSidePaneWidth,
int vCountSelectionMax,
long vUserDatas,
int vFlags)
open modal with custom right pane (path and fileName can be specified)
|
static void |
openModal(java.lang.String vKey,
java.lang.String vTitle,
java.lang.String vFilters,
java.lang.String vPath,
java.lang.String vFileName,
int vCountSelectionMax,
long vUserDatas,
int vFlags)
open simple modal (path and fileName can be specified)
|
static boolean |
wasOpenedThisFrame()
say if the dialog was already opened this frame
|
static boolean |
wasOpenedThisFrame(java.lang.String vKey)
say if the dialog key was already opened this frame
|
public static void openDialog(java.lang.String vKey, java.lang.String vTitle, java.lang.String vFilters, java.lang.String vPath, java.lang.String vFileName, int vCountSelectionMax, long vUserDatas, int vFlags)
vKey
- key dialogvTitle
- titlevFilters
- filters (in comma separated form i.e. ".png,.jpg" or ".*") or null for directoriesvPath
- pathvFileName
- default file namevCountSelectionMax
- count selection maxvUserDatas
- user datas (can be retrieved in pane)vFlags
- ImGuiFileDialogFlagspublic static void openModal(java.lang.String vKey, java.lang.String vTitle, java.lang.String vFilters, java.lang.String vPath, java.lang.String vFileName, int vCountSelectionMax, long vUserDatas, int vFlags)
vKey
- key dialogvTitle
- titlevFilters
- filters (in comma separated form i.e. ".png,.jpg" or ".*") or null for directoriesvPath
- pathvFileName
- default file namevCountSelectionMax
- count selection maxvUserDatas
- user datas (can be retrieved in pane)vFlags
- ImGuiFileDialogFlagspublic static void openModal(java.lang.String vKey, java.lang.String vTitle, java.lang.String vFilters, java.lang.String vFilePathName, int vCountSelectionMax, long vUserDatas, int vFlags)
vKey
- key dialogvTitle
- titlevFilters
- filters (in comma separated form i.e. ".png,.jpg" or ".*") or null for directoriesvFilePathName
- file path name (will be decomposed in path and fileName)vCountSelectionMax
- count selection maxvUserDatas
- user datas (can be retrieved in pane)vFlags
- ImGuiFileDialogFlagspublic static void openModal(java.lang.String vKey, java.lang.String vTitle, java.lang.String vFilters, java.lang.String vPath, java.lang.String vFileName, ImGuiFileDialogPaneFun vSidePane, float vSidePaneWidth, int vCountSelectionMax, long vUserDatas, int vFlags)
vKey
- key dialogvTitle
- titlevFilters
- filters (in comma separated form i.e. ".png,.jpg" or ".*") or null for directoriesvPath
- pathvFileName
- default file namevSidePane
- side panevSidePaneWidth
- side pane widthvCountSelectionMax
- count selection maxvUserDatas
- user datas (can be retrieved in pane)vFlags
- ImGuiFileDialogFlagspublic static void openModal(java.lang.String vKey, java.lang.String vTitle, java.lang.String vFilters, java.lang.String vFilePathName, ImGuiFileDialogPaneFun vSidePane, float vSidePaneWidth, int vCountSelectionMax, long vUserDatas, int vFlags)
vKey
- key dialogvTitle
- titlevFilters
- filters (in comma separated form i.e. ".png,.jpg" or ".*") or null for directoriesvFilePathName
- file path name (will be decomposed in path and fileName)vSidePane
- side panevSidePaneWidth
- side pane widthvCountSelectionMax
- count selection maxvUserDatas
- user datas (can be retrieved in pane)vFlags
- ImGuiFileDialogFlagspublic static boolean display(java.lang.String vKey, int vFlags, float vMinSizeX, float vMinSizeY, float vMaxSizeX, float vMaxSizeY)
vKey
- key dialog to display (if not the same key as defined by OpenDialog/Modal => no opening)vFlags
- ImGuiWindowFlagsvMinSizeX
- minimal size constraint for the ImGuiWindowvMinSizeY
- minimal size constraint for the ImGuiWindowvMaxSizeX
- maximal size constraint for the ImGuiWindowvMaxSizeY
- maximal size constraint for the ImGuiWindowpublic static void close()
public static boolean wasOpenedThisFrame(java.lang.String vKey)
vKey
- key dialogpublic static boolean wasOpenedThisFrame()
public static boolean isOpened(java.lang.String vKey)
vKey
- key dialogpublic static boolean isOpened()
public static java.lang.String getOpenedKey()
public static boolean isOk()
public static java.util.HashMap<java.lang.String,java.lang.String> getSelection()
For example, if a file is selected, say test.txt. Then the key value pair will be: 'test.txt', '/some/path/to/test.txt'
public static java.lang.String getFilePathName()
public static java.lang.String getCurrentFileName()
public static java.lang.String getCurrentPath()
public static java.lang.String getCurrentFilter()
public static long getUserDatas()
Can be used to pass a long value to the dialog and get the value back. This long value can be a pointer to a native data structure.