Lagrange
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/api.h>
15#include <lagrange/ui/Entity.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 add_panel(Registry& r, const std::string& title, const std::function<void(void)>& body_fn);
40
41LA_UI_API Entity add_panel(
42 Registry& r,
43 const std::string& title,
44 const std::function<void(Registry&, Entity)>& body_fn,
45 const std::function<void(Registry&, Entity)>& before_fn = nullptr,
46 const std::function<void(Registry&, Entity)>& after_fn = nullptr,
47 const std::function<void(Registry&, Entity)>& menubar_fn = nullptr);
48
49
50LA_UI_API void toggle_panel(Registry& r, Entity e);
51
52
56LA_UI_API const WindowSize& get_window_size(const Registry& r);
57
58LA_UI_API MainMenuHeight get_menu_height(const Registry& r);
59
60
61LA_UI_API void hide_tab_bar(Registry& r, Entity uipanel_entity);
62
63
64} // namespace ui
65} // namespace lagrange
Lagrange UI Viewer and mini 3D engine.
Definition: AcceleratedPicking.h:22
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: AABBIGL.h:30