API Documentation
FileExplorer.h
1 // FileExplorer.h
3 //
5 
6 namespace nkWinUi
7 {
11  class FileExplorer : public Component
12  {
13  public :
14 
18  class FileFilter
19  {
20  public :
21 
22 
25  } ;
26 
27  public :
28 
36  FileExplorer (System* system) noexcept ;
40  virtual ~FileExplorer () ;
41 
55  FileFilter& getFilter (unsigned int index) ;
63  void setFilter (unsigned int index, nkMemory::StringView label, nkMemory::StringView extension) ;
64 
70  void setFollowSelfDir (bool value) ;
74  bool getFollowSelfDir () const ;
85 
92  virtual nkMemory::String openDialog (bool forSave) = 0 ;
93 
94  // Import / Export
95  virtual void exportIntrospection (nkExport::Node* rootNode) override ;
96  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
97 
98  public :
99 
100  // Statics
108  static nkMemory::UniquePtr<FileExplorer> create (System* system = nullptr) ;
109  } ;
110 }
nkWinUi::FileExplorer::getFollowSelfDir
bool getFollowSelfDir() const
nkWinUi::FileExplorer::exportIntrospection
virtual void exportIntrospection(nkExport::Node *rootNode) override
nkWinUi::FileExplorer::openDialog
virtual nkMemory::String openDialog(bool forSave)=0
nkWinUi::FileExplorer::FileFilter
Used to filter files in the interface.
Definition: FileExplorer.h:19
nkWinUi::Component
Base class for any graphical component.
Definition: Component.h:12
nkWinUi::FileExplorer::getFilter
FileFilter & getFilter(unsigned int index)
nkWinUi::FileExplorer
A graphical file explorer.
Definition: FileExplorer.h:12
nkWinUi::System
The main system of the component.
Definition: System.h:18
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkWinUi::FileExplorer::create
static nkMemory::UniquePtr< FileExplorer > create(System *system=nullptr)
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkWinUi::FileExplorer::FileFilter::_label
nkMemory::String _label
The label shown for the filter in the interface.
Definition: FileExplorer.h:23
nkWinUi::FileExplorer::setCurrentDir
void setCurrentDir(nkMemory::StringView path)
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkWinUi::FileExplorer::getCurrentDir
nkMemory::StringView getCurrentDir() const
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkWinUi::FileExplorer::FileExplorer
FileExplorer(System *system) noexcept
nkWinUi::FileExplorer::~FileExplorer
virtual ~FileExplorer()
nkWinUi::FileExplorer::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkWinUi::FileExplorer::FileFilter::_extension
nkMemory::String _extension
The extensions filtered by the filter.
Definition: FileExplorer.h:24
nkWinUi::FileExplorer::addFilter
void addFilter(nkMemory::StringView label, nkMemory::StringView extension)
nkWinUi::FileExplorer::setFollowSelfDir
void setFollowSelfDir(bool value)
nkWinUi
Encompasses all API of component NilkinsWinUi.
Definition: Clipboard.h:7
nkWinUi::FileExplorer::setFilter
void setFilter(unsigned int index, nkMemory::StringView label, nkMemory::StringView extension)