merge apple and unix file dialog wrapper class
This commit is contained in:
@@ -43,15 +43,11 @@ class FileDialogWrapper {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__) || defined(__linux__)
|
||||||
|
|
||||||
#include "TargetConditionals.h"
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#if TARGET_OS_MAC == 1
|
|
||||||
|
|
||||||
class FileDialogWrapper {
|
class FileDialogWrapper {
|
||||||
public:
|
public:
|
||||||
static std::string ShowOpenFileDialog();
|
static std::string ShowOpenFileDialog();
|
||||||
@@ -62,32 +58,6 @@ class FileDialogWrapper {
|
|||||||
const std::string& folder_path);
|
const std::string& folder_path);
|
||||||
};
|
};
|
||||||
|
|
||||||
#elif TARGET_OS_IPHONE == 1
|
|
||||||
|
|
||||||
// iOS
|
|
||||||
class FileDialogWrapper {
|
|
||||||
public:
|
|
||||||
static std::string ShowOpenFileDialog();
|
|
||||||
static std::string ShowOpenFolderDialog();
|
|
||||||
static std::vector<std::string> GetSubdirectoriesInFolder(
|
|
||||||
const std::string& folder_path);
|
|
||||||
static std::vector<std::string> GetFilesInFolder(
|
|
||||||
const std::string& folder_path);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(__linux__)
|
|
||||||
|
|
||||||
class FileDialogWrapper {
|
|
||||||
public:
|
|
||||||
static std::string ShowOpenFileDialog() {
|
|
||||||
// Linux-specific file dialog implementation using GTK
|
|
||||||
// ...
|
|
||||||
return "file_path_linux";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "Unsupported platform."
|
#error "Unsupported platform."
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user