void frmMain::_onSaveMenu(wxRibbonButtonBarEvent& evt)
{
    wxMenu mnuPopup;
    mnuPopup.Append(wxID_SAVE, "Save");
    mnuPopup.Append(wxID_SAVEAS, "Save As");
    evt.PopupMenu(&mnuPopup);
}
Example #2
0
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);
}
Example #3
0
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);
}
Example #4
0
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);
}
Example #6
0
void MainFrame::OnAddElementDropdown(wxRibbonButtonBarEvent& event) { event.PopupMenu(m_addElementsMenu); }
Example #7
0
void MainFrame::OnRibbonSaveDropDownClicked(wxRibbonButtonBarEvent& evt)
{
    evt.PopupMenu(&saveContextMenu);
}
Example #8
0
void MainFrame::OnRibbonOpenDropDownClicked(wxRibbonButtonBarEvent& evt)
{
    evt.PopupMenu(&openContextMenu);
}
Example #9
0
void MainFrame::OnRibbonDecomposerDropDownClicked(wxRibbonButtonBarEvent& evt)
{
    evt.PopupMenu(&decomposerContextMenu);
}