ShortcutPanel The ShortcutPanel component was donated to wxCode by Jonatan Magnusson of Phoenix Data. It provides a control similar to the one in MS Outlook.

Screenshots:

Linux Win32
Screenshot under Linux Screenshot under Win32

Usage:

  1. Create a ShortcutPanel
  2. Add groups to the panel with the function ShortcutPanel::AddGroup
  3. Add shortcuts to the group with the function ShortcutBar::AddShortcut
Here is a code snippet from the sample to illustrate

 ShortcutPanel* pShortCutBar = new ShortcutPanel(pSplitter, -1, wxDefaultPosition, wxSize(100, 400));
 pSplitter->SplitVertically(pShortCutBar, pPanel, 150);
 
 pShortCutBar->AddGroup(_("First"));
 pShortCutBar->AddGroup(_("Second"));
 pShortCutBar->AddGroup(_("Third"));
 
 int FirstGroupId = pShortCutBar->FindGroup(_("First"));
 int SecondGroupId = pShortCutBar->FindGroup(_("Second"));
 int ThirdGroupId = pShortCutBar->FindGroup(_("Third"));
 
 wxBitmap* pBitmapOne = new wxBitmap(one_xpm);
 wxBitmap* pBitmapTwo = new wxBitmap(exit_xpm);
 wxBitmap* pBitmapThree = new wxBitmap(three_xpm);
 wxBitmap* pBitmapFour = new wxBitmap(four_xpm);
 
 pShortCutBar->AddShortcut(FirstGroupId, new Shortcut(ID_CMD_ONE, wxString(_("One")), *pBitmapOne));
 pShortCutBar->AddShortcut(FirstGroupId, new Shortcut(wxID_EXIT, wxString(_("Exit")), *pBitmapTwo));
 pShortCutBar->AddShortcut(FirstGroupId, new Shortcut(ID_CMD_THREE, wxString(_("Three")), *pBitmapThree));
 pShortCutBar->AddShortcut(SecondGroupId, new Shortcut(ID_CMD_FOUR, wxString(_("Four")), *pBitmapFour));
 
 delete pBitmapOne;
 delete pBitmapTwo;
 delete pBitmapThree;
 delete pBitmapFour;

Limitation