Audacity  2.2.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
KeyConfigPrefs Class Referencefinal

A PrefsPanel for keybindings. More...

#include <KeyConfigPrefs.h>

Inheritance diagram for KeyConfigPrefs:
PrefsPanel wxPanelWrapper wxTabTraversalWrapper< wxPanel >

Public Member Functions

 KeyConfigPrefs (wxWindow *parent, wxWindowID winid, const wxString &name)
 
bool Commit () override
 
void Cancel () override
 
wxString HelpPageName () override
 
void PopulateOrExchange (ShuttleGui &S) override
 
- Public Member Functions inherited from PrefsPanel
 PrefsPanel (wxWindow *parent, wxWindowID winid, const wxString &title)
 
virtual ~PrefsPanel ()
 
virtual void Preview ()
 
virtual bool ShowsPreviewButton ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
- Public Member Functions inherited from wxPanelWrapper
 wxPanelWrapper ()
 
 wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const wxString &name=_("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const wxString &name=_("Panel"))
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&...args)
 

Private Member Functions

void Populate ()
 
void RefreshBindings (bool bSort)
 
void FilterKeys (std::vector< NormalizedKeyString > &arr)
 
wxString NameFromKey (const NormalizedKeyString &key)
 
void SetKeyForSelected (const NormalizedKeyString &key)
 
void OnViewBy (wxCommandEvent &e)
 
void OnDefaults (wxCommandEvent &e)
 
void OnImportDefaults (wxCommandEvent &e)
 
void OnImport (wxCommandEvent &e)
 
void OnExport (wxCommandEvent &e)
 
void OnSet (wxCommandEvent &e)
 
void OnClear (wxCommandEvent &e)
 
void OnSelected (wxCommandEvent &e)
 
void OnHotkeyKeyDown (wxKeyEvent &e)
 
void OnHotkeyChar (wxKeyEvent &e)
 
void OnHotkeyKillFocus (wxFocusEvent &e)
 
void OnFilterTimer (wxTimerEvent &e)
 
void OnFilterKeyDown (wxKeyEvent &e)
 
void OnFilterChar (wxKeyEvent &e)
 

Private Attributes

KeyViewmView
 
wxTextCtrl * mKey
 
wxButton * mSet
 
wxButton * mClear
 
wxTextCtrl * mFilter
 
wxStaticText * mFilterLabel
 
wxTimer mFilterTimer
 
bool mFilterPending
 
ViewByType mViewType
 
wxRadioButton * mViewByTree
 
wxRadioButton * mViewByName
 
wxRadioButton * mViewByKey
 
CommandManagermManager
 
int mCommandSelected
 
wxArrayString mNames
 
std::vector< NormalizedKeyStringmDefaultKeys
 
std::vector< NormalizedKeyStringmStandardDefaultKeys
 
std::vector< NormalizedKeyStringmKeys
 
std::vector< NormalizedKeyStringmNewKeys
 

Detailed Description

A PrefsPanel for keybindings.

The code for displaying keybindings is similar to code in MousePrefs. It would be nice to create a NEW 'Bindings' class which both KeyConfigPrefs and MousePrefs use.

Definition at line 36 of file KeyConfigPrefs.h.

Constructor & Destructor Documentation

KeyConfigPrefs::KeyConfigPrefs ( wxWindow *  parent,
wxWindowID  winid,
const wxString &  name 
)

Definition at line 79 of file KeyConfigPrefs.cpp.

References name.

82 : PrefsPanel(parent, winid, _("Keyboard")),
83  mView(NULL),
84  mKey(NULL),
85  mFilter(NULL),
87  mFilterPending(false)
88 {
89  Populate();
90  if (!name.empty()) {
91  auto index = mView->GetIndexByName(name);
92  mView->SelectNode(index);
93  }
94 }
#define FilterTimerID
void SelectNode(int index)
Definition: KeyView.cpp:987
wxTextCtrl * mKey
wxTextCtrl * mFilter
PrefsPanel(wxWindow *parent, wxWindowID winid, const wxString &title)
Definition: PrefsPanel.h:48
KeyView * mView
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
int GetIndexByName(const wxString &name) const
Definition: KeyView.cpp:145
const wxChar * name
Definition: Distortion.cpp:94
wxTimer mFilterTimer

Member Function Documentation

void KeyConfigPrefs::Cancel ( )
overridevirtual

Reimplemented from PrefsPanel.

Definition at line 661 of file KeyConfigPrefs.cpp.

References mKeys, mManager, mNames, and CommandManager::SetKeyFromIndex().

662 {
663  // Restore original key values
664  for (size_t i = 0; i < mNames.GetCount(); i++) {
666  }
667 
668  return;
669 }
CommandManager * mManager
void SetKeyFromIndex(int i, const NormalizedKeyString &key)
wxArrayString mNames
std::vector< NormalizedKeyString > mKeys
bool KeyConfigPrefs::Commit ( )
overridevirtual

Implements PrefsPanel.

Definition at line 623 of file KeyConfigPrefs.cpp.

References eIsSavingToPrefs, GetActiveProject(), gPrefs, mDefaultKeys, mNames, mNewKeys, mStandardDefaultKeys, name, and PopulateOrExchange().

