|
1 " |
|
2 COPYRIGHT (c) 2013 by Claus Gittinger |
|
3 All Rights Reserved |
|
4 |
|
5 This software is furnished under a license and may be used |
|
6 only in accordance with the terms of that license and with the |
|
7 inclusion of the above copyright notice. This software may not |
|
8 be provided or otherwise made available to, or used by, any |
|
9 other person. No title to or ownership of the software is |
|
10 hereby transferred. |
|
11 " |
|
12 "{ Package: 'stx:libtool' }" |
|
13 |
|
14 View subclass:#CodeCompletionHelpView |
|
15 instanceVariableNames:'myView' |
|
16 classVariableNames:'' |
|
17 poolDictionaries:'' |
|
18 category:'Interface-Help' |
|
19 ! |
|
20 |
|
21 !CodeCompletionHelpView class methodsFor:'documentation'! |
|
22 |
|
23 copyright |
|
24 " |
|
25 COPYRIGHT (c) 2013 by Claus Gittinger |
|
26 All Rights Reserved |
|
27 |
|
28 This software is furnished under a license and may be used |
|
29 only in accordance with the terms of that license and with the |
|
30 inclusion of the above copyright notice. This software may not |
|
31 be provided or otherwise made available to, or used by, any |
|
32 other person. No title to or ownership of the software is |
|
33 hereby transferred. |
|
34 " |
|
35 ! |
|
36 |
|
37 documentation |
|
38 " |
|
39 used with codecompletion suggestions |
|
40 |
|
41 [author:] |
|
42 Claus Gittinger |
|
43 |
|
44 [See also:] |
|
45 ActiveHelp |
|
46 " |
|
47 ! ! |
|
48 |
|
49 !CodeCompletionHelpView class methodsFor:'instance creation'! |
|
50 |
|
51 with:aView |
|
52 "create a talking-view wrapping some other view" |
|
53 |
|
54 ^ self new withView:aView |
|
55 |
|
56 " |
|
57 (ActiveHelpView with:(TextView new)) realize |
|
58 (ActiveHelpView with:(TextView new)) open |
|
59 (ActiveHelpView with:(Button label:'ok')) open |
|
60 " |
|
61 |
|
62 "Modified: 27.4.1996 / 15:14:18 / cg" |
|
63 ! ! |
|
64 |
|
65 !CodeCompletionHelpView methodsFor:'accessing'! |
|
66 |
|
67 withView:aView |
|
68 "set the component view" |
|
69 |
|
70 |fg| |
|
71 |
|
72 (aView isKindOf:Label) ifTrue:[ |
|
73 aView viewBackground:viewBackground. |
|
74 aView backgroundColor:viewBackground. |
|
75 (fg := styleSheet colorAt:#'activeHelp.foregroundColor' default:nil) notNil ifTrue:[ |
|
76 aView foregroundColor:fg. |
|
77 ]. |
|
78 ]. |
|
79 self addSubView:aView. |
|
80 myView := aView. |
|
81 myView borderWidth:0. |
|
82 myView origin:(0.0@0.0) corner:(1.0@1.0). |
|
83 |
|
84 "Modified: 27.4.1996 / 15:16:46 / cg" |
|
85 ! ! |
|
86 |
|
87 !CodeCompletionHelpView methodsFor:'initialization'! |
|
88 |
|
89 initStyle |
|
90 "setup viewStyle specifics" |
|
91 |
|
92 <resource: #style (#'activeHelp.backgroundColor' |
|
93 #'activeHelp.borderWidth' |
|
94 #'activeHelp.font' |
|
95 #'activeHelp.style')> |
|
96 |
|
97 |defaultFont| |
|
98 |
|
99 super initStyle. |
|
100 |
|
101 defaultFont := styleSheet fontAt:#'activeHelp.font' default:nil. |
|
102 defaultFont notNil ifTrue:[ |
|
103 self font:defaultFont |
|
104 ]. |
|
105 |
|
106 self borderWidth:(styleSheet at:#'activeHelp.borderWidth' default:1). |
|
107 |
|
108 "Modified: / 26.10.1997 / 17:02:09 / cg" |
|
109 ! |
|
110 |
|
111 realize |
|
112 self create. |
|
113 "/ self computeShape. |
|
114 self enableMotionEvents. |
|
115 self enableButtonMotionEvents. |
|
116 super realize |
|
117 ! ! |
|
118 |
|
119 !CodeCompletionHelpView methodsFor:'private'! |
|
120 |
|
121 resizeToFit |
|
122 "resize myself to make the component view fit" |
|
123 |
|
124 |pref| |
|
125 |
|
126 pref := myView preferredExtent. |
|
127 self extent:(pref + (self borderWidth * 2)). |
|
128 myView origin:(self borderWidth asPoint). |
|
129 |
|
130 "Modified: 28.6.1997 / 14:23:49 / cg" |
|
131 ! ! |
|
132 |
|
133 !CodeCompletionHelpView methodsFor:'queries'! |
|
134 |
|
135 isPopUpView |
|
136 "return true - I am a popUp type of view (no decoration, pop-to-top)" |
|
137 |
|
138 ^ true |
|
139 |
|
140 "Modified: 12.5.1996 / 21:58:12 / cg" |
|
141 ! ! |
|
142 |
|
143 !CodeCompletionHelpView class methodsFor:'documentation'! |
|
144 |
|
145 version |
|
146 ^ '$Header: /cvs/stx/stx/libtool/CodeCompletionHelpView.st,v 1.1 2013-06-14 14:29:52 cg Exp $' |
|
147 ! |
|
148 |
|
149 version_CVS |
|
150 ^ '$Header: /cvs/stx/stx/libtool/CodeCompletionHelpView.st,v 1.1 2013-06-14 14:29:52 cg Exp $' |
|
151 ! ! |
|
152 |