Test of FileDialog.hpp
This commit is contained in:
@@ -29,18 +29,35 @@ namespace JUI
|
||||
FileDialogWindow() : Window() {
|
||||
auto* toolbar = new JUI::UtilityBar(this->Content());
|
||||
|
||||
auto* file_listing = new JUI::ScrollingRect(this->Content());
|
||||
auto* file_listing = new JUI::Rect(this->Content());
|
||||
file_listing->Size({100_percent, 100_percent-20_px});
|
||||
|
||||
file_layout = new JUI::VerticalListLayout(file_listing);
|
||||
}
|
||||
|
||||
/// Tree system
|
||||
|
||||
JUI::Rect* CreateFileEntry(const std::string& name) {
|
||||
|
||||
}
|
||||
FileDialogWindow(const std::filesystem::path& root) : FileDialogWindow() {
|
||||
std::cout << root.relative_path() << std::endl;
|
||||
std::cout << root.root_directory() << std::endl;
|
||||
for (const auto& entry: std::filesystem::directory_iterator(root)) {
|
||||
std::cout << entry.path().filename() << std::endl;
|
||||
}
|
||||
}
|
||||
FileDialogWindow(const std::filesystem::path& root) : FileDialogWindow() {}
|
||||
explicit FileDialogWindow(Widget* parent, const std::filesystem::path& root) : FileDialogWindow(root)
|
||||
{
|
||||
Parent(parent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
VerticalListLayout* file_layout;
|
||||
std::vector<Rect*> file_entry_widgets;
|
||||
private:
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user