MCPcopy Create free account
hub / github.com/audacity/audacity / ShouldBeginGroup

Method ShouldBeginGroup

libraries/lib-menus/MenuRegistry.cpp:30–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30std::pair<bool, bool> detail::VisitorBase::ShouldBeginGroup(
31 const ItemProperties *pProperties)
32{
33 const auto properties =
34 pProperties ? pProperties->GetProperties() : ItemProperties::None;
35
36 bool inlined = false;
37 bool shouldDoSeparator = false;
38
39 switch (properties) {
40 case ItemProperties::Inline: {
41 inlined = true;
42 break;
43 }
44 case ItemProperties::Section: {
45 if (!needSeparator.empty())
46 needSeparator.back() = true;
47 break;
48 }
49 case ItemProperties::Whole:
50 case ItemProperties::Extension: {
51 shouldDoSeparator = ShouldDoSeparator();
52 break;
53 }
54 default:
55 break;
56 }
57
58 return { !inlined, shouldDoSeparator };
59}
60
61void detail::VisitorBase::AfterBeginGroup(
62 const ItemProperties *pProperties)

Callers

nothing calls this directly

Calls 2

GetPropertiesMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected