23#include <ImGuiColorTextEdit/TextEditor.h>
27namespace ImGui {
class FileBrowser; }
50 GUIeditor(
GUIhelper * helper, std::string
const & imguiid, std::vector<EditorItem> && fixeditems,
51 std::string
const & scanpath, std::string
const & prefix, std::set<std::string> && extensions);
60 void loadFile(std::filesystem::path
const & fn);
76 void loadFileInternal(std::filesystem::path
const & fn, std::string
const & failtxt);
78 std::string
const itsId;
80 std::vector<EditorItem> itsItems;
81 size_t itsNumFixedItems;
82 std::string itsScanPath;
83 std::string
const itsPrefix;
84 std::set<std::string>
const itsExtensions;
86 int itsCurrentItem = 0;
87 bool itsWantLoad =
true;
88 bool itsWantAction =
false;
89 bool itsOkToLoad =
false;
90 bool itsOverrideReloadModule =
false;
92 std::filesystem::path itsFilename;
93 std::unique_ptr<ImGui::FileBrowser> itsBrowser;
Editor panel for JeVois-Pro GUI.
EditorSaveAction
Helper enum for actions to execute after saving a config file.
virtual ~GUIeditor()
Destructor.
void saveFile()
Save a file.
std::filesystem::path const & getLoadedFilePath() const
Get path of file last loaded with loadFile(), may be empty.
void refresh()
Refresh list of files.
void loadFile(std::filesystem::path const &fn)
Load a file and set it as the current file.
void draw()
Draw the editor into ImGui.
Helper class to assist modules in creating graphical and GUI elements.
Main namespace for all JeVois classes and functions.
Helper class to represent a GUIeditor file in a pull-down menu.
EditorSaveAction action
What to do after file is edited and saved.
std::filesystem::path filename
Full absolute path to the item.
std::string displayname
Description of item in pull-down menu.