-
Notifications
You must be signed in to change notification settings - Fork 2
/
DKSDController.h
71 lines (56 loc) · 2.38 KB
/
DKSDController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//
// DKSDController.h
// GCDrawKit
//
// Created by graham on 19/06/2008.
// Copyright 2008 Apptree.net. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class DKStyle;
// the controller class - this is the only custom class used in this demo application
@interface DKSDController : NSWindowController
{
// TOOLS
IBOutlet id mToolMatrix; // matrix of buttons for selecting the drawing tool
IBOutlet id mToolStickyCheckbox; // checkbox for setting "sticky" state of tools
// STYLE
IBOutlet id mStyleFillCheckbox; // checkbox for enabling the "fill" property
IBOutlet id mStyleFillColourWell; // colour well for the fill's colour
IBOutlet id mStyleStrokeCheckbox; // checkbox for enabling the "stroke" property
IBOutlet id mStyleStrokeColourWell; // colour well for the stroke's colour
IBOutlet id mStyleStrokeWidthTextField; // text field for the stroke's width
IBOutlet id mStyleStrokeWidthStepper; // stepper buttons for the stroke's width
// GRID
IBOutlet id mGridMatrix; // matrix of buttons for selecting the grid to use
IBOutlet id mGridSnapCheckbox; // checkbox to enable "snap to grid"
// LAYERS
IBOutlet id mLayerTable; // table view for listing the drawing's layers
IBOutlet id mLayerAddButton; // button for adding a new layer
IBOutlet id mLayerRemoveButton; // button for removing the active (selected) layer
// MAIN VIEW
IBOutlet id mDrawingView; // outlet to the main DKDrawingView that displays the content (and owns the drawing)
}
// TOOLS
- (IBAction) toolMatrixAction:(id) sender;
- (IBAction) toolStickyAction:(id) sender;
// STYLES
- (IBAction) styleFillColourAction:(id) sender;
- (IBAction) styleStrokeColourAction:(id) sender;
- (IBAction) styleStrokeWidthAction:(id) sender;
- (IBAction) styleFillCheckboxAction:(id) sender;
- (IBAction) styleStrokeCheckboxAction:(id) sender;
// GRID
- (IBAction) gridMatrixAction:(id) sender;
- (IBAction) snapToGridAction:(id) sender;
// LAYERS
- (IBAction) layerAddButtonAction:(id) sender;
- (IBAction) layerRemoveButtonAction:(id) sender;
// Notifications
- (void) drawingSelectionDidChange:(NSNotification*) note;
- (void) activeLayerDidChange:(NSNotification*) note;
- (void) numberOfLayersChanged:(NSNotification*) note;
- (void) selectedToolDidChange:(NSNotification*) note;
// Supporting methods
- (void) updateControlsForSelection:(NSArray*) selection;
- (DKStyle*) styleOfSelectedObject;
@end