add changelog dialog and display_file api (implemented in osx and ios)

This commit is contained in:
2018-09-24 16:03:43 +02:00
parent c6f8bf7b9f
commit f1ff142d91
12 changed files with 152 additions and 3 deletions

View File

@@ -63,6 +63,26 @@ void App::pick_image(std::function<void(std::string path)> callback)
#endif
}
void App::display_file(std::string path)
{
#ifdef __IOS__
[ios_view display_file:path];
#elif __OSX__
[[NSWorkspace sharedWorkspace] openFile:[NSString stringWithUTF8String:path.c_str()]];
// dispatch_async(dispatch_get_main_queue(), ^{
// std::string path = [osx_view pick_file];
// if (!path.empty())
// callback(path);
// });
#elif __ANDROID__
//displayKeyboard(and_app, false);
#elif _WIN32
// std::string path = win32_open_file();
// if (!path.empty())
// callback(path);
#endif
}
bool App::mouse_down(int button, float x, float y, float pressure, kEventSource source)
{
redraw = true;