mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 22:37:39 +00:00
Small improvements to allow changing of the text container for a text
view. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29648 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4f02b08fb2
commit
c9d1292563
4 changed files with 21 additions and 6 deletions
|
@ -1142,13 +1142,16 @@ to this method from the text container or layout manager.
|
|||
[self _updateMultipleTextViews];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- (void) replaceTextContainer: (NSTextContainer *)newContainer
|
||||
{
|
||||
NSLog(@"TODO! [NSTextView -replaceTextContainer:] isn't implemented");
|
||||
NSLayoutManager *lm = RETAIN(_layoutManager);
|
||||
unsigned int index = [[lm textContainers] indexOfObject: _textContainer];
|
||||
|
||||
[_textContainer setTextView: nil];
|
||||
[lm removeTextContainerAtIndex: index];
|
||||
[lm insertTextContainer: newContainer atIndex: index];
|
||||
[newContainer setTextView: self];
|
||||
RELEASE(lm);
|
||||
}
|
||||
|
||||
- (NSTextContainer *) textContainer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue