conditional os in UI xml, add system dialog file open on osx, check api format or error message when opening a document, per-char text wrap on NodeText, additional info on create doc dialog like working path

This commit is contained in:
2018-10-06 14:20:07 +02:00
parent 5baa807cce
commit 739784b0d1
23 changed files with 161 additions and 63 deletions

View File

@@ -38,15 +38,15 @@ std::mutex task_mutex;
{
[[NSApplication sharedApplication] terminate:nil];
}
- (std::string)pick_file
- (std::string)pick_file:(NSArray<NSString*>*)types
{
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setCanChooseFiles:YES];
[panel setCanChooseDirectories:NO];
[panel setAllowsMultipleSelection:NO]; // yes if more than one dir is allowed
NSArray* fileTypes = [NSArray arrayWithObjects:@"png", @"PNG", @"jpg", @"JPG", @"jpeg", nil];
[panel setAllowedFileTypes:fileTypes];
//NSArray* fileTypes = [NSArray arrayWithObjects:@"png", @"PNG", @"jpg", @"JPG", @"jpeg", nil];
[panel setAllowedFileTypes:types];
NSInteger clicked = [panel runModal];

View File

@@ -22,5 +22,5 @@
- (void)async_lock;
- (void)async_unlock;
- (void)async_swap;
- (std::string)pick_file;
- (std::string)pick_file:(NSArray<NSString*>*)types;
@end