ui/cocoa/window.m

changeset 1175
1943f7411e50
parent 1174
8b8da1adef7d
child 1176
87a906a990e3
equal deleted inserted replaced
1174:8b8da1adef7d 1175:1943f7411e50
312 NSWindowStyleMaskClosable | 312 NSWindowStyleMaskClosable |
313 NSWindowStyleMaskResizable | 313 NSWindowStyleMaskResizable |
314 NSWindowStyleMaskUtilityWindow) 314 NSWindowStyleMaskUtilityWindow)
315 backing:NSBackingStoreBuffered 315 backing:NSBackingStoreBuffered
316 defer:NO]; 316 defer:NO];
317 NSWindowController *controller = [[NSWindowController alloc] initWithWindow:panel];
318 panel.windowController = controller;
317 panel.parent = (__bridge NSWindow*)parent->wobj; 319 panel.parent = (__bridge NSWindow*)parent->wobj;
318 panel.obj = obj; 320 panel.obj = obj;
319 panel.modal = args->modal; 321 panel.modal = args->modal;
320 panel.onclick = args->onclick; 322 panel.onclick = args->onclick;
321 panel.onclickdata = args->onclickdata; 323 panel.onclickdata = args->onclickdata;
322 [panel center]; 324 [panel center];
323 [[WindowManager sharedWindowManager] addWindow:panel]; 325 [[WindowManager sharedWindowManager] addWindow:controller];
324 obj->wobj = (__bridge void*)panel; 326 obj->wobj = (__bridge void*)panel;
325 327
326 NSView *content = panel.contentView; 328 NSView *content = panel.contentView;
327 329
328 // Create a view for the dialog window buttons (lbutton1, lbutton2, rbutton3, rbutton4) 330 // Create a view for the dialog window buttons (lbutton1, lbutton2, rbutton3, rbutton4)

mercurial