mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 05:10:58 +00:00
Implemented textContainerChangeTextView:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8483 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2d4e6ceb4c
commit
1a11570535
1 changed files with 48 additions and 22 deletions
|
@ -537,10 +537,36 @@ static NSComparisonResult aSort(GSIArrayItem i0, GSIArrayItem i1)
|
||||||
actualCharacterRange: NULL];
|
actualCharacterRange: NULL];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called by NSTextContainer whenever its textView changes. Used to
|
/* Called by NSTextContainer whenever its textView changes. Used to
|
||||||
// keep notifications in synch.
|
keep notifications in synch. */
|
||||||
- (void) textContainerChangedTextView: (NSTextContainer*)aContainer
|
- (void) textContainerChangedTextView: (NSTextContainer*)aContainer
|
||||||
{
|
{
|
||||||
|
/* It only makes sense if we have more than one text container */
|
||||||
|
if (_textContainersCount > 1)
|
||||||
|
{
|
||||||
|
unsigned index;
|
||||||
|
|
||||||
|
index = [_textContainers indexOfObjectIdenticalTo: aContainer];
|
||||||
|
|
||||||
|
if (index != NSNotFound)
|
||||||
|
{
|
||||||
|
if (index == 0)
|
||||||
|
{
|
||||||
|
/* It's the first text view. Need to update everything. */
|
||||||
|
int i;
|
||||||
|
|
||||||
|
_firstTextView = [aContainer textView];
|
||||||
|
|
||||||
|
for (i = 0; i < _textContainersCount; i++)
|
||||||
|
{
|
||||||
|
NSTextView *tv;
|
||||||
|
|
||||||
|
tv = [[_textContainers objectAtIndex: i] textView];
|
||||||
|
[tv _updateMultipleTextViews];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sent from processEditing in NSTextStorage. newCharRange is the
|
// Sent from processEditing in NSTextStorage. newCharRange is the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue