Contents Up Previous Next

wxTextEditorModel

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

wxTextEditorModel()


wxTextEditorModel::~wxTextEditorModel

~wxTextEditorModel()


wxTextEditorModel::AddChangeListener

void AddChangeListener(TTextChangeListenerBase* pListener)


wxTextEditorModel::AddPin

long AddPin(TPinBase* pPin)


wxTextEditorModel::AddView

void AddView(wxTextEditorView* pView)


wxTextEditorModel::AllocCharacters

char* AllocCharacters(size_t n)

utilities

char* AllocCharacters(size_t n, const char* srcBuf)


wxTextEditorModel::AppendText

void AppendText(const wxString& text)


wxTextEditorModel::ArrangePositions

void ArrangePositions(TPosition& upper, TPosition& lower)

void ArrangePositions(size_t& upper, size_t& lower)


wxTextEditorModel::CanCopy

bool CanCopy()


wxTextEditorModel::CanPaste

bool CanPaste()


wxTextEditorModel::CanPrependCommand

bool CanPrependCommand(TCommand* pCmd)

to methods enabling grouping of undo-able commands


wxTextEditorModel::CanRedo

bool CanRedo()


wxTextEditorModel::CanUndo

bool CanUndo()

undo-redo


wxTextEditorModel::CheckSelection

void CheckSelection()


wxTextEditorModel::CheckpointModified

bool CheckpointModified()


wxTextEditorModel::ClearAllPins

void ClearAllPins()


wxTextEditorModel::ClearUndoBuffer

void ClearUndoBuffer()


wxTextEditorModel::CreateIterator

TTextIterator CreateIterator(const TPosition& pos)


wxTextEditorModel::CursorBeyondText

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.


wxTextEditorModel::DeleteAllText

void DeleteAllText()


wxTextEditorModel::DeleteRange

void DeleteRange(const TPosition& from, const TPosition& till)


wxTextEditorModel::DeleteSelection

void DeleteSelection()


wxTextEditorModel::DoDeleteRange

void DoDeleteRange(const TPosition& from, const TPosition& till, TRange& actualRange)


wxTextEditorModel::DoExecuteNewCommand

void DoExecuteNewCommand(TCommand& cmd)


wxTextEditorModel::DoInsertText

void DoInsertText(const TPosition& pos, char* text, size_t len, TRange& actualRange)

two lowest-level operations


wxTextEditorModel::DoMoveCursor

void DoMoveCursor(int rows, int cols)


wxTextEditorModel::DoReexecuteCommand

void DoReexecuteCommand(TCommand& cmd)


wxTextEditorModel::DoUnexecuteCommand

void DoUnexecuteCommand(TCommand& cmd)


wxTextEditorModel::ExecuteCommand

void ExecuteCommand(TCommand* pCmd)


wxTextEditorModel::FindFirstPinInRange

size_t FindFirstPinInRange(size_t fromRow, size_t tillRow)

returns NPOS, if non


wxTextEditorModel::FindNextPinFrom

size_t FindNextPinFrom(size_t fromRow)


wxTextEditorModel::FindPinById

TPinBase* FindPinById(long pinId)


wxTextEditorModel::FindPreviousPinFrom

size_t FindPreviousPinFrom(size_t fromRow)


wxTextEditorModel::FinishBatch

void FinishBatch()


wxTextEditorModel::FreeCharacters

void FreeCharacters(char* buf)


wxTextEditorModel::GetActiveView

wxTextEditorView* GetActiveView()


wxTextEditorModel::GetAllText

void GetAllText(char ** text, size_t& textLen)

wxString GetAllText()


wxTextEditorModel::GetCursor

TPosition GetCursor()


wxTextEditorModel::GetEndOfSelection

TPosition GetEndOfSelection()


wxTextEditorModel::GetLineAlignedBlockSize

size_t GetLineAlignedBlockSize(char* start, char* end, size_t preferredSize)


wxTextEditorModel::GetLineCountInRange

size_t GetLineCountInRange(char* from, char* till)


wxTextEditorModel::GetPinAt

TPinBase* GetPinAt(size_t row, int pinTypeCode)


wxTextEditorModel::GetPinNoAt

size_t GetPinNoAt(size_t row, int pinTypeCode)


wxTextEditorModel::GetPins

PinListT& GetPins()


wxTextEditorModel::GetSelection

void GetSelection(char ** text, size_t& textLen)


wxTextEditorModel::GetStartOfSelection

TPosition GetStartOfSelection()

accessors

void GetTextFromRange(const TPosition& from, const TPosition& till, wxString& toStr)


wxTextEditorModel::GetTextFromRange

void GetTextFromRange(const TPosition& from, const TPosition& till, char ** text, size_t& textLen)


wxTextEditorModel::GetTotalRowCount

size_t GetTotalRowCount()


wxTextEditorModel::InsertText

void InsertText(const TPosition& pos, const char* text, size_t len)

void InsertText(const TPosition& pos, const wxString& text)


wxTextEditorModel::IsInsertMode

bool IsInsertMode()


wxTextEditorModel::IsLastLine

bool IsLastLine(const TPosition& pos)


wxTextEditorModel::IsModified

bool IsModified()


wxTextEditorModel::IsReadOnly

bool IsReadOnly()

status


wxTextEditorModel::IsUnixText

bool IsUnixText()


wxTextEditorModel::LoadTextFromFile

void LoadTextFromFile(const wxString& fname)


wxTextEditorModel::MergeChange

void MergeChange(size_t fromRow, size_t nRows)


