forked from pthom/hello_imgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimgui_window_params.h
76 lines (59 loc) · 2.57 KB
/
imgui_window_params.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#pragma once
#include "imgui.h"
#include <functional>
namespace HelloImGui
{
/**
@@md#DefaultImGuiWindowType
__DefaultImGuiWindowType__ is an enum class that defines whether or not a full screen background window is provided.
Values:
* _ProvideFullScreenWindow_: a full window is provided in the background
* _ProvideFullScreenDockSpace_: a full screen dockspace is provided in the background
* _NoDefaultWindow_: No default window is provided (except for ImGui's default "debug" window)
@@md
*/
enum class DefaultImGuiWindowType
{
ProvideFullScreenWindow,
ProvideFullScreenDockSpace,
NoDefaultWindow
};
/**
@@md#ImGuiWindowParams
__ImGuiWindowParams__ is a struct that defines the ImGui inner windows params
These settings affect the imgui inner windows inside the application window.
In order to change the application window settings, change the _AppWindowsParams_
Members:
* `defaultImGuiWindowType`: _DefaultImGuiWindowType, default=ProvideFullScreenWindow_.
By default, a full window is provided in the background. You can still
add windows on top of it, since the Z-order of this background window is always behind
* `backgroundColor`: _ImVec4, default=ImVec4(0.45f, 0.55f, 0.60f, 1.00f)_.
This is the "clearColor", only visible is defaultImGuiWindowType is NoDefaultWindow.
* `showMenuBar`: _bool, default=false_.
Show Menu bar on top of imgui main window
You can customize the menu via `RunnerCallbacks.ShowMenus()`
* `showMenu_App`: _bool, default=true_.
If menu bar is shown, include or not the default app menu (with Quit button)
* `showMenu_View`: _bool, default=true_.
If menu bar is shown, include or not the default _View_ menu, that enables to change the layout and
set the docked windows and status bar visibility)
* `showStatusBar`: _bool, default=false_.
Flag that enable to show a Status bar at the bottom. You can customize the status bar
via RunnerCallbacks.ShowStatus()
* `showStatus_Fps`: _bool, default=true_. If set, display the FPS in the status bar.
* `configWindowsMoveFromTitleBarOnly`: _bool, default=true_.
Make windows only movable from the title bar
@@md
*/
struct ImGuiWindowParams
{
DefaultImGuiWindowType defaultImGuiWindowType = DefaultImGuiWindowType::ProvideFullScreenWindow;
ImVec4 backgroundColor = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
bool showMenuBar = false;
bool showMenu_App = true;
bool showMenu_View = true;
bool showStatusBar = false;
bool showStatus_Fps = true;
bool configWindowsMoveFromTitleBarOnly = true;
};
} // namespace HelloImGui