Audacity  2.2.0
KeyView Class Referencefinal

Provides multiple views of keyboard shortcuts. More...

#include <KeyView.h>

Inheritance diagram for KeyView:

Public Member Functions

 KeyView (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
 
virtual ~KeyView ()
 
wxString GetName () const
 
void RefreshBindings (const wxArrayString &names, const wxArrayString &categories, const wxArrayString &prefixes, const wxArrayString &labels, const wxArrayString &keys, bool bSort)
 
int GetSelected () const
 
wxString GetLabel (int index) const
 
wxString GetFullLabel (int index) const
 
int GetIndexByName (const wxString &name) const
 
wxString GetName (int index) const
 
wxString GetNameByKey (const wxString &key) const
 
int GetIndexByKey (const wxString &key) const
 
wxString GetKey (int index) const
 
bool CanSetKey (int index) const
 
bool SetKey (int index, const wxString &key)
 
bool SetKeyByName (const wxString &name, const wxString &key)
 
void SetView (ViewByType type)
 
void SetFilter (const wxString &filter)
 
void ExpandAll ()
 
void CollapseAll ()
 

Private Member Functions

void RecalcExtents ()
 
void UpdateHScroll ()
 
void RefreshLines (bool bSort=true)
 
void SelectNode (int index)
 
int LineToIndex (int line) const
 
int IndexToLine (int index) const
 
void OnDrawBackground (wxDC &dc, const wxRect &rect, size_t line) const
 
void OnDrawItem (wxDC &dc, const wxRect &rect, size_t line) const
 
wxCoord OnMeasureItem (size_t line) const
 
void OnSelected (wxCommandEvent &event)
 
void OnSetFocus (wxFocusEvent &event)
 
void OnKillFocus (wxFocusEvent &event)
 
void OnSize (wxSizeEvent &event)
 
void OnScroll (wxScrollWinEvent &event)
 
void OnKeyDown (wxKeyEvent &event)
 
void OnLeftDown (wxMouseEvent &event)
 

Static Private Member Functions

static int CmpKeyNodeByTree (KeyNode ***n1, KeyNode ***n2)
 
static int CmpKeyNodeByName (KeyNode ***n1, KeyNode ***n2)
 
static int CmpKeyNodeByKey (KeyNode ***n1, KeyNode ***n2)
 

Private Attributes

KeyNodeArray mNodes
 
KeyNodeArrayPtr mLines
 
ViewByType mViewType
 
wxString mFilter
 
wxCoord mScrollX
 
wxCoord mWidth
 
size_t mLineCount
 
wxCoord mLineHeight
 
wxCoord mKeyX
 
int mCommandWidth
 
wxCoord mKeyWidth
 

Static Private Attributes

static wxString CommandTranslated ="Command"
 

Detailed Description

Provides multiple views of keyboard shortcuts.

Constructor & Destructor Documentation

KeyView::KeyView ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize 
)

References safenew, and ViewByTree.

KeyView::~KeyView ( )
virtual

Member Function Documentation

bool KeyView::CanSetKey ( int  index) const
int KeyView::CmpKeyNodeByKey ( KeyNode ***  n1,
KeyNode ***  n2 
)
staticprivate

References KeyNode::key, KeyNode::label, and KeyNode::prefix.

Referenced by RefreshLines().

int KeyView::CmpKeyNodeByName ( KeyNode ***  n1,
KeyNode ***  n2 
)
staticprivate

References KeyNode::label, and KeyNode::prefix.

Referenced by RefreshLines().

int KeyView::CmpKeyNodeByTree ( KeyNode ***  n1,
KeyNode ***  n2 
)
staticprivate
void KeyView::CollapseAll ( )
void KeyView::ExpandAll ( )
wxString KeyView::GetFullLabel ( int  index) const

References KeyNode::label, label, mNodes, and KeyNode::prefix.

Referenced by OnKeyDown().

int KeyView::GetIndexByKey ( const wxString &  key) const

References mNodes.

int KeyView::GetIndexByName ( const wxString &  name) const

References mNodes.

Referenced by SetKeyByName().

wxString KeyView::GetKey ( int  index) const
wxString KeyView::GetLabel ( int  index) const

References mNodes.

Referenced by OnKeyDown().

wxString KeyView::GetName ( ) const
wxString KeyView::GetName ( int  index) const

References mNodes.

wxString KeyView::GetNameByKey ( const wxString &  key) const
int KeyView::GetSelected ( ) const

References LineToIndex().

Referenced by KeyConfigPrefs::OnSelected().

int KeyView::IndexToLine ( int  index) const
private

References mNodes.

Referenced by SelectNode().

int KeyView::LineToIndex ( int  line) const
private
void KeyView::OnDrawBackground ( wxDC &  dc,
const wxRect &  rect,
size_t  line 
) const
private
void KeyView::OnKillFocus ( wxFocusEvent &  event)
private
void KeyView::OnLeftDown ( wxMouseEvent &  event)
private
wxCoord KeyView::OnMeasureItem ( size_t  line) const
private

References mLineHeight.

void KeyView::OnScroll ( wxScrollWinEvent &  event)
private
void KeyView::OnSelected ( wxCommandEvent &  event)
private
void KeyView::OnSetFocus ( wxFocusEvent &  event)
private
void KeyView::OnSize ( wxSizeEvent &  event)
private

References UpdateHScroll().

void KeyView::RefreshBindings ( const wxArrayString &  names,
const wxArrayString &  categories,
const wxArrayString &  prefixes,
const wxArrayString &  labels,
const wxArrayString &  keys,
bool  bSort 
)
void KeyView::SelectNode ( int  index)
private
void KeyView::SetFilter ( const wxString &  filter)
bool KeyView::SetKey ( int  index,
const wxString &  key 
)
bool KeyView::SetKeyByName ( const wxString &  name,
const wxString &  key 
)

References GetIndexByName(), and SetKey().

Referenced by KeyConfigPrefs::OnSet().

Member Data Documentation

wxString KeyView::CommandTranslated ="Command"
staticprivate

Referenced by CmpKeyNodeByTree(), and RefreshLines().

int KeyView::mCommandWidth
private
wxString KeyView::mFilter
private

Referenced by RefreshLines(), and SetFilter().

wxCoord KeyView::mKeyWidth
private
wxCoord KeyView::mKeyX
private
size_t KeyView::mLineCount
private
wxCoord KeyView::mLineHeight
private
KeyNodeArrayPtr KeyView::mLines
private
wxCoord KeyView::mScrollX
private
wxCoord KeyView::mWidth
private

Referenced by OnDrawBackground(), and UpdateHScroll().


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