Beispiel #1
0
void HeeksRibbon::OnExternalBarButton(wxRibbonButtonBarEvent& event)
{
	RibbonButtonData* data = GetRibbonButtonData(event.GetId());
	if (data)
	{
		(*(data->m_on_button))(event);
		event.Skip();
	}
}
void frmMain::_onSaveMenu(wxRibbonButtonBarEvent& evt)
{
    wxMenu mnuPopup;
    mnuPopup.Append(wxID_SAVE, "Save");
    mnuPopup.Append(wxID_SAVEAS, "Save As");
    evt.PopupMenu(&mnuPopup);
}
Beispiel #3
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);
}
Beispiel #4
0
void HeeksRibbon::OnBarButtonDropDown(wxRibbonButtonBarEvent& event)
{
	RibbonButtonData* data = GetRibbonButtonData(event.GetId());

	if (data && data->m_on_dropdown)
	{
		(*(data->m_on_dropdown))(event);
	}
}
Beispiel #5
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);
}
void frmMain::_onViewParcels(wxRibbonButtonBarEvent& evt)
{
    m_bViewParcels = evt.IsChecked();
    _applyViewOverlay();
    m_pGamePanel->Refresh();

    if(evt.IsChecked())
    {
        wxRibbonPanel* pParcelPanel = new wxRibbonPanel(m_pHomePage,
            ID_PARCEL_PANEL, L"Parcels");
        wxRibbonGallery* pParcelGallery = new wxRibbonGallery(pParcelPanel,
            ID_GALLERY_PARCELS);
        _populateParcelGallery(pParcelGallery);
    }
    else
    {
        wxWindow* pParcelPanel = m_pHomePage->FindWindow(ID_PARCEL_PANEL);
        if(pParcelPanel)
            pParcelPanel->Destroy();
    }
    m_pRibbon->Realize();
}
Beispiel #7
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);
}
Beispiel #9
0
void MainFrame::OnAddElementDropdown(wxRibbonButtonBarEvent& event) { event.PopupMenu(m_addElementsMenu); }
Beispiel #10
0
void MainFrame::OnRibbonSaveDropDownClicked(wxRibbonButtonBarEvent& evt)
{
    evt.PopupMenu(&saveContextMenu);
}
Beispiel #11
0
void MainFrame::OnRibbonOpenDropDownClicked(wxRibbonButtonBarEvent& evt)
{
    evt.PopupMenu(&openContextMenu);
}
Beispiel #12
0
void MainFrame::OnRibbonDecomposerDropDownClicked(wxRibbonButtonBarEvent& evt)
{
    evt.PopupMenu(&decomposerContextMenu);
}
void frmMain::_onViewFlags(wxRibbonButtonBarEvent& evt)
{
    m_bViewFlags = evt.IsChecked();
    _applyViewOverlay();
    m_pGamePanel->Refresh();
}
Beispiel #14
0
	void OnRibbonButtonClick(wxRibbonButtonBarEvent& evt)
	{
		evt.SetEventType(wxEVT_COMMAND_BUTTON_CLICKED);
		evt.Skip();
	}
Beispiel #15
0
	void OnRibbonButtonDropdown(wxRibbonButtonBarEvent& evt)
	{
		evt.SetEventType(AppData::current().evt_user_dropdown_menu);
		AppData::current().popup_dropdown_menu.bind(&ICtl_ribbon_buttonbar::EvtPopupMenu, _1, _2, &evt);
		evt.Skip();
	}