FileChooser.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 #include <ewol/debug.hpp>
10 #include <ewol/widget/Composer.hpp>
11 #include <esignal/Signal.hpp>
12 
13 namespace ewol {
14  namespace widget {
15  class FileChooser;
16  using FileChooserShared = ememory::SharedPtr<ewol::widget::FileChooser>;
17  using FileChooserWeak = ememory::WeakPtr<ewol::widget::FileChooser>;
67  public: // signals
68  esignal::Signal<> signalCancel;
69  esignal::Signal<std::string> signalValidate;
70  public: // properties
76  protected:
77  FileChooser();
78  void init() override;
79  public:
80  DECLARE_WIDGET_FACTORY(FileChooser, "FileChooser");
81  virtual ~FileChooser();
82  private:
83  std::string getCompleateFileName();
84  void updateCurrentFolder();
85  public:
86  void onGetFocus() override;
87  private:
88  // callback functions:
89  void onCallbackEntryFolderChangeValue(const std::string& _value);
90  void onCallbackEntryFileChangeValue(const std::string& _value);
91  void onCallbackButtonCancelPressed();
92  void onCallbackHidenFileChangeChangeValue(const bool& _value);
93  void onCallbackListFolderSelectChange(const std::string& _value);
94  void onCallbackListFileSelectChange(const std::string& _value);
95  void onCallbackListFileValidate(const std::string& _value);
96  void onCallbackListValidate();
97  void onCallbackHomePressed();
98  protected:
99  virtual void onChangePropertyPath();
100  virtual void onChangePropertyFile();
101  virtual void onChangePropertyLabelTitle();
102  virtual void onChangePropertyLabelValidate();
103  virtual void onChangePropertyLabelCancel();
104  };
105  };
106 };
eproperty::Value< std::string > propertyLabelValidate
Label of validate button of the pop-up (can use translation)
Definition: FileChooser.hpp:74
Definition: Area.hpp:16
esignal::Signal< std::string > signalValidate
select file(s)
Definition: FileChooser.hpp:69
eproperty::Value< std::string > propertyLabelTitle
Label of the pop-up (can use translation)
Definition: FileChooser.hpp:73
eproperty::Value< std::string > propertyPath
Current path to explore.
Definition: FileChooser.hpp:71
eproperty::Value< std::string > propertyFile
Selected file.
Definition: FileChooser.hpp:72
esignal::Signal signalCancel
abort the display of the pop-up or press cancel button
Definition: FileChooser.hpp:68
void onGetFocus() override
Event of the focus has been grep by the current widget.
the composer widget is a widget that create a link on a string.file to parse the data and generate so...
Definition: Composer.hpp:21
eproperty::Value< std::string > propertyLabelCancel
Label of cancel/close button of the pop-up (can use translation)
Definition: FileChooser.hpp:75
File Chooser is a simple selector of file for opening, saving, and what you want ...
Definition: FileChooser.hpp:66