edbee - Qt Editor Library
|
A full line data text change. This means the growing or shrinking of the line data buffer It stores the old-data list that needs to be remebered for undoing. More...
#include <linedatalistchange.h>
Public Member Functions | |
LineDataListChange (TextLineDataManager *manager, int offset, int lenght, int newLength) | |
The line data text change constructor. More... | |
virtual | ~LineDataListChange () |
Destructs the linedata textchange. More... | |
virtual void | execute (TextDocument *document) |
Executes the line data changes. More... | |
virtual void | revert (TextDocument *doc) |
Reverts the line data change. More... | |
virtual void | mergeStoredData (AbstractRangedChange *change) |
This method merges the old data with the new data change the data to merge with. More... | |
virtual bool | giveAndMerge (TextDocument *document, Change *textChange) |
Merges mutliple textline changes together. More... | |
virtual QString | toString () |
Converts this change to a string. More... | |
int | offset () const |
Returns the line. More... | |
void | setOffset (int value) |
Sets the new offset. More... | |
virtual int | docLength () const |
Retursn the length in the document/data. More... | |
void | setDocLength (int value) |
This method sets the old length. More... | |
virtual int | storedLength () const |
The lengt of the content in this object. More... | |
TextLineDataList ** | oldListList () |
returns the old list list More... | |
int | oldListListLength () |
retursn the length of th eold list list More... | |
Public Member Functions inherited from edbee::AbstractRangedChange | |
virtual | ~AbstractRangedChange () |
default destructor is empty More... | |
void | addOffset (int amount) |
Adds the given amount to the offset. More... | |
bool | isOverlappedBy (AbstractRangedChange *secondChange) |
This method checks if this textchange is overlapped by the second text change overlapping is an exclusive overlap, which means the changes are really on top of eachother to test if the changes are touching use isTouchedBy. More... | |
bool | isTouchedBy (AbstractRangedChange *secondChange) |
Touched ranges are ranges that are next to eachother Touching means the end offset of one range is the start offset of the other range. More... | |
Public Member Functions inherited from edbee::Change | |
virtual | ~Change () |
a virtual empty destructor More... | |
virtual bool | canUndo () |
This method should return true if the change can be reverted. More... | |
virtual bool | isPersistenceRequired () |
This flag is used to mark this stack item as non-persistence requirable The default behaviour is that every textchange requires persistence. It is also possible to have certain changes that do not require persitence but should be placed on the undo stack. More... | |
virtual TextEditorController * | controllerContext () |
A text command can belong to a controller/view When it's a view only command. The undo only applies only to this view warning a DOCUMENT change may NEVER return a controllerContext!! More... | |
bool | isDocumentChange () |
this method can be used to check if the given change is a document change More... | |
virtual bool | isGroup () |
This method returns true if this change is a group change. When an object is group change it should be inherited by TextChangeGroup. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from edbee::AbstractRangedChange | |
int | getMergedDocLength (AbstractRangedChange *change) |
Calculates the merged length. More... | |
int | getMergedStoredLength (AbstractRangedChange *change) |
Calculates the merge data size, that's required for merging the given change. More... | |
void | mergeStoredDataViaMemcopy (void *targetData, void *data, void *changeData, AbstractRangedChange *change, int itemSize) |
This method merges the data via a memcopy. I really don't like this way of merging the data. though this is a way which support all kinds of arrays. I cannot use inheritance, because the types like QString don't have a common ancestor. More... | |
bool | merge (AbstractRangedChange *change) |
This method merges the change. More... | |
A full line data text change. This means the growing or shrinking of the line data buffer It stores the old-data list that needs to be remebered for undoing.
edbee::LineDataListChange::LineDataListChange | ( | TextLineDataManager * | manager, |
int | line, | ||
int | length, | ||
int | newLength | ||
) |
The line data text change constructor.
manger | the line data manager |
line | the starting line of the change |
length | the number of lines affected |
newLength | the new number of lines |
|
virtual |
Destructs the linedata textchange.
|
virtual |
Retursn the length in the document/data.
Implements edbee::AbstractRangedChange.
|
virtual |
Executes the line data changes.
document | the document to execute the change for |
new X[]() => fills it with zero's
Implements edbee::Change.
|
virtual |
Merges mutliple textline changes together.
document | the document the changes are fior |
textChange | the other textchange |
Reimplemented from edbee::Change.
|
virtual |
This method merges the old data with the new data change the data to merge with.
Implements edbee::AbstractRangedChange.
|
virtual |
Returns the line.
Implements edbee::AbstractRangedChange.
TextLineDataList ** edbee::LineDataListChange::oldListList | ( | ) |
returns the old list list
int edbee::LineDataListChange::oldListListLength | ( | ) |
retursn the length of th eold list list
|
virtual |
Reverts the line data change.
doc | the document to execute the change for |
Reimplemented from edbee::Change.
|
virtual |
This method sets the old length.
value | the new old-length value |
Implements edbee::AbstractRangedChange.
|
virtual |
Sets the new offset.
Implements edbee::AbstractRangedChange.
|
virtual |
The lengt of the content in this object.
Implements edbee::AbstractRangedChange.
|
virtual |
Converts this change to a string.
Implements edbee::Change.