2003-05-23 02:25:34 +00:00
|
|
|
/* Gorm.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 Free Software Foundation, Inc.
|
|
|
|
*
|
|
|
|
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
|
|
|
|
* Date: 2003
|
|
|
|
*
|
|
|
|
* This file is part of GNUstep.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2011-05-17 21:21:40 +00:00
|
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
2011-05-17 21:23:13 +00:00
|
|
|
* the Free Software Foundation; either version 2.1 of the License, or
|
2003-05-23 02:25:34 +00:00
|
|
|
* (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
|
2011-05-17 21:21:40 +00:00
|
|
|
* GNU Lesser General Public License for more details.
|
2003-05-23 02:25:34 +00:00
|
|
|
*
|
2011-05-17 21:21:40 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
2003-05-23 02:25:34 +00:00
|
|
|
* along with this program; if not, write to the Free Software
|
2005-05-26 03:37:38 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
2003-05-23 02:25:34 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INCLUDED_IBCONNECTORS_H
|
|
|
|
#define INCLUDED_IBCONNECTORS_H
|
|
|
|
|
2019-11-03 01:57:39 +00:00
|
|
|
#include <Foundation/Foundation.h>
|
|
|
|
#include <AppKit/AppKit.h>
|
2003-08-23 01:04:36 +00:00
|
|
|
#include <AppKit/NSNibConnector.h>
|
2019-11-03 01:57:39 +00:00
|
|
|
|
2004-12-18 13:57:26 +00:00
|
|
|
#include <InterfaceBuilder/IBSystem.h>
|
2003-05-23 02:25:34 +00:00
|
|
|
|
|
|
|
// forward declarations
|
|
|
|
@class NSString;
|
|
|
|
|
2004-12-18 18:24:28 +00:00
|
|
|
IB_EXTERN NSString *IBWillAddConnectorNotification;
|
|
|
|
IB_EXTERN NSString *IBDidAddConnectorNotification;
|
|
|
|
IB_EXTERN NSString *IBWillRemoveConnectorNotification;
|
|
|
|
IB_EXTERN NSString *IBDidRemoveConnectorNotification;
|
2003-05-23 02:25:34 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Connector objects are used to record connections between nib objects.
|
|
|
|
*/
|
|
|
|
@protocol IBConnectors <NSObject>
|
2005-01-01 14:56:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Destination for the receiver.
|
|
|
|
*/
|
2003-05-23 02:25:34 +00:00
|
|
|
- (id) destination;
|
2005-01-01 14:56:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Establish the connection.
|
|
|
|
*/
|
2003-05-23 02:25:34 +00:00
|
|
|
- (void) establishConnection;
|
2005-01-01 14:56:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The method to which the receiver will be connected.
|
|
|
|
*/
|
2003-05-23 02:25:34 +00:00
|
|
|
- (NSString*) label;
|
2005-01-01 14:56:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Replace anObject with anotherObject. This method looks at
|
|
|
|
* the receiver's source and destination and replaces whichever
|
|
|
|
* one matches anObject with anotherObject.
|
|
|
|
*/
|
2003-05-23 02:25:34 +00:00
|
|
|
- (void) replaceObject: (id)anObject withObject: (id)anotherObject;
|
2005-01-01 14:56:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The source of the receiver.
|
|
|
|
*/
|
2003-05-23 02:25:34 +00:00
|
|
|
- (id) source;
|
2005-01-01 14:56:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the receiver's destination to anObject.
|
|
|
|
*/
|
2003-05-23 02:25:34 +00:00
|
|
|
- (void) setDestination: (id)anObject;
|
2005-01-01 14:56:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the receiver's label.
|
|
|
|
*/
|
2003-05-23 02:25:34 +00:00
|
|
|
- (void) setLabel: (NSString*)label;
|
2005-01-01 14:56:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the receiver's source to anObject.
|
|
|
|
*/
|
2003-05-23 02:25:34 +00:00
|
|
|
- (void) setSource: (id)anObject;
|
2005-01-01 14:56:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Called after the document is loaded on connections.
|
|
|
|
*/
|
2003-08-23 01:04:36 +00:00
|
|
|
- (id) nibInstantiate;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSNibConnector (IBConnectorsProtocol) <IBConnectors>
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSObject (IBNibInstantiation)
|
2005-01-01 14:56:11 +00:00
|
|
|
/**
|
|
|
|
* Invoked after loading.
|
|
|
|
*/
|
2003-08-23 01:04:36 +00:00
|
|
|
- (id) nibInstantiate;
|
2003-05-23 02:25:34 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSApplication (IBConnections)
|
2004-01-06 06:11:24 +00:00
|
|
|
/**
|
2003-05-23 02:25:34 +00:00
|
|
|
* [NSApp -connectSource] returns the source object as set by the most recent
|
|
|
|
* [NSApp -displayConnectionBetween:and:]
|
|
|
|
*/
|
|
|
|
- (id) connectSource;
|
|
|
|
|
2004-01-06 06:11:24 +00:00
|
|
|
/**
|
2003-05-23 02:25:34 +00:00
|
|
|
* [NSApp -connectDestination] returns the target object as set by the most
|
|
|
|
* recent [NSApp -displayConnectionBetween:and:]
|
|
|
|
*/
|
|
|
|
- (id) connectDestination;
|
|
|
|
|
2004-01-06 06:11:24 +00:00
|
|
|
/**
|
2003-05-23 02:25:34 +00:00
|
|
|
* [NSApp -isConnecting] simply lets you know if a connection is in progress.
|
|
|
|
*/
|
|
|
|
- (BOOL) isConnecting;
|
|
|
|
|
2004-01-06 06:11:24 +00:00
|
|
|
/**
|
2003-05-23 02:25:34 +00:00
|
|
|
* [NSApp -stopConnecting] terminates the current connection process and
|
|
|
|
* removes the connection marks from the display.
|
|
|
|
*/
|
|
|
|
- (void) stopConnecting;
|
|
|
|
|
2004-01-06 06:11:24 +00:00
|
|
|
/**
|
2003-05-23 02:25:34 +00:00
|
|
|
* [NSApp -displayConnectionBetween:and:] is used to set the source and target
|
|
|
|
* objects and mark the display appropriately. Setting either source or
|
|
|
|
* target to 'nil' will remove markup from any previous source or target.
|
|
|
|
* NB. This method expects to be able to call the active document to ask it
|
|
|
|
* for the window and rectangle in which to perform markup.
|
|
|
|
*/
|
|
|
|
- (void) displayConnectionBetween: (id)source and: (id)destination;
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif
|