void frmMain::_onSaveMenu(wxRibbonButtonBarEvent& evt) { wxMenu mnuPopup; mnuPopup.Append(wxID_SAVE, "Save"); mnuPopup.Append(wxID_SAVEAS, "Save As"); evt.PopupMenu(&mnuPopup); }
void MyFrame::OnTriangleDropdown(wxRibbonButtonBarEvent& evt) { wxMenu menu; menu.Append(wxID_ANY, wxT("Equilateral")); menu.Append(wxID_ANY, wxT("Isosceles")); menu.Append(wxID_ANY, wxT("Scalene")); evt.PopupMenu(&menu); }
void MyFrame::OnPolygonDropdown(wxRibbonButtonBarEvent& evt) { wxMenu menu; menu.Append(wxID_ANY, wxT("Pentagon (5 sided)")); menu.Append(wxID_ANY, wxT("Hexagon (6 sided)")); menu.Append(wxID_ANY, wxT("Heptagon (7 sided)")); menu.Append(wxID_ANY, wxT("Octogon (8 sided)")); menu.Append(wxID_ANY, wxT("Nonagon (9 sided)")); menu.Append(wxID_ANY, wxT("Decagon (10 sided)")); evt.PopupMenu(&menu); }
static void OnOpenDropdown(wxRibbonButtonBarEvent& evt) { wxMenu menu; int recent_id = ID_RECENT_FIRST; for (std::list< wxString >::iterator It = wxGetApp().m_recent_files.begin(); It != wxGetApp().m_recent_files.end() && recent_id < ID_RECENT_FIRST + MAX_RECENT_FILES; It++, recent_id++) { wxString& filepath = *It; menu.Append(recent_id, filepath, filepath); } evt.PopupMenu(&menu); }
void DiffSideBySidePanel::OnCopyRightToLeftMenu(wxRibbonButtonBarEvent& event) { size_t flags = m_config.GetFlags(); bool copyAndMove = flags & DiffConfig::kCopyRightToLeftAndMove; wxMenu menu; menu.Append(ID_COPY_RIGHT_TO_LEFT, _("Copy to the left"), wxEmptyString, wxITEM_RADIO); menu.Check(ID_COPY_RIGHT_TO_LEFT, !copyAndMove); menu.Append( ID_COPY_RIGHT_TO_LEFT_AND_MOVE, _("Copy to the left and move to the next diff"), wxEmptyString, wxITEM_RADIO); menu.Check(ID_COPY_RIGHT_TO_LEFT_AND_MOVE, copyAndMove); event.PopupMenu(&menu); }
void MainFrame::OnAddElementDropdown(wxRibbonButtonBarEvent& event) { event.PopupMenu(m_addElementsMenu); }
void MainFrame::OnRibbonSaveDropDownClicked(wxRibbonButtonBarEvent& evt) { evt.PopupMenu(&saveContextMenu); }
void MainFrame::OnRibbonOpenDropDownClicked(wxRibbonButtonBarEvent& evt) { evt.PopupMenu(&openContextMenu); }
void MainFrame::OnRibbonDecomposerDropDownClicked(wxRibbonButtonBarEvent& evt) { evt.PopupMenu(&decomposerContextMenu); }