mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 02:20:37 +00:00
Documentation tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14760 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d73d397164
commit
92867e201f
3 changed files with 31 additions and 21 deletions
|
@ -122,9 +122,13 @@
|
|||
return _layoutManager;
|
||||
}
|
||||
|
||||
- (void) replaceLayoutManager: (NSLayoutManager *)newLayoutManager
|
||||
/**
|
||||
* Replaces the layout manager while maintaining the text object
|
||||
* framework intact.
|
||||
*/
|
||||
- (void) replaceLayoutManager: (NSLayoutManager*)aLayoutManager
|
||||
{
|
||||
if (newLayoutManager != _layoutManager)
|
||||
if (aLayoutManager != _layoutManager)
|
||||
{
|
||||
id textStorage = [_layoutManager textStorage];
|
||||
NSArray *textContainers = [_layoutManager textContainers];
|
||||
|
@ -133,7 +137,7 @@
|
|||
|
||||
RETAIN (oldLayoutManager);
|
||||
[textStorage removeLayoutManager: _layoutManager];
|
||||
[textStorage addLayoutManager: newLayoutManager];
|
||||
[textStorage addLayoutManager: aLayoutManager];
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
|
@ -141,7 +145,7 @@
|
|||
|
||||
container = RETAIN ([textContainers objectAtIndex: i]);
|
||||
[_layoutManager removeTextContainerAtIndex: i];
|
||||
[newLayoutManager addTextContainer: container];
|
||||
[aLayoutManager addTextContainer: container];
|
||||
/* The textview is caching the layout manager; refresh the
|
||||
* cache with this do-nothing call. */
|
||||
[[container textView] setTextContainer: container];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue