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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#import "CLIPSConstructInspectorController.h"
#import "AppController.h"
@implementation CLIPSConstructInspectorController
/*********/
/* init: */
/*********/
- (id) init
{
self = [super initWithWindowNibName:@"CLIPSConstructInspector"];
return self;
}
/*****************/
/* awakeFromNib: */
/*****************/
- (void) awakeFromNib
{
AppController *theDelegate = [NSApp delegate];
/*======================================================*/
/* Places a few pixels of white space between the edges */
/* of the window and the rectangle in which the text is */
/* displayed in the construct inspector. */
/*======================================================*/
NSSize theSize = { 3, 3 };
[textView setTextContainerInset: theSize];
/*=============================================================*/
/* Locate and assign the application's environment controller. */
/*=============================================================*/
[self setAppController: theDelegate];
/*==================================*/
/* Set up the horizontal scrollbar. */
/*==================================*/
NSScrollView *textScrollView = [textView enclosingScrollView];
[textScrollView setHasHorizontalScroller: YES];
[textScrollView setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
[textView setMaxSize: NSMakeSize(FLT_MAX, FLT_MAX)];
[textView setHorizontallyResizable: YES];
[textView setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
[[textView textContainer] setContainerSize: NSMakeSize(FLT_MAX, FLT_MAX)];
[[textView textContainer] setWidthTracksTextView: NO];
}
/**************/
/* showPanel: */
/**************/
- (void) showPanel
{
NSWindow *panel = [self window];
[panel setExcludedFromWindowsMenu:YES];
[panel setMenu:nil];
/*====================*/
/* Display the panel. */
/*====================*/
[panel makeKeyAndOrderFront:nil];
}
/*%%%%%%%%%%%%%%%%%%*/
/* Delegate Methods */
/*%%%%%%%%%%%%%%%%%%*/
/*
- (BOOL) shouldDrawInsertionPoint
{
return NO;
}
*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/* Key-Value Coding Methods */
/*%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/*********************/
/* setAppController: */
/*********************/
- (void) setAppController: (AppController *) theController
{
appController = theController;
}
/******************/
/* appController: */
/******************/
- (AppController *) appController
{
return appController;
}
@end