OLD STUFF::
struct TPinBaseCompareFunctor inline int operator()(const TPinBasePtrT* x, const TPinBasePtrT*& y ) const return x->mLine < y->mLine; ;
typedef WXSTL_MULTIMAP( TPinBasePtrT, TPinBasePtrT, TPinBaseCompareFunctor ) PinMapT; typedef PinMapT::iterator PinIteratorT; * Class manages access and manpulation of in-memory text. Can * be accessed by multiple views, only one of which can be active * at a time.
Derived from
wxObject
Data structures
Members
wxTextEditorModel::wxTextEditorModel
wxTextEditorModel::~wxTextEditorModel
wxTextEditorModel::AddChangeListener
wxTextEditorModel::AddPin
wxTextEditorModel::AddView
wxTextEditorModel::AllocCharacters
wxTextEditorModel::AppendText
wxTextEditorModel::ArrangePositions
wxTextEditorModel::CanCopy
wxTextEditorModel::CanPaste
wxTextEditorModel::CanPrependCommand
wxTextEditorModel::CanRedo
wxTextEditorModel::CanUndo
wxTextEditorModel::CheckSelection
wxTextEditorModel::CheckpointModified
wxTextEditorModel::ClearAllPins
wxTextEditorModel::ClearUndoBuffer
wxTextEditorModel::CreateIterator
wxTextEditorModel::CursorBeyondText
wxTextEditorModel::DeleteAllText
wxTextEditorModel::DeleteRange
wxTextEditorModel::DeleteSelection
wxTextEditorModel::DoDeleteRange
wxTextEditorModel::DoExecuteNewCommand
wxTextEditorModel::DoInsertText
wxTextEditorModel::DoMoveCursor
wxTextEditorModel::DoReexecuteCommand
wxTextEditorModel::DoUnexecuteCommand
wxTextEditorModel::ExecuteCommand
wxTextEditorModel::FindFirstPinInRange
wxTextEditorModel::FindNextPinFrom
wxTextEditorModel::FindPinById
wxTextEditorModel::FindPreviousPinFrom
wxTextEditorModel::FinishBatch
wxTextEditorModel::FreeCharacters
wxTextEditorModel::GetActiveView
wxTextEditorModel::GetAllText
wxTextEditorModel::GetCursor
wxTextEditorModel::GetEndOfSelection
wxTextEditorModel::GetLineAlignedBlockSize
wxTextEditorModel::GetLineCountInRange
wxTextEditorModel::GetPinAt
wxTextEditorModel::GetPinNoAt
wxTextEditorModel::GetPins
wxTextEditorModel::GetSelection
wxTextEditorModel::GetStartOfSelection
wxTextEditorModel::GetTextFromRange
wxTextEditorModel::GetTotalRowCount
wxTextEditorModel::InsertText
wxTextEditorModel::IsInsertMode
wxTextEditorModel::IsLastLine
wxTextEditorModel::IsModified
wxTextEditorModel::IsReadOnly
wxTextEditorModel::IsUnixText
wxTextEditorModel::LoadTextFromFile
wxTextEditorModel::MergeChange
wxTextEditorModel::NotifyAllViews
wxTextEditorModel::NotifyTextChanged
wxTextEditorModel::NotifyView
wxTextEditorModel::OnCopy
wxTextEditorModel::OnCut
wxTextEditorKeyInterceptor::OnDblClick
wxTextEditorModel::OnDelete
wxTextEditorModel::OnDeleteBack
wxTextEditorModel::OnDeleteLine
wxTextEditorModel::OnEndOfLine
wxTextEditorModel::OnEndOfText
wxTextEditorModel::OnFind
wxTextEditorModel::OnFindNext
wxTextEditorModel::OnFindPrevious
wxTextEditorModel::OnGotoLine
wxTextEditorModel::OnInsertChar
wxTextEditorModel::OnMoveDown
wxTextEditorModel::OnMoveLeft
wxTextEditorModel::OnMoveRight
wxTextEditorModel::OnMoveToPosition
wxTextEditorModel::OnMoveUp
wxTextEditorModel::OnNextBookmark
wxTextEditorModel::OnPageDown
wxTextEditorModel::OnPageUp
wxTextEditorModel::OnPaste
wxTextEditorModel::OnPreviousBookmark
wxTextEditorModel::OnRedo
wxTextEditorModel::OnReplace
wxTextEditorModel::OnReplaceNext
wxTextEditorModel::OnSelectAll
wxTextEditorModel::OnSelectWord
wxTextEditorModel::OnShiftSelectionIndent
wxTextEditorModel::OnSlideDown
wxTextEditorModel::OnSlideUp
wxTextEditorModel::OnStartOfLine
wxTextEditorModel::OnStartOfText
wxTextEditorModel::OnToggleBookmark
wxTextEditorModel::OnUndo
wxTextEditorModel::OnWordLeft
wxTextEditorModel::OnWordRight
wxTextEditorModel::PrepareForCommand
wxTextEditorModel::PrependCommand
wxTextEditorModel::RecalcBlockProperties
wxTextEditorModel::RedoImpl
wxTextEditorModel::RemovePinAt
wxTextEditorModel::RemoveView
wxTextEditorModel::ResetSelection
wxTextEditorModel::SaveTextToFile
wxTextEditorModel::ScrToTextColumn
wxTextEditorModel::SelectionIsEmpty
wxTextEditorModel::SetActiveView
wxTextEditorModel::SetCheckpoint
wxTextEditorModel::SetCursor
wxTextEditorModel::SetEndOfSelection
wxTextEditorModel::SetInsertMode
wxTextEditorModel::SetPostPos
wxTextEditorModel::SetReadOnly
wxTextEditorModel::SetRowsPerPage
wxTextEditorModel::SetSelectionEditMode
wxTextEditorModel::SetStartOfSelection
wxTextEditorModel::StartBatch
wxTextEditorModel::TextToScrColumn
wxTextEditorModel::TrackSelection
wxTextEditorModel::UndoImpl
wxTextEditorModel::WriteText
wxTextEditorModel()
~wxTextEditorModel()
void AddChangeListener(TTextChangeListenerBase* pListener)
long AddPin(TPinBase* pPin)
void AddView(wxTextEditorView* pView)
char* AllocCharacters(size_t n)
utilities
char* AllocCharacters(size_t n, const char* srcBuf)
void AppendText(const wxString& text)
void ArrangePositions(TPosition& upper, TPosition& lower)
void ArrangePositions(size_t& upper, size_t& lower)
bool CanCopy()
bool CanPaste()
bool CanPrependCommand(TCommand* pCmd)
to methods enabling grouping of undo-able commands
bool CanRedo()
bool CanUndo()
undo-redo
void CheckSelection()
bool CheckpointModified()
void ClearAllPins()
void ClearUndoBuffer()
TTextIterator CreateIterator(const TPosition& pos)
void CursorBeyondText()
Is common code to be called if we expect the cursor pos to go over the end of the text line Note: No screen update is done in this routine... even when the cursor pos is changed.
void DeleteAllText()
void DeleteRange(const TPosition& from, const TPosition& till)
void DeleteSelection()
void DoDeleteRange(const TPosition& from, const TPosition& till, TRange& actualRange)
void DoExecuteNewCommand(TCommand& cmd)
void DoInsertText(const TPosition& pos, char* text, size_t len, TRange& actualRange)
two lowest-level operations
void DoMoveCursor(int rows, int cols)
void DoReexecuteCommand(TCommand& cmd)
void DoUnexecuteCommand(TCommand& cmd)
void ExecuteCommand(TCommand* pCmd)
size_t FindFirstPinInRange(size_t fromRow, size_t tillRow)
returns NPOS, if non
size_t FindNextPinFrom(size_t fromRow)
TPinBase* FindPinById(long pinId)
size_t FindPreviousPinFrom(size_t fromRow)
void FinishBatch()
void FreeCharacters(char* buf)
wxTextEditorView* GetActiveView()
void GetAllText(char ** text, size_t& textLen)
wxString GetAllText()
TPosition GetCursor()
TPosition GetEndOfSelection()
size_t GetLineAlignedBlockSize(char* start, char* end, size_t preferredSize)
size_t GetLineCountInRange(char* from, char* till)
TPinBase* GetPinAt(size_t row, int pinTypeCode)
size_t GetPinNoAt(size_t row, int pinTypeCode)
PinListT& GetPins()
void GetSelection(char ** text, size_t& textLen)
TPosition GetStartOfSelection()
accessors
void GetTextFromRange(const TPosition& from, const TPosition& till, wxString& toStr)
void GetTextFromRange(const TPosition& from, const TPosition& till, char ** text, size_t& textLen)
size_t GetTotalRowCount()
void InsertText(const TPosition& pos, const char* text, size_t len)
void InsertText(const TPosition& pos, const wxString& text)
bool IsInsertMode()
bool IsLastLine(const TPosition& pos)
bool IsModified()
bool IsReadOnly()
status
bool IsUnixText()
void LoadTextFromFile(const wxString& fname)
void MergeChange(size_t fromRow, size_t nRows)
void NotifyAllViews()
void NotifyTextChanged(TPosition from, TPosition till, TEXT_CHANGE_TYPE ct)
void NotifyTextChanged(size_t atRow, size_t nRows, TEXT_CHANGE_TYPE ct)
void NotifyView()
does on-screen updates
void OnCopy()
clipboard functions
void OnCut()
bool OnDblClick(wxMouseEvent& event)
FOR NOW:: some unrelated event
void OnDelete()
void OnDeleteBack()
void OnDeleteLine()
void OnEndOfLine()
void OnEndOfText()
bool OnFind()
bool OnFindNext(bool quiet = FALSE)
bool OnFindPrevious(bool quiet = FALSE)
void OnGotoLine(unsigned int line, unsigned int col)
void OnGotoLine()
void OnInsertChar(char ch)
user-level commands **mutable (undoable) commands
void OnMoveDown()
void OnMoveLeft()
imutable commands
void OnMoveRight()
void OnMoveToPosition(const TPosition& pos)
void OnMoveUp()
void OnNextBookmark()
void OnPageDown()
void OnPageUp()
void OnPaste()
void OnPreviousBookmark()
void OnRedo()
bool OnReplace()
search/replace
bool OnReplaceNext()
void OnSelectAll()
void OnSelectWord()
void OnShiftSelectionIndent(bool left)
void OnSlideDown()
void OnSlideUp()
void OnStartOfLine()
void OnStartOfText()
void OnToggleBookmark()
bookmarks
void OnUndo()
void OnWordLeft()
void OnWordRight()
void PrepareForCommand()
void PrependCommand(TCommand* pCmd)
void RecalcBlockProperties(TBlockIteratorT& iter)
void RedoImpl()
bool RemovePinAt(size_t row, int pinTypeCode)
void RemoveView(wxTextEditorView* pView)
void ResetSelection()
void SaveTextToFile(const wxString& fname)
size_t ScrToTextColumn(TPosition pos)
bool SelectionIsEmpty()
void SetActiveView(wxTextEditorView* pView)
void SetCheckpoint()
check-pointing
void SetCursor(const TPosition& pos)
void SetEndOfSelection(const TPosition& pos)
void SetInsertMode(bool on)
void SetPostPos(const TPosition& pos)
void SetReadOnly(bool on)
void SetRowsPerPage(size_t n)
void SetSelectionEditMode(bool editIsOn)
void SetStartOfSelection(const TPosition& pos)
void StartBatch()
size_t TextToScrColumn(const TPosition& pos)
void TrackSelection()
void UndoImpl()
void WriteText(const wxString& text)
writes text at current cursor position