Changes to use _containerView as main internal view.

This commit is contained in:
Gregory John Casamento 2021-08-03 19:44:29 -04:00
parent 7504a154e1
commit 6c59f53df4
2 changed files with 12 additions and 10 deletions

View file

@ -47,6 +47,7 @@
NSMutableString *_path; NSMutableString *_path;
NSString *_categoryPath; NSString *_categoryPath;
NSWindow *_window; NSWindow *_window;
NSView *_containerView;
BOOL _isEdited; BOOL _isEdited;
BOOL _isEditable; BOOL _isEditable;

View file

@ -104,8 +104,7 @@
- (void)_createInternalView - (void)_createInternalView
{ {
NSRect rect = NSMakeRect(0,0,512,320); NSRect rect = NSMakeRect(0,0,512,320 - 15);
NSView *containerView;
// Scroll view // Scroll view
_intScrollView = [[NSScrollView alloc] initWithFrame:rect]; _intScrollView = [[NSScrollView alloc] initWithFrame:rect];
@ -125,17 +124,19 @@
[_intStatusField setSelectable:NO]; [_intStatusField setSelectable:NO];
[_intStatusField setDrawsBackground:NO]; [_intStatusField setDrawsBackground:NO];
[_intStatusField setAutoresizingMask: NSViewWidthSizable]; [_intStatusField setAutoresizingMask: NSViewWidthSizable];
containerView = [[NSView alloc] init]; _containerView = [[NSView alloc] init];
[containerView addSubview:_intStatusField]; [_containerView addSubview:_intStatusField];
[containerView addSubview:_intScrollView]; [_containerView addSubview:_intScrollView];
NSLog(@"%@", _intStatusField);
NSLog(@"%@", [_intStatusField superview]);
/* /*
* Setting up ext view / scroll view / window * Setting up ext view / scroll view / window
*/ */
[_intScrollView setDocumentView:_intEditorView]; [_intScrollView setDocumentView:_intEditorView];
[_intEditorView setNeedsDisplay:YES]; [_intEditorView setNeedsDisplay:YES];
RELEASE(_intEditorView); RELEASE(_intEditorView);
RELEASE(containerView); // RELEASE(containerView);
} }
- (PCEditorView *)_createEditorViewWithFrame:(NSRect)fr - (PCEditorView *)_createEditorViewWithFrame:(NSRect)fr
@ -460,7 +461,7 @@
- (NSView *)editorView - (NSView *)editorView
{ {
if (!_intScrollView) if (!_containerView)
{ {
[self _createInternalView]; [self _createInternalView];
} }
@ -469,11 +470,11 @@
- (NSView *)componentView - (NSView *)componentView
{ {
if (!_intScrollView) if (!_containerView)
{ {
[self _createInternalView]; [self _createInternalView];
} }
return _intScrollView; return _containerView;
} }
- (NSString *)path - (NSString *)path
@ -900,7 +901,7 @@
{ {
if ([sender isEqual:_window]) if ([sender isEqual:_window])
{ {
if (_intScrollView) if (_containerView)
{ {
// Just close if this file also displayed in int view // Just close if this file also displayed in int view
_isWindowed = NO; _isWindowed = NO;