gui.hpp 838 Bytes
Newer Older
1
2
3
4
5
6
7
// Copyright (c) 2020 INRA Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef ORG_VLEPROJECT_IRRITATOR_APP_GUI_2020
#define ORG_VLEPROJECT_IRRITATOR_APP_GUI_2020

8
9
#include <imgui.h>

10
11
12
13
namespace irt {

void
node_editor_initialize();
14

15
16
void
node_editor_show();
17

18
19
20
void
node_editor_shutdown();

21
22
23
24
25
26
27
28
struct window_logger
{
    ImGuiTextBuffer buffer;
    ImGuiTextFilter filter;
    ImVector<int> line_offsets;

    bool auto_scroll = true;
    bool scroll_to_bottom = false;
Gauthier Quesnel's avatar
Gauthier Quesnel committed
29
    window_logger() = default;
30
31
32
33
34
35
36
    void clear() noexcept;

    void log(const int level, const char* fmt, ...) IM_FMTARGS(3);
    void log(const int level, const char* fmt, va_list args) IM_FMTLIST(3);
    void show(bool* is_show);
};

37
38
} // namespace irt

39
#endif