VR-Vantage 3.2 API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvImgui
imgui_user.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2020 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
namespace
ImGui
13
{
14
15
IMGUI_API
void
PlotMultiLines
(
16
const
char
* label,
17
int
num_datas,
18
const
char
** names,
19
const
ImColor
* colors,
20
float
(*getter)(
const
void
*
data
,
int
idx),
21
const
void
*
const
* datas,
22
int
values_count,
23
int
values_offset,
24
float
scale_min,
25
float
scale_max,
26
ImVec2
graph_size,
27
const
bool
* labels = NULL);
28
29
IMGUI_API
void
PlotMultiHistograms
(
30
const
char
* label,
31
int
num_hists,
32
const
char
** names,
33
const
ImColor
* colors,
34
float
(*getter)(
const
void
*
data
,
int
idx),
35
const
void
*
const
* datas,
36
int
values_count,
37
float
scale_min,
38
float
scale_max,
39
ImVec2
graph_size);
40
41
// doesn't actually work yet
42
IMGUI_API
void
ItemRowsBackground
(
float
lineHeight = -1.0f,
const
ImColor
& color =
ImColor
(20, 20, 20, 64));
43
44
//TDG: I know this is ugly but it avoids the need to put a pop tree in the right spot at the bottom of the if statement
45
// open to suggestions on how to improve this but this was the best I could come up with.
46
// this macro creates a DtScopedTreeNode and runs through the for loop once. The only reason it is a for loop is
47
// so it can base the destructor on the result of the treeNode function return variable.
48
#define IF_IMGUI_SCOPED_TREE_NODE(label) for (ImGui::DtScopedTreeNode scopedNode(label); scopedNode.nodeActive(); scopedNode.setNodeActive(false))
49
#define IF_IMGUI_SCOPED_TREE_NODE_EX(label, flags) for (ImGui::DtScopedTreeNodeEx scopedNode(label, flags); scopedNode.nodeActive(); scopedNode.setNodeActive(false))
50
53
class
IMGUI_API
DtScopedTreeNode
54
{
55
public
:
57
DtScopedTreeNode
(
const
char
* label);
58
60
~
DtScopedTreeNode
();
61
63
bool
nodeActive();
64
66
void
setNodeActive(
bool
flag);
67
68
protected
:
69
70
bool
myNodeActive
;
71
bool
myNodeActiveOriginal
;
72
};
73
76
class
IMGUI_API
DtScopedTreeNodeEx
77
{
78
public
:
80
DtScopedTreeNodeEx
(
const
char
* label,
ImGuiTreeNodeFlags
flags);
81
83
~
DtScopedTreeNodeEx
();
84
86
bool
nodeActive();
87
89
void
setNodeActive(
bool
flag);
90
91
protected
:
92
93
bool
myNodeActive
;
94
bool
myNodeActiveOriginal
;
95
96
};
97
98
}
// namespace ImGui
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (
www.mak.com
)