mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-23 06:20:47 +00:00
Merge branch 'master' into gorm-canvas-changes
This commit is contained in:
commit
b673185658
145 changed files with 3114 additions and 1323 deletions
99
.github/scripts/dependencies.sh
vendored
Executable file
99
.github/scripts/dependencies.sh
vendored
Executable file
|
@ -0,0 +1,99 @@
|
|||
#! /usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
|
||||
install_gnustep_make() {
|
||||
echo "::group::GNUstep Make"
|
||||
cd $DEPS_PATH
|
||||
git clone -q -b ${TOOLS_MAKE_BRANCH:-master} https://github.com/gnustep/tools-make.git
|
||||
cd tools-make
|
||||
MAKE_OPTS=
|
||||
if [ -n "$HOST" ]; then
|
||||
MAKE_OPTS="$MAKE_OPTS --host=$HOST"
|
||||
fi
|
||||
if [ -n "$RUNTIME_VERSION" ]; then
|
||||
MAKE_OPTS="$MAKE_OPTS --with-runtime-abi=$RUNTIME_VERSION"
|
||||
fi
|
||||
./configure --prefix=$INSTALL_PATH --with-library-combo=$LIBRARY_COMBO $MAKE_OPTS || cat config.log
|
||||
make install
|
||||
|
||||
echo Objective-C build flags:
|
||||
$INSTALL_PATH/bin/gnustep-config --objc-flags
|
||||
echo "::endgroup::"
|
||||
}
|
||||
|
||||
install_libobjc2() {
|
||||
echo "::group::libobjc2"
|
||||
cd $DEPS_PATH
|
||||
git clone -q https://github.com/gnustep/libobjc2.git
|
||||
cd libobjc2
|
||||
git submodule sync
|
||||
git submodule update --init
|
||||
mkdir build
|
||||
cd build
|
||||
cmake \
|
||||
-DTESTS=off \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DGNUSTEP_INSTALL_TYPE=NONE \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PATH \
|
||||
../
|
||||
make install
|
||||
echo "::endgroup::"
|
||||
}
|
||||
|
||||
install_libdispatch() {
|
||||
echo "::group::libdispatch"
|
||||
cd $DEPS_PATH
|
||||
# will reference upstream after https://github.com/apple/swift-corelibs-libdispatch/pull/534 is merged
|
||||
git clone -q -b system-blocksruntime https://github.com/ngrewe/swift-corelibs-libdispatch.git libdispatch
|
||||
mkdir libdispatch/build
|
||||
cd libdispatch/build
|
||||
# -Wno-error=void-pointer-to-int-cast to work around build error in queue.c due to -Werror
|
||||
cmake \
|
||||
-DBUILD_TESTING=off \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PATH \
|
||||
-DCMAKE_C_FLAGS="-Wno-error=void-pointer-to-int-cast" \
|
||||
-DINSTALL_PRIVATE_HEADERS=1 \
|
||||
-DBlocksRuntime_INCLUDE_DIR=$INSTALL_PATH/include \
|
||||
-DBlocksRuntime_LIBRARIES=$INSTALL_PATH/lib/libobjc.so \
|
||||
../
|
||||
make install
|
||||
echo "::endgroup::"
|
||||
}
|
||||
|
||||
install_gnustep_gui() {
|
||||
echo "::group::GNUstep GUI"
|
||||
cd $DEPS_PATH
|
||||
. $INSTALL_PATH/share/GNUstep/Makefiles/GNUstep.sh
|
||||
git clone -q -b ${LIBS_GUI_BRANCH:-master} https://github.com/gnustep/libs-gui.git
|
||||
cd libs-gui
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
echo "::endgroup::"
|
||||
}
|
||||
|
||||
install_gnustep_base() {
|
||||
echo "::group::GNUstep Base"
|
||||
cd $DEPS_PATH
|
||||
. $INSTALL_PATH/share/GNUstep/Makefiles/GNUstep.sh
|
||||
git clone -q -b ${LIBS_BASE_BRANCH:-master} https://github.com/gnustep/libs-base.git
|
||||
cd libs-base
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
echo "::endgroup::"
|
||||
}
|
||||
|
||||
mkdir -p $DEPS_PATH
|
||||
|
||||
# Windows MSVC toolchain uses tools-windows-msvc scripts to install non-GNUstep dependencies
|
||||
if [ "$LIBRARY_COMBO" = "ng-gnu-gnu" -a "$IS_WINDOWS_MSVC" != "true" ]; then
|
||||
install_libobjc2
|
||||
install_libdispatch
|
||||
fi
|
||||
|
||||
install_gnustep_make
|
||||
install_gnustep_base
|
||||
install_gnustep_gui
|
126
.github/workflows/main.yml
vendored
Normal file
126
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,126 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tools_make_branch:
|
||||
description: "tools-make branch"
|
||||
default: "master"
|
||||
required: true
|
||||
libs_base_branch:
|
||||
description: "libs-base branch"
|
||||
default: "master"
|
||||
required: true
|
||||
libs_back_branch:
|
||||
description: "libs-back branch"
|
||||
default: "master"
|
||||
required: true
|
||||
|
||||
env:
|
||||
APT_PACKAGES: >-
|
||||
pkg-config
|
||||
libgnutls28-dev
|
||||
libffi-dev
|
||||
libicu-dev
|
||||
libxml2-dev
|
||||
libxslt1-dev
|
||||
libssl-dev
|
||||
libavahi-client-dev
|
||||
zlib1g-dev
|
||||
gnutls-bin
|
||||
libcurl4-gnutls-dev
|
||||
libgmp-dev
|
||||
libcairo2-dev
|
||||
|
||||
# packages for GCC Objective-C runtime
|
||||
APT_PACKAGES_gcc: >-
|
||||
libobjc-10-dev
|
||||
libblocksruntime-dev
|
||||
gobjc
|
||||
|
||||
# packages for libobjc2 / libdispatch
|
||||
APT_PACKAGES_clang: >-
|
||||
libpthread-workqueue-dev
|
||||
|
||||
jobs:
|
||||
########### Linux ###########
|
||||
linux:
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ubuntu-latest
|
||||
# don't run pull requests from local branches twice
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: Ubuntu x64 GCC
|
||||
library-combo: gnu-gnu-gnu
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
|
||||
- name: Ubuntu x64 Clang gnustep-1.9
|
||||
library-combo: ng-gnu-gnu
|
||||
runtime-version: gnustep-1.9
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
|
||||
- name: Ubuntu x64 Clang gnustep-2.0
|
||||
library-combo: ng-gnu-gnu
|
||||
runtime-version: gnustep-2.0
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
|
||||
env:
|
||||
SRC_PATH: ${{ github.workspace }}/source
|
||||
DEPS_PATH: ${{ github.workspace }}/dependencies
|
||||
INSTALL_PATH: ${{ github.workspace }}/build
|
||||
CC: ${{ matrix.CC }}
|
||||
CXX: ${{ matrix.CXX }}
|
||||
LIBRARY_COMBO: ${{ matrix.library-combo }}
|
||||
RUNTIME_VERSION: ${{ matrix.runtime-version }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ env.SRC_PATH }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: ${{ env.SRC_PATH }}
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get -q -y update
|
||||
sudo apt-get -q -y install $APT_PACKAGES $APT_PACKAGES_${{ matrix.library-combo == 'ng-gnu-gnu' && 'clang' || 'gcc' }}
|
||||
|
||||
# gnustep-2.0 runtime requires ld.gold or lld
|
||||
if [ "$RUNTIME_VERSION" = "gnustep-2.0" ]; then
|
||||
sudo update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 10
|
||||
fi
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
TOOLS_MAKE_BRANCH: ${{github.event.inputs.tools_make_branch}}
|
||||
LIBS_BASE_BRANCH: ${{github.event.inputs.libs_base_branch}}
|
||||
LIBS_GUI_BRANCH: ${{github.event.inputs.libs_gui_branch}}
|
||||
run: ./.github/scripts/dependencies.sh
|
||||
|
||||
- name: Build source for Gorm
|
||||
run: . $INSTALL_PATH/share/GNUstep/Makefiles/GNUstep.sh && make && make install
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
. $INSTALL_PATH/share/GNUstep/Makefiles/GNUstep.sh
|
||||
make check
|
||||
|
||||
- name: Upload logs
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: Logs - ${{ matrix.name }}
|
||||
path: |
|
||||
${{ env.SRC_PATH }}/config.log
|
||||
${{ env.SRC_PATH }}/Tests/tests.log
|
|
@ -50,7 +50,7 @@ SVN_MODULE_NAME = gorm
|
|||
SVN_BASE_URL = svn+ssh://svn.gna.org/svn/gnustep/apps
|
||||
|
||||
|
||||
include ./Version
|
||||
include ../../Version
|
||||
|
||||
#
|
||||
# Each palette is a subproject
|
||||
|
@ -142,8 +142,6 @@ Gorm_RESOURCE_FILES = \
|
|||
Images/tabbot_nib.tiff \
|
||||
Images/tabtop_nib.tiff \
|
||||
Images/titleOnly_nib.tiff \
|
||||
Images/browserView.tiff \
|
||||
Images/outlineView.tiff \
|
||||
Images/LeftArr.tiff \
|
||||
Images/RightArr.tiff \
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
if(active != nil)
|
||||
{
|
||||
cm = [active classManager];
|
||||
s = [selectionOwner selection];
|
||||
s = [_selectionOwner selection];
|
||||
}
|
||||
|
||||
if(sel_isEqual(action, @selector(loadPalette:)))
|
||||
|
@ -156,7 +156,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
return [selectionOwner respondsToSelector: @selector(copySelection)];
|
||||
return [_selectionOwner respondsToSelector: @selector(copySelection)];
|
||||
}
|
||||
else if (sel_isEqual(action, @selector(cut:)))
|
||||
{
|
||||
|
@ -174,8 +174,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
return ([selectionOwner respondsToSelector: @selector(copySelection)]
|
||||
&& [selectionOwner respondsToSelector: @selector(deleteSelection)]);
|
||||
return ([_selectionOwner respondsToSelector: @selector(copySelection)]
|
||||
&& [_selectionOwner respondsToSelector: @selector(deleteSelection)]);
|
||||
}
|
||||
else if (sel_isEqual(action, @selector(delete:)))
|
||||
{
|
||||
|
@ -193,7 +193,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
return [selectionOwner respondsToSelector: @selector(deleteSelection)];
|
||||
return [_selectionOwner respondsToSelector: @selector(deleteSelection)];
|
||||
}
|
||||
else if (sel_isEqual(action, @selector(paste:)))
|
||||
{
|
||||
|
@ -212,7 +212,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
return [selectionOwner respondsToSelector: @selector(pasteInSelection)];
|
||||
return [_selectionOwner respondsToSelector: @selector(pasteInSelection)];
|
||||
}
|
||||
else if (sel_isEqual(action, @selector(setName:)))
|
||||
{
|
||||
|
@ -259,7 +259,7 @@
|
|||
|
||||
if(sel_isEqual(action, @selector(createSubclass:)))
|
||||
{
|
||||
NSArray *s = [selectionOwner selection];
|
||||
NSArray *s = [_selectionOwner selection];
|
||||
id o = nil;
|
||||
NSString *name = nil;
|
||||
|
||||
|
@ -345,7 +345,7 @@
|
|||
|
||||
- (IBAction) stop: (id)sender
|
||||
{
|
||||
if(isTesting == NO)
|
||||
if(_isTesting == NO)
|
||||
{
|
||||
// [super stop: sender];
|
||||
}
|
||||
|
@ -365,12 +365,12 @@
|
|||
/** Info Menu Actions */
|
||||
- (IBAction) preferencesPanel: (id) sender
|
||||
{
|
||||
if(! preferencesController)
|
||||
if(! _preferencesController)
|
||||
{
|
||||
preferencesController = [[GormPrefController alloc] init];
|
||||
_preferencesController = [[GormPrefController alloc] init];
|
||||
}
|
||||
|
||||
[[preferencesController panel] makeKeyAndOrderFront:nil];
|
||||
[[_preferencesController panel] makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
/** Document Menu Actions */
|
||||
|
@ -403,8 +403,8 @@
|
|||
|
||||
- (IBAction) copy: (id)sender
|
||||
{
|
||||
if ([[selectionOwner selection] count] == 0
|
||||
|| [selectionOwner respondsToSelector: @selector(copySelection)] == NO)
|
||||
if ([[_selectionOwner selection] count] == 0
|
||||
|| [_selectionOwner respondsToSelector: @selector(copySelection)] == NO)
|
||||
return;
|
||||
|
||||
if([self isConnecting])
|
||||
|
@ -412,15 +412,15 @@
|
|||
[self stopConnecting];
|
||||
}
|
||||
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner copySelection];
|
||||
[(id<IBSelectionOwners,IBEditors>)_selectionOwner copySelection];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction) cut: (id)sender
|
||||
{
|
||||
if ([[selectionOwner selection] count] == 0
|
||||
|| [selectionOwner respondsToSelector: @selector(copySelection)] == NO
|
||||
|| [selectionOwner respondsToSelector: @selector(deleteSelection)] == NO)
|
||||
if ([[_selectionOwner selection] count] == 0
|
||||
|| [_selectionOwner respondsToSelector: @selector(copySelection)] == NO
|
||||
|| [_selectionOwner respondsToSelector: @selector(deleteSelection)] == NO)
|
||||
return;
|
||||
|
||||
if([self isConnecting])
|
||||
|
@ -428,13 +428,13 @@
|
|||
[self stopConnecting];
|
||||
}
|
||||
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner copySelection];
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner deleteSelection];
|
||||
[(id<IBSelectionOwners,IBEditors>)_selectionOwner copySelection];
|
||||
[(id<IBSelectionOwners,IBEditors>)_selectionOwner deleteSelection];
|
||||
}
|
||||
|
||||
- (IBAction) paste: (id)sender
|
||||
{
|
||||
if ([selectionOwner respondsToSelector: @selector(pasteInSelection)] == NO)
|
||||
if ([_selectionOwner respondsToSelector: @selector(pasteInSelection)] == NO)
|
||||
return;
|
||||
|
||||
if([self isConnecting])
|
||||
|
@ -442,14 +442,14 @@
|
|||
[self stopConnecting];
|
||||
}
|
||||
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner pasteInSelection];
|
||||
[(id<IBSelectionOwners,IBEditors>)_selectionOwner pasteInSelection];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction) delete: (id)sender
|
||||
{
|
||||
if ([[selectionOwner selection] count] == 0
|
||||
|| [selectionOwner respondsToSelector: @selector(deleteSelection)] == NO)
|
||||
if ([[_selectionOwner selection] count] == 0
|
||||
|| [_selectionOwner respondsToSelector: @selector(deleteSelection)] == NO)
|
||||
return;
|
||||
|
||||
if([self isConnecting])
|
||||
|
@ -457,13 +457,13 @@
|
|||
[self stopConnecting];
|
||||
}
|
||||
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner deleteSelection];
|
||||
[(id<IBSelectionOwners,IBEditors>)_selectionOwner deleteSelection];
|
||||
}
|
||||
|
||||
- (IBAction) selectAll: (id)sender
|
||||
{
|
||||
if ([[selectionOwner selection] count] == 0
|
||||
|| [selectionOwner respondsToSelector: @selector(deleteSelection)] == NO)
|
||||
if ([[_selectionOwner selection] count] == 0
|
||||
|| [_selectionOwner respondsToSelector: @selector(deleteSelection)] == NO)
|
||||
return;
|
||||
|
||||
if([self isConnecting])
|
||||
|
@ -471,7 +471,7 @@
|
|||
[self stopConnecting];
|
||||
}
|
||||
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner deleteSelection];
|
||||
[(id<IBSelectionOwners,IBEditors>)_selectionOwner deleteSelection];
|
||||
}
|
||||
|
||||
- (IBAction) selectAllItems: (id)sender
|
||||
|
@ -483,47 +483,47 @@
|
|||
|
||||
- (IBAction) groupSelectionInSplitView: (id)sender
|
||||
{
|
||||
if ([[selectionOwner selection] count] < 2
|
||||
|| [selectionOwner respondsToSelector: @selector(groupSelectionInSplitView)] == NO)
|
||||
if ([[_selectionOwner selection] count] < 2
|
||||
|| [_selectionOwner respondsToSelector: @selector(groupSelectionInSplitView)] == NO)
|
||||
return;
|
||||
|
||||
[(GormGenericEditor *)selectionOwner groupSelectionInSplitView];
|
||||
[(GormGenericEditor *)_selectionOwner groupSelectionInSplitView];
|
||||
}
|
||||
|
||||
- (IBAction) groupSelectionInBox: (id)sender
|
||||
{
|
||||
if ([selectionOwner respondsToSelector: @selector(groupSelectionInBox)] == NO)
|
||||
if ([_selectionOwner respondsToSelector: @selector(groupSelectionInBox)] == NO)
|
||||
return;
|
||||
[(GormGenericEditor *)selectionOwner groupSelectionInBox];
|
||||
[(GormGenericEditor *)_selectionOwner groupSelectionInBox];
|
||||
}
|
||||
|
||||
- (IBAction) groupSelectionInView: (id)sender
|
||||
{
|
||||
if ([selectionOwner respondsToSelector: @selector(groupSelectionInView)] == NO)
|
||||
if ([_selectionOwner respondsToSelector: @selector(groupSelectionInView)] == NO)
|
||||
return;
|
||||
[(GormGenericEditor *)selectionOwner groupSelectionInView];
|
||||
[(GormGenericEditor *)_selectionOwner groupSelectionInView];
|
||||
}
|
||||
|
||||
- (IBAction) groupSelectionInScrollView: (id)sender
|
||||
{
|
||||
if ([selectionOwner respondsToSelector: @selector(groupSelectionInScrollView)] == NO)
|
||||
if ([_selectionOwner respondsToSelector: @selector(groupSelectionInScrollView)] == NO)
|
||||
return;
|
||||
[(GormGenericEditor *)selectionOwner groupSelectionInScrollView];
|
||||
[(GormGenericEditor *)_selectionOwner groupSelectionInScrollView];
|
||||
}
|
||||
|
||||
- (IBAction) groupSelectionInMatrix: (id)sender
|
||||
{
|
||||
if ([selectionOwner respondsToSelector: @selector(groupSelectionInMatrix)] == NO)
|
||||
if ([_selectionOwner respondsToSelector: @selector(groupSelectionInMatrix)] == NO)
|
||||
return;
|
||||
[(GormGenericEditor *)selectionOwner groupSelectionInMatrix];
|
||||
[(GormGenericEditor *)_selectionOwner groupSelectionInMatrix];
|
||||
}
|
||||
|
||||
- (IBAction) ungroup: (id)sender
|
||||
{
|
||||
// NSLog(@"ungroup: selectionOwner %@", selectionOwner);
|
||||
if ([selectionOwner respondsToSelector: @selector(ungroup)] == NO)
|
||||
// NSLog(@"ungroup: _selectionOwner %@", _selectionOwner);
|
||||
if ([_selectionOwner respondsToSelector: @selector(ungroup)] == NO)
|
||||
return;
|
||||
[(GormGenericEditor *)selectionOwner ungroup];
|
||||
[(GormGenericEditor *)_selectionOwner ungroup];
|
||||
}
|
||||
|
||||
/** Classes actions */
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
{
|
||||
NSName = "GSNibFileType";
|
||||
NSHumanReadableName = "Cocoa Nib";
|
||||
NSRole = Viewer;
|
||||
NSRole = Editor;
|
||||
NSDocumentClass = GormDocument;
|
||||
NSUnixExtensions = ( "nib" );
|
||||
NSIcon = "GormNib.tiff";
|
||||
|
|
|
@ -3,17 +3,17 @@ ADDITIONAL_INCLUDE_DIRS += -I../../../..
|
|||
|
||||
ifeq ($(GNUSTEP_TARGET_OS),mingw32)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
ADDITIONAL_GUI_LIBS += -lInterfaceBuilder -lGormCore
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_OS),cygwin)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
$(PALETTE_NAME)_LIBRARIES_DEPEND_UPON += -lInterfaceBuilder -lGormCore
|
||||
endif
|
|
@ -3,17 +3,17 @@ ADDITIONAL_INCLUDE_DIRS += -I../../../..
|
|||
|
||||
ifeq ($(GNUSTEP_TARGET_OS),mingw32)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
ADDITIONAL_GUI_LIBS += -lInterfaceBuilder -lGormCore
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_OS),cygwin)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
$(PALETTE_NAME)_LIBRARIES_DEPEND_UPON += -lInterfaceBuilder -lGormCore
|
||||
endif
|
|
@ -4,6 +4,7 @@
|
|||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
"_prototypePopUp"
|
||||
);
|
||||
Super = IBPalette;
|
||||
};
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,10 +1,10 @@
|
|||
/**
|
||||
main.m
|
||||
ControlsPalette.m
|
||||
|
||||
Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2024 Free Software Foundation, Inc.
|
||||
|
||||
Author: Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
Date: 2004
|
||||
Date: 2024, 2004
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
|
@ -23,14 +23,15 @@
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
|
||||
#include <InterfaceBuilder/InterfaceBuilder.h>
|
||||
|
||||
#include "GormNSPopUpButton.h"
|
||||
|
||||
@interface ControlsPalette: IBPalette <IBViewResourceDraggingDelegates>
|
||||
{
|
||||
IBOutlet NSPopUpButton *_prototypePopUp;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
@ -62,16 +63,28 @@
|
|||
|
||||
- (void) finishInstantiate
|
||||
{
|
||||
NSView *contents;
|
||||
id v;
|
||||
NSView *contentView = [originalWindow contentView];
|
||||
NSArray *allItems = nil;
|
||||
NSEnumerator *en = nil;
|
||||
id item = nil;
|
||||
|
||||
_prototypePopUp = [[GormNSPopUpButton alloc] initWithFrame: NSMakeRect(71.0, 157.0, 102.0, 24.0)];
|
||||
[_prototypePopUp addItemWithTitle: @"Item #0"];
|
||||
[_prototypePopUp addItemWithTitle: @"Item #1"];
|
||||
[_prototypePopUp addItemWithTitle: @"Item #2"];
|
||||
[_prototypePopUp setAutoenablesItems: YES];
|
||||
|
||||
allItems = [[_prototypePopUp menu] itemArray];
|
||||
en = [allItems objectEnumerator];
|
||||
while ((item = [en nextObject]) != nil)
|
||||
{
|
||||
[item setTarget: nil];
|
||||
[item setAction: NULL]; // @selector(_popUpItemAction:)];
|
||||
[item setEnabled: YES];
|
||||
}
|
||||
|
||||
contents = [originalWindow contentView];
|
||||
v = [[GormNSPopUpButton alloc] initWithFrame: NSMakeRect(73, 159, 70, 22)];
|
||||
[v addItemWithTitle: @"Item 1"];
|
||||
[v addItemWithTitle: @"Item 2"];
|
||||
[v addItemWithTitle: @"Item 3"];
|
||||
[contents addSubview: v];
|
||||
RELEASE(v);
|
||||
[contentView addSubview: _prototypePopUp];
|
||||
AUTORELEASE(_prototypePopUp);
|
||||
}
|
||||
|
||||
- (void) willInspectObject: (NSNotification *)notification
|
||||
|
|
|
@ -3,17 +3,17 @@ ADDITIONAL_INCLUDE_DIRS += -I../../../..
|
|||
|
||||
ifeq ($(GNUSTEP_TARGET_OS),mingw32)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
ADDITIONAL_GUI_LIBS += -lInterfaceBuilder -lGormCore
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_OS),cygwin)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
$(PALETTE_NAME)_LIBRARIES_DEPEND_UPON += -lInterfaceBuilder -lGormCore
|
||||
endif
|
|
@ -1,5 +1,29 @@
|
|||
#include <GormCore/GormCore.h>
|
||||
/**
|
||||
main.m
|
||||
|
||||
Copyright (C) 2024 Free Software Foundation, Inc.
|
||||
|
||||
Author: Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
Date: 2024
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include <GormCore/GormCore.h>
|
||||
#include "GormNSPopUpButton.h"
|
||||
|
||||
Class _gormnspopupbuttonCellClass = 0;
|
||||
|
@ -65,6 +89,7 @@ Class _gormnspopupbuttonCellClass = 0;
|
|||
* Override this here, since themes may override it.
|
||||
* Always want to show the menu view since it's editable.
|
||||
*/
|
||||
/*
|
||||
- (void) attachPopUpWithFrame: (NSRect)cellFrame
|
||||
inView: (NSView *)controlView
|
||||
{
|
||||
|
@ -127,4 +152,6 @@ Class _gormnspopupbuttonCellClass = 0;
|
|||
name: NSMenuDidSendActionNotification
|
||||
object: _menu];
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -69,16 +69,22 @@
|
|||
{
|
||||
if (sender == typeMatrix)
|
||||
{
|
||||
BOOL pullsDown = [[sender selectedCell] tag];
|
||||
id selectedItem;
|
||||
BOOL pullsDown = [[sender selectedCell] tag] == YES ? YES : NO;
|
||||
NSArray *itemArray = [[object itemArray] copy];
|
||||
NSEnumerator *en = [itemArray objectEnumerator];
|
||||
id o = nil;
|
||||
|
||||
[object removeAllItems];
|
||||
[object setPullsDown: pullsDown];
|
||||
selectedItem = [object selectedItem];
|
||||
[object selectItem: nil];
|
||||
[object selectItem: selectedItem];
|
||||
[pullDownTitleForm setEnabled: pullsDown];
|
||||
[[pullDownTitleForm cellAtIndex: 0]
|
||||
setStringValue: pullsDown ? [object title] : @""];
|
||||
[pullDownArrowPopUp setEnabled: pullsDown];
|
||||
while ((o = [en nextObject]) != nil)
|
||||
{
|
||||
id<NSMenuItem> mi = nil;
|
||||
|
||||
[object addItemWithTitle: [o title]];
|
||||
mi = [object lastItem];
|
||||
[mi setAction: NULL]; // @selector(_popUpItemAction:)];
|
||||
[mi setTarget: nil];
|
||||
}
|
||||
}
|
||||
else if (sender == autoenableSwitch)
|
||||
{
|
||||
|
@ -122,7 +128,7 @@
|
|||
|
||||
pullsDown = [object pullsDown];
|
||||
[typeMatrix selectCellWithTag: pullsDown];
|
||||
[autoenableSwitch setState: [object autoenablesItems]];
|
||||
[autoenableSwitch setState: ([object autoenablesItems] ? NSOnState : NSOffState)];
|
||||
[enableSwitch setState: [object isEnabled]];
|
||||
[[tagForm cellAtRow: 0 column: 0] setIntValue: [object tag]];
|
||||
[[defaultItemForm cellAtRow: 0 column: 0] setIntValue: [object indexOfSelectedItem]];
|
||||
|
|
|
@ -3,17 +3,17 @@ ADDITIONAL_INCLUDE_DIRS += -I../../../..
|
|||
|
||||
ifeq ($(GNUSTEP_TARGET_OS),mingw32)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
ADDITIONAL_GUI_LIBS += -lInterfaceBuilder -lGormCore
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_OS),cygwin)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
$(PALETTE_NAME)_LIBRARIES_DEPEND_UPON += -lInterfaceBuilder -lGormCore
|
||||
endif
|
|
@ -3,17 +3,17 @@ ADDITIONAL_INCLUDE_DIRS += -I../../../..
|
|||
|
||||
ifeq ($(GNUSTEP_TARGET_OS),mingw32)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
ADDITIONAL_GUI_LIBS += -lInterfaceBuilder -lGormCore
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_OS),cygwin)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/GormCore.framework
|
||||
-L../../../../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../../GormCore/GormCore.framework
|
||||
|
||||
$(PALETTE_NAME)_LIBRARIES_DEPEND_UPON += -lInterfaceBuilder -lGormCore
|
||||
endif
|
Binary file not shown.
Binary file not shown.
|
@ -4,15 +4,16 @@
|
|||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
formatTable,
|
||||
detachButton,
|
||||
addThousandSeparatorSwitch,
|
||||
commaPointSwitch,
|
||||
formatForm,
|
||||
formatTable,
|
||||
localizeSwitch,
|
||||
negativeField,
|
||||
negativeRedSwitch,
|
||||
positiveField,
|
||||
detachButton
|
||||
zeroField
|
||||
);
|
||||
Super = IBInspector;
|
||||
};
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -31,15 +31,16 @@
|
|||
|
||||
@interface GormNumberFormatterAttributesInspector : IBInspector
|
||||
{
|
||||
id addThousandSeparatorSwitch;
|
||||
id commaPointSwitch;
|
||||
id formatForm;
|
||||
id formatTable;
|
||||
id localizeSwitch;
|
||||
id negativeField;
|
||||
id negativeRedSwitch;
|
||||
id positiveField;
|
||||
id detachButton;
|
||||
IBOutlet id addThousandSeparatorSwitch;
|
||||
IBOutlet id commaPointSwitch;
|
||||
IBOutlet id formatForm;
|
||||
IBOutlet id formatTable;
|
||||
IBOutlet id negativeRedSwitch;
|
||||
IBOutlet id detachButton;
|
||||
IBOutlet id localizeSwitch;
|
||||
IBOutlet id positiveField;
|
||||
IBOutlet id negativeField;
|
||||
IBOutlet id zeroField;
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -51,8 +51,10 @@ extern NSArray *predefinedNumberFormats;
|
|||
else
|
||||
{
|
||||
NSNumberFormatter *fmtr = [[NSNumberFormatter alloc] init];
|
||||
[fmtr setFormat: [NSNumberFormatter defaultFormat]];
|
||||
|
||||
[fmtr setFormat: [NSNumberFormatter defaultFormat]];
|
||||
[[positiveField cell] setFormatter: fmtr];
|
||||
[[zeroField cell] setFormatter: fmtr];
|
||||
[[negativeField cell] setFormatter: fmtr];
|
||||
}
|
||||
}
|
||||
|
@ -61,14 +63,17 @@ extern NSArray *predefinedNumberFormats;
|
|||
|
||||
- (void) updateAppearanceFieldsWithFormat: (NSString *)format;
|
||||
{
|
||||
|
||||
[[[positiveField cell] formatter] setFormat: format];
|
||||
[[positiveField cell] setObjectValue:
|
||||
[NSDecimalNumber decimalNumberWithString: @"123456.789"]];
|
||||
|
||||
[NSDecimalNumber decimalNumberWithString: @"123456.789"]];
|
||||
|
||||
[[[zeroField cell] formatter] setFormat: format];
|
||||
[[zeroField cell] setObjectValue:
|
||||
[NSDecimalNumber decimalNumberWithString: @"0.000"]];
|
||||
|
||||
[[[negativeField cell] formatter] setFormat: format];
|
||||
[[negativeField cell] setObjectValue:
|
||||
[NSDecimalNumber decimalNumberWithString: @"-123456.789"]];
|
||||
[NSDecimalNumber decimalNumberWithString: @"-123456.789"]];
|
||||
}
|
||||
|
||||
- (void) ok: (id)sender
|
||||
|
@ -98,28 +103,27 @@ extern NSArray *predefinedNumberFormats;
|
|||
zeroFmt = [NSNumberFormatter zeroFormatAtIndex:row];
|
||||
negativeFmt = [NSNumberFormatter negativeFormatAtIndex:row];
|
||||
fullFmt = [NSNumberFormatter formatAtIndex:row];
|
||||
|
||||
// Update Appearance samples
|
||||
[self updateAppearanceFieldsWithFormat: fullFmt];
|
||||
|
||||
// Update editable format fields
|
||||
[[formatForm cellAtIndex:0] setStringValue: VSTR(positiveFmt)];
|
||||
[[formatForm cellAtIndex:1] setStringValue: VSTR(zeroFmt)];
|
||||
[[formatForm cellAtIndex:2] setStringValue: VSTR(negativeFmt)];
|
||||
|
||||
[fmtr setFormat:fullFmt];
|
||||
// Update Appearance samples
|
||||
[self updateAppearanceFieldsWithFormat: fullFmt];
|
||||
|
||||
// Update editable format fields
|
||||
[[formatForm cellAtIndex:0] setStringValue: VSTR(positiveFmt)];
|
||||
[[formatForm cellAtIndex:1] setStringValue: VSTR(zeroFmt)];
|
||||
[[formatForm cellAtIndex:2] setStringValue: VSTR(negativeFmt)];
|
||||
|
||||
[fmtr setFormat:fullFmt];
|
||||
}
|
||||
}
|
||||
else if (sender == formatForm)
|
||||
{
|
||||
NSUInteger idx;
|
||||
|
||||
positiveFmt = [[sender cellAtIndex:0] stringValue];
|
||||
zeroFmt = [[sender cellAtIndex:1] stringValue];
|
||||
negativeFmt = [[sender cellAtIndex:2] stringValue];
|
||||
minValue = [[sender cellAtIndex:3] stringValue];
|
||||
maxValue = [[sender cellAtIndex:4] stringValue];
|
||||
positiveFmt = [[sender cellAtIndex: 0] stringValue];
|
||||
zeroFmt = [[sender cellAtIndex: 1] stringValue];
|
||||
negativeFmt = [[sender cellAtIndex: 2] stringValue];
|
||||
minValue = [[sender cellAtIndex: 3] stringValue];
|
||||
maxValue = [[sender cellAtIndex: 4] stringValue];
|
||||
NSDebugLog(@"min,max: %@, %@", minValue, maxValue);
|
||||
|
||||
fullFmt = [NSString stringWithFormat:@"%@;%@;%@",
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2024-12-25 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* GormObjCHeaderParser/OCClass.m: Improve parsing
|
||||
to allow getting information from .m files/categories.
|
||||
|
||||
2023-01-15 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* ANNOUNCE
|
48
Documentation/ANNOUNCE
Normal file
48
Documentation/ANNOUNCE
Normal file
|
@ -0,0 +1,48 @@
|
|||
1 ANNOUNCE
|
||||
**********
|
||||
|
||||
This is version 1.4.0 of Gorm.
|
||||
|
||||
1.1 What is Gorm?
|
||||
=================
|
||||
|
||||
Gorm is an acronym for Graphic Object Relationship modeler (or perhaps
|
||||
GNUstep Object Relationship Modeler).
|
||||
|
||||
Gorm is a clone of the Cocoa (OpenStep/NeXTSTEP) 'Interface Builder'
|
||||
application for GNUstep.
|
||||
|
||||
1.2 Noteworthy changes in version '1.4.0'
|
||||
=========================================
|
||||
|
||||
* Fix issue with saving a gorm from a nib file.
|
||||
* Fix issue with saving a gorm file from a xib.
|
||||
* Add XLIF support for language translation.
|
||||
* Add capability to generate XIB file.
|
||||
* Add gormtool command-line tool. Allows some gorm work without the
|
||||
gui
|
||||
* Fixes and some improvements to structure Gorm as framework/app.
|
||||
|
||||
1.3 How can I get support for this software?
|
||||
============================================
|
||||
|
||||
You may wish to use the GNUstep discussion mailing list for general
|
||||
questions and discussion. Look at the GNUstep Web Pages for more
|
||||
information regarding GNUstep resources <http://www.gnustep.org/>
|
||||
|
||||
1.4 Where can you get it? How can you compile it?
|
||||
=================================================
|
||||
|
||||
You can download sources and rpms (for some machines) from
|
||||
<ftp://ftp.gnustep.org/pub/gnustep/dev-apps>.
|
||||
|
||||
1.5 Where do I send bug reports?
|
||||
================================
|
||||
|
||||
Bug reports can be sent to <bug-gnustep@gnu.org>.
|
||||
|
||||
1.6 Obtaining GNU Software
|
||||
==========================
|
||||
|
||||
Check out the GNUstep web site. (<http://www.gnustep.org/>), and the
|
||||
GNU web site. (<http://www.gnu.org/>)
|
|
@ -15,15 +15,11 @@ before-all:: version.texi
|
|||
autogsdoc -MakeFrames YES \
|
||||
-DocumentationDirectory InterfaceBuilder \
|
||||
-Declared InterfaceBuilder \
|
||||
../GormLib/*.h 2> /dev/null
|
||||
../InterfaceBuilder/*.h 2> /dev/null
|
||||
autogsdoc -MakeFrames YES \
|
||||
-DocumentationDirectory GormCore \
|
||||
-Declared GormCore \
|
||||
../GormCore/*.h 2> /dev/null
|
||||
autogsdoc -MakeFrames YES \
|
||||
-DocumentationDirectory GormPrefs \
|
||||
-Declared GormPrefs \
|
||||
../GormPrefs/*.h 2> /dev/null
|
||||
autogsdoc -MakeFrames YES \
|
||||
-DocumentationDirectory GormObjCHeaderParser \
|
||||
-Declared GormObjCHeaderParser \
|
||||
|
@ -53,7 +49,6 @@ after-clean::
|
|||
rm -f version.texi
|
||||
rm -rf InterfaceBuilder
|
||||
rm -rf GormCore
|
||||
rm -rf GormPrefs
|
||||
rm -rf GormObjCHeaderParser
|
||||
|
||||
# Things to do before distcleaning
|
||||
|
@ -79,5 +74,3 @@ version.texi: ../Version
|
|||
|
||||
regenerate:
|
||||
mv ANNOUNCE README INSTALL NEWS ..
|
||||
|
||||
|
664
Documentation/NEWS
Normal file
664
Documentation/NEWS
Normal file
|
@ -0,0 +1,664 @@
|
|||
1 Noteworthy changes in version '1.4.0'
|
||||
=======================================
|
||||
|
||||
* Fix issue with saving a gorm from a nib file.
|
||||
* Fix issue with saving a gorm file from a xib.
|
||||
* Add XLIF support for language translation.
|
||||
* Add capability to generate XIB file.
|
||||
* Add gormtool command-line tool. Allows some gorm work without the
|
||||
gui
|
||||
* Fixes and some improvements to structure Gorm as framework/app.
|
||||
|
||||
2 Noteworthy changes in version '1.3.1'
|
||||
=======================================
|
||||
|
||||
* Fix issue with cells appearing in top level editor
|
||||
* Make nibs read only since saving is unstable
|
||||
* Add XIB reading so that they can be loaded by Gorm
|
||||
* Add storyboard file to list of supported files so that an icon is
|
||||
displayed, does not support reading yet.
|
||||
* Fix testing model mode
|
||||
* Bug fixes in GormClassManager, GormDocument, etc.
|
||||
|
||||
3 Noteworthy changes in version '1.2.28'
|
||||
========================================
|
||||
|
||||
* Improved NSScrollView handling.
|
||||
* Added NSMatrix to Group menu to make it easier to create NSMatrix
|
||||
objects
|
||||
* Improved inspector for NSMatrix. Added ability to add rows/columns
|
||||
* Fixed NSMatrix selection problems when grouped in an NSScrollView
|
||||
* Fixes and other improvements to inspectors. Corrected issue where
|
||||
Gorm's menu stays present during testing mode.
|
||||
|
||||
4 Noteworthy changes in version '1.2.26'
|
||||
========================================
|
||||
|
||||
* Refactoring of palettes by Sergii Stoian to correct usability
|
||||
issues in Gorm.
|
||||
* Refactoring of handling and rearrangment of controls in inspectors
|
||||
for usuability.
|
||||
* Stability fixes to make Gorm easier to use.
|
||||
* Autosizing of views corrected in many inspectors
|
||||
* Improvements in error handling.
|
||||
|
||||
5 Noteworthy changes in version '1.2.24'
|
||||
========================================
|
||||
|
||||
* Fix for issue where Gorm was referencing private variables. This
|
||||
caused a crash when built with clang.
|
||||
|
||||
6 Noteworthy changes in version '1.2.23'
|
||||
========================================
|
||||
|
||||
* Fix for issue where NSPanel was being saved as an NSWindow in some
|
||||
cases.
|
||||
|
||||
7 Noteworthy changes in version '1.2.22'
|
||||
========================================
|
||||
|
||||
* Fix for bug#45040: Fix allows Gorm custom class functionality to
|
||||
work normally on OpenBSD/NetBSD/FreeBSD.
|
||||
* Fixes for Solaris
|
||||
* Memory leak fixes.
|
||||
* Objective-C parser improvements.
|
||||
|
||||
8 Noteworthy changes in version '1.2.20'
|
||||
========================================
|
||||
|
||||
* Bug fixes #28643, #32827
|
||||
* Corrected issues with updating document when there is a change.
|
||||
* Add cells as objects to the document so they can be properly
|
||||
edited.
|
||||
* Changes to prevent recursive frame change notifications.
|
||||
|
||||
9 Noteworthy changes in version '1.2.18'
|
||||
========================================
|
||||
|
||||
* Code cleanup, removal of warnings when building with clang.
|
||||
* Removal of use of call to objc_poseAs(..) which was preventing
|
||||
building with newer runtimes.
|
||||
* Stability improvements.
|
||||
|
||||
10 Noteworthy changes in version '1.2.16'
|
||||
=========================================
|
||||
|
||||
* XIB reading.
|
||||
* Bug fixes for standalone views.
|
||||
* Stability changes.
|
||||
|
||||
11 Noteworthy changes in version '1.2.12'
|
||||
=========================================
|
||||
|
||||
Requires: gnustep-base-1.20.0, gnustep-gui-0.18.0. Reason: Parts of the
|
||||
runtime which Gorm used were refactored and it was necessary to make
|
||||
corresponding changes in Gorm to use it.
|
||||
|
||||
* Correction for bugs #27295, 28643, 29085.
|
||||
* Added a DO server which allows modification of internal data
|
||||
structures using a simple interface.
|
||||
* Tooltips now show the object name and the object type for
|
||||
informational purposes.
|
||||
* Opens default document when using NSWindows95InterfaceStyle.
|
||||
|
||||
12 Noteworthy changes in version '1.2.10'
|
||||
=========================================
|
||||
|
||||
* Correction for bug #25401
|
||||
* Correction for some nib loading issues.
|
||||
* Limited support for standalone views.
|
||||
* Fixes for various bugs.
|
||||
|
||||
13 Noteworthy changes in version '1.2.8'
|
||||
========================================
|
||||
|
||||
Requires: gnustep-gui-0.16.0. It will not compile without this version
|
||||
of the library. Reason: Nib and Gorm loading were moved to a more
|
||||
sensible file structure. Additionally, Nib loading was refactored.
|
||||
|
||||
* Correction for bug#25001.
|
||||
* Correction for bug#25111.
|
||||
* Fixes for nib encoding to use the proper template class instances.
|
||||
* Changes to use new headers.
|
||||
|
||||
14 Noteworthy changes in version '1.2.6'
|
||||
========================================
|
||||
|
||||
* Corrections to allow Gorm to build and run properly on the Darwin
|
||||
operating system.
|
||||
* Corrected sizing of Controls Palette.
|
||||
* Added preliminary support for IBPlugin API.
|
||||
* Added preferences panel to add plugins dynamically.
|
||||
* Moved load/save logic for gorm, gmodel, and nib to plugins. This
|
||||
change should allow plugins for virtually any format to be
|
||||
read/written by Gorm.
|
||||
* Correction for bug#24146, bug#23889.
|
||||
|
||||
15 Noteworthy changes in version '1.2.4'
|
||||
========================================
|
||||
|
||||
Requires: gnustep-gui-0.13.2. Reason: Due to changes in popupbutton
|
||||
controller logic.
|
||||
|
||||
* Corrected bug#'s 19640, 21845, 19792, 15637, 17892, 18171.
|
||||
* Added error panel to show the detected inconsistencies in a file.
|
||||
* Added preference setting to turn on or off the gorm file repair
|
||||
logic.
|
||||
* Added capability to repair logic to fix window level issue.
|
||||
* Added ruler switch to scroll view inspector.
|
||||
|
||||
16 Noteworthy changes in version '1.2.2'
|
||||
========================================
|
||||
|
||||
Requires: gnustep-gui-0.13.0.
|
||||
|
||||
* Moved to GPLv3
|
||||
* Added text field to NSTableColumn inspector to allow editing of
|
||||
table column title.
|
||||
* Corrected issue with selection.
|
||||
* Added button modifiers for special keys to button inspectors.
|
||||
* Corrected issue with loading of older gorm files.
|
||||
* Fix to allow Gorm's menus to be Mac-style, but not the one being
|
||||
edited.
|
||||
* Other miscellaneous bug corrections.
|
||||
|
||||
17 Noteworthy changes in version '1.2.1'
|
||||
========================================
|
||||
|
||||
* Minor corrections to previous release.
|
||||
|
||||
18 Noteworthy changes in version '1.2.0'
|
||||
========================================
|
||||
|
||||
* Corrections to some editors to not change selection if connection
|
||||
is in progress.
|
||||
* Force menu style to NSNextStepInterfaceStyle for editing purposes.
|
||||
* Correction for memory issue when closing document.
|
||||
* Minor bug fixes.
|
||||
|
||||
19 Noteworthy changes in version '1.1.0'
|
||||
========================================
|
||||
|
||||
* Changed Gorm architecture to use NSDocument classes.
|
||||
* Abstracted model loading mechanism. This was done by implementing
|
||||
a set of "Loader" and "Builder" classes which handle filling in the
|
||||
data structures in Gorm and exporting them to external formats.
|
||||
* Implemented GormNibWrapperLoader and GormNibWrapperBuilder for
|
||||
reading and writing Cocoa NIB files.
|
||||
* Implemented GormGormWrapperLoader and GormGormWrapperBuilder for
|
||||
reading and writing GNUstep Gorm files
|
||||
* Implemented GormGModelWrapperLoader for reading GNUstep gmodel
|
||||
files.
|
||||
* Updated icon
|
||||
* A number of bugs have been addressed in this release.
|
||||
|
||||
20 Noteworthy changes in version '1.0.8'
|
||||
========================================
|
||||
|
||||
This is a bugfix release.
|
||||
|
||||
* Correction for bug#16587.
|
||||
* Correction for handling non-string identifiers in tableviews.
|
||||
|
||||
21 Noteworthy changes in version '1.0.6'
|
||||
========================================
|
||||
|
||||
This is a bugfix release.
|
||||
|
||||
* Entirely new icon set, for palettes, gorm, gmodel, nib and the
|
||||
application.
|
||||
* Replaced some of the images for the inspectors.
|
||||
* Corrected the following bugs since the last release: #16049,
|
||||
#16050, #15988, #16049, #15989, #15987, #15817, #15780, #15642,
|
||||
#15556.
|
||||
* Changed formatting in some of the inspectors so that they are
|
||||
easier to navigate.
|
||||
|
||||
22 Noteworthy changes in version '1.0.4'
|
||||
========================================
|
||||
|
||||
This is a bugfix release.
|
||||
|
||||
* Corrected some bug#15236 with window style mask settings.
|
||||
* Corrected bug#15236, which caused window fields in the inspector
|
||||
not to update when the field was being edited and a new window is
|
||||
selected.
|
||||
* Corrected bug #15178.
|
||||
* Corrected problem with standalone views
|
||||
|
||||
23 Noteworthy changes in version '1.0.2'
|
||||
========================================
|
||||
|
||||
This is a bugfix release.
|
||||
|
||||
* Fixed some bugs with table column selection.
|
||||
* Corrected a minor problem in the custom class inspector.
|
||||
|
||||
24 Noteworthy changes in version '1.0.0'
|
||||
========================================
|
||||
|
||||
PLEASE NOTE: This version of Gorm requires base 1.11.1 and gui 0.10.1 to
|
||||
be installed (gnustep-startup-0.13.0).
|
||||
|
||||
* All inspectors are now modeled in .gorm files.
|
||||
* Added autosizing to form attributes inspector.
|
||||
* Utilize and maintain parent/child data structure more pervasively
|
||||
* Reorganized code in palettes for cleaner implementation.
|
||||
* Removed code to check for user bundles, since bugs in Camaelon
|
||||
which prompted those changes were fixed long ago.
|
||||
* Added documentation to GormCore
|
||||
|
||||
25 Noteworthy changes in version '0.11.0'
|
||||
=========================================
|
||||
|
||||
* Improved implementation of canSubstituteForClass: the default
|
||||
implementation of this method tests the classes to see if
|
||||
initWithCoder: or encodeWithCoder: is implemented on a subclass to
|
||||
determine automatically if that class has the same encoding
|
||||
signature as the original class, if it does, it can be substituted.
|
||||
* Improved handling of classes which use cell classes in the custom
|
||||
class inspector. The inspector now autmatically replaces the cell
|
||||
class with the appropriate one when the user selects a given
|
||||
subclass.
|
||||
* Browser based class editor in document panel. This interface is
|
||||
more like the one on OSX. The user now has a choice in preferences
|
||||
to determine which view they would like to use.
|
||||
* Translation tools. The Document->Translate menu allows the user to
|
||||
export string and import strings in the strings format, so that
|
||||
someone can easily translate just the strings in the file and
|
||||
doesn't need to directly edit anything in Gorm. The strings file
|
||||
can then be loaded back into Gorm and all of the relevant strings
|
||||
are updated.
|
||||
* Alignment tools. In the new Layout menu there are options to align
|
||||
views, center views, bring views to front or push them to the back
|
||||
of the view layers.
|
||||
* Implementation of IBViewResourceDraggingDelegate. This allows
|
||||
updating of the pull down in the inspectors panel dynamically. It
|
||||
requires the developer of a palette to implement some code to
|
||||
enable this, as on OSX.
|
||||
* Lots of bugfixes and usability changes are also included in this
|
||||
release.
|
||||
|
||||
26 Noteworthy changes in version '0.9.10'
|
||||
=========================================
|
||||
|
||||
* Gorm now has a full implementation of canSubstituteForClass: which
|
||||
is used to determine if a class can be substituted in the custom
|
||||
class inspector. This allows classes added in palettes to say
|
||||
whether or not they can be used as a subsitute for a kit class.
|
||||
* Better separation of Gorm into libraries. As well as the ability
|
||||
to compile on windows with a simple: "make install"
|
||||
* Implementation of IBResourceManager class. This class is used by
|
||||
palettes to register drag types to be considered by the top level
|
||||
editors in the document window: object, sound, image, class.
|
||||
* Gorm now is able to switch views in the document window when you
|
||||
drag a file into it. If it's an image it will switch to the image
|
||||
view, if it's a sound, the sound view, an object the object view
|
||||
etc or if it's a class (a .h file) it will switch to the classes
|
||||
view.
|
||||
* Drag and drop parsing of header files (if you hadn't gathered from
|
||||
the previous item).
|
||||
* Better support for standalone views. while the user cannot
|
||||
instantiate from the classes view (there were too many problems
|
||||
with this approach). They can now drag any view from the palette
|
||||
into the objects view and have it work.
|
||||
* A myriad of bug fixes.
|
||||
|
||||
27 Noteworthy changes in version '0.9.2'
|
||||
========================================
|
||||
|
||||
NOTE: This is mainly a bugfix release.
|
||||
|
||||
* Some improvements to the procedure for removing connections.
|
||||
* Corrected various issues with header parsing.
|
||||
* Now closes windows which were opened during interface testing such
|
||||
as font panels, info panels, etc.
|
||||
* Minor corrections to background color for a number of inspectors.
|
||||
* Improvements to gmodel importation.
|
||||
* Better detection of when the user is utilizing a user bundle. Gorm
|
||||
will now warn the user with a panel.
|
||||
* Various improvements in documentation
|
||||
|
||||
28 Noteworthy changes in version '0.9.0'
|
||||
========================================
|
||||
|
||||
* Images/Sounds can now be dragged into a matrix cell.
|
||||
* Fully implemented date and number formatter inspectors (these
|
||||
classes still need work in GUI).
|
||||
* Added warning panel if the user attempts to edit a .gorm file
|
||||
created with a newer version of Gorm
|
||||
* Modified data.classes format so that only those actions
|
||||
specifically added to FirstResponder are listed.
|
||||
* Greatly improved gmodel importation. (experimental)
|
||||
* It's now possible to add methods to classes which are not custom.
|
||||
This allows the user to add actions which may have been added to
|
||||
those classes by categories.
|
||||
* Completely new header parser implemented.
|
||||
* Improved cut/paste. It's now possible to use cut/paste from almost
|
||||
anywhere. The class editor now fully supports it.
|
||||
* Improved implementation of some of the InterfaceBuilder framework
|
||||
classes.
|
||||
* Object editor will now remove all instances of a class that has
|
||||
been deleted from the class editor.
|
||||
* The class inspector and the classes view will now apply stricter
|
||||
rules to names of actions and outlets to ensure that they are
|
||||
properly entered.
|
||||
* All inspectors work perfectly with customized colors.
|
||||
* Fixed a number of bugs.
|
||||
|
||||
29 Noteworthy changes in version '0.8.0'
|
||||
========================================
|
||||
|
||||
PLEASE NOTE: It is important for this release that you upgrade to Gorm
|
||||
0.8.0 when using Gorm with the new GNUstep libraries (base-1.10.0 and
|
||||
gui-0.9.4). This version of Gorm contains some features which are
|
||||
reliant on changes made in those versions of the libraries. It is
|
||||
stated in Gorm's documentation (the Gorm.texi file) that this is
|
||||
required, but I felt it important enough to also mention it here so that
|
||||
it is known beyond a reasonable doubt.
|
||||
|
||||
* New gorm file version.
|
||||
* Full custom palette support
|
||||
* Palette preferences panel to allow the user to configure palettes
|
||||
to load
|
||||
* Experimental: Standalone views. This feature is to allow the use
|
||||
of a view without the need of a containing window. This allows
|
||||
developers to treat these views as they would any other top level
|
||||
object in the .gorm file. This is experimental functionality.
|
||||
* Improved NSTableColumn inspector. The new inspector allows the
|
||||
user to change the data cell used for a given column. This allows
|
||||
the user to select from a list of cell subclasses and set the
|
||||
appropriate custom or non-custom one they want to appear in that
|
||||
column of the table.
|
||||
* Improved layout of some of the inspectors.
|
||||
* Removed old class parser. The parser was somewhat buggy and was
|
||||
actually causing some issues. A new parser will be available in
|
||||
the next version of Gorm. For now users will need to use the class
|
||||
inspector or the outline view to enter classes into Gorm.
|
||||
* Experimental: "File" section. This is essentially a per-file
|
||||
preference which allows the user to control which version of
|
||||
GNUstep a given file will be compatible with. It also lists the
|
||||
potential compatibility issues with the selected version.
|
||||
* Improved controls palette. New items for some of the standard font
|
||||
replace the old "Title" widget which was a System-14 font. The new
|
||||
widgets use a selection of the standard System font to allow the
|
||||
user to easily build a gui using these and reducing the amount of
|
||||
time the user needs to spend fiddling with the font panel.
|
||||
|
||||
30 Noteworthy changes in version '0.7.7'
|
||||
========================================
|
||||
|
||||
* Important bugfixes in editor classes.
|
||||
* Rearranged some of the editor classes to be in the palettes which
|
||||
contain the classes they are responsible for editing
|
||||
(GormButtonEditor & GormTabViewEditor).
|
||||
* Image and Sound editors will now display system default images or
|
||||
sounds if they are available.
|
||||
* Document window now uses an NSToolbar (experimental).
|
||||
* Improved the layout of some of the inspectors.
|
||||
* Corrected some minor issues in the inspectors
|
||||
* Added code to allow NSTableView and NSOutlineView to show some data
|
||||
during testing
|
||||
* Gorm will now show an alert panel when a model fails to load or
|
||||
test properly.
|
||||
|
||||
31 Noteworthy changes in version '0.7.6'
|
||||
========================================
|
||||
|
||||
This release is mainly a bugfix release for 0.7.5.
|
||||
|
||||
* Improved .gmodel support
|
||||
* Corrections to previous repair feature.
|
||||
* Important bugfixes for Menu editing.
|
||||
* Important bugfixes for class inspector.
|
||||
|
||||
32 Noteworthy changes in version '0.7.5'
|
||||
========================================
|
||||
|
||||
* The 'reparent' feature in the class inspector. This allows the
|
||||
user to change the class hierarchy from within Gorm.
|
||||
* Some important bugfixes
|
||||
* a property 'GormRepairFileOnLoad' (untested) which should repaire
|
||||
old .gorm files... It is HIGHLY recommended that Gorm not be run
|
||||
with this on constantly and that you back up any files which you
|
||||
want to repair before opening them with this option turned on.
|
||||
* A shelf inspector in prefs that lets you expand the size of the
|
||||
names in the object view..
|
||||
* Support for NSFontManager
|
||||
* A way to restore a complete NSMenu if it's deleted (a new palette
|
||||
entry for NSMenu, not just an item)
|
||||
|
||||
33 Noteworthy changes in version '0.6.0'
|
||||
========================================
|
||||
|
||||
* Several major bugs corrected.
|
||||
* Clarified some of the inspectors
|
||||
* Menu items are now properly enabled/disabled when appropriate
|
||||
* More descriptive title displayed when a class is being edited.
|
||||
|
||||
34 Noteworthy changes in version '0.5.0'
|
||||
========================================
|
||||
|
||||
* Enabled defer in NSWindow inspector.
|
||||
* Added code to the connection inspector to prevent erroneous
|
||||
connections.
|
||||
* Added support for upgrading of old .gorm files using the older
|
||||
template mechanism
|
||||
* Grouping with an NSSplitView now operates using the relative
|
||||
positions of the views in the window.
|
||||
* Custom Class inspector now shows all subclasses, not just direct
|
||||
custom subclasses.
|
||||
* Bug fixes, eliminated memory leak, code cleanup, etc.
|
||||
|
||||
35 Noteworthy changes in version '0.4.0'
|
||||
========================================
|
||||
|
||||
* New Menu and Menu Item inspectors.
|
||||
* User can now specify the Services and Windows menus in the menu
|
||||
inspector.
|
||||
* User can specify a non-custom subclass as well as a custom one to
|
||||
replace the class when the .gorm is unarchived. This can be used
|
||||
to turn a NSTextField into NSSecureTextField and etc.
|
||||
* New set name panel.
|
||||
* New switch control on the font panel to allow the user to specify
|
||||
if a font is encoded with its default size or not.
|
||||
* Added NSStepper and NSStepperCell to the class list to allow
|
||||
creation of custom subclasses.
|
||||
* Windows and Services menus now function correctly.
|
||||
|
||||
36 Noteworthy changes in version '0.3.1'
|
||||
========================================
|
||||
|
||||
* New custom class system.
|
||||
* Images now persist correctly when added to a button or view.
|
||||
* Fixed DND
|
||||
* Various bugfixes
|
||||
|
||||
37 Noteworthy changes in version '0.3.0'
|
||||
========================================
|
||||
|
||||
* Preferences added.
|
||||
* User can now enable and disable guidlines for easier editing.
|
||||
* Refactored code into GormLib which is a clone of the
|
||||
InterfaceBuilder framework. This facilitates creating palettes and
|
||||
inspectors outside of Gorm.
|
||||
* Added class inspector for easier editing of classes. This gives
|
||||
the user the option to use either the outline view or the inspector
|
||||
to edit new classes.
|
||||
* Added inspectors for the following: NSScrollView,
|
||||
NSProgressIndicator, NSColorWell, GormImageInspector (for images
|
||||
added to .gorm files).
|
||||
* Improved look of NSTabView inspector.
|
||||
* Removed all warnings from the code.
|
||||
* various bug fixes.
|
||||
|
||||
38 Noteworthy changes in version '0.2.5'.
|
||||
=========================================
|
||||
|
||||
Many fixes and improvements to make the app work better.
|
||||
|
||||
* Better parsing of headers
|
||||
* Interface code redone as gorm files.
|
||||
* Re-add multiple selection via mouse drag.
|
||||
|
||||
39 Noteworthy changes in version '0.2.0' snapshot.
|
||||
==================================================
|
||||
|
||||
Gobs of improvements, mostly due to the hard work of Gregory John
|
||||
Casamento and Pierre-Yves Rivaille. Thanks guys!
|
||||
|
||||
* Custom class support/translations implemented.
|
||||
* Added NSScrollView, NSPopupButton, NSOutlineView, NSTableView
|
||||
editing.
|
||||
* Improved test mode support.
|
||||
* Improved drag n' drop support on many items.
|
||||
* Intelligent placement hints.
|
||||
* Read gmodel files.
|
||||
* More inspectors.
|
||||
* Sound and Image support.
|
||||
* gorm files were changed to directory wrappers for more flexibility.
|
||||
|
||||
40 Noteworthy changes in version '0.1.0'
|
||||
========================================
|
||||
|
||||
* load/parses class files for entry into class list.
|
||||
* Pallete/inspectors for date and number formatters
|
||||
* Pallete/Inspectors for browsers and tableViews
|
||||
* NSStepper, NSForm, NSPopupButton pallete item and inspector
|
||||
* Most inspectors greatly improved and fleshed out.
|
||||
* Custom views added.
|
||||
* Ability to edit cells in a matrix.
|
||||
* Ability to change the font of some objects.
|
||||
|
||||
41 Noteworthy changes in version '0.0.3'
|
||||
========================================
|
||||
|
||||
* Create stub .m and .h files from new classes
|
||||
* Works better with ProjectCenter.
|
||||
* Handle Ctrl-Drag and Alt-Drag of objects - automatic conversion to
|
||||
matrices and/or increase decrease rows and cols.
|
||||
* Edit NSForms titles in place.
|
||||
* Edit NSBoxes and add subviews.
|
||||
* Support for custom objects.
|
||||
|
||||
42 Noteworthy changes in version '0.0.2'
|
||||
========================================
|
||||
|
||||
* Add popup and pulldown menu controls
|
||||
* Menu support
|
||||
* More inspectors
|
||||
* Some support for connections
|
||||
* Much more fleshed out - too numerous to mention.
|
||||
|
||||
43 Noteworthy changes in version '0.0.1'
|
||||
========================================
|
||||
|
||||
* 8th December 1999
|
||||
|
||||
* Save/Load 'nib' documents (binary archived data)
|
||||
|
||||
This works so far as it can be tested - but that's just
|
||||
archives containing windows or panels so far.
|
||||
|
||||
* Load palettes
|
||||
|
||||
Loading of palettes works. You can load palettes from the
|
||||
'Tools' menu. Gorm automatically loads all the palettes from
|
||||
its Resources directory.
|
||||
|
||||
* Basic framework
|
||||
|
||||
So far, the app provides a basic framework that needs fleshing
|
||||
out.
|
||||
* It has a palettes manager object that allows you to
|
||||
select a palette and drag items from the palette into
|
||||
your document.
|
||||
|
||||
* It has a special per-document editor object, which keeps
|
||||
track of a matrix of icons representing the top-level
|
||||
objects in the document.
|
||||
|
||||
* It has an inspector manager class, which updates the
|
||||
inspector panel when the selected object is changed by an
|
||||
editor.
|
||||
|
||||
* It has special inspectors for handling an empty selection
|
||||
or a multiple selection.
|
||||
|
||||
* Palettes
|
||||
|
||||
Four palettes (three of which are empty at present) are built
|
||||
and installed in the apps Resources directory.
|
||||
|
||||
The Window palette is more fully fleshed out than the other
|
||||
palettes. It permits windows and panels to be created in
|
||||
Gorm. If provides the start of a window attributes inspector.
|
||||
|
||||
* 18 December 1999
|
||||
|
||||
* You can drag views from a palette into a window or panel.
|
||||
* You can select views in a window by clicking on them,
|
||||
shift-clicking (for multiple selection), or click-drag on the
|
||||
window background to select views in a box.
|
||||
* You can delete/cut/copy/paste views betwen windows.
|
||||
* You can move views in a window by clicking on them and
|
||||
dragging.
|
||||
* You can resize views by clicking on their knobs and dragging.
|
||||
* You can control-drag to mark source and destination views for
|
||||
a connection.
|
||||
|
||||
* Next task - inspectors.
|
||||
|
||||
The connection inspector needs to be implemented to complete
|
||||
the process of establishing connections. The size inspector
|
||||
needs to be implemented to set autosizing parameters for a
|
||||
view.
|
||||
|
||||
Once these are done, the object editor needs to be made to
|
||||
support connections so that we can connect between objects
|
||||
other than views, then we need to write a menu editor.
|
||||
|
||||
* 22 December 1999
|
||||
|
||||
* Connections inspector is now working - but it needs some
|
||||
effort to tidy it up.
|
||||
* Class info (outlets and actions) is specified in
|
||||
'ClassInformation.plist' and needs to be present so that the
|
||||
app knows what outlets/actions an object has (and therefore
|
||||
what connections can be made).
|
||||
|
||||
* The view size inspector is working - allowing you to set the
|
||||
size of the subviews within a window.
|
||||
|
||||
* The attributes inspector for 'FilesOwner' is working, so you
|
||||
can define the class of the files owner (it defaults to
|
||||
NSApplication).
|
||||
|
||||
* There is a crude panel for setting the name of the selected
|
||||
object.
|
||||
|
||||
* I've created a couple of new images and got rid of the two
|
||||
NeXT images that were lurking in there.
|
||||
|
||||
* There is a Testing directory, with a GormTest application that
|
||||
lets you load a nib for testing - it assumes that the nib will
|
||||
set its FilesOwners delegate to point to a window, and makes
|
||||
that window the key window ...
|
||||
|
||||
* 23 December 1999
|
||||
|
||||
Last work before christmas ...
|
||||
|
||||
Various bits of tidying up plus -
|
||||
|
||||
Added an evil hack of a generic attributes inspector ... This
|
||||
looks through all the methods of the selected object to find those
|
||||
taking a single argument and beginning with 'set'. It makes all
|
||||
these setting methods (whose argument is a simple scalar type or an
|
||||
object) available for you to invoke from the inspector panel.
|
||||
|
||||
This makes it possible to set pretty much any attribute of any
|
||||
object, but you do need to have the GNUstep header files to hand,
|
||||
so you can tell what numeric values to enter to achieve a desired
|
||||
result.
|
||||
|
3
Documentation/README.md
Normal file
3
Documentation/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Documentation directory
|
||||
|
||||
This directory contains documentation for the Gorm application as well as the frameworks used in it's functionality.
|
|
@ -4,6 +4,21 @@
|
|||
@include version.texi
|
||||
@end ifset
|
||||
|
||||
@section Noteworthy changes in version @samp{1.4.0}
|
||||
|
||||
@itemize @bullet
|
||||
@item Fix issue with saving a gorm from a nib file.
|
||||
@item Fix issue with saving a gorm file from a xib.
|
||||
@item Add XLIF support for language translation.
|
||||
@item Add capability to generate XIB file.
|
||||
@item Add gormtool command-line tool. Allows some gorm work without the gui
|
||||
@item Fixes and some improvements to structure Gorm as framework/app.
|
||||
@end itemize
|
||||
|
||||
@c ====================================================================
|
||||
@c Keep the next line just below the list of changes in most recent version.
|
||||
@ifclear ANNOUNCE-ONLY
|
||||
|
||||
@section Noteworthy changes in version @samp{1.3.1}
|
||||
|
||||
@itemize @bullet
|
||||
|
@ -15,10 +30,6 @@
|
|||
@item Bug fixes in GormClassManager, GormDocument, etc.
|
||||
@end itemize
|
||||
|
||||
@c ====================================================================
|
||||
@c Keep the next line just below the list of changes in most recent version.
|
||||
@ifclear ANNOUNCE-ONLY
|
||||
|
||||
@section Noteworthy changes in version @samp{1.2.28}
|
||||
|
||||
@itemize @bullet
|
|
@ -41,6 +41,7 @@ ifeq ($(GNUSTEP_MAKEFILES),)
|
|||
$(error You need to set GNUSTEP_MAKEFILES before compiling!)
|
||||
endif
|
||||
|
||||
VERSION = 1.4.0
|
||||
PACKAGE_NAME = gorm
|
||||
export PACKAGE_NAME
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
@ -54,8 +55,9 @@ SVN_BASE_URL = svn+ssh://svn.gna.org/svn/gnustep/apps
|
|||
#
|
||||
SUBPROJECTS = \
|
||||
InterfaceBuilder \
|
||||
GormCore \
|
||||
GormObjCHeaderParser \
|
||||
GormCore \
|
||||
Plugins \
|
||||
Applications \
|
||||
Tools
|
||||
|
||||
|
|
8
GNUmakefile.postamble
Normal file
8
GNUmakefile.postamble
Normal file
|
@ -0,0 +1,8 @@
|
|||
# GNUmakefile -- copy all plugins
|
||||
|
||||
after-all::
|
||||
echo "Copying Plugins..."
|
||||
cp -r Plugins/GModel/*.plugin GormCore/GormCore.framework/Resources
|
||||
cp -r Plugins/Gorm/*.plugin GormCore/GormCore.framework/Resources
|
||||
cp -r Plugins/Nib/*.plugin GormCore/GormCore.framework/Resources
|
||||
cp -r Plugins/Xib/*.plugin GormCore/GormCore.framework/Resources
|
|
@ -28,18 +28,18 @@
|
|||
"selectAction:"
|
||||
);
|
||||
Outlets = (
|
||||
classField,
|
||||
tabView,
|
||||
removeOutlet,
|
||||
addAction,
|
||||
actionTable,
|
||||
outletTable,
|
||||
removeAction,
|
||||
addOutlet,
|
||||
selectClass,
|
||||
parentClass,
|
||||
search,
|
||||
searchText
|
||||
"_classField",
|
||||
"_tabView",
|
||||
"_removeOutlet",
|
||||
"_addAction",
|
||||
"_actionTable",
|
||||
"_outletTable",
|
||||
"_removeAction",
|
||||
"_addOutlet",
|
||||
"_selectClass",
|
||||
"_parentClass",
|
||||
"_search",
|
||||
"_searchText"
|
||||
);
|
||||
Super = IBInspector;
|
||||
};
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -31,12 +31,10 @@ include $(GNUSTEP_MAKEFILES)/common.make
|
|||
PACKAGE_NAME=GormCore
|
||||
FRAMEWORK_VAR=GORMCORE
|
||||
FRAMEWORK_NAME=GormCore
|
||||
GormCore_HEADER_FILES_DIR=.
|
||||
GormCore_HEADER_FILES_INSTALL_DIR=/GormCore
|
||||
ADDITIONAL_INCLUDE_DIRS = -I..
|
||||
srcdir = .
|
||||
|
||||
SUBPROJECTS = Plugins
|
||||
SUBPROJECTS =
|
||||
|
||||
GormCore_HEADER_FILES = \
|
||||
GormCore.h \
|
||||
|
@ -196,10 +194,6 @@ GormCore_OBJC_FILES = \
|
|||
GormXLIFFDocument.m \
|
||||
|
||||
GormCore_RESOURCE_FILES = \
|
||||
Plugins/Gorm/Gorm.plugin \
|
||||
Plugins/Nib/Nib.plugin \
|
||||
Plugins/Xib/Xib.plugin \
|
||||
Plugins/GModel/GModel.plugin \
|
||||
Images/GormActionSelected.tiff \
|
||||
Images/GormAction.tiff \
|
||||
Images/GormClass.tiff \
|
||||
|
@ -225,6 +219,8 @@ GormCore_RESOURCE_FILES = \
|
|||
Images/GormUnknown.tiff \
|
||||
Images/GormView.tiff \
|
||||
Images/GormWindow.tiff \
|
||||
Images/browserView.tiff \
|
||||
Images/outlineView.tiff \
|
||||
Resources/VersionProfiles.plist \
|
||||
Resources/ClassInformation.plist
|
||||
|
||||
|
|
|
@ -22,11 +22,19 @@
|
|||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
|
||||
#
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += \
|
||||
-I../InterfaceBuilder
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../..
|
||||
|
||||
# ADDITIONAL_GUI_LIBS += \
|
||||
# -lInterfaceBuilder
|
||||
ifeq ($(GNUSTEP_TARGET_OS),mingw32)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
|
||||
#ADDITIONAL_LIB_DIRS += \
|
||||
# -L../InterfaceBuilder/$(GNUSTEP_OBJ_DIR)
|
||||
ADDITIONAL_GUI_LIBS += -lInterfaceBuilder -lGormObjCHeaderParser
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_OS),cygwin)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../InterfaceBuilder/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
|
||||
$(BUNDLE_NAME)_LIBRARIES_DEPEND_UPON += -lInterfaceBuilder -lGormObjCHeaderParser
|
||||
endif
|
|
@ -45,32 +45,32 @@
|
|||
|
||||
@interface GormAbstractDelegate : NSObject <IB, GormAppDelegate, GormServer>
|
||||
{
|
||||
IBOutlet id gormMenu;
|
||||
IBOutlet id guideLineMenuItem;
|
||||
IBOutlet id _gormMenu;
|
||||
IBOutlet id _guideLineMenuItem;
|
||||
|
||||
GormPrefController *preferencesController;
|
||||
GormClassManager *classManager;
|
||||
GormInspectorsManager *inspectorsManager;
|
||||
GormPalettesManager *palettesManager;
|
||||
GormPluginManager *pluginManager;
|
||||
id<IBSelectionOwners> selectionOwner;
|
||||
BOOL isConnecting;
|
||||
BOOL isTesting;
|
||||
id testContainer;
|
||||
NSMenu *mainMenu; // saves the main menu...
|
||||
NSMenu *servicesMenu; // saves the services menu...
|
||||
NSMenu *classMenu; // so we can set it for the class view
|
||||
NSDictionary *menuLocations;
|
||||
NSImage *linkImage;
|
||||
NSImage *sourceImage;
|
||||
NSImage *targetImage;
|
||||
NSImage *gormImage;
|
||||
NSImage *testingImage;
|
||||
id connectSource;
|
||||
id connectDestination;
|
||||
NSMutableArray *testingWindows;
|
||||
NSSet *topObjects;
|
||||
NSDockTile *dockTile;
|
||||
GormPrefController *_preferencesController;
|
||||
GormClassManager *_classManager;
|
||||
GormInspectorsManager *_inspectorsManager;
|
||||
GormPalettesManager *_palettesManager;
|
||||
GormPluginManager *_pluginManager;
|
||||
id<IBSelectionOwners> _selectionOwner;
|
||||
BOOL _isConnecting;
|
||||
BOOL _isTesting;
|
||||
id _testContainer;
|
||||
NSMenu *_mainMenu; // saves the main menu...
|
||||
NSMenu *_servicesMenu; // saves the services menu...
|
||||
NSMenu *_classMenu; // so we can set it for the class view
|
||||
NSDictionary *_menuLocations;
|
||||
NSImage *_linkImage;
|
||||
NSImage *_sourceImage;
|
||||
NSImage *_targetImage;
|
||||
NSImage *_gormImage;
|
||||
NSImage *_testingImage;
|
||||
id _connectSource;
|
||||
id _connectDestination;
|
||||
NSMutableArray *_testingWindows;
|
||||
NSSet *_topObjects;
|
||||
NSDockTile *_dockTile;
|
||||
}
|
||||
|
||||
// testing the interface
|
||||
|
@ -78,6 +78,10 @@
|
|||
- (IBAction) testInterface: (id)sender;
|
||||
- (IBAction) endTesting: (id)sender;
|
||||
|
||||
// Testing...
|
||||
- (void) setTestingInterface: (BOOL)testing;
|
||||
- (BOOL) isTestingInterface;
|
||||
|
||||
@end
|
||||
|
||||
#endif // import guard
|
||||
|
|
|
@ -61,16 +61,19 @@
|
|||
if ([self isInTool] == NO)
|
||||
{
|
||||
path = [bundle pathForImageResource: @"GormLinkImage"];
|
||||
linkImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
_linkImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormSourceTag"];
|
||||
sourceImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
_sourceImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormTargetTag"];
|
||||
targetImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
_targetImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"Gorm"];
|
||||
gormImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
_gormImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormTesting"];
|
||||
testingImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
_testingImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
|
||||
// Initialize ivars
|
||||
_isTesting = NO;
|
||||
|
||||
// regular notifications...
|
||||
[nc addObserver: self
|
||||
|
@ -143,9 +146,9 @@
|
|||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
|
||||
[nc removeObserver: self];
|
||||
RELEASE(inspectorsManager);
|
||||
RELEASE(palettesManager);
|
||||
RELEASE(classManager);
|
||||
RELEASE(_inspectorsManager);
|
||||
RELEASE(_palettesManager);
|
||||
RELEASE(_classManager);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -274,22 +277,22 @@
|
|||
if (document != nil) return [document classManager];
|
||||
|
||||
/* kept in the case one want access to the classManager without document */
|
||||
else if (classManager == nil)
|
||||
else if (_classManager == nil)
|
||||
{
|
||||
classManager = [[GormClassManager alloc] init];
|
||||
_classManager = [[GormClassManager alloc] init];
|
||||
}
|
||||
return classManager;
|
||||
return _classManager;
|
||||
|
||||
}
|
||||
|
||||
- (id) connectDestination
|
||||
{
|
||||
return connectDestination;
|
||||
return _connectDestination;
|
||||
}
|
||||
|
||||
- (id) connectSource
|
||||
{
|
||||
return connectSource;
|
||||
return _connectSource;
|
||||
}
|
||||
|
||||
- (void) displayConnectionBetween: (id)source
|
||||
|
@ -299,12 +302,12 @@
|
|||
NSRect rect;
|
||||
|
||||
|
||||
if (source != connectSource)
|
||||
if (source != _connectSource)
|
||||
{
|
||||
if (connectSource != nil)
|
||||
if (_connectSource != nil)
|
||||
{
|
||||
window = [(GormDocument *)[self activeDocument] windowAndRect: &rect
|
||||
forObject: connectSource];
|
||||
forObject: _connectSource];
|
||||
if (window != nil)
|
||||
{
|
||||
NSView *view = [[window contentView] superview];
|
||||
|
@ -321,14 +324,14 @@
|
|||
[window flushWindow];
|
||||
}
|
||||
}
|
||||
connectSource = source;
|
||||
_connectSource = source;
|
||||
}
|
||||
if (destination != connectDestination)
|
||||
if (destination != _connectDestination)
|
||||
{
|
||||
if (connectDestination != nil)
|
||||
if (_connectDestination != nil)
|
||||
{
|
||||
window = [(GormDocument *)[self activeDocument] windowAndRect: &rect
|
||||
forObject: connectDestination];
|
||||
forObject: _connectDestination];
|
||||
if (window != nil)
|
||||
{
|
||||
NSView *view = [[window contentView] superview];
|
||||
|
@ -346,11 +349,11 @@
|
|||
[window flushWindow];
|
||||
}
|
||||
}
|
||||
connectDestination = destination;
|
||||
_connectDestination = destination;
|
||||
}
|
||||
if (connectSource != nil)
|
||||
if (_connectSource != nil)
|
||||
{
|
||||
window = [(GormDocument *)[self activeDocument] windowAndRect: &rect forObject: connectSource];
|
||||
window = [(GormDocument *)[self activeDocument] windowAndRect: &rect forObject: _connectSource];
|
||||
if (window != nil)
|
||||
{
|
||||
NSView *view = [[window contentView] superview];
|
||||
|
@ -363,16 +366,16 @@
|
|||
[[NSColor greenColor] set];
|
||||
NSFrameRectWithWidth(rect, 1);
|
||||
|
||||
[sourceImage compositeToPoint: imageRect.origin
|
||||
operation: NSCompositeSourceOver];
|
||||
[_sourceImage compositeToPoint: imageRect.origin
|
||||
operation: NSCompositeSourceOver];
|
||||
[view unlockFocus];
|
||||
[window flushWindow];
|
||||
}
|
||||
}
|
||||
if (connectDestination != nil && connectDestination == connectSource)
|
||||
if (_connectDestination != nil && _connectDestination == _connectSource)
|
||||
{
|
||||
window = [(GormDocument *)[self activeDocument] windowAndRect: &rect
|
||||
forObject: connectDestination];
|
||||
forObject: _connectDestination];
|
||||
if (window != nil)
|
||||
{
|
||||
NSView *view = [[window contentView] superview];
|
||||
|
@ -386,17 +389,17 @@
|
|||
[[NSColor purpleColor] set];
|
||||
NSFrameRectWithWidth(rect, 1);
|
||||
|
||||
imageRect.origin.x += [targetImage size].width;
|
||||
[targetImage compositeToPoint: imageRect.origin
|
||||
operation: NSCompositeSourceOver];
|
||||
imageRect.origin.x += [_targetImage size].width;
|
||||
[_targetImage compositeToPoint: imageRect.origin
|
||||
operation: NSCompositeSourceOver];
|
||||
[view unlockFocus];
|
||||
[window flushWindow];
|
||||
}
|
||||
}
|
||||
else if (connectDestination != nil)
|
||||
else if (_connectDestination != nil)
|
||||
{
|
||||
window = [(GormDocument *)[self activeDocument] windowAndRect: &rect
|
||||
forObject: connectDestination];
|
||||
forObject: _connectDestination];
|
||||
if (window != nil)
|
||||
{
|
||||
NSView *view = [[window contentView] superview];
|
||||
|
@ -409,8 +412,8 @@
|
|||
[[NSColor purpleColor] set];
|
||||
NSFrameRectWithWidth(rect, 1);
|
||||
|
||||
[targetImage compositeToPoint: imageRect.origin
|
||||
operation: NSCompositeSourceOver];
|
||||
[_targetImage compositeToPoint: imageRect.origin
|
||||
operation: NSCompositeSourceOver];
|
||||
[view unlockFocus];
|
||||
[window flushWindow];
|
||||
}
|
||||
|
@ -419,7 +422,7 @@
|
|||
|
||||
- (IBAction) testInterface: (id)sender
|
||||
{
|
||||
if (isTesting == NO)
|
||||
if (_isTesting == NO || [self isInTool])
|
||||
{
|
||||
// top level objects
|
||||
NS_DURING
|
||||
|
@ -430,7 +433,7 @@
|
|||
NSData *data;
|
||||
NSArchiver *archiver;
|
||||
NSEnumerator *en;
|
||||
NSDictionary *substituteClasses = [palettesManager substituteClasses];
|
||||
NSDictionary *substituteClasses = [_palettesManager substituteClasses];
|
||||
NSString *subClassName;
|
||||
id obj;
|
||||
id savedDelegate = [NSApp delegate];
|
||||
|
@ -438,46 +441,53 @@
|
|||
|
||||
|
||||
// which windows were open when testing started...
|
||||
testingWindows = [[NSMutableArray alloc] init];
|
||||
_testingWindows = [[NSMutableArray alloc] init];
|
||||
en = [[NSApp windows] objectEnumerator];
|
||||
while((obj = [en nextObject]) != nil)
|
||||
{
|
||||
if([obj isVisible])
|
||||
{
|
||||
[testingWindows addObject: obj];
|
||||
[_testingWindows addObject: obj];
|
||||
if ([activeDoc window] != obj)
|
||||
{
|
||||
[obj close]; // close the visible windows...
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// set here, so that beginArchiving and endArchiving do not use templates.
|
||||
isTesting = YES;
|
||||
// [NSApp setApplicationIconImage: testingImage];
|
||||
_isTesting = YES;
|
||||
// [NSApp setApplicationIconImage: _testingImage];
|
||||
|
||||
// Set up the dock tile...
|
||||
dockTile = [[NSDockTile alloc] init];
|
||||
[dockTile setShowsApplicationBadge: YES];
|
||||
[dockTile setBadgeLabel: @"Test!"];
|
||||
|
||||
_dockTile = [[NSDockTile alloc] init];
|
||||
[_dockTile setShowsApplicationBadge: YES];
|
||||
[_dockTile setBadgeLabel: @"Test!"];
|
||||
|
||||
// Encode palette classes with their equivalent substitutes
|
||||
archiver = [[NSArchiver alloc] init];
|
||||
[activeDoc deactivateEditors];
|
||||
[archiver encodeClassName: @"GormCustomView"
|
||||
intoClassName: @"GormTestCustomView"];
|
||||
|
||||
// substitute classes from palettes.
|
||||
en = [substituteClasses keyEnumerator];
|
||||
while((subClassName = [en nextObject]) != nil)
|
||||
if ([self isInTool] == NO)
|
||||
{
|
||||
NSString *realClassName = [substituteClasses objectForKey: subClassName];
|
||||
[archiver encodeClassName: @"GormCustomView"
|
||||
intoClassName: @"GormTestCustomView"];
|
||||
|
||||
if([realClassName isEqualToString: @"NSTableView"] ||
|
||||
[realClassName isEqualToString: @"NSOutlineView"] ||
|
||||
[realClassName isEqualToString: @"NSBrowser"])
|
||||
// substitute classes from palettes.
|
||||
en = [substituteClasses keyEnumerator];
|
||||
while((subClassName = [en nextObject]) != nil)
|
||||
{
|
||||
continue;
|
||||
NSString *realClassName = [substituteClasses objectForKey: subClassName];
|
||||
|
||||
if([realClassName isEqualToString: @"NSTableView"] ||
|
||||
[realClassName isEqualToString: @"NSOutlineView"] ||
|
||||
[realClassName isEqualToString: @"NSBrowser"])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
[archiver encodeClassName: subClassName
|
||||
intoClassName: realClassName];
|
||||
}
|
||||
|
||||
[archiver encodeClassName: subClassName
|
||||
intoClassName: realClassName];
|
||||
}
|
||||
|
||||
// do not allow custom classes during testing.
|
||||
|
@ -492,45 +502,55 @@
|
|||
[notifCenter postNotificationName: IBWillBeginTestingInterfaceNotification
|
||||
object: self];
|
||||
|
||||
if ([selectionOwner conformsToProtocol: @protocol(IBEditors)] == YES)
|
||||
if ([_selectionOwner conformsToProtocol: @protocol(IBEditors)] == YES)
|
||||
{
|
||||
[selectionOwner makeSelectionVisible: NO];
|
||||
[_selectionOwner makeSelectionVisible: NO];
|
||||
}
|
||||
|
||||
defaults = [NSUserDefaults standardUserDefaults];
|
||||
menuLocations = [[defaults objectForKey: @"NSMenuLocations"] copy];
|
||||
_menuLocations = [[defaults objectForKey: @"NSMenuLocations"] copy];
|
||||
[defaults removeObjectForKey: @"NSMenuLocations"];
|
||||
servicesMenu = [NSApp servicesMenu];
|
||||
_servicesMenu = [NSApp servicesMenu];
|
||||
|
||||
testContainer = [NSUnarchiver unarchiveObjectWithData: data];
|
||||
if (testContainer != nil)
|
||||
_testContainer = [NSUnarchiver unarchiveObjectWithData: data];
|
||||
if (_testContainer != nil)
|
||||
{
|
||||
NSMutableDictionary *nameTable = [testContainer nameTable];
|
||||
NSMutableDictionary *nameTable = [_testContainer nameTable];
|
||||
NSMenu *aMenu = [nameTable objectForKey: @"NSMenu"];
|
||||
|
||||
mainMenu = [NSApp mainMenu]; // save the menu before testing...
|
||||
_mainMenu = [NSApp mainMenu]; // save the menu before testing...
|
||||
[[NSApp mainMenu] close];
|
||||
[NSApp setMainMenu: aMenu];
|
||||
// initialize the context.
|
||||
RETAIN(testContainer);
|
||||
topObjects = [testContainer topLevelObjects];
|
||||
RETAIN(_testContainer);
|
||||
_topObjects = [_testContainer topLevelObjects];
|
||||
|
||||
[nameTable removeObjectForKey: @"NSServicesMenu"];
|
||||
[nameTable removeObjectForKey: @"NSWindowsMenu"];
|
||||
[testContainer awakeWithContext: nil];
|
||||
[_testContainer awakeWithContext: nil];
|
||||
[NSApp setDelegate: savedDelegate]; // makes sure the delegate isn't reset.
|
||||
|
||||
/*
|
||||
* If the model didn't have a main menu, create one,
|
||||
* otherwise, ensure that 'quit' ends testing mode.
|
||||
*/
|
||||
|
||||
SEL endSelector = NULL;
|
||||
|
||||
endSelector = @selector(deferredEndTesting:);
|
||||
if ([self isInTool])
|
||||
{
|
||||
endSelector = @selector(endTestingNow:);
|
||||
}
|
||||
|
||||
|
||||
if (aMenu == nil)
|
||||
{
|
||||
NSMenu *testMenu;
|
||||
|
||||
testMenu = [[NSMenu alloc] initWithTitle: _(@"Test Menu (Gorm)")];
|
||||
[testMenu addItemWithTitle: _(@"Quit Test")
|
||||
action: @selector(deferredEndTesting:)
|
||||
action: endSelector
|
||||
keyEquivalent: @"q"];
|
||||
[NSApp setMainMenu: testMenu]; // released, when the menu is reset in endTesting.
|
||||
}
|
||||
|
@ -553,7 +573,7 @@
|
|||
found = YES;
|
||||
[item setTitle: _(@"Quit Test")];
|
||||
[item setTarget: self];
|
||||
[item setAction: @selector(deferredEndTesting:)];
|
||||
[item setAction: endSelector];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -566,8 +586,8 @@
|
|||
if(found == NO)
|
||||
{
|
||||
[testMenu addItemWithTitle: _(@"Quit Test")
|
||||
action: @selector(deferredEndTesting:)
|
||||
keyEquivalent: @"q"];
|
||||
action: endSelector
|
||||
keyEquivalent: @"q"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -615,7 +635,7 @@
|
|||
GormSetNameController *panel;
|
||||
int returnPanel;
|
||||
NSTextField *textField;
|
||||
NSArray *selectionArray = [selectionOwner selection];
|
||||
NSArray *selectionArray = [_selectionOwner selection];
|
||||
id obj = [selectionArray objectAtIndex: 0];
|
||||
NSString *name;
|
||||
|
||||
|
@ -641,15 +661,15 @@
|
|||
{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: GormToggleGuidelineNotification
|
||||
object:nil];
|
||||
if ( [guideLineMenuItem tag] == 0 )
|
||||
if ( [_guideLineMenuItem tag] == 0 )
|
||||
{
|
||||
[guideLineMenuItem setTitle:_(@"Turn GuideLine On")];
|
||||
[guideLineMenuItem setTag:1];
|
||||
[_guideLineMenuItem setTitle:_(@"Turn GuideLine On")];
|
||||
[_guideLineMenuItem setTag:1];
|
||||
}
|
||||
else if ( [guideLineMenuItem tag] == 1)
|
||||
else if ( [_guideLineMenuItem tag] == 1)
|
||||
{
|
||||
[guideLineMenuItem setTitle:_(@"Turn GuideLine Off")];
|
||||
[guideLineMenuItem setTag:0];
|
||||
[_guideLineMenuItem setTitle:_(@"Turn GuideLine Off")];
|
||||
[_guideLineMenuItem setTag:0];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,6 +683,10 @@
|
|||
}
|
||||
|
||||
/** Testing methods... */
|
||||
- (IBAction) endTestingNow: (id)sender
|
||||
{
|
||||
[NSApp terminate: self];
|
||||
}
|
||||
|
||||
- (IBAction) deferredEndTesting: (id) sender
|
||||
{
|
||||
|
@ -679,7 +703,7 @@
|
|||
|
||||
- (IBAction) endTesting: (id)sender
|
||||
{
|
||||
if (isTesting)
|
||||
if (_isTesting)
|
||||
{
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
NSUserDefaults *defaults;
|
||||
|
@ -692,7 +716,7 @@
|
|||
/*
|
||||
* Make sure windows will go away when the container is destroyed.
|
||||
*/
|
||||
e = [topObjects objectEnumerator];
|
||||
e = [_topObjects objectEnumerator];
|
||||
while ((val = [e nextObject]) != nil)
|
||||
{
|
||||
if ([val isKindOfClass: [NSWindow class]] == YES)
|
||||
|
@ -708,7 +732,7 @@
|
|||
e = [[NSApp windows] objectEnumerator];
|
||||
while ((val = [e nextObject]) != nil)
|
||||
{
|
||||
if ([testingWindows containsObject: val] == NO &&
|
||||
if ([_testingWindows containsObject: val] == NO &&
|
||||
[val isKindOfClass: [NSWindow class]] &&
|
||||
[val isVisible])
|
||||
{
|
||||
|
@ -716,21 +740,22 @@
|
|||
}
|
||||
}
|
||||
|
||||
// prevent saving of this, if the menuLocations have not previously been set.
|
||||
if(menuLocations != nil)
|
||||
// prevent saving of this, if the _menuLocations have not previously been set.
|
||||
if(_menuLocations != nil)
|
||||
{
|
||||
defaults = [NSUserDefaults standardUserDefaults];
|
||||
[defaults setObject: menuLocations forKey: @"NSMenuLocations"];
|
||||
DESTROY(menuLocations);
|
||||
[defaults setObject: _menuLocations forKey: @"NSMenuLocations"];
|
||||
DESTROY(_menuLocations);
|
||||
}
|
||||
|
||||
// Restore windows and menus...
|
||||
[NSApp setMainMenu: mainMenu];
|
||||
[NSApp setApplicationIconImage: gormImage];
|
||||
[NSApp setMainMenu: _mainMenu];
|
||||
[NSApp setApplicationIconImage: _gormImage];
|
||||
[[NSApp mainMenu] display];
|
||||
RELEASE(dockTile);
|
||||
|
||||
RELEASE(_dockTile);
|
||||
|
||||
e = [testingWindows objectEnumerator];
|
||||
e = [_testingWindows objectEnumerator];
|
||||
while ((val = [e nextObject]) != nil)
|
||||
{
|
||||
[val orderFront: self];
|
||||
|
@ -738,7 +763,7 @@
|
|||
|
||||
NS_DURING
|
||||
{
|
||||
[NSApp setServicesMenu: servicesMenu];
|
||||
[NSApp setServicesMenu: _servicesMenu];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -746,20 +771,20 @@
|
|||
}
|
||||
NS_ENDHANDLER
|
||||
|
||||
isTesting = NO;
|
||||
_isTesting = NO;
|
||||
|
||||
if ([selectionOwner conformsToProtocol: @protocol(IBEditors)] == YES)
|
||||
if ([_selectionOwner conformsToProtocol: @protocol(IBEditors)] == YES)
|
||||
{
|
||||
[selectionOwner makeSelectionVisible: YES];
|
||||
[_selectionOwner makeSelectionVisible: YES];
|
||||
}
|
||||
[nc postNotificationName: IBDidEndTestingInterfaceNotification
|
||||
object: self];
|
||||
|
||||
|
||||
DESTROY(testingWindows);
|
||||
DESTROY(_testingWindows);
|
||||
|
||||
// deallocate
|
||||
RELEASE(testContainer);
|
||||
RELEASE(_testContainer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -780,13 +805,13 @@
|
|||
{
|
||||
[self stopConnecting];
|
||||
}
|
||||
[selectionOwner makeSelectionVisible: NO];
|
||||
selectionOwner = obj;
|
||||
[_selectionOwner makeSelectionVisible: NO];
|
||||
_selectionOwner = obj;
|
||||
[[self inspectorsManager] updateSelection];
|
||||
}
|
||||
else if ([name isEqual: IBWillCloseDocumentNotification])
|
||||
{
|
||||
selectionOwner = nil;
|
||||
_selectionOwner = nil;
|
||||
}
|
||||
else if ([name isEqual: @"GormAddClassNotification"])
|
||||
{
|
||||
|
@ -809,59 +834,64 @@
|
|||
- (void) awakeFromNib
|
||||
{
|
||||
// set the menu...
|
||||
mainMenu = (NSMenu *)gormMenu;
|
||||
_mainMenu = (NSMenu *)_gormMenu;
|
||||
}
|
||||
|
||||
- (GormInspectorsManager*) inspectorsManager
|
||||
{
|
||||
if (inspectorsManager == nil)
|
||||
if (_inspectorsManager == nil)
|
||||
{
|
||||
inspectorsManager = (GormInspectorsManager *)[GormInspectorsManager sharedInspectorManager];
|
||||
_inspectorsManager = (GormInspectorsManager *)[GormInspectorsManager sharedInspectorManager];
|
||||
}
|
||||
return inspectorsManager;
|
||||
return _inspectorsManager;
|
||||
}
|
||||
|
||||
- (BOOL) isConnecting
|
||||
{
|
||||
return isConnecting;
|
||||
return _isConnecting;
|
||||
}
|
||||
|
||||
- (BOOL) isTestingInterface
|
||||
{
|
||||
return isTesting;
|
||||
return _isTesting;
|
||||
}
|
||||
|
||||
- (void) setTestingInterface: (BOOL)testing
|
||||
{
|
||||
_isTesting = testing;
|
||||
}
|
||||
|
||||
- (NSImage*) linkImage
|
||||
{
|
||||
return linkImage;
|
||||
return _linkImage;
|
||||
}
|
||||
|
||||
- (GormPalettesManager*) palettesManager
|
||||
{
|
||||
if (palettesManager == nil)
|
||||
if (_palettesManager == nil)
|
||||
{
|
||||
palettesManager = [[GormPalettesManager alloc] init];
|
||||
_palettesManager = [[GormPalettesManager alloc] init];
|
||||
}
|
||||
return palettesManager;
|
||||
return _palettesManager;
|
||||
}
|
||||
|
||||
- (GormPluginManager*) pluginManager
|
||||
{
|
||||
if (pluginManager == nil)
|
||||
if (_pluginManager == nil)
|
||||
{
|
||||
pluginManager = [[GormPluginManager alloc] init];
|
||||
_pluginManager = [[GormPluginManager alloc] init];
|
||||
}
|
||||
return pluginManager;
|
||||
return _pluginManager;
|
||||
}
|
||||
|
||||
- (id<IBSelectionOwners>) selectionOwner
|
||||
{
|
||||
return (id<IBSelectionOwners>)selectionOwner;
|
||||
return (id<IBSelectionOwners>)_selectionOwner;
|
||||
}
|
||||
|
||||
- (id) selectedObject
|
||||
{
|
||||
return [[selectionOwner selection] lastObject];
|
||||
return [[_selectionOwner selection] lastObject];
|
||||
}
|
||||
|
||||
- (id<IBDocuments>) documentForObject: (id)object
|
||||
|
@ -886,40 +916,40 @@
|
|||
|
||||
- (void) startConnecting
|
||||
{
|
||||
if (isConnecting == YES)
|
||||
if (_isConnecting == YES)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (connectSource == nil)
|
||||
if (_connectSource == nil)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (connectDestination
|
||||
&& [[self activeDocument] containsObject: connectDestination] == NO)
|
||||
if (_connectDestination
|
||||
&& [[self activeDocument] containsObject: _connectDestination] == NO)
|
||||
{
|
||||
NSLog(@"Oops - connectDestination not in active document");
|
||||
NSLog(@"Oops - _connectDestination not in active document");
|
||||
return;
|
||||
}
|
||||
if ([[self activeDocument] containsObject: connectSource] == NO)
|
||||
if ([[self activeDocument] containsObject: _connectSource] == NO)
|
||||
{
|
||||
NSLog(@"Oops - connectSource not in active document");
|
||||
NSLog(@"Oops - _connectSource not in active document");
|
||||
return;
|
||||
}
|
||||
isConnecting = YES;
|
||||
_isConnecting = YES;
|
||||
[[self inspectorsManager] updateSelection];
|
||||
}
|
||||
|
||||
- (void) stopConnecting
|
||||
{
|
||||
[self displayConnectionBetween: nil and: nil];
|
||||
isConnecting = NO;
|
||||
connectSource = nil;
|
||||
connectDestination = nil;
|
||||
_isConnecting = NO;
|
||||
_connectSource = nil;
|
||||
_connectDestination = nil;
|
||||
}
|
||||
|
||||
- (NSMenu*) classMenu
|
||||
{
|
||||
return classMenu;
|
||||
return _classMenu;
|
||||
}
|
||||
|
||||
// Methods to support external apps adding and deleting
|
||||
|
@ -954,4 +984,11 @@
|
|||
[cm removeClassNamed: className];
|
||||
}
|
||||
|
||||
- (void) exceptionWhileLoadingModel: (NSString *)errorMessage
|
||||
{
|
||||
NSRunAlertPanel(_(@"Exception"),
|
||||
errorMessage,
|
||||
nil, nil, nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -73,7 +73,7 @@ NSImage *browserImage = nil;
|
|||
{
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
|
||||
if([bundle loadNibNamed: @"GormClassEditor" owner: self topLevelObjects: nil])
|
||||
if([bundle loadNibNamed: @"GormClassEditor" owner: self topLevelObjects: NULL])
|
||||
{
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
NSRect scrollRect = [classesView frame]; // = {{0, 0}, {340, 188}};
|
||||
|
@ -153,7 +153,7 @@ NSImage *browserImage = nil;
|
|||
RELEASE(tableColumn);
|
||||
|
||||
// expand all of the items in the classesView...
|
||||
[outlineView expandItem: @"NSObject"];
|
||||
// [outlineView expandItem: @"NSObject"];
|
||||
[outlineView setFrame: scrollRect];
|
||||
|
||||
// allocate the NSBrowser view.
|
||||
|
@ -859,73 +859,14 @@ NSImage *browserImage = nil;
|
|||
*/
|
||||
- (id) instantiateClass: (id)sender
|
||||
{
|
||||
NSString *object = [self selectedClassName];
|
||||
GSNibItem *item = nil;
|
||||
NSString *className = [self selectedClassName];
|
||||
NSString *theName = nil;
|
||||
|
||||
if([object isEqualToString: @"FirstResponder"])
|
||||
theName = [document instantiateClassNamed: className];
|
||||
if (theName == nil)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
if([classManager canInstantiateClassNamed: object] == NO)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
if([classManager isSuperclass: @"NSView" linkedToClass: object] ||
|
||||
[object isEqual: @"NSView"])
|
||||
{
|
||||
Class cls;
|
||||
NSString *className = object;
|
||||
BOOL isCustom = [classManager isCustomClass: object];
|
||||
id instance;
|
||||
|
||||
if(isCustom)
|
||||
{
|
||||
className = [classManager nonCustomSuperClassOf: object];
|
||||
}
|
||||
|
||||
// instantiate the object or it's substitute...
|
||||
cls = NSClassFromString(className);
|
||||
if([cls respondsToSelector: @selector(allocSubstitute)])
|
||||
{
|
||||
instance = [cls allocSubstitute];
|
||||
}
|
||||
else
|
||||
{
|
||||
instance = [cls alloc];
|
||||
}
|
||||
|
||||
// give it some initial dimensions...
|
||||
if([instance respondsToSelector: @selector(initWithFrame:)])
|
||||
{
|
||||
instance = [instance initWithFrame: NSMakeRect(10,10,380,280)];
|
||||
}
|
||||
else
|
||||
{
|
||||
instance = [instance init];
|
||||
}
|
||||
|
||||
// add it to the top level objects...
|
||||
[document attachObject: instance toParent: nil];
|
||||
|
||||
// we want to record if it's custom or not and act appropriately...
|
||||
if(isCustom)
|
||||
{
|
||||
NSString *name = [document nameForObject: instance];
|
||||
[classManager setCustomClass: object
|
||||
forName: name];
|
||||
}
|
||||
|
||||
[document changeToViewWithTag: 0];
|
||||
NSLog(@"Instantiate NSView subclass %@",object);
|
||||
}
|
||||
else
|
||||
{
|
||||
item = [[GormObjectProxy alloc] initWithClassName: object];
|
||||
[document attachObject: item toParent: nil];
|
||||
[document changeToViewWithTag: 0];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -944,7 +885,7 @@ NSImage *browserImage = nil;
|
|||
*/
|
||||
- (id) loadClass: (id)sender
|
||||
{
|
||||
NSArray *fileTypes = [NSArray arrayWithObjects: @"h", @"H", nil];
|
||||
NSArray *fileTypes = [NSArray arrayWithObjects: @"h", @"H", @"m", @"mm", nil];
|
||||
NSOpenPanel *oPanel = [NSOpenPanel openPanel];
|
||||
int result;
|
||||
|
||||
|
@ -981,7 +922,7 @@ NSImage *browserImage = nil;
|
|||
message,
|
||||
nil, nil, nil);
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
|
||||
return nil;
|
||||
|
|
|
@ -35,28 +35,28 @@
|
|||
@interface GormClassInspector : IBInspector
|
||||
{
|
||||
// outlets
|
||||
id actionTable;
|
||||
id addAction;
|
||||
id addOutlet;
|
||||
id classField;
|
||||
id outletTable;
|
||||
id parentClass;
|
||||
id removeAction;
|
||||
id removeOutlet;
|
||||
id selectClass;
|
||||
id search;
|
||||
id searchText;
|
||||
id tabView;
|
||||
id _actionTable;
|
||||
id _addAction;
|
||||
id _addOutlet;
|
||||
id _classField;
|
||||
id _outletTable;
|
||||
id _parentClass;
|
||||
id _removeAction;
|
||||
id _removeOutlet;
|
||||
id _selectClass;
|
||||
id _search;
|
||||
id _searchText;
|
||||
id _tabView;
|
||||
|
||||
// internal vars
|
||||
NSString *currentClass;
|
||||
id theobject;
|
||||
id actionData;
|
||||
id outletData;
|
||||
id parentClassData;
|
||||
NSString *_currentClass;
|
||||
id _theobject;
|
||||
id _actionData;
|
||||
id _outletData;
|
||||
id _parentClassData;
|
||||
|
||||
// class manager..
|
||||
GormClassManager *classManager;
|
||||
GormClassManager *_classManager;
|
||||
}
|
||||
- (void) addAction: (id)sender;
|
||||
- (void) removeAction: (id)sender;
|
||||
|
|
|
@ -258,23 +258,23 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
|
||||
// initialize all member variables...
|
||||
actionTable = nil;
|
||||
addAction = nil;
|
||||
addOutlet = nil;
|
||||
classField = nil;
|
||||
outletTable = nil;
|
||||
removeAction = nil;
|
||||
removeOutlet = nil;
|
||||
tabView = nil;
|
||||
currentClass = nil;
|
||||
actionData = nil;
|
||||
outletData = nil;
|
||||
parentClassData = nil;
|
||||
_actionTable = nil;
|
||||
_addAction = nil;
|
||||
_addOutlet = nil;
|
||||
_classField = nil;
|
||||
_outletTable = nil;
|
||||
_removeAction = nil;
|
||||
_removeOutlet = nil;
|
||||
_tabView = nil;
|
||||
_currentClass = nil;
|
||||
_actionData = nil;
|
||||
_outletData = nil;
|
||||
_parentClassData = nil;
|
||||
|
||||
// load the gui...
|
||||
if (![bundle loadNibNamed: @"GormClassInspector"
|
||||
owner: self
|
||||
topLevelObjects: nil])
|
||||
topLevelObjects: NULL])
|
||||
{
|
||||
NSLog(@"Could not open gorm GormClassInspector");
|
||||
return nil;
|
||||
|
@ -289,52 +289,61 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
RELEASE(_actionData);
|
||||
RELEASE(_outletData);
|
||||
RELEASE(_parentClassData);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
// instantiate..
|
||||
actionData = [[GormActionDataSource alloc] init];
|
||||
outletData = [[GormOutletDataSource alloc] init];
|
||||
parentClassData = [[GormClassesDataSource alloc] init];
|
||||
_actionData = [[GormActionDataSource alloc] init];
|
||||
_outletData = [[GormOutletDataSource alloc] init];
|
||||
_parentClassData = [[GormClassesDataSource alloc] init];
|
||||
|
||||
// initialize..
|
||||
[actionData setInspector: self];
|
||||
[outletData setInspector: self];
|
||||
[parentClassData setInspector: self];
|
||||
[_actionData setInspector: self];
|
||||
[_outletData setInspector: self];
|
||||
[_parentClassData setInspector: self];
|
||||
|
||||
// use..
|
||||
[actionTable setDataSource: actionData];
|
||||
[outletTable setDataSource: outletData];
|
||||
[parentClass setDataSource: parentClassData];
|
||||
[parentClass setDoubleAction: @selector(selectClass:)];
|
||||
[parentClass setTarget: self];
|
||||
[_actionTable setDataSource: _actionData];
|
||||
[_outletTable setDataSource: _outletData];
|
||||
[_parentClass setDataSource: _parentClassData];
|
||||
[_parentClass setDoubleAction: @selector(selectClass:)];
|
||||
[_parentClass setTarget: self];
|
||||
|
||||
// delegate...
|
||||
[actionTable setDelegate: self];
|
||||
[outletTable setDelegate: self];
|
||||
[parentClass setDelegate: self];
|
||||
[_actionTable setDelegate: self];
|
||||
[_outletTable setDelegate: self];
|
||||
[_parentClass setDelegate: self];
|
||||
}
|
||||
|
||||
- (void) _refreshView
|
||||
{
|
||||
id addActionCell = [addAction cell];
|
||||
id removeActionCell = [removeAction cell];
|
||||
id addOutletCell = [addOutlet cell];
|
||||
id removeOutletCell = [removeOutlet cell];
|
||||
id selectClassCell = [selectClass cell];
|
||||
id searchCell = [search cell];
|
||||
BOOL isEditable = [classManager isCustomClass: [self _currentClass]];
|
||||
id addActionCell = [_addAction cell];
|
||||
id removeActionCell = [_removeAction cell];
|
||||
id addOutletCell = [_addOutlet cell];
|
||||
id removeOutletCell = [_removeOutlet cell];
|
||||
id selectClassCell = [_selectClass cell];
|
||||
id searchCell = [_search cell];
|
||||
BOOL isEditable = [_classManager isCustomClass: [self _currentClass]];
|
||||
BOOL isFirstResponder = [[self _currentClass] isEqualToString: @"FirstResponder"];
|
||||
|
||||
NSArray *list = [classManager allClassNames];
|
||||
NSString *superClass = [classManager parentOfClass: [self _currentClass]];
|
||||
NSArray *list = [_classManager allClassNames];
|
||||
NSString *superClass = [_classManager parentOfClass: [self _currentClass]];
|
||||
NSUInteger index = [list indexOfObject: superClass];
|
||||
|
||||
[classField setStringValue: [self _currentClass]];
|
||||
[outletTable reloadData];
|
||||
[actionTable reloadData];
|
||||
[parentClass reloadData];
|
||||
// [outletTable deselectAll: self];
|
||||
// [actionTable deselectAll: self];
|
||||
[_classField setStringValue: [self _currentClass]];
|
||||
[_outletTable reloadData];
|
||||
[_actionTable reloadData];
|
||||
[_parentClass reloadData];
|
||||
// [_outletTable deselectAll: self];
|
||||
// [_actionTable deselectAll: self];
|
||||
|
||||
// activate for actions...
|
||||
[addActionCell setEnabled: YES];
|
||||
|
@ -346,16 +355,16 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
|
||||
// activate select class...
|
||||
[selectClassCell setEnabled: (isEditable && !isFirstResponder)];
|
||||
[parentClass setEnabled: (isEditable && !isFirstResponder)];
|
||||
[_parentClass setEnabled: (isEditable && !isFirstResponder)];
|
||||
[searchCell setEnabled: (isEditable && !isFirstResponder)];
|
||||
[classField setEditable: (isEditable && !isFirstResponder)];
|
||||
[classField setBackgroundColor: ((isEditable && !isFirstResponder)?[NSColor textBackgroundColor]:[NSColor selectedTextBackgroundColor])];
|
||||
[_classField setEditable: (isEditable && !isFirstResponder)];
|
||||
[_classField setBackgroundColor: ((isEditable && !isFirstResponder)?[NSColor textBackgroundColor]:[NSColor selectedTextBackgroundColor])];
|
||||
|
||||
// select the parent class
|
||||
if(index != NSNotFound && list != nil)
|
||||
{
|
||||
[parentClass selectRow: index byExtendingSelection: NO];
|
||||
[parentClass scrollRowToVisible: index];
|
||||
[_parentClass selectRow: index byExtendingSelection: NO];
|
||||
[_parentClass scrollRowToVisible: index];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -367,17 +376,17 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
if(document != nil)
|
||||
{
|
||||
NSString *className = [self _currentClass];
|
||||
NSString *newAction = [classManager addNewActionToClassNamed: className];
|
||||
NSArray *list = [classManager allActionsForClassNamed: className];
|
||||
NSString *newAction = [_classManager addNewActionToClassNamed: className];
|
||||
NSArray *list = [_classManager allActionsForClassNamed: className];
|
||||
NSInteger row = [list indexOfObject: newAction];
|
||||
|
||||
[document collapseClass: className];
|
||||
[document reloadClasses];
|
||||
[nc postNotificationName: IBInspectorDidModifyObjectNotification
|
||||
object: classManager];
|
||||
[actionTable reloadData];
|
||||
[actionTable scrollRowToVisible: row];
|
||||
[actionTable selectRow: row byExtendingSelection: NO];
|
||||
object: _classManager];
|
||||
[_actionTable reloadData];
|
||||
[_actionTable scrollRowToVisible: row];
|
||||
[_actionTable selectRow: row byExtendingSelection: NO];
|
||||
[document selectClass: className];
|
||||
[super ok: sender];
|
||||
}
|
||||
|
@ -397,17 +406,17 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
if(document != nil)
|
||||
{
|
||||
NSString *className = [self _currentClass];
|
||||
NSString *newOutlet = [classManager addNewOutletToClassNamed: className];
|
||||
NSArray *list = [classManager allOutletsForClassNamed: className];
|
||||
NSString *newOutlet = [_classManager addNewOutletToClassNamed: className];
|
||||
NSArray *list = [_classManager allOutletsForClassNamed: className];
|
||||
NSInteger row = [list indexOfObject: newOutlet];
|
||||
|
||||
[document collapseClass: className];
|
||||
[document reloadClasses];
|
||||
[nc postNotificationName: IBInspectorDidModifyObjectNotification
|
||||
object: classManager];
|
||||
[outletTable reloadData];
|
||||
[outletTable scrollRowToVisible: row];
|
||||
[outletTable selectRow: row byExtendingSelection: NO];
|
||||
object: _classManager];
|
||||
[_outletTable reloadData];
|
||||
[_outletTable scrollRowToVisible: row];
|
||||
[_outletTable selectRow: row byExtendingSelection: NO];
|
||||
[document selectClass: className];
|
||||
[super ok: sender];
|
||||
}
|
||||
|
@ -423,28 +432,28 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
{
|
||||
NS_DURING
|
||||
{
|
||||
NSInteger i = [actionTable selectedRow];
|
||||
NSInteger i = [_actionTable selectedRow];
|
||||
NSString *className = [self _currentClass];
|
||||
NSArray *list = [classManager allActionsForClassNamed: className];
|
||||
NSArray *list = [_classManager allActionsForClassNamed: className];
|
||||
BOOL removed = NO;
|
||||
BOOL isCustom = [classManager isCustomClass: className];
|
||||
BOOL isCustom = [_classManager isCustomClass: className];
|
||||
NSString *name = nil;
|
||||
GormDocument *document = (GormDocument *)[(id <IB>)[NSApp delegate] activeDocument];
|
||||
|
||||
if(document != nil)
|
||||
{
|
||||
// check the count...
|
||||
if(isCustom || [classManager isCategoryForClass: className])
|
||||
if(isCustom || [_classManager isCategoryForClass: className])
|
||||
{
|
||||
if([list count] > 0 && i >= 0 && i < [list count])
|
||||
{
|
||||
[actionTable deselectAll: self];
|
||||
[_actionTable deselectAll: self];
|
||||
name = [list objectAtIndex: i];
|
||||
if(isCustom || [classManager isAction: name onCategoryForClassNamed: className])
|
||||
if(isCustom || [_classManager isAction: name onCategoryForClassNamed: className])
|
||||
{
|
||||
removed = [document
|
||||
removeConnectionsWithLabel: name
|
||||
forClassNamed: currentClass
|
||||
forClassNamed: _currentClass
|
||||
isAction: YES];
|
||||
}
|
||||
}
|
||||
|
@ -454,10 +463,10 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
[super ok: sender];
|
||||
[document collapseClass: className];
|
||||
[document reloadClasses];
|
||||
[classManager removeAction: name fromClassNamed: className];
|
||||
[_classManager removeAction: name fromClassNamed: className];
|
||||
[nc postNotificationName: IBInspectorDidModifyObjectNotification
|
||||
object: classManager];
|
||||
[actionTable reloadData];
|
||||
object: _classManager];
|
||||
[_actionTable reloadData];
|
||||
[document selectClass: className];
|
||||
}
|
||||
}
|
||||
|
@ -474,9 +483,9 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
{
|
||||
NS_DURING
|
||||
{
|
||||
NSInteger i = [outletTable selectedRow];
|
||||
NSInteger i = [_outletTable selectedRow];
|
||||
NSString *className = [self _currentClass];
|
||||
NSArray *list = [classManager allOutletsForClassNamed: className];
|
||||
NSArray *list = [_classManager allOutletsForClassNamed: className];
|
||||
BOOL removed = NO;
|
||||
NSString *name = nil;
|
||||
GormDocument *document = (GormDocument *)[(id <IB>)[NSApp delegate] activeDocument];
|
||||
|
@ -486,11 +495,11 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
// check the count...
|
||||
if([list count] > 0 && i >= 0 && i < [list count])
|
||||
{
|
||||
[outletTable deselectAll: self];
|
||||
[_outletTable deselectAll: self];
|
||||
name = [list objectAtIndex: i];
|
||||
removed = [document
|
||||
removeConnectionsWithLabel: name
|
||||
forClassNamed: currentClass
|
||||
forClassNamed: _currentClass
|
||||
isAction: NO];
|
||||
}
|
||||
|
||||
|
@ -499,10 +508,10 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
[super ok: sender];
|
||||
[document collapseClass: className];
|
||||
[document reloadClasses];
|
||||
[classManager removeOutlet: name fromClassNamed: className];
|
||||
[_classManager removeOutlet: name fromClassNamed: className];
|
||||
[nc postNotificationName: IBInspectorDidModifyObjectNotification
|
||||
object: classManager];
|
||||
[outletTable reloadData];
|
||||
object: _classManager];
|
||||
[_outletTable reloadData];
|
||||
[document selectClass: className];
|
||||
}
|
||||
}
|
||||
|
@ -521,24 +530,24 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
|
||||
- (void) searchForClass: (id)sender
|
||||
{
|
||||
NSArray *list = [classManager allClassNames];
|
||||
NSString *stringValue = [searchText stringValue];
|
||||
NSArray *list = [_classManager allClassNames];
|
||||
NSString *stringValue = [_searchText stringValue];
|
||||
NSInteger index = [list indexOfObject: stringValue];
|
||||
|
||||
NSLog(@"Search... %@",[searchText stringValue]);
|
||||
NSLog(@"Search... %@",[_searchText stringValue]);
|
||||
if(index != NSNotFound && list != nil &&
|
||||
[stringValue isEqualToString: @"FirstResponder"] == NO)
|
||||
{
|
||||
// select the parent class
|
||||
[parentClass selectRow: index byExtendingSelection: NO];
|
||||
[parentClass scrollRowToVisible: index];
|
||||
[_parentClass selectRow: index byExtendingSelection: NO];
|
||||
[_parentClass scrollRowToVisible: index];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) selectClass: (id)sender
|
||||
{
|
||||
NSArray *list = [classManager allClassNames];
|
||||
NSInteger row = [parentClass selectedRow];
|
||||
NSArray *list = [_classManager allClassNames];
|
||||
NSInteger row = [_parentClass selectedRow];
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -551,7 +560,7 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
// if it's a custom class, let it go, if not do nothing.
|
||||
if(document != nil)
|
||||
{
|
||||
if([classManager isCustomClass: name])
|
||||
if([_classManager isCustomClass: name])
|
||||
{
|
||||
NSString *title = _(@"Modifying/Reparenting Class");
|
||||
NSString *msg = [NSString stringWithFormat: _(@"This action may break existing connections "
|
||||
|
@ -576,12 +585,12 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
// if removed, move the class and notify...
|
||||
if(removed)
|
||||
{
|
||||
NSString *oldSuper = [classManager superClassNameForClassNamed: name];
|
||||
NSString *oldSuper = [_classManager superClassNameForClassNamed: name];
|
||||
|
||||
[classManager setSuperClassNamed: newParent forClassNamed: name];
|
||||
[_classManager setSuperClassNamed: newParent forClassNamed: name];
|
||||
[document refreshConnectionsForClassNamed: name];
|
||||
[nc postNotificationName: IBInspectorDidModifyObjectNotification
|
||||
object: classManager];
|
||||
object: _classManager];
|
||||
[document collapseClass: oldSuper];
|
||||
[document collapseClass: name];
|
||||
[document reloadClasses];
|
||||
|
@ -612,10 +621,10 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
if(flag)
|
||||
{
|
||||
[document collapseClass: name];
|
||||
[classManager renameClassNamed: name
|
||||
[_classManager renameClassNamed: name
|
||||
newName: newName];
|
||||
[nc postNotificationName: IBInspectorDidModifyObjectNotification
|
||||
object: classManager];
|
||||
object: _classManager];
|
||||
[document reloadClasses];
|
||||
[document selectClass: newName];
|
||||
[super ok: sender];
|
||||
|
@ -625,14 +634,14 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
- (void) selectAction: (id)sender
|
||||
{
|
||||
NSInteger row = [sender selectedRow];
|
||||
NSArray *actions = [classManager allActionsForClassNamed: currentClass];
|
||||
NSArray *actions = [_classManager allActionsForClassNamed: _currentClass];
|
||||
if(row <= [actions count])
|
||||
{
|
||||
BOOL isCustom = [classManager isCustomClass: currentClass];
|
||||
id cell = [removeAction cell];
|
||||
BOOL isCustom = [_classManager isCustomClass: _currentClass];
|
||||
id cell = [_removeAction cell];
|
||||
NSString *action = [actions objectAtIndex: row];
|
||||
BOOL isAction = [classManager isAction: action ofClass: currentClass];
|
||||
BOOL isActionOnCategory = [classManager isAction: action onCategoryForClassNamed: currentClass];
|
||||
BOOL isAction = [_classManager isAction: action ofClass: _currentClass];
|
||||
BOOL isActionOnCategory = [_classManager isAction: action onCategoryForClassNamed: _currentClass];
|
||||
[cell setEnabled: ((isCustom && isAction) || isActionOnCategory)];
|
||||
}
|
||||
}
|
||||
|
@ -640,14 +649,14 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
- (void) selectOutlet: (id)sender
|
||||
{
|
||||
NSInteger row = [sender selectedRow];
|
||||
NSArray *outlets = [classManager allOutletsForClassNamed: currentClass];
|
||||
NSArray *outlets = [_classManager allOutletsForClassNamed: _currentClass];
|
||||
if(row <= [outlets count])
|
||||
{
|
||||
BOOL isCustom = [classManager isCustomClass: currentClass];
|
||||
BOOL isFirstResponder = [currentClass isEqualToString: @"FirstResponder"];
|
||||
id cell = [removeOutlet cell];
|
||||
BOOL isCustom = [_classManager isCustomClass: _currentClass];
|
||||
BOOL isFirstResponder = [_currentClass isEqualToString: @"FirstResponder"];
|
||||
id cell = [_removeOutlet cell];
|
||||
NSString *outlet = [outlets objectAtIndex: row];
|
||||
BOOL isOutlet = [classManager isOutlet: outlet ofClass: currentClass];
|
||||
BOOL isOutlet = [_classManager isOutlet: outlet ofClass: _currentClass];
|
||||
[cell setEnabled: (isOutlet && isCustom && !isFirstResponder)];
|
||||
}
|
||||
}
|
||||
|
@ -666,17 +675,17 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
if([anObject isKindOfClass: [GormClassProxy class]])
|
||||
{
|
||||
[super setObject: anObject];
|
||||
ASSIGN(classManager, [(id<GormAppDelegate>)[NSApp delegate] classManager]);
|
||||
ASSIGN(currentClass, [object className]);
|
||||
ASSIGN(_classManager, [(id<GormAppDelegate>)[NSApp delegate] classManager]);
|
||||
ASSIGN(_currentClass, [object className]);
|
||||
|
||||
outletsCount = [[classManager allOutletsForClassNamed: currentClass] count];
|
||||
actionsCount = [[classManager allActionsForClassNamed: currentClass] count];
|
||||
outletsCount = [[_classManager allOutletsForClassNamed: _currentClass] count];
|
||||
actionsCount = [[_classManager allActionsForClassNamed: _currentClass] count];
|
||||
|
||||
item = [tabView tabViewItemAtIndex: 1]; // actions;
|
||||
item = [_tabView tabViewItemAtIndex: 1]; // actions;
|
||||
[item setLabel: [NSString stringWithFormat: @"Actions (%ld)",(long)actionsCount]];
|
||||
item = [tabView tabViewItemAtIndex: 0]; // outlets;
|
||||
item = [_tabView tabViewItemAtIndex: 0]; // outlets;
|
||||
[item setLabel: [NSString stringWithFormat: @"Outlets (%ld)",(long)outletsCount]];
|
||||
[tabView setNeedsDisplay: YES];
|
||||
[_tabView setNeedsDisplay: YES];
|
||||
|
||||
[self _refreshView];
|
||||
}
|
||||
|
@ -693,7 +702,7 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
|
||||
- (void) handleNotification: (NSNotification *)notification
|
||||
{
|
||||
if([notification object] == classManager &&
|
||||
if([notification object] == _classManager &&
|
||||
(id<IB>)[[NSApp delegate] activeDocument] != nil)
|
||||
{
|
||||
[self _refreshView];
|
||||
|
@ -707,39 +716,39 @@ shouldEditTableColumn: (NSTableColumn *)aTableColumn
|
|||
{
|
||||
BOOL result = NO;
|
||||
|
||||
if(tableView != parentClass)
|
||||
if(tableView != _parentClass)
|
||||
{
|
||||
NSArray *list = nil;
|
||||
NSString *name = nil;
|
||||
NSString *className = [self _currentClass];
|
||||
|
||||
if(tableView == actionTable)
|
||||
if(tableView == _actionTable)
|
||||
{
|
||||
list = [classManager allActionsForClassNamed: className];
|
||||
list = [_classManager allActionsForClassNamed: className];
|
||||
name = [list objectAtIndex: rowIndex];
|
||||
}
|
||||
else if(tableView == outletTable)
|
||||
else if(tableView == _outletTable)
|
||||
{
|
||||
list = [classManager allOutletsForClassNamed: className];
|
||||
list = [_classManager allOutletsForClassNamed: className];
|
||||
name = [list objectAtIndex: rowIndex];
|
||||
}
|
||||
|
||||
if([classManager isCustomClass: className])
|
||||
if([_classManager isCustomClass: className])
|
||||
{
|
||||
if(tableView == actionTable)
|
||||
if(tableView == _actionTable)
|
||||
{
|
||||
result = [classManager isAction: name
|
||||
result = [_classManager isAction: name
|
||||
ofClass: className];
|
||||
}
|
||||
else if(tableView == outletTable)
|
||||
else if(tableView == _outletTable)
|
||||
{
|
||||
result = [classManager isOutlet: name
|
||||
result = [_classManager isOutlet: name
|
||||
ofClass: className];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = [classManager isAction: name onCategoryForClassNamed: className];
|
||||
result = [_classManager isAction: name onCategoryForClassNamed: className];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -754,15 +763,15 @@ shouldEditTableColumn: (NSTableColumn *)aTableColumn
|
|||
NSString *name = [aCell stringValue];
|
||||
NSString *className = [self _currentClass];
|
||||
|
||||
if (tableView == parentClass)
|
||||
if (tableView == _parentClass)
|
||||
{
|
||||
[aCell setTextColor: [NSColor textColor]];
|
||||
}
|
||||
else if (tableView == actionTable)
|
||||
else if (tableView == _actionTable)
|
||||
{
|
||||
if(([classManager isCustomClass: className] &&
|
||||
[classManager isAction: name ofClass: className]) ||
|
||||
[classManager isAction: name onCategoryForClassNamed: className])
|
||||
if(([_classManager isCustomClass: className] &&
|
||||
[_classManager isAction: name ofClass: className]) ||
|
||||
[_classManager isAction: name onCategoryForClassNamed: className])
|
||||
{
|
||||
[aCell setTextColor: [NSColor textColor]];
|
||||
}
|
||||
|
@ -771,10 +780,10 @@ shouldEditTableColumn: (NSTableColumn *)aTableColumn
|
|||
[aCell setTextColor: [NSColor selectedTextColor]];
|
||||
}
|
||||
}
|
||||
else if( tableView == outletTable)
|
||||
else if( tableView == _outletTable)
|
||||
{
|
||||
if([classManager isCustomClass: className] &&
|
||||
[classManager isOutlet: name ofClass: className])
|
||||
if([_classManager isCustomClass: className] &&
|
||||
[_classManager isOutlet: name ofClass: className])
|
||||
{
|
||||
[aCell setTextColor: [NSColor textColor]];
|
||||
}
|
||||
|
@ -791,14 +800,14 @@ shouldEditTableColumn: (NSTableColumn *)aTableColumn
|
|||
shouldSelectRow: (NSInteger)rowIndex
|
||||
{
|
||||
BOOL result = YES;
|
||||
if(tv == parentClass)
|
||||
if(tv == _parentClass)
|
||||
{
|
||||
NSArray *list = [classManager allClassNames];
|
||||
NSArray *list = [_classManager allClassNames];
|
||||
NSString *className = [list objectAtIndex: rowIndex];
|
||||
NSString *name = [self _currentClass];
|
||||
BOOL isFirstResponder = [className isEqualToString: @"FirstResponder"];
|
||||
BOOL isCurrentClass = [className isEqualToString: name];
|
||||
BOOL isSubClass = [classManager isSuperclass: name linkedToClass: className];
|
||||
BOOL isSubClass = [_classManager isSuperclass: name linkedToClass: className];
|
||||
if(isFirstResponder || isCurrentClass || isSubClass)
|
||||
{
|
||||
NSBeep();
|
||||
|
|
|
@ -345,6 +345,13 @@
|
|||
NSEnumerator *en = [subClasses objectEnumerator];
|
||||
NSString *subclassName = nil;
|
||||
|
||||
if (action == nil
|
||||
|| className == nil)
|
||||
{
|
||||
NSLog(@"Attempt to add nil action = %@ or className = %@ to class manager", action, className);
|
||||
return;
|
||||
}
|
||||
|
||||
// check all
|
||||
if ([allActions containsObject: anAction])
|
||||
{
|
||||
|
@ -1862,7 +1869,7 @@
|
|||
|
||||
- (BOOL) parseHeader: (NSString *)headerPath
|
||||
{
|
||||
OCHeaderParser *ochp = AUTORELEASE([[OCHeaderParser alloc] initWithContentsOfFile: headerPath]);
|
||||
OCHeaderParser *ochp = [[OCHeaderParser alloc] initWithContentsOfFile: headerPath];
|
||||
BOOL result = NO;
|
||||
|
||||
if(ochp != nil)
|
||||
|
@ -1878,12 +1885,15 @@
|
|||
{
|
||||
NSArray *methods = [cls methods];
|
||||
NSArray *ivars = [cls ivars];
|
||||
NSString *superClass = [cls superClassName];
|
||||
NSArray *properties = [cls properties];
|
||||
NSString *superClass = [cls superClassName]; // == nil) ? @"NSObject":[cls superClassName];
|
||||
NSString *className = [cls className];
|
||||
NSEnumerator *ien = [ivars objectEnumerator];
|
||||
NSEnumerator *men = [methods objectEnumerator];
|
||||
NSEnumerator *pen = [properties objectEnumerator];
|
||||
OCMethod *method = nil;
|
||||
OCIVar *ivar = nil;
|
||||
OCProperty *property = nil;
|
||||
NSMutableArray *actions = [NSMutableArray array];
|
||||
NSMutableArray *outlets = [NSMutableArray array];
|
||||
|
||||
|
@ -1904,6 +1914,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
while((property = (OCProperty *)[pen nextObject]) != nil)
|
||||
{
|
||||
if([property isOutlet])
|
||||
{
|
||||
[outlets addObject: [property name]];
|
||||
}
|
||||
}
|
||||
|
||||
NSLog(@"outlets = %@", outlets);
|
||||
|
||||
if(([self isKnownClass: superClass] || superClass == nil) &&
|
||||
[cls isCategory] == NO)
|
||||
{
|
||||
|
@ -1951,13 +1971,25 @@
|
|||
withOutlets: outlets];
|
||||
}
|
||||
}
|
||||
else if([cls isCategory] && [self isKnownClass: className])
|
||||
else if([cls isCategory])
|
||||
{
|
||||
[self addActions: actions forClassNamed: className];
|
||||
if ([self isKnownClass: className])
|
||||
{
|
||||
[self addActions: actions forClassNamed: className];
|
||||
[self addActions: outlets forClassNamed: className];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self addClassNamed: className
|
||||
withSuperClassNamed: @"NSObject"
|
||||
withActions: actions
|
||||
withOutlets: outlets];
|
||||
}
|
||||
}
|
||||
else if(superClass != nil && [self isKnownClass: superClass] == NO)
|
||||
{
|
||||
result = NO;
|
||||
RELEASE(ochp);
|
||||
[NSException raise: NSGenericException
|
||||
format: @"The superclass %@ of class %@ is not known, please parse it.",
|
||||
superClass, className];
|
||||
|
@ -1966,6 +1998,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
RELEASE(ochp);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2264,6 +2297,8 @@
|
|||
return result;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
|
||||
- (NSString *) description
|
||||
{
|
||||
return [NSString stringWithFormat: @"<%s: %lx> = %@",
|
||||
|
@ -2271,6 +2306,7 @@
|
|||
(unsigned long)self,
|
||||
_customClassMap];
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/** Helpful for debugging */
|
||||
- (NSString *) dumpClassInformation
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
{
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
|
||||
if ( ![bundle loadNibNamed:@"GormClassPanel" owner:self topLevelObjects: nil] )
|
||||
if ( ![bundle loadNibNamed:@"GormClassPanel" owner:self topLevelObjects: NULL] )
|
||||
{
|
||||
NSLog(@"Can not load bundle GormClassPanel");
|
||||
return nil;
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
{
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
|
||||
if([bundle loadNibNamed: @"GormConnectionInspector" owner: self topLevelObjects: nil] == NO)
|
||||
if([bundle loadNibNamed: @"GormConnectionInspector" owner: self topLevelObjects: NULL] == NO)
|
||||
{
|
||||
NSLog(@"Couldn't load GormConnectionInsector");
|
||||
return nil;
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
// load the gui...
|
||||
if (![bundle loadNibNamed: @"GormCustomClassInspector"
|
||||
owner: self
|
||||
topLevelObjects: nil])
|
||||
topLevelObjects: NULL])
|
||||
{
|
||||
NSLog(@"Could not open gorm GormCustomClassInspector");
|
||||
return nil;
|
||||
|
|
|
@ -240,6 +240,12 @@
|
|||
*/
|
||||
- (id) instantiateClass: (id)sender;
|
||||
|
||||
/**
|
||||
* Instantiate the class specified by the parameter className and
|
||||
* returns the reference name within the document
|
||||
*/
|
||||
- (NSString *) instantiateClassNamed: (NSString *)className;
|
||||
|
||||
/**
|
||||
* Generate the class files for the selected class
|
||||
*/
|
||||
|
@ -518,6 +524,11 @@
|
|||
*/
|
||||
- (NSMutableSet *) topLevelObjects;
|
||||
|
||||
/**
|
||||
* Returns an array of issues. If document is valid the array should be empty.
|
||||
*/
|
||||
- (NSArray *) validate;
|
||||
|
||||
@end
|
||||
|
||||
@interface GormDocument (MenuValidation)
|
||||
|
@ -543,4 +554,7 @@
|
|||
|
||||
@end
|
||||
|
||||
@interface GormDocument (Metadata) <NSOutlineViewDataSource>
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
* protocol plus additional methods which are useful for managing the
|
||||
* contents of the document.
|
||||
*
|
||||
* Copyright (C) 1999,2002,2003,2004,2005,2020,2021 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1999,2002,2003,2004,2005,2020,
|
||||
* 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
* Date: 2002,2003,2004,2005,2020,2021
|
||||
|
@ -57,6 +58,22 @@
|
|||
#import "GormXLIFFDocument.h"
|
||||
#import "GormCanvasView.h"
|
||||
|
||||
@interface NSObject (GormNSCoding)
|
||||
@end
|
||||
|
||||
@implementation NSObject (GormNSCoding)
|
||||
|
||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
return [self init];
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface GormDisplayCell : NSButtonCell
|
||||
@end
|
||||
|
||||
|
@ -85,6 +102,7 @@
|
|||
@end
|
||||
|
||||
@implementation GormFirstResponder
|
||||
|
||||
- (NSImage*) imageForViewer
|
||||
{
|
||||
static NSImage *image = nil;
|
||||
|
@ -519,28 +537,35 @@ static NSImage *fileImage = nil;
|
|||
*/
|
||||
- (void) _instantiateFontManager
|
||||
{
|
||||
GSNibItem *item = nil;
|
||||
NSMenu *fontMenu = nil;
|
||||
|
||||
item = [[GormObjectProxy alloc] initWithClassName: @"NSFontManager"];
|
||||
|
||||
[self setName: @"NSFont" forObject: item];
|
||||
[self attachObject: item toParent: nil];
|
||||
RELEASE(item);
|
||||
|
||||
// set the holder in the document.
|
||||
fontManager = (GormObjectProxy *)item;
|
||||
[self changeToViewWithTag: 0];
|
||||
|
||||
// Add the connection to the menu from the font manager, if the NSFontMenu exists...
|
||||
fontMenu = [self fontMenu];
|
||||
if (fontMenu != nil)
|
||||
if (fontManager != nil)
|
||||
{
|
||||
NSNibOutletConnector *con = [[NSNibOutletConnector alloc] init];
|
||||
[con setSource: item];
|
||||
[con setDestination: fontMenu];
|
||||
[con setLabel: @"menu"];
|
||||
[self addConnector: con];
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
GSNibItem *item = nil;
|
||||
NSMenu *fontMenu = nil;
|
||||
|
||||
item = [[GormObjectProxy alloc] initWithClassName: @"NSFontManager"];
|
||||
|
||||
[self setName: @"NSFont" forObject: item];
|
||||
[self attachObject: item toParent: nil];
|
||||
RELEASE(item);
|
||||
|
||||
// set the holder in the document.
|
||||
fontManager = (GormObjectProxy *)item;
|
||||
[self changeToViewWithTag: 0];
|
||||
|
||||
// Add the connection to the menu from the font manager, if the NSFontMenu exists...
|
||||
fontMenu = [self fontMenu];
|
||||
if (fontMenu != nil)
|
||||
{
|
||||
NSNibOutletConnector *con = [[NSNibOutletConnector alloc] init];
|
||||
[con setSource: item];
|
||||
[con setDestination: fontMenu];
|
||||
[con setLabel: @"menu"];
|
||||
[self addConnector: con];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1437,7 +1462,7 @@ static NSImage *fileImage = nil;
|
|||
/**
|
||||
* Detach every object in anArray from the document. Optionally closing editors.
|
||||
*/
|
||||
- (void) detachObjects: (NSArray*)anArray closeEditors: (BOOL)close_editors
|
||||
- (void) detachObjects: (/* NSArray* */ id)anArray closeEditors: (BOOL)close_editors
|
||||
{
|
||||
NSEnumerator *enumerator = [anArray objectEnumerator];
|
||||
NSObject *obj;
|
||||
|
@ -1489,6 +1514,84 @@ static NSImage *fileImage = nil;
|
|||
return [classesView instantiateClass: sender];
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiate the class specified by the parameter className
|
||||
*/
|
||||
- (NSString *) instantiateClassNamed: (NSString *)className
|
||||
{
|
||||
NSString *theName = nil;
|
||||
GSNibItem *item = nil;
|
||||
|
||||
if([className isEqualToString: @"FirstResponder"])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
if([classManager canInstantiateClassNamed: className] == NO)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
if([classManager isSuperclass: @"NSView" linkedToClass: className] ||
|
||||
[className isEqualToString: @"NSView"])
|
||||
{
|
||||
Class cls;
|
||||
BOOL isCustom = [classManager isCustomClass: className];
|
||||
id instance;
|
||||
|
||||
// Replace with NON custom class, since we don't have the compiled version
|
||||
// of the custom class available to us in Gorm.
|
||||
if(isCustom)
|
||||
{
|
||||
className = [classManager nonCustomSuperClassOf: className];
|
||||
}
|
||||
|
||||
// instantiate the object or it's substitute...
|
||||
cls = NSClassFromString(className);
|
||||
if([cls respondsToSelector: @selector(allocSubstitute)])
|
||||
{
|
||||
instance = [cls allocSubstitute];
|
||||
}
|
||||
else
|
||||
{
|
||||
instance = [cls alloc];
|
||||
}
|
||||
|
||||
// give it some initial dimensions...
|
||||
if([instance respondsToSelector: @selector(initWithFrame:)])
|
||||
{
|
||||
instance = [instance initWithFrame: NSMakeRect(10,10,380,280)];
|
||||
}
|
||||
else
|
||||
{
|
||||
instance = [instance init];
|
||||
}
|
||||
|
||||
// add it to the top level objects...
|
||||
[self attachObject: instance toParent: nil];
|
||||
|
||||
// we want to record if it's custom or not and act appropriately...
|
||||
if(isCustom)
|
||||
{
|
||||
theName = [self nameForObject: instance];
|
||||
[classManager setCustomClass: className
|
||||
forName: theName];
|
||||
}
|
||||
|
||||
[self changeToViewWithTag: 0];
|
||||
NSDebugLog(@"Instantiate NSView subclass %@",className);
|
||||
}
|
||||
else
|
||||
{
|
||||
item = [[GormObjectProxy alloc] initWithClassName: className];
|
||||
[self attachObject: item toParent: nil];
|
||||
[self changeToViewWithTag: 0];
|
||||
theName = [self nameForObject: item];
|
||||
}
|
||||
|
||||
return theName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a class from the classes view
|
||||
*/
|
||||
|
@ -1736,7 +1839,8 @@ static void _real_close(GormDocument *self,
|
|||
}
|
||||
else if ([name isEqual: IBWillBeginTestingInterfaceNotification] && isDocumentOpen)
|
||||
{
|
||||
if ([(id<IB>)[NSApp delegate] activeDocument] == self)
|
||||
id delegate = [NSApp delegate];
|
||||
if ([delegate activeDocument] == self && [delegate isInTool] == NO)
|
||||
{
|
||||
NSEnumerator *enumerator;
|
||||
id obj;
|
||||
|
@ -1748,8 +1852,11 @@ static void _real_close(GormDocument *self,
|
|||
[[self window] orderOut: self];
|
||||
}
|
||||
|
||||
[[[NSApp delegate] mainMenu] close]; // close the menu during test...
|
||||
|
||||
if ([delegate respondsToSelector: @selector(mainMenu)])
|
||||
{
|
||||
[[delegate mainMenu] close]; // close the menu during test...
|
||||
}
|
||||
|
||||
enumerator = [nameTable objectEnumerator];
|
||||
while ((obj = [enumerator nextObject]) != nil)
|
||||
{
|
||||
|
@ -2925,6 +3032,8 @@ static void _real_close(GormDocument *self,
|
|||
/**
|
||||
* Return a text description of the document.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
|
||||
- (NSString *) description
|
||||
{
|
||||
return [NSString stringWithFormat: @"<%s: %lx> = <<name table: %@, connections: %@>>",
|
||||
|
@ -2932,6 +3041,7 @@ static void _real_close(GormDocument *self,
|
|||
(unsigned long)self,
|
||||
nameTable, connections];
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/**
|
||||
* Returns YES, if obj is a top level object.
|
||||
|
@ -3642,6 +3752,56 @@ static void _real_close(GormDocument *self,
|
|||
{
|
||||
return [classManager allOutletsForClassNamed: className];
|
||||
}
|
||||
|
||||
//// Document Validation
|
||||
|
||||
- (NSArray *) validate
|
||||
{
|
||||
NSMutableArray *results = [NSMutableArray array];
|
||||
NSEnumerator *en = [topLevelObjects objectEnumerator];
|
||||
id o = nil;
|
||||
|
||||
NSLog(@"Validating topLevelObjects: %@", topLevelObjects);
|
||||
while ((o = [en nextObject]) != nil)
|
||||
{
|
||||
// check the type of o...
|
||||
if ([o isKindOfClass: [NSWindow class]]
|
||||
|| [o isKindOfClass: [NSMenu class]]
|
||||
|| [o isKindOfClass: [NSView class]]
|
||||
|| [o isKindOfClass: [GormObjectProxy class]])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSString *className = NSStringFromClass([o class]);
|
||||
NSString *error = [NSString stringWithFormat: @"%@ has an invalid class of type %@", o, className];
|
||||
|
||||
[results addObject: error];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
NSLog(@"Checking connections..."); // %@", connections);
|
||||
en = [connections objectEnumerator];
|
||||
o = nil;
|
||||
while ((o = [en nextObject]) != nil)
|
||||
{
|
||||
id src = [o source];
|
||||
id dst = [o destination];
|
||||
NSString *label = [o label];
|
||||
|
||||
if ([o isKindOfClass: [NSNibControlConnector class]])
|
||||
{
|
||||
}
|
||||
else if ([o isKindOfClass: [NSNibOutletConnector class]])
|
||||
{
|
||||
}
|
||||
}
|
||||
*/
|
||||
return results;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation GormDocument (MenuValidation)
|
||||
|
@ -3750,3 +3910,89 @@ willBeInsertedIntoToolbar: (BOOL)flag
|
|||
}
|
||||
@end
|
||||
|
||||
@implementation GormDocument (Metadata)
|
||||
|
||||
// Core methods..
|
||||
|
||||
- (id) outlineView: (NSOutlineView *)ov
|
||||
child: (NSInteger)index
|
||||
ofItem: (id)item
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (BOOL) outlineView: (NSOutlineView *)ov
|
||||
isItemExpandable: (id)item
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSInteger) outlineView: (NSOutlineView *)ov
|
||||
numberOfChildrenOfItem: (id)item
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (id) outlineView: (NSOutlineView *)ov
|
||||
objectValueForTableColumn: (NSTableColumn *)tableColumn
|
||||
byItem: (id)tem
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Other methods...
|
||||
|
||||
- (BOOL) outlineView: (NSOutlineView *)ov
|
||||
acceptDrop: (id<NSDraggingInfo>)info
|
||||
item: (id)item
|
||||
childIndex: (NSInteger)index
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (id) outlineView: (NSOutlineView *)ov
|
||||
itemForPersistentObject: (id)obj
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) outlineView: (NSOutlineView *)ov
|
||||
persistentObjectForItem: (id)item
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray *) outlineView: (NSOutlineView *)ov
|
||||
namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination
|
||||
forDraggedItems: (NSArray *)items
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) outlineView: (NSOutlineView *)ov
|
||||
setObjectValue: (id)value
|
||||
forTableColumn: (NSTableColumn *)tc
|
||||
byItem: (id)item
|
||||
{
|
||||
}
|
||||
|
||||
- (void) outlineView: (NSOutlineView *)ov
|
||||
sortDescriptorsDidChange: (NSArray *)oldDescriptors
|
||||
{
|
||||
}
|
||||
|
||||
- (void) outlineView: (NSOutlineView *)ov
|
||||
writeItems: (NSArray *)items
|
||||
toPasteboard: (NSPasteboard *)pb
|
||||
{
|
||||
}
|
||||
|
||||
- (NSDragOperation) outlineView: (NSOutlineView *)ov
|
||||
validateDrop: (id<NSDraggingInfo>)info
|
||||
proposedItem: (id)item
|
||||
proposedChildIndex: (NSInteger)index
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -24,10 +24,11 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include "GormPrivate.h"
|
||||
#include <GormCore/GormDocument.h>
|
||||
#include <GormCore/GormDocumentController.h>
|
||||
|
||||
#include "GormPrivate.h"
|
||||
|
||||
@implementation GormDocumentController
|
||||
|
||||
- (id) currentDocument
|
||||
|
|
|
@ -87,7 +87,7 @@ NSString *formatVersion(NSInteger version)
|
|||
|
||||
+ (int) currentVersion
|
||||
{
|
||||
return appVersion(1,3,1);
|
||||
return appVersion(1,4,0);
|
||||
}
|
||||
|
||||
- (void) awakeFromNib
|
||||
|
|
|
@ -27,7 +27,7 @@ static GormFontViewController *gorm_font_cont = nil;
|
|||
// load the gui...
|
||||
if (![bundle loadNibNamed: @"GormFontView"
|
||||
owner: self
|
||||
topLevelObjects: nil])
|
||||
topLevelObjects: NULL])
|
||||
{
|
||||
NSLog(@"Could not open gorm GormFontView");
|
||||
return nil;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
return nil;
|
||||
}
|
||||
|
||||
if ([bundle loadNibNamed: @"GormHelpInspector" owner: self topLevelObjects: nil] == NO)
|
||||
if ([bundle loadNibNamed: @"GormHelpInspector" owner: self topLevelObjects: NULL] == NO)
|
||||
{
|
||||
NSLog(@"Could not gorm GormHelpInspector");
|
||||
return nil;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
// load the gui...
|
||||
if (![bundle loadNibNamed: @"GormImageInspector"
|
||||
owner: self
|
||||
topLevelObjects: nil])
|
||||
topLevelObjects: NULL])
|
||||
{
|
||||
NSLog(@"Could not open gorm GormImageInspector");
|
||||
return nil;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
{
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
|
||||
if([bundle loadNibNamed: @"GormDummyInspector" owner: self topLevelObjects: nil])
|
||||
if([bundle loadNibNamed: @"GormDummyInspector" owner: self topLevelObjects: NULL])
|
||||
{
|
||||
[button setStringValue: [self title]];
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
if ([bundle loadNibNamed: @"GormNSSplitViewInspector"
|
||||
owner: self
|
||||
topLevelObjects: nil] == NO)
|
||||
topLevelObjects: NULL] == NO)
|
||||
{
|
||||
NSLog(@"Could not open gorm GormNSSplitViewInspector");
|
||||
NSLog(@"self %@", self);
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include "GormPrivate.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
static NSString *typeId = @"Object";
|
||||
static NSString *typeChar = @"Character or Boolean";
|
||||
static NSString *typeUChar = @"Unsigned character/bool";
|
||||
|
@ -34,7 +36,7 @@ static NSString *typeInt = @"Integer";
|
|||
static NSString *typeUInt = @"Unsigned integer";
|
||||
static NSString *typeFloat = @"Float";
|
||||
static NSString *typeDouble = @"Double";
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@interface GormObjectInspector : IBInspector
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
{
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
|
||||
if([bundle loadNibNamed: @"GormObjectInspector" owner: self topLevelObjects: nil] == NO)
|
||||
if([bundle loadNibNamed: @"GormObjectInspector" owner: self topLevelObjects: NULL] == NO)
|
||||
{
|
||||
NSLog(@"Couldn't load GormObjectInsector");
|
||||
return nil;
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#include <GormCore/GormProtocol.h>
|
||||
#include <GormCore/GormClassEditor.h>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wattributes"
|
||||
extern NSString *GormLinkPboardType;
|
||||
extern NSString *GormToggleGuidelineNotification;
|
||||
extern NSString *GormDidModifyClassNotification;
|
||||
|
@ -47,6 +49,7 @@ extern NSString *GormDidDeleteClassNotification;
|
|||
extern NSString *GormWillDetachObjectFromDocumentNotification;
|
||||
extern NSString *GormDidDetachObjectFromDocumentNotification;
|
||||
extern NSString *GormResizeCellNotification;
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@class GormDocument;
|
||||
@class GormInspectorsManager;
|
||||
|
|
|
@ -76,19 +76,10 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
@end
|
||||
|
||||
@interface NSObject (GormPrivate)
|
||||
// + (void) poseAsClass: (Class)aClassObject;
|
||||
+ (BOOL) canSubstituteForClass: (Class)origClass;
|
||||
@end
|
||||
|
||||
@implementation NSObject (GormPrivate)
|
||||
/*
|
||||
+ (void) poseAsClass: (Class)aClassObject
|
||||
{
|
||||
// disable poseAs: while in Gorm.
|
||||
class_pose_as(self, aClassObject);
|
||||
NSLog(@"WARNING: poseAs: called in Gorm.");
|
||||
}
|
||||
*/
|
||||
|
||||
+ (BOOL) canSubstituteForClass: (Class)origClass
|
||||
{
|
||||
|
@ -113,6 +104,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation GormObjectProxy
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
- (void) couldNotParseClassAtPath: (NSString *)path;
|
||||
- (void) exceptionWhileParsingClass: (NSException *)localException;
|
||||
- (BOOL) shouldBreakConnectionsReparsingClass: (NSString *)className;
|
||||
- (void) exceptionWhileLoadingModel: (NSString *)errorMessage;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -31,6 +31,29 @@
|
|||
#include "GormPalettesManager.h"
|
||||
#include "GormResource.h"
|
||||
|
||||
@interface NSMatrix (GormResourceEditorPrivate)
|
||||
- (BOOL **) _selectedCells;
|
||||
- (id **) _cells;
|
||||
- (void) _setSelectedCell: (id)c;
|
||||
@end
|
||||
|
||||
@implementation NSMatrix (GormResourceEditorPrivate)
|
||||
- (BOOL **) _selectedCells
|
||||
{
|
||||
return _selectedCells;
|
||||
}
|
||||
|
||||
- (id **) _cells
|
||||
{
|
||||
return _cells;
|
||||
}
|
||||
|
||||
- (void) _setSelectedCell: (id)c
|
||||
{
|
||||
_selectedCell = c;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation GormResourceEditor
|
||||
|
||||
- (BOOL) acceptsTypeFromArray: (NSArray*)types
|
||||
|
@ -197,7 +220,9 @@
|
|||
NSPoint lastLocation = [theEvent locationInWindow];
|
||||
NSEvent* lastEvent = theEvent;
|
||||
NSPoint initialLocation;
|
||||
|
||||
BOOL **selectedCells = [self _selectedCells];
|
||||
id selectedCell = [self selectedCell];
|
||||
|
||||
/*
|
||||
* Pathological case -- ignore mouse down
|
||||
*/
|
||||
|
@ -219,17 +244,17 @@
|
|||
{
|
||||
if ((_mode == NSRadioModeMatrix) && _selectedCell != nil)
|
||||
{
|
||||
[_selectedCell setState: NSOffState];
|
||||
[selectedCell setState: NSOffState];
|
||||
[self drawCellAtRow: _selectedRow column: _selectedColumn];
|
||||
_selectedCells[_selectedRow][_selectedColumn] = NO;
|
||||
_selectedCell = nil;
|
||||
selectedCells[_selectedRow][_selectedColumn] = NO;
|
||||
selectedCell = nil;
|
||||
_selectedRow = _selectedColumn = -1;
|
||||
}
|
||||
[_cells[row][column] setState: NSOnState];
|
||||
[self drawCellAtRow: row column: column];
|
||||
[_window flushWindow];
|
||||
_selectedCells[row][column] = YES;
|
||||
_selectedCell = _cells[row][column];
|
||||
selectedCells[row][column] = YES;
|
||||
[self _setSelectedCell: _cells[row][column]];
|
||||
_selectedRow = row;
|
||||
_selectedColumn = column;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
if ([bundle loadNibNamed: @"GormScrollViewAttributesInspector"
|
||||
owner: self
|
||||
topLevelObjects: nil] == NO)
|
||||
topLevelObjects: NULL] == NO)
|
||||
{
|
||||
NSLog(@"Could not open gorm GormScrollViewAttributesInspector");
|
||||
NSLog(@"self %@", self);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
|
||||
if (![bundle loadNibNamed: @"GormSetName" owner: self topLevelObjects: nil])
|
||||
if (![bundle loadNibNamed: @"GormSetName" owner: self topLevelObjects: NULL])
|
||||
{
|
||||
return NSAlertAlternateReturn;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
// load the gui...
|
||||
if (![bundle loadNibNamed: @"GormSoundInspector"
|
||||
owner: self
|
||||
topLevelObjects: nil])
|
||||
topLevelObjects: NULL])
|
||||
{
|
||||
NSLog(@"Could not open gorm GormSoundInspector");
|
||||
return nil;
|
||||
|
|
|
@ -1447,9 +1447,14 @@ static BOOL currently_displaying = NO;
|
|||
|
||||
- (void) postDraw: (NSRect) rect
|
||||
{
|
||||
if ([parent respondsToSelector: @selector(postDrawForView:)])
|
||||
[parent performSelector: @selector(postDrawForView:)
|
||||
withObject: self];
|
||||
if (parent != nil)
|
||||
{
|
||||
if ([parent respondsToSelector: @selector(postDrawForView:)])
|
||||
{
|
||||
[parent performSelector: @selector(postDrawForView:)
|
||||
withObject: self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) drawRect: (NSRect) rect
|
||||
|
|
|
@ -81,7 +81,7 @@ NSImage *mVLine = nil;
|
|||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
if ([bundle loadNibNamed: @"GormViewSizeInspector"
|
||||
owner: self
|
||||
topLevelObjects: nil] == NO)
|
||||
topLevelObjects: NULL] == NO)
|
||||
{
|
||||
NSLog(@"Could not open gorm GormViewSizeInspector");
|
||||
NSLog(@"self %@", self);
|
||||
|
@ -152,16 +152,7 @@ NSImage *mVLine = nil;
|
|||
if (anObject != object)
|
||||
return;
|
||||
|
||||
/*
|
||||
if([[anObject window] isKindOfClass: [GormViewWindow class]])
|
||||
{
|
||||
[sizeForm setEnabled: NO];
|
||||
}
|
||||
else
|
||||
*/
|
||||
{
|
||||
[sizeForm setEnabled: YES];
|
||||
}
|
||||
[sizeForm setEnabled: YES];
|
||||
|
||||
// stop editing so that the new values can be populated.
|
||||
[sizeForm abortEditing];
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../..
|
||||
|
||||
ifeq ($(GNUSTEP_TARGET_OS),mingw32)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../GormLib/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
ADDITIONAL_GUI_LIBS += -lGorm -lGormCore
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_OS),cygwin)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../GormLib/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
$(BUNDLE_NAME)_LIBRARIES_DEPEND_UPON += -lGorm -lGormCore
|
||||
endif
|
|
@ -1,19 +0,0 @@
|
|||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../..
|
||||
|
||||
ifeq ($(GNUSTEP_TARGET_OS),mingw32)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../GormLib/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
ADDITIONAL_GUI_LIBS += -lGorm -lGormCore
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_OS),cygwin)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../GormLib/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
$(BUNDLE_NAME)_LIBRARIES_DEPEND_UPON += -lGorm -lGormCore
|
||||
endif
|
|
@ -1,19 +0,0 @@
|
|||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../..
|
||||
|
||||
ifeq ($(GNUSTEP_TARGET_OS),mingw32)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../GormLib/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
ADDITIONAL_GUI_LIBS += -lGorm -lGormCore
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_OS),cygwin)
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L../../../GormLib/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormObjCHeaderParser/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../GormCore/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
$(BUNDLE_NAME)_LIBRARIES_DEPEND_UPON += -lGorm -lGormCore
|
||||
endif
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue