File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / Draw / DrawApp.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:37 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

/*
 * Unfortunately, we have to have individual #imports here because
 * ProjectBuilder generates a Draw_main.m which does NOT import our
 * precompiled header.
 */

#import <dpsclient/event.h>
#import <appkit/Application.h>

@class Matrix, View, Panel, TextField, NXColorPanel, SavePanel, MenuCell;
@class GridView, DrawDocument, DrawPageLayout;

@interface DrawApp : Application
{
    Matrix *tools;		/* the Tool Palette matrix */
    id currentGraphic;		/* the factory object used to create things */
    View *savePanelAccessory;	/* the SavePanel Draw/PS/TIFF view */
    Matrix *spamatrix;		/* the matrix in the savePanelAccessory view */
    Panel *infoPanel;		/* the Info... panel */
    TextField *version;		/* the version field in the Info... panel */
    GridView *gridInspector;	/* the shared modal panel to inspect grids */
    NXColorPanel *inspectorPanel; /* the shared inspector panel */
    BOOL cursorPushed;		/* whether we've temporarily changed the
				   cursor to NXArrow because the user held
				   down the Control key */
    BOOL haveOpenedDocument;	/* whether we have opened a document */
}

/* Public methods */

+ initialize;
+ new;

- currentGraphic;
- (DrawDocument *)currentDocument;
- (const char *)currentDirectory;
- startEditMode;
- endEditMode;

/* Shared panels */

- (SavePanel *)saveToPanel:sender;
- (SavePanel *)saveAsPanel:sender;
- (GridView *)gridInspector;
- (Panel *)inspectorPanel;
- (DrawPageLayout *)pageLayout;
- orderFrontInspectorPanel:sender;

/* Target/Action methods */

- info:sender;
- new:sender;
- open:sender;
- terminate:sender;

/* Application delegate methods */

- appDidInit:(Application *)sender;
- (int)app:sender openFile:(const char *)path type:(const char *)type;
- (BOOL)appAcceptsAnotherFile:(Application *)sender;

/* Listener/Speaker methods */

- (int)msgDirectory:(const char **)fullPath ok:(int *)flag;
- (int)msgVersion:(const char **)aString ok:(int *)flag;
- (int)msgFile:(const char **)fullPath ok:(int *)flag;
- (int)msgPrint:(const char *)fullPath ok:(int *)flag;
- (int)msgSelection:(const char **)bytes length:(int *)len asType:(const char *)aType ok:(int *)flag;
- (int)msgCopyAsType:(const char *)aType ok:(int *)flag;
- (int)msgCutAsType:(const char *)aType ok:(int *)flag;
- (int)msgPaste:(int *)flag;

/* Global cursor setting methods */

- cursor;
- sendEvent:(NXEvent *)event;

/* Menu updating method */

- (BOOL)menuItemUpdate:(MenuCell *)menuCell;
- (BOOL)validateCommand:(MenuCell *)menuCell;

/* Target/Action method which sets the currentGraphic instance variable */

- setCurrentGraphic:sender;

@end


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.