VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
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 
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 
54  {
55  public:
57  DtScopedTreeNode(const char* label);
58 
61 
63  bool nodeActive();
64 
66  void setNodeActive(bool flag);
67 
68  protected:
69 
72  };
73 
77  {
78  public:
80  DtScopedTreeNodeEx(const char* label, ImGuiTreeNodeFlags flags);
81 
84 
86  bool nodeActive();
87 
89  void setNodeActive(bool flag);
90 
91  protected:
92 
95 
96  };
97 
98 } // namespace ImGui
bool myNodeActive
Definition: imgui_user.h:93
IMGUI_API void PlotMultiHistograms(const char *label, int num_hists, const char **names, const ImColor *colors, float(*getter)(const void *data, int idx), const void *const *datas, int values_count, float scale_min, float scale_max, ImVec2 graph_size)
IMGUI_API void ItemRowsBackground(float lineHeight=-1.0f, const ImColor &color=ImColor(20, 20, 20, 64))
class for scoping an imgui tree node should only be used with the macro above.
Definition: imgui_user.h:53
Definition: imgui.h:262
#define IMGUI_API
Definition: imgui.h:78
bool myNodeActiveOriginal
Definition: imgui_user.h:71
class for scoping an imgui tree node should only be used with the macro above.
Definition: imgui_user.h:76
bool myNodeActiveOriginal
Definition: imgui_user.h:94
IMGUI_API void PlotMultiLines(const char *label, int num_datas, const char **names, const ImColor *colors, float(*getter)(const void *data, int idx), const void *const *datas, int values_count, int values_offset, float scale_min, float scale_max, ImVec2 graph_size, const bool *labels=NULL)
Definition: imgui.h:2243
bool myNodeActive
Definition: imgui_user.h:70

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)