MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / construct

Method construct

radiant/ui/menu/MenuSeparator.cpp:28–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void MenuSeparator::construct()
29{
30 _needsRefresh = false;
31
32 if (_separator != nullptr)
33 {
34 MenuElement::constructChildren();
35 return;
36 }
37
38 if (isVisible())
39 {
40 // Get the parent menu
41 MenuElementPtr parent = getParent();
42
43 if (!parent || !std::dynamic_pointer_cast<MenuFolder>(parent))
44 {
45 rWarning() << "Cannot construct separator without a parent menu" << std::endl;
46 return;
47 }
48
49 wxMenu* menu = std::static_pointer_cast<MenuFolder>(parent)->getMenu();
50
51 int pos = parent->getMenuPosition(shared_from_this());
52 _separator = menu->InsertSeparator(pos);
53 }
54
55 MenuElement::constructChildren();
56}
57
58void MenuSeparator::deconstruct()
59{

Callers

nothing calls this directly

Calls 3

rWarningFunction · 0.85
getMenuMethod · 0.80
getMenuPositionMethod · 0.80

Tested by

no test coverage detected