wxTextEditorModel::NotifyAllViews

void NotifyAllViews()

void NotifyTextChanged(TPosition from, TPosition till, TEXT_CHANGE_TYPE ct)


wxTextEditorModel::NotifyTextChanged

void NotifyTextChanged(size_t atRow, size_t nRows, TEXT_CHANGE_TYPE ct)


wxTextEditorModel::NotifyView

void NotifyView()

does on-screen updates


wxTextEditorModel::OnCopy

void OnCopy()

clipboard functions


wxTextEditorModel::OnCut

void OnCut()


wxTextEditorKeyInterceptor::OnDblClick

bool OnDblClick(wxMouseEvent& event)

FOR NOW:: some unrelated event


wxTextEditorModel::OnDelete

void OnDelete()


wxTextEditorModel::OnDeleteBack

void OnDeleteBack()


wxTextEditorModel::OnDeleteLine

void OnDeleteLine()


wxTextEditorModel::OnEndOfLine

void OnEndOfLine()


wxTextEditorModel::OnEndOfText

void OnEndOfText()


wxTextEditorModel::OnFind

bool OnFind()


wxTextEditorModel::OnFindNext

bool OnFindNext(bool quiet = FALSE)


wxTextEditorModel::OnFindPrevious

bool OnFindPrevious(bool quiet = FALSE)


wxTextEditorModel::OnGotoLine

void OnGotoLine(unsigned int line, unsigned int col)

void OnGotoLine()


wxTextEditorModel::OnInsertChar

void OnInsertChar(char ch)

user-level commands **mutable (undoable) commands


wxTextEditorModel::OnMoveDown

void OnMoveDown()


wxTextEditorModel::OnMoveLeft

void OnMoveLeft()

imutable commands


wxTextEditorModel::OnMoveRight

void OnMoveRight()


wxTextEditorModel::OnMoveToPosition

void OnMoveToPosition(const TPosition& pos)


wxTextEditorModel::OnMoveUp

void OnMoveUp()


wxTextEditorModel::OnNextBookmark

void OnNextBookmark()


wxTextEditorModel::OnPageDown

void OnPageDown()


wxTextEditorModel::OnPageUp

void OnPageUp()


wxTextEditorModel::OnPaste

void OnPaste()


wxTextEditorModel::OnPreviousBookmark

void OnPreviousBookmark()


wxTextEditorModel::OnRedo

void OnRedo()


wxTextEditorModel::OnReplace

bool OnReplace()

search/replace


wxTextEditorModel::OnReplaceNext

bool OnReplaceNext()


wxTextEditorModel::OnSelectAll

void OnSelectAll()


wxTextEditorModel::OnSelectWord

void OnSelectWord()


wxTextEditorModel::OnShiftSelectionIndent

void OnShiftSelectionIndent(bool left)


wxTextEditorModel::OnSlideDown

void OnSlideDown()


wxTextEditorModel::OnSlideUp

void OnSlideUp()


wxTextEditorModel::OnStartOfLine

void OnStartOfLine()


wxTextEditorModel::OnStartOfText

void OnStartOfText()


wxTextEditorModel::OnToggleBookmark

void OnToggleBookmark()

bookmarks


wxTextEditorModel::OnUndo

void OnUndo()


wxTextEditorModel::OnWordLeft

void OnWordLeft()


wxTextEditorModel::OnWordRight

void OnWordRight()


wxTextEditorModel::PrepareForCommand

void PrepareForCommand()


wxTextEditorModel::PrependCommand

void PrependCommand(TCommand* pCmd)


wxTextEditorModel::RecalcBlockProperties

void RecalcBlockProperties(TBlockIteratorT& iter)


wxTextEditorModel::RedoImpl

void RedoImpl()


wxTextEditorModel::RemovePinAt

bool RemovePinAt(size_t row, int pinTypeCode)


wxTextEditorModel::RemoveView

void RemoveView(wxTextEditorView* pView)


wxTextEditorModel::ResetSelection

void ResetSelection()


wxTextEditorModel::SaveTextToFile

void SaveTextToFile(const wxString& fname)


wxTextEditorModel::ScrToTextColumn

size_t ScrToTextColumn(TPosition pos)


wxTextEditorModel::SelectionIsEmpty

bool SelectionIsEmpty()


wxTextEditorModel::SetActiveView

void SetActiveView(wxTextEditorView* pView)


wxTextEditorModel::SetCheckpoint

void SetCheckpoint()

check-pointing


wxTextEditorModel::SetCursor

void SetCursor(const TPosition& pos)


wxTextEditorModel::SetEndOfSelection

void SetEndOfSelection(const TPosition& pos)


wxTextEditorModel::SetInsertMode

void SetInsertMode(bool on)


wxTextEditorModel::SetPostPos

void SetPostPos(const TPosition& pos)


wxTextEditorModel::SetReadOnly

void SetReadOnly(bool on)


wxTextEditorModel::SetRowsPerPage

void SetRowsPerPage(size_t n)


wxTextEditorModel::SetSelectionEditMode

void SetSelectionEditMode(bool editIsOn)


wxTextEditorModel::SetStartOfSelection

void SetStartOfSelection(const TPosition& pos)


wxTextEditorModel::StartBatch

void StartBatch()


wxTextEditorModel::TextToScrColumn

size_t TextToScrColumn(const TPosition& pos)


wxTextEditorModel::TrackSelection

void TrackSelection()


wxTextEditorModel::UndoImpl

void UndoImpl()


wxTextEditorModel::WriteText

void WriteText(const wxString& text)

writes text at current cursor position