7 //background = activeBorder;
10 //background = activeBorder;
12 bool OnMoving(int * x, int * y, int w, int h)
14 //if(((ExplorerWindow)master).userMode)
20 class PanelText : Panel
22 // IDEA: Would it be totally unreasonable for a group box to use client size
23 // to set the actual size considering the size of the border?
24 // Also, to have anchors be relative to the client size?
25 clientSize = { 200, 40 };
27 //background = activeBorder;
34 anchor = { left = 8, top = 16, right = 8 };
39 return editBox.contents;
43 class PanelTextMatch : PanelText
45 clientSize = { 200, 40 };
48 Button optionMatchCase
51 //toggle = true, inactive = true;
53 text = "Match Case", hotKey = Key { c, alt = true };
55 //anchor = { left = 4, top = 40, right = 0.508f };
56 anchor = { top = 38, right = 8 };
58 Button optionMatchWord
61 //toggle = true, inactive = true;
63 text = "Match Whole Word", hotKey = Key { w, alt = true };
65 position = Point { y = 62 };
66 //anchor = { left = 0.508f, top = 40, right = 4 };
67 anchor = { top = 38, right = 8 };
72 optionMatchCase.anchor.right = (int)optionMatchWord.size.w + 8 + 2;
76 /*void OnResize(int width, int height)
78 optionMatchCase.anchor.right = (int)optionMatchWord.size.w + 8 + 2;
82 class PanelFileName : PanelTextMatch
84 clientSize = { 200, 40 };
87 hotKey = Key { n, alt = true };
90 editBox.contents = "Ecere";
94 class PanelFileSize : Panel
96 clientSize = { 200, 40 };
100 hotKey = Key { s, alt = true };
107 //borderStyle = none;
110 anchor = { left = 8, top = 16, right = 130 };
112 bool NotifyModified(EditBox editBox)
121 toggle = true, inactive = true;
124 anchor = { top = 16, right = 98 };
125 NotifyClicked = optionScale_NotifyClicked;
130 toggle = true, inactive = true;
133 anchor = { top = 16, right = 66 };
134 NotifyClicked = optionScale_NotifyClicked;
139 toggle = true, checked = true, inactive = true;
142 anchor = { top = 16, right = 34 };
143 NotifyClicked = optionScale_NotifyClicked;
148 toggle = true, inactive = true;
151 anchor = { top = 16, right = 4 };
152 NotifyClicked = optionScale_NotifyClicked;
158 toggle = true, inactive = true;
161 anchor = { left = 4, top = 41, right = 0.67f };
162 NotifyClicked = optionCompare_NotifyClicked
167 toggle = true, inactive = true;
170 anchor = { left = 0.34f, top = 41, right = 0.34f };
171 NotifyClicked = optionCompare_NotifyClicked;
176 toggle = true, checked = true, inactive = true;
179 anchor = { left = 0.67f, top = 41, right = 4 };
180 NotifyClicked = optionCompare_NotifyClicked;
183 bool optionScale_NotifyClicked(Button button, int x, int y, Modifiers mods)
185 optionGB.checked = (button == optionGB);
186 optionMB.checked = (button == optionMB);
187 optionKB.checked = (button == optionKB);
188 optionB.checked = (button == optionB);
193 bool optionCompare_NotifyClicked(Button button, int x, int y, Modifiers mods)
195 optionSmaller.checked = (button == optionSmaller);
196 optionEqual.checked = (button == optionEqual);
197 optionGreater.checked = (button == optionGreater);
201 bool Match(uint size)
203 if(optionSmaller.checked)
204 return size < compare;
205 else if(optionEqual.checked)
206 return size = compare;
207 else if(optionGreater.checked)
208 return size > compare;
216 compare = atoi(editBox.contents) * 1024 * 1024 * 1024;
217 else if(optionMB.checked)
218 compare = atoi(editBox.contents) * 1024 * 1024;
219 else if(optionKB.checked)
220 compare = atoi(editBox.contents) * 1024;
221 else if(optionB.checked)
222 compare = atoi(editBox.contents);
227 class PanelFileTextContent : PanelTextMatch
229 clientSize = { 200, 40 };
231 text = "Text Content";
232 hotKey = Key { x, alt = true };
235 class PanelLocation : Panel
237 clientSize = { 200, 40 };
240 hotKey = Key { l, alt = true };
242 FileDialog fileDialog
246 text = "Select Search Location...";
252 //borderStyle = none;
255 anchor = { left = 8, top = 16, right = 2 + 24 + 8 };
261 anchor = { top = 14, right = 8 };
262 toolId = ExplorerToolId::browse;
264 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
266 fileDialog.currentDirectory = editBox.contents;
267 if(fileDialog.Modal() == ok)
268 editBox.contents = fileDialog.filePath;
273 /*Button buttonBrowse
276 text = "Browse", hotKey = Key { b, alt = true };
278 anchor = { left = 8, top = 41, right = 8 };
284 return editBox.contents;
288 class PanelOptions : Panel
290 clientSize = { 200, 60 };
293 hotKey = Key { o, alt = true };
298 toggle = true, checked = true;
299 text = "Search Sub Directories", hotKey = Key { d, alt = true };
301 anchor = { left = 8, top = 16, right = 8 };
303 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
307 tree.disabled = false;
308 browser.disabled = false;
312 // I need a way to show this unchecked while keeping it original checked value
313 tree.disabled = true;
314 browser.disabled = true;
322 toggle = true, checked = true, inactive = true;
323 text = "Display Results With Tree", hotKey = Key { t, alt = true };
325 anchor = { left = 8, top = 40, right = 8 };
327 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
329 ExplorerSearch search = (ExplorerSearch)parent;
330 search.OptTree(button.checked);
337 toggle = true, checked = true, inactive = true;
338 text = "Show Browser", hotKey = Key { h, alt = true };
340 anchor = { left = 8, top = 60, right = 8 };
344 class PanelActions : Panel
346 clientSize = { 200, 38 };
349 hotKey = Key { o, alt = true };
355 text = "Start Search", hotKey = Key { s, alt = true };
357 anchor = { top = 16, right = 92 };
359 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
361 ExplorerSearch search = (ExplorerSearch)parent;
362 //--//if(!finderWnd.SearchStop())
363 search.SearchStart();
371 text = "Clear Results", hotKey = Key { c, alt = true };
373 anchor = { top = 16, right = 8 };
375 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
377 ExplorerSearch search = (ExplorerSearch)parent;
379 search.view.results.Clear();
380 search.view.browser.Clear();
381 button.disabled = true;