mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 13:10:52 +00:00
Make sure the text network stays synchronized when one part changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15760 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5580ccd32c
commit
6d9a9c890c
3 changed files with 30 additions and 1 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2003-01-29 21:14 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/GSLayoutManager.m (-setTextStorage:): Tell our text
|
||||
containers about the change.
|
||||
|
||||
* Source/NSTextContainer.m (-setLayoutManager:): Tell our text view
|
||||
about the change.
|
||||
|
||||
* Source/NSTextView.m: Guard in a few places where _layoutManager
|
||||
might be nil.
|
||||
|
||||
2003-01-29 16:01 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/GSHorizontalTypesetter.m (-layoutLineNewParagraph:): Place
|
||||
|
|
|
@ -1991,8 +1991,14 @@ forStartOfGlyphRange: (NSRange)glyphRange
|
|||
* more for internal use by the text system.
|
||||
* Invalidates the entire layout (should it??)
|
||||
*/
|
||||
/*
|
||||
See [NSTextView -setTextContainer:] for more information about these calls.
|
||||
*/
|
||||
- (void) setTextStorage: (NSTextStorage *)aTextStorage
|
||||
{
|
||||
int i;
|
||||
textcontainer_t *tc;
|
||||
|
||||
[self _invalidateEverything];
|
||||
|
||||
/*
|
||||
|
@ -2001,7 +2007,14 @@ forStartOfGlyphRange: (NSRange)glyphRange
|
|||
*/
|
||||
_textStorage = aTextStorage;
|
||||
|
||||
/* TODO: tell all the text containers about that change! */
|
||||
/*
|
||||
We send this message to all text containers so they can respond to the
|
||||
change (most importantly to let them tell their text views).
|
||||
*/
|
||||
for (i = 0, tc = textcontainers; i < num_textcontainers; i++, tc++)
|
||||
{
|
||||
[tc->textContainer setLayoutManager: self];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -118,11 +118,16 @@ use bounds rectangle instead of frame? */
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
/*
|
||||
See [NSTextView -setTextContainer:] for more information about these calls.
|
||||
*/
|
||||
- (void) setLayoutManager: (GSLayoutManager*)aLayoutManager
|
||||
{
|
||||
/* The layout manager owns us - so he retains us and we don't retain
|
||||
him. */
|
||||
_layoutManager = aLayoutManager;
|
||||
/* Tell our text view about the change. */
|
||||
[_textView setTextContainer: self];
|
||||
}
|
||||
|
||||
- (GSLayoutManager*) layoutManager
|
||||
|
|
Loading…
Reference in a new issue