120 {
121 if ((parent_ != nullptr) && (menu_bar)) {
122 if (is_check_box_entry_) {
123 sv->MenuItem(parent_->text_.c_str(), text_.c_str(), cmd_event_, toggle_value_);
124 } else {
125 sv->MenuItem(parent_->text_.c_str(), text_.c_str(), cmd_event_);
126 }
127 } else if ((parent_ != nullptr) && (!menu_bar)) {
128 if (description_.length() > 0) {
129 sv->PopupItem(parent_->text_.c_str(), text_.c_str(), cmd_event_, value_.c_str(),
130 description_.c_str());
131 } else {
132 sv->PopupItem(parent_->text_.c_str(), text_.c_str());
133 }
134 }
135 if (child_ != nullptr) {
137 delete child_;
138 }
139 if (next_ != nullptr) {
141 delete next_;
142 }
143}
void BuildMenu(ScrollView *sv, bool menu_bar=true)