Logo ROOT  
Reference Guide
ROOTApplicationDelegate.mm
Go to the documentation of this file.
2 #include "TApplication.h"
3 
4 @implementation ROOTApplicationDelegate
5 
6 //______________________________________________________________________________
7 - (id) init
8 {
9  if (self = [super init])
10  [[NSApplication sharedApplication] setDelegate : self];
11 
12  return self;
13 }
14 
15 //______________________________________________________________________________
16 - (void) dealloc
17 {
18  [NSApp setDelegate : nil];//?
19  [super dealloc];
20 }
21 
22 
23 //NSApplicationDelegate.
24 
25 //______________________________________________________________________________
26 - (void) applicationWillResignActive : (NSNotification *) aNotification
27 {
28  //Popup windows, menus, color-selectors, etc. - they all have
29  //a problem: due to some reason, Cocoa changes the z-stack order
30  //of such a window while switching between applications (using alt-tab, for example).
31  //This leads to a very annoying effect: you open a menu, alt-tab,
32  //alt-tab back and ... popup or menu is now behind the main window.
33  //I have to save/restore this z-stack order here.
34 
35  //Popups were fixed using transient hint, noop now
36 #pragma unused(aNotification)
37 }
38 
39 //______________________________________________________________________________
40 - (void) applicationDidBecomeActive : (NSNotification *) aNotification
41 {
42  //Popup windows, menus, color-selectors, etc. - they all have
43  //a problem: due to some reason, Cocoa changes the z-stack order
44  //of such a window while switching between applications (using alt-tab, for example).
45  //This leads to a very annoying effect: you open a menu, alt-tab,
46  //alt-tab back and ... popup or menu is now behind the main window.
47  //I have to save/restore this z-stack order here.
48 
49  //Popups were fixed using transient hint, noop now.
50 #pragma unused(aNotification)
51 }
52 
53 //______________________________________________________________________________
54 - (void) quitROOT
55 {
57 }
58 
59 //______________________________________________________________________________
60 - (NSApplicationTerminateReply) applicationShouldTerminate : (NSApplication *) sender
61 {
62 #pragma unused(sender)
63  [self performSelector : @selector(quitROOT) withObject : nil afterDelay : 0.1];
64  return NSTerminateCancel;
65 }
66 
67 @end
BatchHelpers::init
EvaluateInfo init(std::vector< RooRealProxy > parameters, std::vector< ArrayWrapper * > wrappers, std::vector< double * > arrays, size_t begin, size_t batchSize)
ROOTApplicationDelegate.h
id
XFontStruct * id
Definition: TGX11.cxx:109
TApplication.h
gApplication
R__EXTERN TApplication * gApplication
Definition: TApplication.h:166
TApplication::Terminate
virtual void Terminate(Int_t status=0)
void
typedef void((*Func_t)())
ROOTApplicationDelegate
Definition: ROOTApplicationDelegate.h:6