openshot-audio  0.1.7
juce_TopLevelWindow.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_TOPLEVELWINDOW_H_INCLUDED
26 #define JUCE_TOPLEVELWINDOW_H_INCLUDED
27 
28 
29 //==============================================================================
52 {
53 public:
54  //==============================================================================
61  TopLevelWindow (const String& name, bool addToDesktop);
62 
64  ~TopLevelWindow();
65 
66  //==============================================================================
75  bool isActiveWindow() const noexcept { return isCurrentlyActive; }
76 
77  //==============================================================================
89  void centreAroundComponent (Component* componentToCentreAround,
90  int width, int height);
91 
92  //==============================================================================
94  void setDropShadowEnabled (bool useShadow);
95 
97  bool isDropShadowEnabled() const noexcept { return useDropShadow; }
98 
102  void setUsingNativeTitleBar (bool useNativeTitleBar);
103 
107  bool isUsingNativeTitleBar() const noexcept;
108 
109  //==============================================================================
113  static int getNumTopLevelWindows() noexcept;
114 
118  static TopLevelWindow* getTopLevelWindow (int index) noexcept;
119 
123  static TopLevelWindow* getActiveTopLevelWindow() noexcept;
124 
126  void addToDesktop();
127 
128  //==============================================================================
130  void addToDesktop (int windowStyleFlags, void* nativeWindowToAttachTo = nullptr) override;
131 
132 protected:
133  //==============================================================================
137  virtual void activeWindowStatusChanged();
138 
139 
140  //==============================================================================
144  void parentHierarchyChanged() override;
146  virtual int getDesktopWindowStyleFlags() const;
148  void recreateDesktopWindow();
150  void visibilityChanged() override;
151 
152 private:
153  friend class TopLevelWindowManager;
154  friend class ResizableWindow;
155  bool useDropShadow, useNativeTitleBar, isCurrentlyActive;
157 
158  void setWindowActive (bool);
159 
161 };
162 
163 
164 #endif // JUCE_TOPLEVELWINDOW_H_INCLUDED
Definition: juce_ResizableWindow.h:49
bool isDropShadowEnabled() const noexcept
Definition: juce_TopLevelWindow.h:97
#define noexcept
Definition: juce_CompilerSupport.h:141
virtual void addToDesktop(int windowStyleFlags, void *nativeWindowToAttachTo=nullptr)
Definition: juce_Component.cpp:594
FocusChangeType
Definition: juce_Component.h:1702
Definition: juce_TopLevelWindow.h:51
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_TopLevelWindow.cpp:26
Definition: juce_Component.h:33
virtual void parentHierarchyChanged()
Definition: juce_Component.cpp:1646
virtual void focusOfChildComponentChanged(FocusChangeType cause)
Definition: juce_Component.cpp:2656
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
bool isActiveWindow() const noexcept
Definition: juce_TopLevelWindow.h:75
virtual void visibilityChanged()
Definition: juce_Component.cpp:559