624 {
625  // On the Mac, preferences may be changed without any active
626  // projects. This means that the CommandManager isn't availabe
627  // either. So we can't attempt to save preferences, otherwise
628  // NULL ptr dereferences will happen in ShuttleGui because the
629  // radio buttons are never created. (See Populate() above.)
630  if (!GetActiveProject()) {
631  return true;
632  }
633 
634  ShuttleGui S(this, eIsSavingToPrefs);
636 
637  bool bFull = gPrefs->ReadBool(wxT("/GUI/Shortcuts/FullDefaults"), false);
638  for (size_t i = 0; i < mNames.GetCount(); i++) {
639  const auto &dkey = bFull ? mDefaultKeys[i] : mStandardDefaultKeys[i];
640  wxString name = wxT("/NewKeys/") + mNames[i];
641  const auto &key = mNewKeys[i];
642 
643  if (gPrefs->HasEntry(name)) {
644  if (key != NormalizedKeyString{ gPrefs->Read(name, key.Raw()) } ) {
645  gPrefs->Write(name, key.Raw());
646  }
647  if (key == dkey) {
648  gPrefs->DeleteEntry(name);
649  }
650  }
651  else {
652  if (key != dkey) {
653  gPrefs->Write(name, key.Raw());
654  }
655  }
656  }
657 
658  return gPrefs->Flush();
659 }
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
std::vector< NormalizedKeyString > mStandardDefaultKeys
std::vector< NormalizedKeyString > mNewKeys
void PopulateOrExchange(ShuttleGui &S) override
wxArrayString mNames
const wxChar * name
Definition: Distortion.cpp:94
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:308
std::vector< NormalizedKeyString > mDefaultKeys
void KeyConfigPrefs::FilterKeys ( std::vector< NormalizedKeyString > &  arr)
private

Definition at line 379 of file KeyConfigPrefs.cpp.

References CommandManager::ExcludedList().

Referenced by OnImportDefaults(), and RefreshBindings().

380 {
381  const auto &MaxListOnly = CommandManager::ExcludedList();
382 
383  // Remove items that are in MaxList.
384  for (size_t i = 0; i < arr.size(); i++) {
385  if( std::binary_search(MaxListOnly.begin(), MaxListOnly.end(), arr[i]) )
386  arr[i] = {};
387  }
388 }
static const std::vector< NormalizedKeyString > & ExcludedList()
wxString KeyConfigPrefs::HelpPageName ( )
overridevirtual

Reimplemented from PrefsPanel.

Definition at line 671 of file KeyConfigPrefs.cpp.

672 {
673  return "Keyboard_Preferences";
674 }
wxString KeyConfigPrefs::NameFromKey ( const NormalizedKeyString key)
private

Definition at line 504 of file KeyConfigPrefs.cpp.

References KeyView::GetNameByKey(), and mView.

505 {
506  return mView->GetNameByKey(key);
507 }
wxString GetNameByKey(const NormalizedKeyString &key) const
Definition: KeyView.cpp:181
KeyView * mView
void KeyConfigPrefs::OnClear ( wxCommandEvent &  e)
private

Definition at line 573 of file KeyConfigPrefs.cpp.

References mCommandSelected, mKey, and SetKeyForSelected().

574 {
575  mKey->Clear();
576 
577  if (mCommandSelected != wxNOT_FOUND) {
578  SetKeyForSelected({});
579  }
580 }
wxTextCtrl * mKey
void SetKeyForSelected(const NormalizedKeyString &key)
void KeyConfigPrefs::OnDefaults ( wxCommandEvent &  e)
private

Definition at line 369 of file KeyConfigPrefs.cpp.

References _(), and OnImportDefaults().

370 {
371  wxMenu Menu;
372  Menu.Append( 1, _("Standard") );
373  Menu.Append( 2, _("Full") );
374  Menu.Bind( wxEVT_COMMAND_MENU_SELECTED, &KeyConfigPrefs::OnImportDefaults, this );
375  // Pop it up where the mouse is.
376  PopupMenu(&Menu);//, wxPoint(0, 0));
377 }
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
void OnImportDefaults(wxCommandEvent &e)
void KeyConfigPrefs::OnExport ( wxCommandEvent &  e)
private

Definition at line 341 of file KeyConfigPrefs.cpp.

References _(), FileNames::Export, GuardedCall(), mManager, FileNames::SelectFile(), and CommandManager::WriteXML().

