mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Unify filedialog and browsedialog code
This commit is contained in:
@@ -22,44 +22,17 @@
|
||||
#define FILEDIALOG_H_
|
||||
|
||||
#include <string>
|
||||
#include "filelister.h"
|
||||
#include "gmenu2x.h"
|
||||
|
||||
#define FD_NO_ACTION 0
|
||||
#define FD_ACTION_CLOSE 1
|
||||
#define FD_ACTION_UP 2
|
||||
#define FD_ACTION_DOWN 3
|
||||
#define FD_ACTION_LEFT 4
|
||||
#define FD_ACTION_RIGHT 5
|
||||
#define FD_ACTION_SCROLLDOWN 6
|
||||
#define FD_ACTION_SCROLLUP 7
|
||||
#define FD_ACTION_GOUP 8
|
||||
#define FD_ACTION_SELECT 9
|
||||
#include "browsedialog.h"
|
||||
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
class FileDialog {
|
||||
protected:
|
||||
int selRow;
|
||||
string text, title;
|
||||
GMenu2X *gmenu2x;
|
||||
string filter;
|
||||
FileLister fl;
|
||||
uint selected;
|
||||
string path_v;
|
||||
|
||||
class FileDialog : public BrowseDialog {
|
||||
public:
|
||||
string file;
|
||||
FileDialog(GMenu2X *gmenu2x, const string &text, const string &filter="", const string &file="");
|
||||
virtual ~FileDialog() {};
|
||||
|
||||
virtual const string &path() { return path_v; };
|
||||
virtual void setPath(const string &path);
|
||||
|
||||
inline virtual void beforeFileList();
|
||||
inline virtual void onChangeDir();
|
||||
bool exec();
|
||||
FileDialog(GMenu2X *gmenu2x, const string &text, const string &filter="",
|
||||
const string &file="", const string &title = "File Dialog");
|
||||
virtual ~FileDialog();
|
||||
};
|
||||
|
||||
#endif /*INPUTDIALOG_H_*/
|
||||
|
||||
Reference in New Issue
Block a user