19#ifndef ZXWIDGET_FILEBROWSER
20#define ZXWIDGET_FILEBROWSER
58 const std::filesystem::path & initpath =
59 std::filesystem::path{},
60 const std::string & initedit =
"",
61 char markingsinfiles =
'N',
62 const std::string & tooltiptext =
"",
81 pwtree_ !=
nullptr,&fileentries_); }
87 const std::filesystem::path &
browserPath(
void)
const noexcept
97 {
return((pwtree_ !=
nullptr) && cbp.isAfterWithData() &&
98 (cbp.whoprocessed !=
nullptr) &&
99 cbp.whoprocessed->isDescendantOf(*pwtree_)); }
107 {
return(cbp.isAfterWithData() && (cbp.whoprocessed !=
nullptr) &&
108 cbp.whoprocessed->isDescendantOf(*pwfiles_)); }
111 const char *
className(
void)
const noexcept {
return(
"FileBrowserWidget"); }
112 std::pair<bool,const CharRect *>
hasFocusZone(
void)
const noexcept override;
129 static const ID kIDsSubs[NUMSUBWIDGETS];
131 static bool checkDir(
const std::filesystem::path & pa);
137 std::vector<std::string> fileentries_;
140 std::filesystem::path curpath_;
142 int treeMarked(
void)
const;
143 void setDir(
const std::filesystem::path & path);
144 bool followTreeDir(
void);
145 int processEvent(
const EventData & evdata,
Widget * who)
override;
void fillWithFiles(const std::filesystem::path &path={}, char mode='T', bool onlyfiles=false, std::vector< std::string > *entries=nullptr)
Clear the list and fill it with the files and folders in PATH.
The main namespace of the library, that spans across all the zx modules.