9#ifndef __AUDACITY_WIDGETS_KEYVIEW__
10#define __AUDACITY_WIDGETS_KEYVIEW__
67#if wxUSE_ACCESSIBILITY
76 wxWindowID
id = wxID_ANY,
77 const wxPoint & pos = wxDefaultPosition,
78 const wxSize &
size = wxDefaultSize);
80 wxString
GetName()
const override;
86 const std::vector<NormalizedKeyString> & keys,
121 void OnDrawBackground(wxDC & dc,
const wxRect & rect,
size_t line)
const override;
122 void OnDrawItem(wxDC & dc,
const wxRect & rect,
size_t line)
const override;
128 void OnSize(wxSizeEvent & event);
129 void OnScroll(wxScrollWinEvent & event);
138#if wxUSE_ACCESSIBILITY
139 friend class KeyViewAx;
141 bool HasChildren(
int line);
142 bool IsExpanded(
int line);
143 wxCoord GetLineHeight(
int line);
144 wxString GetValue(
int line);
164#if wxUSE_ACCESSIBILITY
168 DECLARE_EVENT_TABLE()
std::vector< CommandID > CommandIDs
std::vector< TranslatableString > TranslatableStrings
KeyNode(const KeyNode &)=default
KeyNode & operator=(const KeyNode &)=default
Provides multiple views of keyboard shortcuts.
bool CanSetKey(int index) const
std::vector< KeyNode * > mLines
void OnSetFocus(wxFocusEvent &event)
void OnLeftDown(wxMouseEvent &event)
void OnDrawBackground(wxDC &dc, const wxRect &rect, size_t line) const override
int GetIndexByName(const CommandID &name) const
int GetIndexByKey(const NormalizedKeyString &key) const
void OnKillFocus(wxFocusEvent &event)
void OnDrawItem(wxDC &dc, const wxRect &rect, size_t line) const override
bool SetKey(int index, const NormalizedKeyString &key)
void OnSelected(wxCommandEvent &event)
wxString GetLabel(int index) const
void OnSize(wxSizeEvent &event)
void RefreshLines(bool bSort=true)
void SelectNode(int index)
void SetView(ViewByType type)
KeyView(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
void SetFilter(const wxString &filter)
static bool CmpKeyNodeByTree(KeyNode *n1, KeyNode *n2)
wxCoord OnMeasureItem(size_t line) const override
void OnScroll(wxScrollWinEvent &event)
std::vector< KeyNode > mNodes
wxString GetFullLabel(int index) const
void OnKeyDown(wxKeyEvent &event)
static bool CmpKeyNodeByName(KeyNode *n1, KeyNode *n2)
int IndexToLine(int index) const
NormalizedKeyString GetKey(int index) const
void RefreshBindings(const CommandIDs &names, const TranslatableStrings &categories, const TranslatableStrings &prefixes, const TranslatableStrings &labels, const std::vector< NormalizedKeyString > &keys, bool bSort)
bool SetKeyByName(const CommandID &name, const NormalizedKeyString &key)
wxString GetName() const override
CommandID GetNameByKey(const NormalizedKeyString &key) const
int LineToIndex(int line) const
static bool CmpKeyNodeByKey(KeyNode *n1, KeyNode *n2)