Dandelion
2.0.0
A light-weight 3D builder for educational usage
Toggle main menu visibility
载入中...
搜索中...
未找到
menubar.h
浏览该文件的文档.
1
#ifndef DANDELION_UI_MENUBAR_H
2
#define DANDELION_UI_MENUBAR_H
3
4
#include <functional>
5
6
#include "
../scene/scene.h
"
7
#include "
../utils/rendering.hpp
"
8
9
/*!
10
* \file ui/menubar.h
11
* \ingroup ui
12
*/
13
14
namespace
UI {
15
16
/*!
17
* \ingroup ui
18
* \~chinese
19
* \brief 菜单栏提供加载文件操作、调整日志级别等调试选项和一些帮助页面。
20
*/
21
class
Menubar
22
{
23
public
:
24
25
/*! \~chinese 菜单栏持有对调试选项的引用,构造时需要传递。 */
26
Menubar
(
DebugOptions
&
debug_options
);
27
~Menubar
();
28
/*! \~chinese 显示菜单栏。 */
29
void
render
(
Scene
& scene);
30
/*! \~chinese 当前菜单栏高度。 */
31
float
height
()
const
;
32
std::function<void()> reset_ui;
33
34
private
:
35
36
/*! \~chinese 调整全局日志输出级别的菜单。 */
37
void
logging_levels_menu
();
38
/*! \~chinese 显示 GUI 操作帮助的弹出窗口。 */
39
void
usage
();
40
/*! \~chinese 显示开发者信息的弹出窗口。 */
41
void
about
();
42
/*! \~chinese 控制调试选项的面板。 */
43
void
debug_options_panel
();
44
/*! \~chinese 当前菜单栏高度,每一帧调用 `render` 时更新。 */
45
float
menubar_height
;
46
/*! \~chinese 对调试选项的引用。 */
47
DebugOptions
&
debug_options
;
48
/*! \~chinese 用于在开发者信息页面显示 Logo 的 OpenGL 纹理描述符。 */
49
unsigned
int
gl_icon_texture
;
50
};
51
52
}
// namespace UI
53
54
#endif
// DANDELION_UI_MENUBAR_H
Scene
表示一个包含相机、光源、物体等对象的完整场景。
定义
scene.h:57
UI::Menubar::height
float height() const
定义
menubar.cpp:147
UI::Menubar::Menubar
Menubar(DebugOptions &debug_options)
定义
menubar.cpp:30
UI::Menubar::menubar_height
float menubar_height
定义
menubar.h:45
UI::Menubar::logging_levels_menu
void logging_levels_menu()
定义
menubar.cpp:152
UI::Menubar::render
void render(Scene &scene)
定义
menubar.cpp:50
UI::Menubar::about
void about()
定义
menubar.cpp:191
UI::Menubar::usage
void usage()
定义
menubar.cpp:175
UI::Menubar::debug_options_panel
void debug_options_panel()
定义
menubar.cpp:208
UI::Menubar::debug_options
DebugOptions & debug_options
定义
menubar.h:47
UI::Menubar::gl_icon_texture
unsigned int gl_icon_texture
定义
menubar.h:49
rendering.hpp
这个文件定义了一些和渲染(离线渲染或场景预览)相关的常量、枚举等。
scene.h
包含场景的类。
DebugOptions
辅助调试的 GUI 选项。
定义
rendering.hpp:94
src
ui
menubar.h
制作者
1.18.0