Rise
The Vieneo Province
Loading...
Searching...
No Matches
ExternalCameraDialogVisibility.h
Go to the documentation of this file.
1#pragma once
2
3// Context changes must not undo a user's close/minimize choice within an external view.
5{
6 bool wasExternal = false;
7 bool suppressed = false;
9
10public:
11 // Returns true when entering an external view, so the dialog can take focus.
12 bool Update(bool external, bool hideTemporarily, bool allMinimized, bool& active, bool& minimized)
13 {
14 const bool entering = external && !wasExternal;
15 if (!external)
16 {
17 active = minimized = false;
19 }
20 else if (entering)
21 {
22 active = !allMinimized;
23 minimized = allMinimized;
24 }
25 else if (suppressed && !hideTemporarily)
26 {
27 active = restoreAfterSuppression && !allMinimized;
28 if (restoreAfterSuppression && allMinimized) minimized = true;
29 }
30
31 if (external && hideTemporarily)
32 {
33 if (!suppressed || entering) restoreAfterSuppression = active;
34 active = false;
35 }
36 wasExternal = external;
37 suppressed = hideTemporarily;
38 return entering;
39 }
40};
bool Update(bool external, bool hideTemporarily, bool allMinimized, bool &active, bool &minimized)