342 {
343  wxString file = wxT("Audacity-keys.xml");
344 
346  _("Export Keyboard Shortcuts As:"),
347  wxEmptyString,
348  file,
349  wxT("xml"),
350  _("XML files (*.xml)|*.xml|All files|*"),
351  wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
352  this);
353 
354  if (!file) {
355  return;
356  }
357 
358  GuardedCall( [&] {
359  XMLFileWriter prefFile{ file, _("Error Exporting Keyboard Shortcuts") };
360  mManager->WriteXML(prefFile);
361  prefFile.Commit();
362  } );
363 }
CommandManager * mManager
void WriteXML(XMLWriter &xmlFile) const
Wrapper to output XML data to files.
Definition: XMLWriter.h:74
R GuardedCall(const F1 &body, const F2 &handler=F2::Default(), const F3 &delayedHandler={})
static wxString SelectFile(Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
Definition: FileNames.cpp:411
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
void KeyConfigPrefs::OnFilterChar ( wxKeyEvent &  e)
private

Definition at line 494 of file KeyConfigPrefs.cpp.

References mViewType, and ViewByKey.

Referenced by PopulateOrExchange().

495 {
496  if (mViewType != ViewByKey)
497  {
498  e.Skip();
499  }
500 }
ViewByType mViewType
void KeyConfigPrefs::OnFilterKeyDown ( wxKeyEvent &  e)
private

Definition at line 452 of file KeyConfigPrefs.cpp.

References NormalizedKeyString::Display(), KeyEventToKeyString(), mFilterPending, mFilterTimer, mView, mViewType, KeyView::SetFilter(), and ViewByKey.

Referenced by PopulateOrExchange().

453 {
454  wxTextCtrl *t = (wxTextCtrl *)e.GetEventObject();
455  int keycode = e.GetKeyCode();
456 
457  // Make sure we can navigate away from the hotkey textctrl.
458  // On Linux and OSX, it an get stuck, but it doesn't hurt
459  // to do it for Windows as well.
460  if (keycode == WXK_TAB) {
461  wxNavigationKeyEvent nevent;
462  nevent.SetWindowChange(e.ControlDown());
463  nevent.SetDirection(!e.ShiftDown());
464  nevent.SetEventObject(t);
465  nevent.SetCurrentFocus(t);
466  t->GetParent()->GetEventHandler()->ProcessEvent(nevent);
467 
468  return;
469  }
470 
471  if (mViewType == ViewByKey) {
472  wxString key = KeyEventToKeyString(e).Display();
473  t->SetValue(key);
474 
475  if (key != wxEmptyString) {
476  mView->SetFilter(t->GetValue());
477  }
478  }
479  else
480  {
481  if (keycode == WXK_RETURN) {
482  mFilterPending = false;
483  mView->SetFilter(t->GetValue());
484  }
485  else {
486  mFilterPending = true;
487  mFilterTimer.Start(500, wxTIMER_ONE_SHOT);
488 
489  e.Skip();
490  }
491  }
492 }
ViewByType mViewType
NormalizedKeyString KeyEventToKeyString(const wxKeyEvent &event)
Definition: Keyboard.cpp:78
void SetFilter(const wxString &filter)
Definition: KeyView.cpp:364
KeyView * mView
wxString Display(bool usesSpecialChars=false) const
Definition: Keyboard.cpp:53
wxTimer mFilterTimer
void KeyConfigPrefs::OnFilterTimer ( wxTimerEvent &  e)
private

Definition at line 442 of file KeyConfigPrefs.cpp.

References mFilter, mFilterPending, mView, and KeyView::SetFilter().

443 {
444  // The filter timer has expired, so set the filter
445  if (mFilterPending)
446  {
447  // Do not reset mFilterPending here...possible race
448  mView->SetFilter(mFilter->GetValue());
449  }
450 }
wxTextCtrl * mFilter
void SetFilter(const wxString &filter)
Definition: KeyView.cpp:364
KeyView * mView
void KeyConfigPrefs::OnHotkeyChar ( wxKeyEvent &  e)
private

Definition at line 428 of file KeyConfigPrefs.cpp.

Referenced by PopulateOrExchange().

429 {
430  // event.Skip() not performed, so event will not be processed further.
431 }
void KeyConfigPrefs::OnHotkeyKeyDown ( wxKeyEvent &  e)
private

Definition at line 406 of file KeyConfigPrefs.cpp.

References KeyEventToKeyString().

Referenced by PopulateOrExchange().

407 {
408  wxTextCtrl *t = (wxTextCtrl *)e.GetEventObject();
409 
410  // Make sure we can navigate away from the hotkey textctrl.
411  // On Linux and OSX, it can get stuck, but it doesn't hurt
412  // to do it for Windows as well.
413  //
414  // Mac note: Don't waste time trying to figure out why the
415  // focus goes back to the prefs tree. Unless Voiceover is
416  // active, buttons on the Mac do not accept focus and all the
417  // controls between this one and the tree control are buttons.
418  if (e.GetKeyCode() == WXK_TAB) {
419  NavigateIn(e.ShiftDown()
420  ? wxNavigationKeyEvent::IsBackward
421  : wxNavigationKeyEvent::IsForward);
422  return;
423  }
424 
425  t->SetValue(KeyEventToKeyString(e).Display());
426 }
NormalizedKeyString KeyEventToKeyString(const wxKeyEvent &event)
Definition: Keyboard.cpp:78
void KeyConfigPrefs::OnHotkeyKillFocus ( wxFocusEvent &  e)
private

Definition at line 433 of file KeyConfigPrefs.cpp.

References NormalizedKeyString::Display(), KeyView::GetKey(), mCommandSelected, mKey, and mView.

Referenced by PopulateOrExchange().

434 {
435  if (mKey->GetValue().IsEmpty() && mCommandSelected != wxNOT_FOUND) {
436  mKey->AppendText(mView->GetKey(mCommandSelected).Display());
437  }
438 
439  e.Skip();
440 }
NormalizedKeyString GetKey(int index) const
Definition: KeyView.cpp:221
wxTextCtrl * mKey
KeyView * mView
wxString Display(bool usesSpecialChars=false) const
Definition: Keyboard.cpp:53
void KeyConfigPrefs::OnImport ( wxCommandEvent &  e)
private

Definition at line 314 of file KeyConfigPrefs.cpp.

References _(), AudacityMessageBox(), XMLFileReader::GetErrorStr(), mManager, FileNames::Open, XMLFileReader::Parse(), RefreshBindings(), and FileNames::SelectFile().

315 {
316  wxString file = wxT("Audacity-keys.xml");
317 
319  _("Select an XML file containing Audacity keyboard shortcuts..."),
320  wxEmptyString,
321  file,
322  wxT(""),
323  _("XML files (*.xml)|*.xml|All files|*"),
324  wxRESIZE_BORDER,
325  this);
326 
327  if (!file) {
328  return;
329  }
330 
331  XMLFileReader reader;
332  if (!reader.Parse(mManager, file)) {
334  _("Error Importing Keyboard Shortcuts"),
335  wxOK | wxCENTRE, this);
336  }
337 
338  RefreshBindings(true);
339 }
CommandManager * mManager
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
bool Parse(XMLTagHandler *baseHandler, const wxString &fname)
Reads a file and passes the results through an XMLTagHandler.
Definition: XMLFileReader.h:18
void RefreshBindings(bool bSort)
static wxString SelectFile(Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
Definition: FileNames.cpp:411
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxString GetErrorStr()
void KeyConfigPrefs::OnImportDefaults ( wxCommandEvent &  e)
private

Definition at line 390 of file KeyConfigPrefs.cpp.

References FilterKeys(), gPrefs, mDefaultKeys, mManager, mNewKeys, RefreshBindings(), and CommandManager::SetKeyFromIndex().

Referenced by OnDefaults().

391 {
392  gPrefs->DeleteEntry(wxT("/GUI/Shortcuts/FullDefaults"));
393  gPrefs->Flush();
394 
396  if( event.GetId() == 1 )
397  FilterKeys( mNewKeys );
398 
399  for (size_t i = 0; i < mNewKeys.size(); i++) {
401  }
402 
403  RefreshBindings(true);
404 }
CommandManager * mManager
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
void FilterKeys(std::vector< NormalizedKeyString > &arr)
std::vector< NormalizedKeyString > mNewKeys
void SetKeyFromIndex(int i, const NormalizedKeyString &key)
void RefreshBindings(bool bSort)
std::vector< NormalizedKeyString > mDefaultKeys
void KeyConfigPrefs::OnSelected ( wxCommandEvent &  e)
private

Definition at line 582 of file KeyConfigPrefs.cpp.

References KeyView::CanSetKey(), NormalizedKeyString::Display(), KeyView::GetKey(), KeyView::GetSelected(), mClear, mCommandSelected, mKey, mSet, and mView.

583 {
585  mKey->Clear();
586 
587  if (mCommandSelected != wxNOT_FOUND) {
588  bool canset = mView->CanSetKey(mCommandSelected);
589  if (canset) {
590  mKey->AppendText(mView->GetKey(mCommandSelected).Display());
591  }
592 
593  mKey->Enable(canset);
594  mSet->Enable(canset);
595  mClear->Enable(canset);
596  }
597 }
NormalizedKeyString GetKey(int index) const
Definition: KeyView.cpp:221
int GetSelected() const
Definition: KeyView.cpp:84
bool CanSetKey(int index) const
Definition: KeyView.cpp:237
wxTextCtrl * mKey
wxButton * mClear
wxButton * mSet
KeyView * mView
wxString Display(bool usesSpecialChars=false) const
Definition: Keyboard.cpp:53
void KeyConfigPrefs::OnSet ( wxCommandEvent &  e)
private

Definition at line 528 of file KeyConfigPrefs.cpp.

References _(), AudacityMessageBox(), CommandManager::GetCategoryFromName(), KeyView::GetName(), KeyView::GetNameByKey(), CommandManager::GetPrefixedLabelFromName(), mCommandSelected, mKey, mManager, mNames, mNewKeys, mView, KeyView::SetKeyByName(), SetKeyForSelected(), and CommandManager::SetKeyFromName().

529 {
530  if (mCommandSelected == wxNOT_FOUND) {
531  AudacityMessageBox(_("You must select a binding before assigning a shortcut"),
532  _("Error"), wxICON_WARNING | wxCENTRE, this);
533  return;
534  }
535 
536  NormalizedKeyString key { mKey->GetValue() };
537  wxString oldname = mView->GetNameByKey(key);
538  wxString newname = mView->GetName(mCommandSelected);
539 
540  // Just ignore it if they are the same
541  if (oldname == newname) {
542  return;
543  }
544 
545  // Prevent same hotkey combination being used twice.
546  if (!oldname.empty()) {
547  auto oldlabel = wxString::Format( _("%s - %s"),
548  mManager->GetCategoryFromName(oldname),
550  auto newlabel = wxString::Format( _("%s - %s"),
551  mManager->GetCategoryFromName(newname),
553  if (AudacityMessageBox(
554  wxString::Format(
555  _("The keyboard shortcut '%s' is already assigned to:\n\n\t'%s'\n\nClick OK to assign the shortcut to\n\n\t'%s'\n\ninstead. Otherwise, click Cancel."),
556  mKey->GetValue(),
557  oldlabel,
558  newlabel),
559  _("Error"), wxOK | wxCANCEL | wxICON_STOP | wxCENTRE, this) == wxCANCEL)
560  {
561  return;
562  }
563 
564  mView->SetKeyByName(oldname, {});
565  mManager->SetKeyFromName(oldname, {});
566  mNewKeys[mNames.Index(oldname)] = {};
567 
568  }
569 
570  SetKeyForSelected(key);
571 }
CommandManager * mManager
wxString GetNameByKey(const NormalizedKeyString &key) const
Definition: KeyView.cpp:181
wxString GetName() const
Definition: KeyView.cpp:93
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
std::vector< NormalizedKeyString > mNewKeys
wxTextCtrl * mKey
wxString GetPrefixedLabelFromName(const wxString &name)
wxString GetCategoryFromName(const wxString &name)
wxArrayString mNames
KeyView * mView
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
bool SetKeyByName(const wxString &name, const NormalizedKeyString &key)
Definition: KeyView.cpp:295
void SetKeyForSelected(const NormalizedKeyString &key)
void SetKeyFromName(const wxString &name, const NormalizedKeyString &key)
void KeyConfigPrefs::OnViewBy ( wxCommandEvent &  e)
private

Definition at line 599 of file KeyConfigPrefs.cpp.

References _(), mFilter, mFilterLabel, mView, mViewType, KeyView::SetView(), ViewByKey, ViewByKeyID, ViewByName, ViewByNameID, ViewByTree, and ViewByTreeID.

600 {
601  switch (e.GetId())
602  {
603  case ViewByTreeID:
605  mFilterLabel->SetLabel(_("Searc&h:"));
606  break;
607 
608  case ViewByNameID:
610  mFilterLabel->SetLabel(_("Searc&h:"));
611  break;
612 
613  case ViewByKeyID:
615  mFilterLabel->SetLabel(_("&Hotkey:"));
616  break;
617  }
618 
620  mFilter->SetName(wxStripMenuCodes(mFilterLabel->GetLabel()));
621 }
ViewByType mViewType
#define ViewByTreeID
wxStaticText * mFilterLabel
#define ViewByKeyID
void SetView(ViewByType type)
Definition: KeyView.cpp:313
wxTextCtrl * mFilter
KeyView * mView
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
#define ViewByNameID
void KeyConfigPrefs::Populate ( )
private

Definition at line 96 of file KeyConfigPrefs.cpp.

References _(), ShuttleGuiBase::AddTitle(), eIsCreatingFromPrefs, ShuttleGuiBase::EndStatic(), ShuttleGuiBase::EndVerticalLay(), GetActiveProject(), AudacityProject::GetCommandManager(), mCommandSelected, mFilter, mFilterLabel, mManager, mView, mViewByKey, mViewByName, mViewByTree, mViewType, PopulateOrExchange(), RefreshBindings(), KeyView::SetView(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::StartVerticalLay(), ViewByKey, ViewByName, and ViewByTree.

97 {
99  AudacityProject *project = GetActiveProject();
100 
101  if (!project) {
102  S.StartVerticalLay(true);
103  {
104  S.StartStatic( {}, true);
105  {
106  S.AddTitle(_("Keyboard preferences currently unavailable."));
107  S.AddTitle(_("Open a new project to modify keyboard shortcuts."));
108  }
109  S.EndStatic();
110  }
111  S.EndVerticalLay();
112 
113  return;
114  }
115 
117 
118  mCommandSelected = wxNOT_FOUND;
119 
120  mManager = project->GetCommandManager();
121 
122  // For speed, don't sort here. We're just creating.
123  // Instead sort when we do SetView later in this function.
124  RefreshBindings(false);
125 
126  if (mViewByTree->GetValue()) {
128  }
129  else if (mViewByName->GetValue()) {
131  }
132  else if (mViewByKey->GetValue()) {
134  mFilterLabel->SetLabel(_("&Hotkey:"));
135  mFilter->SetName(wxStripMenuCodes(mFilterLabel->GetLabel()));
136  }
137 
139 }
CommandManager * mManager
wxRadioButton * mViewByKey
ViewByType mViewType
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
CommandManager * GetCommandManager()
Definition: Project.h:346
wxStaticText * mFilterLabel
void PopulateOrExchange(ShuttleGui &S) override
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:176
void SetView(ViewByType type)
Definition: KeyView.cpp:313
wxRadioButton * mViewByTree
wxTextCtrl * mFilter
wxRadioButton * mViewByName
void RefreshBindings(bool bSort)
KeyView * mView
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:308
void KeyConfigPrefs::PopulateOrExchange ( ShuttleGui S)
override

Normally in classes derived from PrefsPanel this function is used both to populate the panel and to exchange data with it. With KeyConfigPrefs all the exchanges are handled specially, so this is only used in populating the panel.

Definition at line 145 of file KeyConfigPrefs.cpp.

References _(), ShuttleGuiBase::AddButton(), ShuttleGuiBase::AddFixedText(), ShuttleGui::AddSpace(), ShuttleGuiBase::AddTitle(), ShuttleGuiBase::AddVariableText(), ShuttleGuiBase::AddWindow(), AssignDefaultsButtonID, ClearButtonID, CommandsListID, CurrentComboID, ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndRadioButtonGroup(), ShuttleGuiBase::EndStatic(), ShuttleGuiBase::EndThreeColumn(), ExportButtonID, FilterID, ShuttleGui::Id(), ImportButtonID, mClear, mFilter, mFilterLabel, mKey, mSet, mView, mViewByKey, mViewByName, mViewByTree, OnFilterChar(), OnFilterKeyDown(), OnHotkeyChar(), OnHotkeyKeyDown(), OnHotkeyKillFocus(), ShuttleGui::Prop(), safenew, ShuttleGuiBase::SetBorder(), SetButtonID, ShuttleGuiBase::SetStretchyCol(), ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartRadioButtonGroup(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::StartThreeColumn(), ShuttleGuiBase::TieRadioButton(), ViewByKeyID, ViewByNameID, and ViewByTreeID.

Referenced by Commit(), and Populate().

146 {
147  S.SetBorder(2);
148 
149  S.StartStatic(_("Key Bindings"), 1);
150  {
151  S.StartMultiColumn(3, wxEXPAND);
152  {
153  S.SetStretchyCol(1);
154 
155  S.StartHorizontalLay(wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 0);
156  {
157  S.AddTitle(_("View by:"));
158  S.StartRadioButtonGroup(wxT("/Prefs/KeyConfig/ViewBy"), wxT("tree"));
159  {
160  mViewByTree = S.Id(ViewByTreeID).TieRadioButton(_("&Tree"), wxT("tree"));
161  if( mViewByTree ) mViewByTree->SetName(_("View by tree"));
162  mViewByName = S.Id(ViewByNameID).TieRadioButton(_("&Name"), wxT("name"));
163  if( mViewByName ) mViewByName->SetName(_("View by name"));
164  mViewByKey = S.Id(ViewByKeyID).TieRadioButton(_("&Key"), wxT("key"));
165  if( mViewByKey ) mViewByKey->SetName(_("View by key"));
166 #if wxUSE_ACCESSIBILITY
167  // so that name can be set on a standard control
171 #endif
172  }
174  }
175  S.EndHorizontalLay();
176 
177  S.StartHorizontalLay(wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, 0);
178  {
179  // just a spacer
180  }
181  S.EndHorizontalLay();
182 
183  S.StartHorizontalLay(wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 0);
184  {
185  mFilterLabel = S.AddVariableText(_("Searc&h:"));
186 
187  if (!mFilter) {
188  mFilter = safenew wxTextCtrl(this,
189  FilterID,
190  wxT(""),
191  wxDefaultPosition,
192 #if defined(__WXMAC__)
193  wxSize(300, -1),
194 #else
195  wxSize(210, -1),
196 #endif
197  wxTE_PROCESS_ENTER);
198  mFilter->SetName(wxStripMenuCodes(mFilterLabel->GetLabel()));
199  mFilter->Bind(wxEVT_KEY_DOWN,
201  this);
202  mFilter->Bind(wxEVT_CHAR,
204  this);
205  }
206  S.AddWindow(mFilter, wxALIGN_NOT | wxALIGN_LEFT);
207  }
208  S.EndHorizontalLay();
209  }
210  S.EndThreeColumn();
211  S.AddSpace(-1, 2);
212 
213  S.StartHorizontalLay(wxEXPAND, 1);
214  {
215  if (!mView) {
217  mView->SetName(_("Bindings"));
218  }
219  S.Prop(true);
220  S.AddWindow(mView, wxEXPAND);
221  }
222  S.EndHorizontalLay();
223 
224  S.StartThreeColumn();
225  {
226  if (!mKey) {
227  mKey = safenew wxTextCtrl(this,
229  wxT(""),
230  wxDefaultPosition,
231 #if defined(__WXMAC__)
232  wxSize(300, -1),
233 #else
234  wxSize(210, -1),
235 #endif
236  wxTE_PROCESS_ENTER);
237 #if wxUSE_ACCESSIBILITY
238  // so that name can be set on a standard control
239  mKey->SetAccessible(safenew WindowAccessible(mKey));
240 #endif
241  mKey->SetName(_("Short cut"));
242  mKey->Bind(wxEVT_KEY_DOWN,
244  this);
245  mKey->Bind(wxEVT_CHAR,
247  this);
248  mKey->Bind(wxEVT_KILL_FOCUS,
250  this);
251  }
252  S.AddWindow(mKey);
253 
254  /* i18n-hint: (verb)*/
255  mSet = S.Id(SetButtonID).AddButton(_("&Set"));
256  mClear = S.Id(ClearButtonID).AddButton(_("Cl&ear"));
257  }
258  S.EndThreeColumn();
259 
260 #if defined(__WXMAC__)
261  S.AddFixedText(_("Note: Pressing Cmd+Q will quit. All other keys are valid."));
262 #endif
263 
264  S.StartThreeColumn();
265  {
266  S.Id(ImportButtonID).AddButton(_("&Import..."));
267  S.Id(ExportButtonID).AddButton(_("&Export..."));
268  S.Id(AssignDefaultsButtonID).AddButton(_("&Defaults"));
269  }
270  S.EndThreeColumn();
271  }
272  S.EndStatic();
273 
274 
275  // Need to layout so that the KeyView is properly sized before populating.
276  // Otherwise, the initial selection is not scrolled into view.
277  Layout();
278 }
wxRadioButton * mViewByKey
void EndThreeColumn()
Definition: ShuttleGui.h:139
void EndRadioButtonGroup()
wxWindow * AddWindow(wxWindow *pWindow, int Flags=wxALIGN_CENTRE|wxALL)
Definition: ShuttleGui.cpp:288
#define ViewByTreeID
wxStaticText * mFilterLabel
#define safenew
Definition: Audacity.h:230
void EndHorizontalLay()
wxTextCtrl * mKey
#define ImportButtonID
#define AssignDefaultsButtonID
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...
#define CurrentComboID
void OnFilterKeyDown(wxKeyEvent &e)
#define ViewByKeyID
wxRadioButton * mViewByTree
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
wxTextCtrl * mFilter
ShuttleGui & Id(int id)
void AddFixedText(const wxString &Str, bool bCenter=false)
Definition: ShuttleGui.cpp:397
wxButton * mClear
wxButton * mSet
void AddTitle(const wxString &Prompt)
Centred text string.
Definition: ShuttleGui.cpp:274
wxRadioButton * mViewByName
#define ClearButtonID
wxRadioButton * TieRadioButton(const wxString &Prompt, WrappedType &WrappedRef)
void StartThreeColumn()
Definition: ShuttleGui.h:138
#define ExportButtonID
KeyView * mView
void OnFilterChar(wxKeyEvent &e)
#define FilterID
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
#define ViewByNameID
#define CommandsListID
wxStaticText * AddVariableText(const wxString &Str, bool bCenter=false, int PositionFlags=0)
Definition: ShuttleGui.cpp:414
wxStaticBox * StartStatic(const wxString &Str, int iProp=0)
Definition: ShuttleGui.cpp:763
ShuttleGui & Prop(int iProp)
Definition: ShuttleGui.h:418
void OnHotkeyKeyDown(wxKeyEvent &e)
wxSizerItem * AddSpace(int width, int height)
void OnHotkeyKillFocus(wxFocusEvent &e)
#define SetButtonID
void SetBorder(int Border)
Definition: ShuttleGui.h:286
void StartRadioButtonGroup(const wxString &SettingName)
Provides multiple views of keyboard shortcuts.
Definition: KeyView.h:73
wxButton * AddButton(const wxString &Text, int PositionFlags=wxALIGN_CENTRE)
Definition: ShuttleGui.cpp:341
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:203
void OnHotkeyChar(wxKeyEvent &e)
void KeyConfigPrefs::RefreshBindings ( bool  bSort)
private

Definition at line 280 of file KeyConfigPrefs.cpp.

References FilterKeys(), CommandManager::GetAllCommandData(), mDefaultKeys, mKeys, mManager, mNames, mNewKeys, mStandardDefaultKeys, mView, and KeyView::RefreshBindings().

Referenced by OnImport(), OnImportDefaults(), and Populate().

281 {
282  wxArrayString Labels;
283  wxArrayString Categories;
284  wxArrayString Prefixes;
285 
286  mNames.Clear();
287  mKeys.clear();
288  mDefaultKeys.clear();
289  mStandardDefaultKeys.clear();
291  mNames,
292  mKeys,
293  mDefaultKeys,
294  Labels,
295  Categories,
296  Prefixes,
297  true); // True to include effects (list items), false otherwise.
298 
301 
303  Categories,
304  Prefixes,
305  Labels,
306  mKeys,
307  bSort);
308  //Not needed as NEW nodes are already shown expanded.
309  //mView->ExpandAll();
310 
311  mNewKeys = mKeys;
312 }
CommandManager * mManager
std::vector< NormalizedKeyString > mStandardDefaultKeys
void RefreshBindings(const wxArrayString &names, const wxArrayString &categories, const wxArrayString &prefixes, const wxArrayString &labels, const std::vector< NormalizedKeyString > &keys, bool bSort)
Definition: KeyView.cpp:521
void FilterKeys(std::vector< NormalizedKeyString > &arr)
std::vector< NormalizedKeyString > mNewKeys
void GetAllCommandData(wxArrayString &names, std::vector< NormalizedKeyString > &keys, std::vector< NormalizedKeyString > &default_keys, wxArrayString &labels, wxArrayString &categories, wxArrayString &prefixes, bool includeMultis)
wxArrayString mNames
KeyView * mView
std::vector< NormalizedKeyString > mKeys
std::vector< NormalizedKeyString > mDefaultKeys
void KeyConfigPrefs::SetKeyForSelected ( const NormalizedKeyString key)
private

Definition at line 511 of file KeyConfigPrefs.cpp.

References _(), AudacityMessageBox(), KeyView::CanSetKey(), KeyView::GetName(), mCommandSelected, mManager, mNames, mNewKeys, mView, name, KeyView::SetKey(), and CommandManager::SetKeyFromName().

Referenced by OnClear(), and OnSet().

512 {
513  wxString name = mView->GetName(mCommandSelected);
514 
516  {
517  AudacityMessageBox(_("You may not assign a key to this entry"),
518  _("Error"), wxICON_ERROR | wxCENTRE, this);
519  return;
520  }
521 
523  mManager->SetKeyFromName(name, key);
524  mNewKeys[mNames.Index(name)] = key;
525 }
CommandManager * mManager
wxString GetName() const
Definition: KeyView.cpp:93
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
std::vector< NormalizedKeyString > mNewKeys
bool CanSetKey(int index) const
Definition: KeyView.cpp:237
wxArrayString mNames
KeyView * mView
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
const wxChar * name
Definition: Distortion.cpp:94
bool SetKey(int index, const NormalizedKeyString &key)
Definition: KeyView.cpp:254
void SetKeyFromName(const wxString &name, const NormalizedKeyString &key)

Member Data Documentation

wxButton* KeyConfigPrefs::mClear
private

Definition at line 72 of file KeyConfigPrefs.h.

Referenced by OnSelected(), and PopulateOrExchange().

int KeyConfigPrefs::mCommandSelected
private
std::vector<NormalizedKeyString> KeyConfigPrefs::mDefaultKeys
private

Definition at line 88 of file KeyConfigPrefs.h.

Referenced by Commit(), OnImportDefaults(), and RefreshBindings().

wxTextCtrl* KeyConfigPrefs::mFilter
private

Definition at line 74 of file KeyConfigPrefs.h.

Referenced by OnFilterTimer(), OnViewBy(), Populate(), and PopulateOrExchange().

wxStaticText* KeyConfigPrefs::mFilterLabel
private

Definition at line 75 of file KeyConfigPrefs.h.

Referenced by OnViewBy(), Populate(), and PopulateOrExchange().

bool KeyConfigPrefs::mFilterPending
private

Definition at line 77 of file KeyConfigPrefs.h.

Referenced by OnFilterKeyDown(), and OnFilterTimer().

wxTimer KeyConfigPrefs::mFilterTimer
private

Definition at line 76 of file KeyConfigPrefs.h.

Referenced by OnFilterKeyDown().

wxTextCtrl* KeyConfigPrefs::mKey
private

Definition at line 70 of file KeyConfigPrefs.h.

Referenced by OnClear(), OnHotkeyKillFocus(), OnSelected(), OnSet(), and PopulateOrExchange().

std::vector<NormalizedKeyString> KeyConfigPrefs::mKeys
private

Definition at line 90 of file KeyConfigPrefs.h.

Referenced by Cancel(), and RefreshBindings().

CommandManager* KeyConfigPrefs::mManager
private
wxArrayString KeyConfigPrefs::mNames
private

Definition at line 87 of file KeyConfigPrefs.h.

Referenced by Cancel(), Commit(), OnSet(), RefreshBindings(), and SetKeyForSelected().

std::vector<NormalizedKeyString> KeyConfigPrefs::mNewKeys
private

Definition at line 91 of file KeyConfigPrefs.h.

Referenced by Commit(), OnImportDefaults(), OnSet(), RefreshBindings(), and SetKeyForSelected().

wxButton* KeyConfigPrefs::mSet
private

Definition at line 71 of file KeyConfigPrefs.h.

Referenced by OnSelected(), and PopulateOrExchange().

std::vector<NormalizedKeyString> KeyConfigPrefs::mStandardDefaultKeys
private

Definition at line 89 of file KeyConfigPrefs.h.

Referenced by Commit(), and RefreshBindings().

KeyView* KeyConfigPrefs::mView
private
wxRadioButton* KeyConfigPrefs::mViewByKey
private

Definition at line 82 of file KeyConfigPrefs.h.

Referenced by Populate(), and PopulateOrExchange().

wxRadioButton* KeyConfigPrefs::mViewByName
private

Definition at line 81 of file KeyConfigPrefs.h.

Referenced by Populate(), and PopulateOrExchange().

wxRadioButton* KeyConfigPrefs::mViewByTree
private

Definition at line 80 of file KeyConfigPrefs.h.

Referenced by Populate(), and PopulateOrExchange().

ViewByType KeyConfigPrefs::mViewType
private

Definition at line 79 of file KeyConfigPrefs.h.

Referenced by OnFilterChar(), OnFilterKeyDown(), OnViewBy(), and Populate().


The documentation for this class was generated from the following files: