vvvv / VL.StandardLibs

A collection of standard libraries for vvvv including VL.Stride, VL.Skia, VL.ImGui, msgpack.org[VL]
https://visualprogramming.net
GNU Lesser General Public License v3.0
36 stars 14 forks source link

CollapsingHeader: IsVisible and IsOpen are BSubjects #46

Closed antongit closed 1 year ago

antongit commented 2 years ago

After today's demo, the CollapsingHeader got IsOpen BSubject in addition to its IsVisible.

@azeno would you please check the code here: https://github.com/vvvv/VL.ImGui/blob/main/src/VL.ImGui/Widgets/Tree/CollapsingHeader.cs

Here is the definition: https://github.com/ocornut/imgui/blob/873e9d35acb4d629a5ba06a312201edff8b9d0f6/imgui.h#L607

HowTo: HowTo Trees

azeno commented 2 years ago

Looks good, but why does it take many items? Should only be one Content input, no? Same for TabBar and probably some others. There should only be a few nodes which take many widgets.

antongit commented 2 years ago

The same goes for the TabItem. Its return value says if the Tab is selected (opened), its value says if the Tab is visible (at all) or closed (for example by pressing X).

antongit commented 1 year ago

CollapsingHeader: two Channels:

TabItem: two Channels:

For both: boolean outputs of the same name. Channels represent the state of the items, and not the commands.

SetNextItemOpen - should we call this for each item, or only for only those that are true ( = shall be Open)?