Lagrange
Loading...
Searching...
No Matches
uipanel.h
1/*
2 * Copyright 2021 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/ui/Entity.h>
15#include <lagrange/ui/api.h>
16#include <lagrange/ui/components/UIPanel.h>
17#include <lagrange/ui/types/Systems.h>
18
19#include <imgui.h>
20
21#include <typeindex>
22#include <typeinfo>
23#include <unordered_map>
24
25namespace lagrange {
26namespace ui {
27
28
29LA_UI_API bool begin_panel(UIPanel& panel);
30LA_UI_API void end_panel(UIPanel& panel);
31
32
39LA_UI_API Entity
40add_panel(Registry& r, const std::string& title, const std::function<void(void)>& body_fn);
41
42LA_UI_API Entity add_panel(
43 Registry& r,
44 const std::string& title,
45 const std::function<void(Registry&, Entity)>& body_fn,
46 const std::function<void(Registry&, Entity)>& before_fn = nullptr,
47 const std::function<void(Registry&, Entity)>& after_fn = nullptr,
48 const std::function<void(Registry&, Entity)>& menubar_fn = nullptr);
49
50
51LA_UI_API void toggle_panel(Registry& r, Entity e);
52
53
57LA_UI_API const WindowSize& get_window_size(const Registry& r);
58
59LA_UI_API MainMenuHeight get_menu_height(const Registry& r);
60
61
62LA_UI_API void hide_tab_bar(Registry& r, Entity uipanel_entity);
63
64
65} // namespace ui
66} // namespace lagrange
Lagrange UI Viewer and mini 3D engine.
Definition AcceleratedPicking.h:23
LA_UI_API Entity add_panel(Registry &r, const std::string &title, const std::function< void(void)> &body_fn)
Adds window that executed given imgui_code.
Definition uipanel.cpp:89
LA_UI_API const WindowSize & get_window_size(const Registry &r)
Returns global window size.
Definition uipanel.cpp:151
Main namespace for Lagrange.
Definition UIPanel.h:77
Definition UIPanel.h:26
Definition UIPanel.h:87