MeVisLab Toolbox Reference
macWindow.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef MAC_WINDOW_H
14 #define MAC_WINDOW_H
15 
17 
18 #if defined(__APPLE__)
19 
21 
22 #ifndef MACOS_FORWARD_DECLARE_OBJC_CLASS
23 # ifdef __OBJC__
24 # define MACOS_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname
25 # else
26 # define MACOS_FORWARD_DECLARE_OBJC_CLASS(classname) class classname
27 # endif
28 #endif
29 
32 
33 namespace macos {
34 
37  {
38  public:
39 
41  static NSWindow *nsWindowFromNSView(NSView *view);
42 
44  static void nsWindowSetAllowsAutomaticWindowTabbing(bool trueOrFalse);
45 
46  typedef enum {
47  UndefinedWindowLevel = 0,
48  NormalWindowLevel = 1,
49  FloatingWindowLevel = 2,
50  PopUpMenuWindowLevel = 3
51  } WindowLevelType;
52 
54  static void nsWindowSetLevel(NSWindow *window, WindowLevelType level);
55 
57  static void nsWindowSetHasShadow(NSWindow *window, bool hasShadow = true);
58 
60  static void nsWindowSetCanGoFullScreen(NSWindow *window, bool trueOrFalse = true);
61 
63  static void nsWindowToggleFullScreen(NSWindow *window);
65  static void nsWindowEnterFullScreen(NSWindow *window);
67  static void nsWindowExitFullScreen(NSWindow *window);
69  static bool nsWindowIsFullScreen(NSWindow *window);
70 
72  static double nsWindowBackingScaleFactor(NSWindow *window);
73  };
74 
75 }
76 
77 #endif // __APPLE__
78 #endif // __macWindow_H
Window related functions.
Definition: macWindow.h:37
static void nsWindowSetHasShadow(NSWindow *window, bool hasShadow=true)
Specify whether the window has a shadow.
static bool nsWindowIsFullScreen(NSWindow *window)
Returns whether the window has fullscreen appearance (Mac OS X 10.7 and up)
static void nsWindowExitFullScreen(NSWindow *window)
Take the window out of fullscreen mode (Mac OS X 10.7 and up)
static void nsWindowSetLevel(NSWindow *window, WindowLevelType level)
Adjust the window level.
static double nsWindowBackingScaleFactor(NSWindow *window)
Return the backing scale factor (Mac OS X 10.7 and up)
static void nsWindowToggleFullScreen(NSWindow *window)
Take the window into or out of fullscreen mode (Mac OS X 10.7 and up)
static void nsWindowSetCanGoFullScreen(NSWindow *window, bool trueOrFalse=true)
Specify whether the window will have a fullscreen button in the upper right of its titlebar.
static void nsWindowEnterFullScreen(NSWindow *window)
Take the window into fullscreen mode (Mac OS X 10.7 and up)
static NSWindow * nsWindowFromNSView(NSView *view)
Return NSWindow pointer from NSView pointer.
static void nsWindowSetAllowsAutomaticWindowTabbing(bool trueOrFalse)
Allows automatic window tabbing when trueOrFalse is true (macOS 10.12 and up)
#define OSXSUPPORT_PUBLIC_API
Symbol visibility macros.
#define MACOS_FORWARD_DECLARE_OBJC_CLASS(classname)
Window related functions.
Definition: macWindow.h:26
AppleScript support.
MLCSO_EXPORT void level(CSO *cso)
Determines the normal and the center of gravity of the given CSO.