Update image

This commit is contained in:
Gregory John Casamento 2024-12-30 04:02:34 -05:00
parent a4a3a6efb8
commit 9be9b24dd8
7 changed files with 46 additions and 84 deletions

View file

@ -3,6 +3,7 @@
FirstResponder = {
Actions = (
"iconView:",
"editorButton:",
"outlineView:"
);
Super = NSObject;
@ -10,12 +11,14 @@
GormObjectViewController = {
Actions = (
"iconView:",
"outlineView:"
"outlineView:",
"editorButton:"
);
Outlets = (
displayView,
iconButton,
outlineButton
outlineButton,
editorButton
);
Super = NSViewController;
};

View file

@ -69,8 +69,6 @@ GormCore_HEADER_FILES = \
GormNSWindow.h \
GormObjectEditor.h \
GormObjectInspector.h \
GormObjectMainView.h \
GormObjectOutlineView.h \
GormObjectViewController.h \
GormOpenGLView.h \
GormOutlineView.h \
@ -151,8 +149,6 @@ GormCore_OBJC_FILES = \
GormNSWindow.m \
GormObjectEditor.m \
GormObjectInspector.m \
GormObjectMainView.m \
GormObjectOutlineView.m \
GormObjectViewController.m \
GormOpenGLView.m \
GormOutlineView.m \
@ -224,6 +220,7 @@ GormCore_RESOURCE_FILES = \
Images/browserView.tiff \
Images/outlineView.tiff \
Images/iconView.tiff \
Images/editor.tiff \
Resources/VersionProfiles.plist \
Resources/ClassInformation.plist

View file

@ -1,48 +0,0 @@
/* Definition of class GormObjectMainView
Copyright (C) 2024 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: 25-12-2024
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _GormObjectMainView_h_INCLUDE
#define _GormObjectMainView_h_INCLUDE
#import <AppKit/AppKit.h>
#import <GNUstepBase/GSVersionMacros.h>
#if defined(__cplusplus)
extern "C" {
#endif
GS_EXPORT_CLASS
@interface GormObjectMainView : NSView
{
IBOutlet NSBox *contentView;
}
@end
#if defined(__cplusplus)
}
#endif
#endif /* _GormObjectMainView_h_INCLUDE */

View file

@ -1,30 +0,0 @@
/* Implementation of class GormObjectMainView
Copyright (C) 2024 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: 25-12-2024
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "GormObjectMainView.h"
@implementation GormObjectMainView
@end

View file

@ -12,11 +12,15 @@
IBOutlet id displayView;
IBOutlet id iconButton;
IBOutlet id outlineButton;
IBOutlet id editorButton;
// Document
GormDocument *_document;
id _iconView;
id _outlineView;
// Editor flag
BOOL _editor;
}
- (GormDocument *) document;
@ -28,10 +32,15 @@
- (id) outlineView;
- (void) setOutlineView: (id)outlineView;
- (BOOL) editor;
- (void) setEditor: (BOOL)f;
- (void) resetDisplayView: (NSView *)view;
- (void) reloadOutlineView;
- (IBAction) iconView: (id)sender;
- (IBAction) outlineView: (id)sender;
- (IBAction) editorButton: (id)sender;
@end

View file

@ -14,6 +14,7 @@
_document = nil;
_iconView = nil;
_outlineView = nil;
_editor = NO;
}
return self;
}
@ -57,6 +58,16 @@
ASSIGN(_outlineView, outlineView);
}
- (BOOL) editor
{
return _editor;
}
- (void) setEditor: (BOOL)f
{
_editor = f;
}
- (IBAction) iconView: (id)sender
{
NSDebugLog(@"Called %@", NSStringFromSelector(_cmd));
@ -72,10 +83,30 @@
[self resetDisplayView: _outlineView];
}
- (IBAction) editorButton: (id)sender
{
_editor = !_editor;
}
- (void) resetDisplayView: (NSView *)view
{
[displayView setContentView: view];
NSDebugLog(@"displayView = %@", view);
}
- (void) reloadOutlineView
{
if (_editor == NO)
{
[_document deactivateEditors];
}
[[_outlineView documentView] reloadData];
if (_editor == NO)
{
[_document reactivateEditors];
}
}
@end