author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 30 Jan 2012 17:49:41 +0000 | |
branch | jv |
changeset 12128 | a7ff7d66ee85 |
parent 12125 | 0c49a3b13e43 |
child 12401 | 4714b9640528 |
permissions | -rw-r--r-- |
8275 | 1 |
" |
2 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
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 |
" |
|
8048 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
ApplicationModel subclass:#StringSearchTool |
|
8077 | 17 |
instanceVariableNames:'searchTextHolder searchTextView searchBarImageInfoLabelHolder |
8955 | 18 |
searchBarInfoLabelHolder searchTextModifiedHolder matchCaseHolder |
19 |
closeBlock searchNextBlock searchPreviousBlock restartHolder' |
|
20 |
classVariableNames:'LastMatchCase LastRestart' |
|
8077 | 21 |
poolDictionaries:'' |
22 |
category:'Interface-Tools' |
|
8048 | 23 |
! |
24 |
||
25 |
!StringSearchTool class methodsFor:'documentation'! |
|
26 |
||
8275 | 27 |
copyright |
28 |
" |
|
29 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
8048 | 41 |
documentation |
42 |
" |
|
43 |
documentation to be added. |
|
44 |
||
45 |
[author:] |
|
46 |
User (User@FELIXM) |
|
47 |
||
48 |
[instance variables:] |
|
49 |
||
50 |
[class variables:] |
|
51 |
||
52 |
[see also:] |
|
53 |
||
54 |
" |
|
55 |
! |
|
56 |
||
57 |
examples |
|
58 |
" |
|
59 |
Starting the application: |
|
60 |
[exBegin] |
|
61 |
Tools::StringSearchTool open |
|
62 |
||
63 |
[exEnd] |
|
64 |
||
65 |
more examples to be added: |
|
66 |
[exBegin] |
|
67 |
... add code fragment for |
|
68 |
... executable example here ... |
|
69 |
[exEnd] |
|
70 |
" |
|
71 |
! ! |
|
72 |
||
8914 | 73 |
!StringSearchTool class methodsFor:'accessing'! |
74 |
||
8955 | 75 |
lastMatchCase |
8914 | 76 |
|
8955 | 77 |
^ LastMatchCase ? false |
8914 | 78 |
! |
79 |
||
8955 | 80 |
lastMatchCase: aBoolean |
8914 | 81 |
|
8955 | 82 |
LastMatchCase := aBoolean |
8914 | 83 |
! |
84 |
||
85 |
lastRestart |
|
86 |
||
87 |
^ LastRestart ? false |
|
88 |
! |
|
89 |
||
90 |
lastRestart: aBoolean |
|
91 |
||
92 |
LastRestart := aBoolean |
|
93 |
! ! |
|
94 |
||
8048 | 95 |
!StringSearchTool class methodsFor:'image specs'! |
96 |
||
97 |
closeSearchBarIcon |
|
98 |
"This resource specification was automatically generated |
|
99 |
by the ImageEditor of ST/X." |
|
100 |
||
101 |
"Do not manually edit this!! If it is corrupted, |
|
102 |
the ImageEditor may not be able to read the specification." |
|
103 |
||
104 |
" |
|
105 |
self closeSearchBar inspect |
|
106 |
ImageEditor openOnClass:self andSelector:#closeSearchBar |
|
107 |
Icon flushCachedIcons |
|
108 |
" |
|
109 |
||
110 |
<resource: #image> |
|
111 |
||
112 |
^Icon |
|
8485
48c95e955fb8
invalidkeyInImageResourceMethod
Claus Gittinger <cg@exept.de>
parents:
8477
diff
changeset
|
113 |
constantNamed:#'Tools::StringSearchTool class closeSearchBarIcon' |
8048 | 114 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
115 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@GQ\SD1LSD1LSD1LSD1LWGP@@@@@@ |
|
116 |
@ATGA@HA@PDA@PDA@PHDA1T@@@@@@@@TAENG!!(VB XA?_''57QPPT@@@@@@@@E NJ^V)&X%)UTT5IV7 KE @@@@@@@A A"7Q,#&9VS%^MQ$E<DQ @@@@@@@@Z |
|
117 |
@X%-#9NRX52R$80:^1@Z@@@@@@@@F0FHY6>R$9JR$9ION''(PF0@@@@@@@A<A 5ABT)FS$9D=KR13C1<@@@@@@@@)@WUCND*Q$9NQM"T!!XP8)@@@@@@@@K E2 |
|
118 |
O4RQ$9FQ$9@2G%8JK @@@@@@@CLA\S2D$9D9M)BS]!!1]BSL@@@@@@@@7@W@5LXP6J2\2]"P"VP 7@@@@@@@@O U+R3@*I2T#HA0&N5 RO @@@@@@@D LPF%( |
|
119 |
YVQ W59]VU 4CD @@@@@@@AGFP4F@PDA@PDA@PDFCQ%G@@@@@@@@K41TUEQTUEQTUEQTUEQLK0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
120 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 167 25 15 170 49 40 171 50 39 174 68 60 176 56 48 176 58 49 183 118 110 184 45 32 184 46 32 184 47 34 184 71 58 184 85 78 184 86 79 185 53 39 186 57 42 186 59 43 186 60 45 186 68 58 190 187 180 192 188 181 193 189 182 194 190 183 195 192 184 197 194 186 202 148 142 202 199 191 205 202 195 207 64 48 207 203 195 208 65 49 208 205 198 209 65 49 209 66 49 209 69 52 210 66 49 210 78 64 211 67 51 211 71 54 212 69 51 212 208 200 212 208 202 213 69 52 213 70 52 213 79 57 215 80 59 215 212 206 217 214 207 218 79 62 218 84 67 219 107 95 219 216 210 221 84 63 221 84 67 221 109 96 221 218 213 222 76 56 222 110 96 222 113 79 223 87 67 223 87 70 223 115 99 224 221 216 225 89 72 225 105 91 225 117 84 227 89 64 227 91 73 227 112 98 227 115 95 227 122 92 227 224 219 227 225 219 228 113 83 228 113 99 229 102 87 229 226 221 230 115 84 230 117 81 230 142 117 231 102 80 231 116 86 231 120 103 231 131 119 231 228 224 232 118 88 232 119 82 233 143 117 234 99 76 234 102 79 234 119 89 234 127 100 234 145 119 235 104 82 235 106 86 236 108 89 236 110 92 236 113 92 236 121 91 236 146 119 237 113 95 237 115 98 237 122 92 237 132 100 238 117 101 238 119 104 238 123 93 238 123 109 238 131 98 238 133 102 238 146 120 238 148 121 239 125 112 239 127 115 239 129 118 239 131 105 239 134 102 240 135 122 240 200 196 242 135 113 242 141 116 242 141 119 242 145 116 242 147 118 242 148 120 243 137 115 243 138 118 243 141 121 243 142 123 243 144 126 243 145 129 243 151 134 243 202 197 244 147 132 244 149 135 244 152 137 244 163 142 244 164 145 245 160 143 245 164 146 245 213 204 246 213 203 248 215 205 249 215 206 252 244 243 253 244 243 253 247 245 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? G?? @@@@@@@@@@@@') ; yourself); yourself] |
|
121 |
||
122 |
"Created: / 15-06-2007 / 18:04:38 / Administrador" |
|
123 |
! |
|
124 |
||
125 |
restartSearchBarIcon |
|
126 |
"This resource specification was automatically generated |
|
127 |
by the ImageEditor of ST/X." |
|
128 |
||
129 |
"Do not manually edit this!! If it is corrupted, |
|
130 |
the ImageEditor may not be able to read the specification." |
|
131 |
||
132 |
" |
|
133 |
self restartSearchBarIcon inspect |
|
134 |
ImageEditor openOnClass:self andSelector:#restartSearchBarIcon |
|
135 |
Icon flushCachedIcons |
|
136 |
" |
|
137 |
||
138 |
<resource: #image> |
|
139 |
||
140 |
^Icon |
|
8477
e12a54b40fd9
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8275
diff
changeset
|
141 |
constantNamed:#'Tools::StringSearchTool class restartSearchBarIcon' |
8048 | 142 |
ifAbsentPut:[(Depth24Image new) width: 20; height: 20; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:' |
143 |
@@@@@@@@@@@@@@@@@@@@@@@@?>SX?>''V?>;)?>O!!?>G]?>WY@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?=3\:[>''5;JF/Y-.+XY),(U. |
|
144 |
6JZK?=J1?>V<>.+I@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>?'':+:!!19]U6*-Q?]Y/?>RC?>*!!?>F_>+=939UL2Y!!L>MJT??W[@@@@@@@@@@@@@@@@@@@@ |
|
145 |
@@@@??[-=\^&1IEP=<Q[?>1/?=5$?=52?>NT?=^Q?>BP?>FG>;1]6JEO8;^H?]3I@@@@@@@@@@@@@@@@@@@@?\*95Y-)<+!!$??.F?>)17+-U8,E40Y-.09I) |
|
146 |
:Z1-?=I??=)8?<1.>K597;NL??K,@@@@@@@@@@@@?=#M6I>B>+:@?>2U=,]]5[IN7,^C5LB[<MWL?]#O=,BZ7)=\>;Y[??FP?=>O1YEW8<B$;=WH@@@@@@@@ |
|
147 |
>,"%8Z:A?>N#?>._5KA$9-JW7=+FX6M+V%U3"''*T0Y>V4ZA7595T=;1"?=&D?=&L,W(93IU\:KE9=LBG9[Q9;K1<?=^R:K591*-6??''[@@@@RE%37>7?=?/? |
|
148 |
>^_''3*.M0YAU<K5,?>ZO?=>G?<!!6?<Y6>+U(69YI3:IG?=Z@?>NU5:=19,6%@@@@@@@@OU5*2.+7;O??5-KF2;JS?=*&?>&"?=.E?>2R?=&F?>"X8I-N5)ED |
|
149 |
29$&?>M:?=*F3:E&>]/A@@@@@@@@O5=.7O??5^/(?O++<M.>0I-/;LNE??2)?=&B?>^%,W)A8:14?=FX3)TR?>U/?=Q:3IAZ?=?T@@@@@@@@P5Y68_#?7.70 |
|
150 |
??[1??C_:,F%6;A=>MJA?>6":,6+&G91?>+^?>+]79<$?<1\?=:C5IM[?<;F@@@@@@@@Q$1>6N_?<?+?<.W.?>3*??S(=,.(2Z!!#=-:^+9>P4,[P<>''46=O^ |
|
151 |
=+MX;Z)O?>^Q:Z]*;+Z''@@@@@@@@TD:O9^/?;/C??>???>/:?>71?>7Z;]^%0+JA7=CI8]O"0+[D8=#&?<&V79="?=2L?\E88[BG@@@@@@@@VU&M=_3?9N''? |
|
152 |
>/C???K??NK/??[1???#9M?B??3;(IV#/[WD;^_5@@@@;KR]<[10?=Q68[9,8,>W@@@@TU9&;/??9__9:.;/?_#<??/?>?[==?79>_?=<_S9T5M[0,WN7^G* |
|
153 |
@@@@@@@@1Y= >=!!>9,]-3[],6]B''TEH=;O_''=O?6>O77>O''=>//?=_+?:O_?:_''?>O??SEM[/<[P6.O,@@@@@@@@8-F%1*%/9[>@?>R(7+VG_%,;\E]CW$=H |
|
154 |
U5AWV5%.U5);R5M:Q5M;S%-=TE]*[GI>):696M;*@@@@@@@@@@@@6\F[2Y914)9.;[VF?L"!!8[^_3J>''0KB:0;?V0,_''-<C),K/(,;7!!+[OI,K[D2=G_9N+8 |
|
155 |
@@@@@@@@@@@@@@@@@@@@?\*_7*]>3))5/II9+9FF+9> 0;7I5-#-7NO?7^#?8^/?:/G?7NK07>W3@@@@@@@@@@@@@@@@@@@@@@@@?>N;?>N;?=:9?>7T?>#X |
|
156 |
>^_%=N?6<OK?@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@?@OC?0OO?8O_?<O_?>O???O?????_??>_??>_??>_??>_??>_??>_??__??O???O???G???A??/A? O') ; yourself); yourself] |
|
157 |
! |
|
158 |
||
159 |
searchNextIcon |
|
160 |
"This resource specification was automatically generated |
|
161 |
by the ImageEditor of ST/X." |
|
162 |
||
163 |
"Do not manually edit this!! If it is corrupted, |
|
164 |
the ImageEditor may not be able to read the specification." |
|
165 |
||
166 |
" |
|
167 |
self searchNextIcon inspect |
|
168 |
ImageEditor openOnClass:self andSelector:#searchNextIcon |
|
169 |
Icon flushCachedIcons |
|
170 |
" |
|
171 |
||
172 |
<resource: #image> |
|
173 |
||
174 |
^Icon |
|
8477
e12a54b40fd9
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8275
diff
changeset
|
175 |
constantNamed:#'Tools::StringSearchTool class searchNextIcon' |
8048 | 176 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
177 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ZE)ZZ@@@@@@@@@@@@@@@ |
|
178 |
@@@@@@AFF XA@PXUQ @@@@@@@@@@@@@@@@@*@Q5G^WX6E0D*@@@@@@@@@@@@@@@,AVQ?\&1#W&X8@20@@@@@@@@@@@A[@U==\F-"VUQOUSLAV0@@@@@@@@@@ |
|
179 |
G19-D <NCP0KB!!@7D1<@@@@@@@@@ ]MT5JY&Y&Y&Y%RLR4G @@@@@@@H\A WL $)&Y&Y&RF35B@X\@@@@@@@BK@XA1WA"X&Y&XE#T:P@FK@@@@@@@@# !!H |
|
180 |
]F$<II&YH3H>N2 H# @@@@@@@@@''GG)*Y2$9NRIDO4DQHP@@@@@@@@@@!!@EP[6U]I"UIQTL.@XP@@@@@@@@@@@ALAD-.XE]VS$(/@$0@@@@@@@@@@@@@@EDA |
|
181 |
FSQ!!VC@T@UD@@@@@@@@@@@@@@@@@#R,I@PDIJ84@@@@@@@@@@@@@@@@@@@@@%)^W% @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
182 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 48 54 77 55 63 87 56 64 89 57 67 90 59 67 90 64 69 89 71 74 92 72 76 96 76 81 100 80 89 118 82 90 119 83 91 120 84 92 122 86 94 123 87 96 124 89 97 126 92 104 132 97 106 136 97 110 138 97 112 138 100 102 112 101 107 130 104 118 144 105 113 135 105 124 146 107 109 118 107 116 144 110 127 148 112 126 148 113 129 148 117 119 129 118 130 156 119 123 133 125 140 174 127 131 146 127 132 148 127 146 178 130 151 181 131 132 143 133 149 185 133 152 182 134 134 138 137 140 150 138 138 142 139 156 191 141 160 195 143 164 199 143 169 198 144 157 197 144 158 197 152 173 208 153 184 209 155 167 210 156 180 208 157 179 215 157 180 211 160 162 171 160 173 216 160 174 216 160 182 214 161 173 217 161 174 217 161 176 219 161 179 220 161 180 220 163 182 222 163 184 222 164 182 222 164 184 223 166 164 161 166 189 212 166 194 211 167 190 228 167 194 229 167 200 221 169 170 174 169 195 212 169 196 232 170 181 228 170 203 221 171 171 176 171 173 182 171 193 220 173 182 232 173 192 232 173 200 234 175 206 239 175 210 240 176 188 237 178 175 168 178 175 173 178 202 234 178 206 240 179 195 238 180 205 223 180 214 243 180 216 244 181 193 242 181 195 239 181 204 223 181 212 243 182 206 242 182 209 243 184 180 173 184 211 244 184 215 245 185 198 246 185 200 244 188 215 233 188 225 249 189 226 249 190 206 250 190 219 248 191 209 249 191 217 248 191 222 248 192 188 181 192 221 249 194 190 184 195 191 184 196 226 251 196 232 251 199 196 189 202 198 191 202 226 253 203 199 193 203 229 253 203 237 252 203 237 253 204 202 196 206 202 195 206 205 204 207 203 196 208 204 197 208 205 201 212 208 200 212 208 201 212 208 202 212 209 205 213 210 202 213 212 213 214 211 206 215 212 207 216 213 206 218 215 210 220 221 223 221 219 214 222 219 215 222 220 215 230 228 225 236 235 232 243 243 244 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@C@@@C@@@C@G C@_8C@?<CA?>CC??CC??CG??#G??#G??#G??#C??CC??CA?>C@?<C@_8C@G C@@@C@@@C@@@C') ; yourself); yourself] |
|
183 |
! |
|
184 |
||
185 |
searchPreviousIcon |
|
186 |
"This resource specification was automatically generated |
|
187 |
by the ImageEditor of ST/X." |
|
188 |
||
189 |
"Do not manually edit this!! If it is corrupted, |
|
190 |
the ImageEditor may not be able to read the specification." |
|
191 |
||
192 |
" |
|
193 |
self searchPreviousIcon inspect |
|
194 |
ImageEditor openOnClass:self andSelector:#searchPreviousIcon |
|
195 |
Icon flushCachedIcons |
|
196 |
" |
|
197 |
||
198 |
<resource: #image> |
|
199 |
||
200 |
^Icon |
|
8477
e12a54b40fd9
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8275
diff
changeset
|
201 |
constantNamed:#'Tools::StringSearchTool class searchPreviousIcon' |
8048 | 202 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
203 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%)^W% @@@@@@@@@@@@@@ |
|
204 |
@@@@@@BMJ0$A@P$+#P@@@@@@@@@@@@@@@@AQ@Q$4XU 0E@EQ@@@@@@@@@@@@@@ALAD-.XE]VS$(/@$0@@@@@@@@@@@BD@UA/YU4&IT%EP28A!!@@@@@@@@@@@ |
|
205 |
I11:Z&\)NS$"QC=ADRD@@@@@@@@@# !!H]F$<II&YH3H>N2 H# @@@@@@@H,A GE\FI"Y&Y VMS)@@X,@@@@@@@BG@XE3HIJY&Y&Y$!!,=P FG@@@@@@@@ ]M |
|
206 |
T5JY&Y&Y&Y%RLR4G @@@@@@@@@_G&4RC08MC@,JDC\SG0@@@@@@@@@@V0E__WA+X%%TS5T3@U,@@@@@@@@@@@@,AVQ?\&1#W&X8@20@@@@@@@@@@@@@@B(A |
|
207 |
GT]9]#XW@R(@@@@@@@@@@@@@@@@@Q!!(F@PDFETX@@@@@@@@@@@@@@@@@@@@@ZE)ZZ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
208 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 48 54 77 55 63 87 56 64 89 57 67 90 59 67 90 64 69 89 71 74 92 72 76 96 76 81 100 80 89 118 82 90 119 83 91 120 84 92 122 86 94 123 87 96 124 89 97 126 92 104 132 97 106 136 97 110 138 97 112 138 100 102 112 101 107 130 104 118 144 105 113 135 105 124 146 107 109 118 107 116 144 110 127 148 112 126 148 113 129 148 117 119 129 118 130 156 119 123 133 125 140 174 127 131 146 127 132 148 127 146 178 130 151 181 131 132 143 133 149 185 133 152 182 134 134 138 137 140 150 138 138 142 139 156 191 141 160 195 143 164 199 143 169 198 144 157 197 144 158 197 152 173 208 153 184 209 155 167 210 156 180 208 157 179 215 157 180 211 160 162 171 160 173 216 160 174 216 160 182 214 161 173 217 161 174 217 161 176 219 161 179 220 161 180 220 163 182 222 163 184 222 164 182 222 164 184 223 166 164 161 166 189 212 166 194 211 167 190 228 167 194 229 167 200 221 169 170 174 169 195 212 169 196 232 170 181 228 170 203 221 171 171 176 171 173 182 171 193 220 173 182 232 173 192 232 173 200 234 175 206 239 175 210 240 176 188 237 178 175 168 178 175 173 178 202 234 178 206 240 179 195 238 180 205 223 180 214 243 180 216 244 181 193 242 181 195 239 181 204 223 181 212 243 182 206 242 182 209 243 184 180 173 184 211 244 184 215 245 185 198 246 185 200 244 188 215 233 188 225 249 189 226 249 190 206 250 190 219 248 191 209 249 191 217 248 191 222 248 192 188 181 192 221 249 194 190 184 195 191 184 196 226 251 196 232 251 199 196 189 202 198 191 202 226 253 203 199 193 203 229 253 203 237 252 203 237 253 204 202 196 206 202 195 206 205 204 207 203 196 208 204 197 208 205 201 212 208 200 212 208 201 212 208 202 212 209 205 213 210 202 213 212 213 214 211 206 215 212 207 216 213 206 218 215 210 220 221 223 221 219 214 222 219 215 222 220 215 230 228 225 236 235 232 243 243 244 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@C@@@C@@@C@G C@_8C@?<CA?>CC??CC??CG??#G??#G??#G??#C??CC??CA?>C@?<C@_8C@G C@@@C@@@C@@@C') ; yourself); yourself] |
|
209 |
! |
|
210 |
||
211 |
searchToolBarIcon |
|
212 |
"This resource specification was automatically generated |
|
213 |
by the ImageEditor of ST/X." |
|
214 |
||
215 |
"Do not manually edit this!! If it is corrupted, |
|
216 |
the ImageEditor may not be able to read the specification." |
|
217 |
||
218 |
" |
|
219 |
self searchToolBarIcon inspect |
|
220 |
ImageEditor openOnClass:self andSelector:#searchToolBarIcon |
|
221 |
Icon flushCachedIcons |
|
222 |
" |
|
223 |
||
224 |
<resource: #image> |
|
225 |
||
226 |
^Icon |
|
8477
e12a54b40fd9
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8275
diff
changeset
|
227 |
constantNamed:#'Tools::StringSearchTool class searchToolBarIcon' |
8048 | 228 |
ifAbsentPut:[(Depth24Image new) width: 22; height: 22; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:' |
229 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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C@O<C@_>C@_>C@_>C@_>C@_>C@?>CA?<CC?8CG8@CG0@CC @CA@@C@@@C@@@C@@@C@@@C') ; yourself); yourself] |
|
246 |
! |
|
247 |
||
248 |
warningSearchBarIcon |
|
249 |
"This resource specification was automatically generated |
|
250 |
by the ImageEditor of ST/X." |
|
251 |
||
252 |
"Do not manually edit this!! If it is corrupted, |
|
253 |
the ImageEditor may not be able to read the specification." |
|
254 |
||
255 |
" |
|
256 |
self warningSearchBarIcon inspect |
|
257 |
ImageEditor openOnClass:self andSelector:#warningSearchBarIcon |
|
258 |
Icon flushCachedIcons |
|
259 |
" |
|
260 |
||
261 |
<resource: #image> |
|
262 |
||
263 |
^Icon |
|
8477
e12a54b40fd9
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8275
diff
changeset
|
264 |
constantNamed:#'Tools::StringSearchTool class warningSearchBarIcon' |
8048 | 265 |
ifAbsentPut:[(Depth24Image new) width: 22; height: 19; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:' |
266 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?:.+<Y"P??C\@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@>_;?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
267 |
@@@@?]SZ)5]X.6!! -HM2??''*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?>39-7*B4H&G>[N+%%MJ>\#A@@@@@@@@ |
|
268 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<+R?*U1&?=CN?>W^4HJ@+FY$?>+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
269 |
@@@@@@@@@@@@@@@@@@@@?>G_)U!!^>Z^->,B><+"4?*^-%C8?;;Z+@@@@@@@@@@@@@@@@@@@@@@@@@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"+34%H13L/02("13T(13\,5$H>3S<= |
|
278 |
1TMC0DQD/$IB/D@>.S4;-S,8,C(:,C 9-3X:(A4""@4R_1DT RH&/6%*?82D/S8503873C<85C<923H,23@+/RP\-"HX,"HW+"DX*"@V)10U)1(S)!!XU)AXU |
|
279 |
(Q0_$1XZ#1X["A(]^QPX&34>?;&).&-Z/6]Y06MU1&AR/5UG15-N0EYF1&EO0&EN/&EP.6AN.%5N.5-M.5%P/UYQ.$)I.4)L0UQW/U-\+5YX5XFA') ; mask:((Depth1Image new) width: 22; height: 19; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@C G@G0C@O0C@O8C@_8C@?<C@?<CA?>CC??CC??CC??#G??#O??3O??3_??;????????????????') ; yourself); yourself] |
|
280 |
! ! |
|
281 |
||
282 |
!StringSearchTool class methodsFor:'interface specs'! |
|
283 |
||
284 |
windowSpec |
|
285 |
"This resource specification was automatically generated |
|
286 |
by the UIPainter of ST/X." |
|
287 |
||
288 |
"Do not manually edit this!! If it is corrupted, |
|
289 |
the UIPainter may not be able to read the specification." |
|
290 |
||
291 |
" |
|
292 |
UIPainter new openOnClass:Tools::StringSearchTool andSelector:#windowSpec |
|
293 |
Tools::StringSearchTool new openInterface:#windowSpec |
|
294 |
Tools::StringSearchTool open |
|
295 |
" |
|
296 |
||
297 |
<resource: #canvas> |
|
298 |
||
299 |
^ |
|
300 |
#(FullSpec |
|
301 |
name: windowSpec |
|
302 |
window: |
|
303 |
(WindowSpec |
|
304 |
label: 'Tools::StringSearchTool' |
|
305 |
name: 'Tools::StringSearchTool' |
|
306 |
min: (Point 10 10) |
|
307 |
bounds: (Rectangle 0 0 801 27) |
|
308 |
) |
|
309 |
component: |
|
310 |
(SpecCollection |
|
311 |
collection: ( |
|
8077 | 312 |
(ViewSpec |
8048 | 313 |
name: 'SearchBox' |
314 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
8077 | 315 |
level: -1 |
8048 | 316 |
component: |
317 |
(SpecCollection |
|
318 |
collection: ( |
|
319 |
(ActionButtonSpec |
|
320 |
label: 'closeSearchBarIcon' |
|
321 |
name: 'hideSearchBarButton' |
|
8077 | 322 |
layout: (LayoutFrame 4 0 2 0 25 0 23 0) |
8048 | 323 |
hasCharacterOrientedLabel: false |
324 |
translateLabel: true |
|
325 |
model: hideSearchBar |
|
326 |
) |
|
327 |
(LabelSpec |
|
328 |
label: 'Search:' |
|
329 |
name: 'SearchLabel' |
|
8077 | 330 |
layout: (LayoutFrame 30 0 1 0 81 0 23 0) |
8048 | 331 |
translateLabel: true |
332 |
adjust: right |
|
333 |
) |
|
334 |
(InputFieldSpec |
|
335 |
name: 'SearchEntryField' |
|
8077 | 336 |
layout: (LayoutFrame 87 0 1 0 298 0 23 0) |
8048 | 337 |
model: searchTextHolder |
338 |
immediateAccept: true |
|
339 |
acceptOnReturn: true |
|
340 |
acceptOnTab: true |
|
341 |
acceptOnLostFocus: true |
|
342 |
modifiedChannel: searchTextModifiedHolder |
|
343 |
acceptOnPointerLeave: false |
|
344 |
postBuildCallback: postBuildSearchTextView: |
|
345 |
) |
|
346 |
(ActionButtonSpec |
|
347 |
label: 'searchNextIcon' |
|
348 |
name: 'SearchNextButton' |
|
8077 | 349 |
layout: (LayoutFrame 302 0 1 0 323 0 22 0) |
8048 | 350 |
hasCharacterOrientedLabel: false |
351 |
translateLabel: true |
|
8076 | 352 |
model: searchNextTextButtonPressed |
8048 | 353 |
) |
354 |
(ActionButtonSpec |
|
355 |
label: 'searchPreviousIcon' |
|
356 |
name: 'searchPreviousButton' |
|
8077 | 357 |
layout: (LayoutFrame 330 0 1 0 351 0 22 0) |
8048 | 358 |
hasCharacterOrientedLabel: false |
359 |
translateLabel: true |
|
8076 | 360 |
model: searchPreviousTextButtonPressed |
8048 | 361 |
) |
362 |
(CheckBoxSpec |
|
8926 | 363 |
label: 'Case' |
364 |
name: 'DoNotIgnoreCaseCheckBox' |
|
8077 | 365 |
layout: (LayoutFrame 360 0 1 0 553 0 23 0) |
8955 | 366 |
model: matchCaseHolder |
8048 | 367 |
translateLabel: true |
368 |
) |
|
369 |
(LabelSpec |
|
370 |
label: 'SearchBarImageInfoLabel' |
|
371 |
name: 'SearchBarImageInfoLabel' |
|
8077 | 372 |
layout: (LayoutFrame 557 0 1 0 581 0 23 0) |
8048 | 373 |
hasCharacterOrientedLabel: false |
374 |
translateLabel: true |
|
375 |
labelChannel: searchBarImageInfoLabelHolder |
|
376 |
) |
|
377 |
(LabelSpec |
|
378 |
label: 'SearchBarInfoLabel' |
|
379 |
name: 'SearchBarInfoLabel' |
|
8077 | 380 |
layout: (LayoutFrame 584 0 1 0 862 0 23 0) |
8048 | 381 |
translateLabel: true |
382 |
labelChannel: searchBarInfoLabelHolder |
|
383 |
adjust: left |
|
384 |
) |
|
385 |
) |
|
386 |
||
387 |
) |
|
388 |
) |
|
389 |
) |
|
390 |
||
391 |
) |
|
392 |
) |
|
393 |
! ! |
|
394 |
||
395 |
!StringSearchTool methodsFor:'accessing'! |
|
396 |
||
397 |
closeBlock |
|
398 |
^ closeBlock |
|
399 |
! |
|
400 |
||
401 |
closeBlock:something |
|
402 |
closeBlock := something. |
|
403 |
! |
|
404 |
||
8955 | 405 |
ignoreCase |
406 |
||
407 |
^ self matchCaseHolder value not |
|
408 |
! |
|
409 |
||
8048 | 410 |
initialSearchString: aString |
411 |
||
412 |
self searchTextHolder value: aString. |
|
8076 | 413 |
! |
414 |
||
8077 | 415 |
matchCheckboxVisible |
416 |
^ false |
|
417 |
! |
|
418 |
||
8076 | 419 |
restartSearch |
420 |
||
421 |
^ self restartHolder value |
|
8048 | 422 |
! |
423 |
||
424 |
searchNextBlock |
|
425 |
^ searchNextBlock |
|
426 |
! |
|
427 |
||
428 |
searchNextBlock:something |
|
429 |
searchNextBlock := something. |
|
430 |
! |
|
431 |
||
432 |
searchPreviousBlock |
|
433 |
^ searchPreviousBlock |
|
434 |
! |
|
435 |
||
436 |
searchPreviousBlock:something |
|
437 |
searchPreviousBlock := something. |
|
8996 | 438 |
! |
439 |
||
440 |
searchText |
|
441 |
||
442 |
^ searchTextView contents |
|
8048 | 443 |
! ! |
444 |
||
445 |
!StringSearchTool methodsFor:'aspects'! |
|
446 |
||
8955 | 447 |
matchCaseHolder |
8048 | 448 |
|
8955 | 449 |
matchCaseHolder isNil ifTrue:[ |
450 |
matchCaseHolder := self class lastMatchCase asValue. |
|
8048 | 451 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
8955 | 452 |
"/ matchCaseHolder addDependent:self. |
453 |
matchCaseHolder onChangeSend:#matchCaseHolderChanged to:self. |
|
8048 | 454 |
|
455 |
]. |
|
8955 | 456 |
^ matchCaseHolder. |
8048 | 457 |
! |
458 |
||
8076 | 459 |
restartHolder |
460 |
||
461 |
restartHolder isNil ifTrue:[ |
|
8914 | 462 |
restartHolder := self class lastRestart asValue. |
8076 | 463 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
464 |
"/ restartHolder addDependent:self. |
|
465 |
restartHolder onChangeSend:#restartHolderChanged to:self. |
|
466 |
]. |
|
467 |
^ restartHolder. |
|
8069
3c4426cb3174
changed #matchCheckboxVisible
Claus Gittinger <cg@exept.de>
parents:
8061
diff
changeset
|
468 |
! |
3c4426cb3174
changed #matchCheckboxVisible
Claus Gittinger <cg@exept.de>
parents:
8061
diff
changeset
|
469 |
|
8048 | 470 |
searchBarImageInfoLabelHolder |
471 |
||
472 |
searchBarImageInfoLabelHolder isNil ifTrue:[ |
|
473 |
searchBarImageInfoLabelHolder := nil asValue . |
|
474 |
]. |
|
475 |
^ searchBarImageInfoLabelHolder. |
|
476 |
! |
|
477 |
||
478 |
searchBarInfoLabelHolder |
|
479 |
||
480 |
searchBarInfoLabelHolder isNil ifTrue:[ |
|
481 |
searchBarInfoLabelHolder := '' asValue . |
|
482 |
]. |
|
483 |
^ searchBarInfoLabelHolder. |
|
484 |
! |
|
485 |
||
486 |
searchTextHolder |
|
487 |
||
488 |
searchTextHolder isNil ifTrue:[ |
|
489 |
searchTextHolder := ValueHolder new. |
|
490 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
491 |
"/ userSelectedHolder addDependent:self. |
|
492 |
"/ userSelectedHolder onChangeSend:#searchTextHolderChanged to:self. |
|
493 |
]. |
|
494 |
^ searchTextHolder. |
|
495 |
! |
|
496 |
||
497 |
searchTextModifiedHolder |
|
498 |
||
499 |
searchTextModifiedHolder isNil ifTrue:[ |
|
500 |
searchTextModifiedHolder := false asValue . |
|
501 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
502 |
"/ searchTextModifiedHolder addDependent:self. |
|
503 |
searchTextModifiedHolder onChangeSend:#searchTextModifiedHolderChanged to:self. |
|
504 |
]. |
|
505 |
^ searchTextModifiedHolder. |
|
506 |
||
507 |
"Created: / 15-06-2007 / 18:07:19 / Administrador" |
|
508 |
! ! |
|
509 |
||
510 |
!StringSearchTool methodsFor:'change & update'! |
|
511 |
||
8955 | 512 |
matchCaseHolderChanged |
8048 | 513 |
|
514 |
self searchNextTextIncludingCurrentSelection: true. |
|
8061 | 515 |
self setFocusToSearchTextView. |
8955 | 516 |
self class lastMatchCase: self matchCaseHolder value. |
8048 | 517 |
! |
518 |
||
519 |
processEvent:anEvent |
|
8061 | 520 |
searchTextView hasFocus ifFalse:[^ false]. |
521 |
||
8048 | 522 |
anEvent isKeyPressEvent ifTrue:[ |
8080 | 523 |
"/ Transcript showCR: anEvent key printString. |
8076 | 524 |
"/ anEvent key == #Find ifTrue:[ |
525 |
"/ self halt. |
|
526 |
"/ self searchNextText. |
|
527 |
"/ ^ true |
|
528 |
"/ ]. |
|
8084 | 529 |
anEvent key == #Escape ifTrue:[ |
530 |
self escapePressed. |
|
531 |
^ true |
|
532 |
]. |
|
8048 | 533 |
anEvent key == #FindNext ifTrue:[ |
534 |
self searchNextText. |
|
535 |
^ true |
|
536 |
]. |
|
537 |
anEvent key == #FindPrev ifTrue:[ |
|
538 |
self searchPreviousText. |
|
539 |
^ true |
|
540 |
]. |
|
541 |
]. |
|
542 |
^ false |
|
543 |
! |
|
544 |
||
8076 | 545 |
restartHolderChanged |
546 |
||
547 |
self setFocusToSearchTextView. |
|
8914 | 548 |
self class lastRestart: self restartHolder value. |
8076 | 549 |
! |
550 |
||
8048 | 551 |
searchTextModifiedHolderChanged |
552 |
||
8076 | 553 |
|previousRestart| |
554 |
||
555 |
"Always restart when looking for a typed string" |
|
556 |
previousRestart := self restartSearch. |
|
557 |
self restartHolder setValue: true. |
|
558 |
||
8048 | 559 |
self searchNextTextIncludingCurrentSelection: true. |
560 |
self searchTextModifiedHolder setValue: false. |
|
8076 | 561 |
self restartHolder setValue: previousRestart. |
562 |
||
8048 | 563 |
|
564 |
"/Transcript showCR: 'searchTextModifiedHolderChanged: ',(self searchTextHolder value ? ''). |
|
8996 | 565 |
"/Transcript showCR: 'searchTextView contents: ',(self searchText ? ''). |
8048 | 566 |
|
567 |
"Created: / 15-06-2007 / 18:07:57 / Administrador" |
|
568 |
"Modified: / 16-06-2007 / 09:21:27 / Administrador" |
|
569 |
! ! |
|
570 |
||
571 |
!StringSearchTool methodsFor:'images'! |
|
572 |
||
573 |
restartSearchBarIcon |
|
574 |
||
575 |
^ self class restartSearchBarIcon |
|
576 |
! |
|
577 |
||
578 |
warningSearchBarIcon |
|
579 |
||
580 |
^ self class warningSearchBarIcon |
|
581 |
! ! |
|
582 |
||
583 |
!StringSearchTool methodsFor:'initialization & release'! |
|
584 |
||
8059 | 585 |
commonPostOpen |
586 |
self windowGroup addPreEventHook:self. |
|
587 |
super commonPostOpen |
|
588 |
! |
|
589 |
||
8048 | 590 |
postBuildSearchTextView: anEditFieldView |
591 |
||
592 |
searchTextView := anEditFieldView |
|
593 |
||
594 |
"Created: / 15-06-2007 / 18:17:15 / Administrador" |
|
595 |
! ! |
|
596 |
||
597 |
!StringSearchTool methodsFor:'private'! |
|
598 |
||
8076 | 599 |
searchReachEndOrBeginningIcon |
600 |
||
601 |
^ self restartSearch |
|
602 |
ifTrue:[self restartSearchBarIcon.] |
|
603 |
ifFalse:[self warningSearchBarIcon.]. |
|
604 |
! |
|
605 |
||
8048 | 606 |
searchTextRestarted: message |
607 |
||
8076 | 608 |
self searchBarImageInfoLabelHolder value: self searchReachEndOrBeginningIcon. |
8048 | 609 |
self searchBarInfoLabelHolder value: message. |
610 |
! |
|
611 |
||
612 |
setSearchTextFoundColors |
|
613 |
||
614 |
searchTextView foregroundColor: Color black. |
|
615 |
searchTextView backgroundColor: Color white. |
|
616 |
||
617 |
"Created: / 16-06-2007 / 06:28:32 / Administrador" |
|
618 |
! |
|
619 |
||
620 |
setSearchTextNotFoundColors |
|
621 |
||
622 |
searchTextView foregroundColor: Color white. |
|
623 |
searchTextView backgroundColor: Color lightRed. |
|
624 |
||
625 |
"Created: / 16-06-2007 / 06:29:00 / Administrador" |
|
626 |
! ! |
|
627 |
||
628 |
!StringSearchTool methodsFor:'public'! |
|
629 |
||
8084 | 630 |
escapePressed |
631 |
||
632 |
self hideSearchBar. |
|
633 |
! |
|
634 |
||
8048 | 635 |
searchBarOpened |
636 |
||
8112
de6cb31af659
select text when focus goes into search-field
Claus Gittinger <cg@exept.de>
parents:
8084
diff
changeset
|
637 |
self setFocusToSearchTextView. |
de6cb31af659
select text when focus goes into search-field
Claus Gittinger <cg@exept.de>
parents:
8084
diff
changeset
|
638 |
self selectAllInSearchTextView. |
8048 | 639 |
! |
640 |
||
641 |
searchNextTextReachEnd |
|
642 |
|message| |
|
8957 | 643 |
message := (resources string: 'End of text reached'). |
8048 | 644 |
self searchTextRestarted: message. |
8076 | 645 |
Smalltalk beep. |
8048 | 646 |
|
8076 | 647 |
self restartSearch ifTrue:[ |
8957 | 648 |
message := message, (resources string: ', starting from the beginning'). |
8076 | 649 |
self searchTextRestarted: message. |
650 |
self searchNextTextFromBeginning. |
|
651 |
]. |
|
8048 | 652 |
! |
653 |
||
654 |
searchPreviousTextReachBeginning |
|
655 |
|message| |
|
8076 | 656 |
|
8957 | 657 |
message := (resources string: 'Beginning of text reached'). |
8048 | 658 |
self searchTextRestarted: message. |
8076 | 659 |
Smalltalk beep. |
660 |
||
661 |
self restartSearch ifTrue:[ |
|
8957 | 662 |
message := message, (resources string: ', starting from the end'). |
8076 | 663 |
self searchTextRestarted: message. |
664 |
self searchPreviousTextFromEnd |
|
665 |
]. |
|
8048 | 666 |
! |
667 |
||
668 |
searchTextNotFound |
|
669 |
||
8957 | 670 |
self searchTextNotFound: (resources string: 'Text not found'). |
8911 | 671 |
! |
672 |
||
673 |
searchTextNotFound: aMessage |
|
674 |
||
8048 | 675 |
self searchBarImageInfoLabelHolder value: self warningSearchBarIcon. |
8911 | 676 |
self searchBarInfoLabelHolder value: aMessage. |
8048 | 677 |
self setSearchTextNotFoundColors. |
678 |
||
679 |
"Created: / 16-06-2007 / 06:51:01 / Administrador" |
|
680 |
"Modified: / 16-06-2007 / 11:43:53 / Administrador" |
|
681 |
! |
|
682 |
||
683 |
searchTextStarted |
|
684 |
||
685 |
self searchBarImageInfoLabelHolder value: nil. |
|
686 |
self searchBarInfoLabelHolder value: ''. |
|
687 |
self setSearchTextFoundColors. |
|
688 |
||
689 |
"Created: / 16-06-2007 / 06:54:03 / Administrador" |
|
690 |
"Modified: / 16-06-2007 / 10:07:06 / Administrador" |
|
8061 | 691 |
! |
692 |
||
8112
de6cb31af659
select text when focus goes into search-field
Claus Gittinger <cg@exept.de>
parents:
8084
diff
changeset
|
693 |
selectAllInSearchTextView |
de6cb31af659
select text when focus goes into search-field
Claus Gittinger <cg@exept.de>
parents:
8084
diff
changeset
|
694 |
|
9244
6bcb7d03910b
changed: #selectAllInSearchTextView
Claus Gittinger <cg@exept.de>
parents:
8996
diff
changeset
|
695 |
searchTextView selectAllInitially. |
8112
de6cb31af659
select text when focus goes into search-field
Claus Gittinger <cg@exept.de>
parents:
8084
diff
changeset
|
696 |
! |
de6cb31af659
select text when focus goes into search-field
Claus Gittinger <cg@exept.de>
parents:
8084
diff
changeset
|
697 |
|
8061 | 698 |
setFocusToSearchTextView |
699 |
||
700 |
searchTextView requestFocus. |
|
8048 | 701 |
! ! |
702 |
||
703 |
!StringSearchTool methodsFor:'searching'! |
|
704 |
||
705 |
hideSearchBar |
|
706 |
||
707 |
closeBlock isNil ifTrue:[^ self]. |
|
708 |
closeBlock value |
|
709 |
! |
|
710 |
||
711 |
searchNextText |
|
712 |
||
713 |
self searchNextTextIncludingCurrentSelection: false. |
|
8076 | 714 |
"/ self setFocusToSearchTextView. |
715 |
! |
|
716 |
||
717 |
searchNextTextButtonPressed |
|
718 |
||
719 |
self searchNextText. |
|
8061 | 720 |
self setFocusToSearchTextView. |
8048 | 721 |
! |
722 |
||
723 |
searchNextTextFromBeginning |
|
724 |
|searchText ignoreCase| |
|
725 |
||
8996 | 726 |
searchText := self searchText. |
8048 | 727 |
searchText isEmptyOrNil ifTrue:[^self]. |
8955 | 728 |
ignoreCase := self ignoreCase. |
8048 | 729 |
searchNextBlock isNil ifTrue:[^ self]. |
730 |
searchNextBlock value: self value: searchText value: ignoreCase value: #beginning |
|
731 |
||
732 |
"/ self parent |
|
733 |
"/ searchNextTextFromBeginning: searchText |
|
734 |
"/ ignoreCase: ignoreCase |
|
735 |
! |
|
736 |
||
737 |
searchNextTextIncludingCurrentSelection: includeCurrentSelection |
|
738 |
|searchText ignoreCase startPlace| |
|
739 |
||
740 |
self searchTextStarted. |
|
8996 | 741 |
searchText := self searchText. |
8048 | 742 |
searchText isEmptyOrNil ifTrue:[^self]. |
8955 | 743 |
ignoreCase := self ignoreCase. |
8048 | 744 |
searchNextBlock isNil ifTrue:[^ self]. |
745 |
startPlace := includeCurrentSelection ifTrue:[#current] ifFalse:[#includingCurrent]. |
|
746 |
searchNextBlock value: self value: searchText value: ignoreCase value: startPlace |
|
747 |
||
748 |
"/ self parent |
|
749 |
"/ searchNextText: searchText |
|
750 |
"/ ignoreCase: ignoreCase |
|
751 |
"/ includingCurrentSelection: includeCurrentSelection. |
|
752 |
! |
|
753 |
||
754 |
searchPreviousText |
|
755 |
||
756 |
|searchText ignoreCase| |
|
757 |
||
758 |
self searchTextStarted. |
|
8996 | 759 |
searchText := self searchText. |
8076 | 760 |
"/ self setFocusToSearchTextView. |
8048 | 761 |
searchText isEmptyOrNil ifTrue:[^self]. |
8955 | 762 |
ignoreCase := self ignoreCase. |
8048 | 763 |
searchPreviousBlock isNil ifTrue:[^ self]. |
8061 | 764 |
searchPreviousBlock value: self value: searchText value: ignoreCase value: #current. |
8048 | 765 |
|
766 |
"/ self parent |
|
767 |
"/ searchPreviousText: searchText |
|
768 |
"/ ignoreCase: ignoreCase |
|
769 |
! |
|
770 |
||
8076 | 771 |
searchPreviousTextButtonPressed |
772 |
||
773 |
self searchPreviousText. |
|
774 |
self setFocusToSearchTextView. |
|
775 |
! |
|
776 |
||
8048 | 777 |
searchPreviousTextFromEnd |
778 |
||
779 |
|searchText ignoreCase| |
|
780 |
||
8996 | 781 |
searchText := self searchText. |
8048 | 782 |
searchText isEmptyOrNil ifTrue:[^self]. |
8955 | 783 |
ignoreCase := self ignoreCase. |
8048 | 784 |
searchPreviousBlock isNil ifTrue:[^ self]. |
785 |
searchPreviousBlock value: self value: searchText value: ignoreCase value: #end |
|
786 |
||
787 |
"/ self parent |
|
788 |
"/ searchPreviousTextFromEnd: searchText |
|
789 |
"/ ignoreCase: ignoreCase |
|
790 |
! ! |
|
791 |
||
792 |
!StringSearchTool class methodsFor:'documentation'! |
|
793 |
||
794 |
version |
|
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
795 |
^ '$Id: Tools__StringSearchTool.st 7854 2012-01-30 17:49:41Z vranyj1 $' |
8911 | 796 |
! |
797 |
||
798 |
version_CVS |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
9474
diff
changeset
|
799 |
^ '§Header: /cvs/stx/stx/libtool/Tools__StringSearchTool.st,v 1.20 2010/05/07 12:28:01 cg Exp §' |
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
800 |
! |
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
801 |
|
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
802 |
version_SVN |
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
803 |
^ '$Id: Tools__StringSearchTool.st 7854 2012-01-30 17:49:41Z vranyj1 $' |
12125 | 804 |
! ! |