Added accelerators to Undo/Redo menu items

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-12-03 18:25:13 +00:00
parent b6a3d6ad88
commit 5e0e6ceb8f
7 changed files with 191 additions and 144 deletions

View File

@@ -565,11 +565,20 @@ public:
int GetMaxCommands() const { return m_maxNoCommands; }
virtual void ClearCommands();
// By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y"
const wxString& GetUndoAccelerator() const { return m_undoAccelerator; }
const wxString& GetRedoAccelerator() const { return m_redoAccelerator; }
void SetUndoAccelerator(const wxString& accel) { m_undoAccelerator = accel; }
void SetRedoAccelerator(const wxString& accel) { m_redoAccelerator = accel; }
protected:
int m_maxNoCommands;
wxList m_commands;
wxNode* m_currentCommand;
wxMenu* m_commandEditMenu;
wxString m_undoAccelerator;
wxString m_redoAccelerator;
};
// ----------------------------------------------------------------------------

View File

@@ -98,7 +98,7 @@ public:
// you're using "direct access" i.e. GetLine()
size_t GetCurrentLine() const { return m_nCurLine; }
void GoToLine(size_t n) { m_nCurLine = n; }
bool Eof() const { return m_nCurLine == m_aLines.Count() - 1; }
bool Eof() const { return (m_aLines.Count() == 0 || m_nCurLine == m_aLines.Count() - 1); }
// these methods allow more "iterator-like" traversal of the list of
// lines, i.e. you may write something like:

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: treectrl.h
// Name: treebase.h
// Purpose: wxTreeCtrl base classes and types
// Author: Julian Smart et al
// Modified by: