You are on page 1of 7

--------------------------------------------------------------QSearch plugin for AkelPad text editor --------------------------------------------------------------This plugin is a small panel for "quick" text search.

The plugin function (QSearch::QSearch) is assumed to be assigned with a hot-key (for example, F7). QSearch dialog's keys: Enter, F3 - find next (down) Shift+Enter - find previous (up) Ctrl+Enter - find from file's beginning Alt+Enter - pick up selected text Esc - close the dialog Ctrl+Del - edit control: erase the text after the caret (to the right) Ctrl+BS - edit control: erase the text before the caret (to the left) Ctrl+A - edit control: select all the text The plugin also contains two functions: SelFindNext and SelFindPrev for quick searching for selected word/phrase below or above in the text right in the editor window. The behaviour of these functions depends on general QSearch'es options (in its popup menu or in the ini-file, see below). Furthermore, the functions QSearch::QSearch and QSearch::SelFindNext/Prev may search for different text (QSearch::QSearch - for text entered in the search field, and QSearch::SelFindNext/Prev - for text selected in the editor window). These functions are assumed to be assigned with hot-keys (for example, Ctrl+Alt+Right and Ctrl+Alt+Left). Example of usage: select a word in the editor window and call the function SelFindNext or SelFindPrev. As a result, the selection moves to next or previous word matching the initially selected word. The DialogSwitcher function allows to switch between the "Find", "Replace", "Go to line" and the QSearch dialogs using corresponding hotkeys. For example, Ctrl+H in the "Find" dialog changes this dialog to the "Replace" dialog. If you use the DialogSwitcher function, it is recommended to enable (check) the function's autoload checkbox in the plugins options window. Additional options (QSearch dialog's popup menu or file "AkelFiles\Plugs\QSearch.ini"): 1) "Search: On-the-fly mode" srch_onthefly_mode = 1 The search is (re)started each time you press a key in the QSearch'es edit control. When this option is enabled, srch_use_specialchars is disabled. srch_onthefly_mode = 0 The search is started when Enter is pressed. 2) "Search: Always from beginning" srch_from_beginning = 0 The search will be continued from current file position when a searched text is changed. srch_from_beginning = 1 The search will be continued from the beginning of current file. 3) "Search: Use special characters ( \n, \t, * and ? )"

srch_use_specialchars = 1 The special characters can be used in the search. When this option is enabled, srch_onthefly_mode is disabled. \n - line feed \t - tabulation \\ - backslash ( '\' ) \* - asterisk ( '*' ) \? - question mark ( '?' ) ? - matches any single character ( e.g. 'b', '0', ' ', etc. ) * - matches any 0 or more characters (i.e. any (sub)string) ** - matches any 0 or more non-space characters ("Whole word" enabled) Note: ? and * does not match line feeds, you must use \n obviously. srch_use_specialchars = 0 Ordinary search, "as is". 4) "Search: Pick up selected text" srch_pickup_selection = 1 When QSearch is activated or F3 is pressed in AkelPad's editor window, QSearch'es edit control picks up the text selected in AkelPad's editor window. srch_pickup_selection = 0 When QSearch is activated, the text in its edit control is not changed. 5) "Search: SelFind picks up selected text" srch_selfind_pickup = 0 When SelFindNext or SelFindPrev is called, the text in QSearch'es edit control is not changed. srch_selfind_pickup = 1 When SelFindNext or SelFindPrev is called, the QSearch'es edit control picks up the text selected in AkelPad's editor window. 6) "Search: Stop at EOF (end of file)" srch_stop_eof = 0 When the end of file is reached, the search is continued from the beginning of the file. srch_stop_eof = 1 When the end of file is reached, the corresponding message is shown. 7) "Window: Docked top" srch_wnd_dockedtop = 1 The QSearch'es window is docked to the top of AkelPad's client area. srch_wnd_dockedtop = 0 The QSearch'es window is docked to the bottom of AkelPad's client area. 8) "Window: Select all when focused" edit_focus_selectall = 1 Each time QSearch'es edit control becomes focused, all its text content becomes selected. edit_focus_selectall = 0 The text content becomes selected only when QSearch::QSearch is called explicitly. 9) "Window: Catch main F3" catch_main_f3 = 1 When F3 (Shift+F3) is pressed in AkelPad's editor window, the QSearch plugin continues searching if there was no previous call to AkelPad's standard Find or Replace Dialog. catch_main_f3 = 0

Standard AkelPad behaviour. 10) "Window: Catch main Esc" catch_main_esc = 1 When Esc key is pressed in AkelPad's editor window and the QSearch'es window is visible, it becomes hidden. catch_main_esc = 0 The QSearch'es window does not catch the Esc key; it is processed by AkelPad (default behaviour). Also you can manually set one of the following values: catch_main_esc = 10 When Esc key is pressed in QSearch'es window, it is passed to AkelPad to be processed by the editor itself (by default - exits the program). When "Window: Catch main Esc" is checked, the value of 'catch_main_esc' is set to 11. catch_main_esc = 11 Works in the same way as catch_main_esc = 1. When "Window: Catch main Esc" is unchecked, the value of 'catch_main_esc' is set to 10. 11) "Window: Hotkey closes the window" hotkey_closes_wnd = 1 When you press the plugin hot-key in QSearch'es window, the window is closed (becomes hidden - the same as when Esc is pressed). hotkey_closes_wnd = 0 When you press the plugin hot-key in QSearch'es window, the AkelPad's editor window becomes focused. 12) "Window: Editor auto-focus" editor_autofocus = 11 When QSearch has the keyboard focus and mouse pointer leaves QSearch'es edit control and moves to AkelPad's editor window, the editor window becomes focused. When mouse pointer moves to QSearch'es edit control, the edit control becomes focused. When "Window: Editor auto-focus" is unchecked, the value of 'editor_autofocus' is set to 10. editor_autofocus = 10 When mouse pointer moves to QSearch'es edit control, the edit control becomes focused. When "Window: Editor auto-focus" is checked, the value of 'editor_autofocus' is set to 11. Also you can manually set one of the following values: editor_autofocus = 1 Works in the same way as editor_autofocus = 11. When "Window: Editor auto-focus" is unchecked, the value of 'editor_autofocus' is set to 0. editor_autofocus = 0 Nothing special happens: neither QSearch'es edit control nor AkelPad's editor window become focused automatically when mouse pointer moves to. When "Window: Editor auto-focus" is checked, the value of 'editor_autofocus' is set to 1. 13) dock_rect_disabled = 1 If this option is manually set to 1, the docked window's coordinates will not be saved. 14) dock_rect = ... (internal parameter, auto-saved when 'dock_rect_disabled' is 0)

15) color_notfound = FFE0E000 Background colour to be set when the searched text is not found. This colour is specified in a form of "RRGGBB00", where RR, GG and BB are hex values of red, green and blue colours (from 00 to FF). 16) color_eof = E4FFE400 Background colour to be set when the search passes the end of file (and continues from the beginning of file). This colour is specified in a form of "RRGGBB00", where RR, GG and BB are hex values of red, green and blue colours (from 00 to FF). You can set "color_eof = FFFFFF00" to disable the colour change. 17) color_highlight = C0FFC000 Background colour of the text to be highlighted when "Highlight all" is checked. This colour is specified in a form of "RRGGBB00", where RR, GG and BB are hex values of red, green and blue colours (from 00 to FF). 18) highlight_mark_id = 1001 'ID' parameter for the HighLight plugin when QSearch calls its function "HighLight::Main" to highlight (mark) the text. 19) highlight_state = 0 (auto-saved when "Highlight all" is checked or unchecked). Also you can manually set one of the following values: highlight_state = 10 When AkelPad starts, "Highlight all" is always unchecked. highlight_state = 11 When AkelPad starts, "Highlight all" is always checked. 20) use_alt_hotkeys = 0 QSearch panel's additional accelerator keys are disabled. use_alt_hotkeys = 1 The following additional accelerator keys are available in QSearch panel: Alt+alt_match_case (Alt+C) - Match case on/off Alt+alt_whole_word (Alt+W) - Whole word on/off Alt+alt_highlight_all (Alt+H) - Highlight all on/off 21) alt_match_case = 67 When 'use_alt_hotkeys' is enabled (set to 1), this parameter specifies an accelerator key code for QSearch'es "Match case" check-box. The default value of 67 means a 'C' key i.e. the accelerator is Alt+C. The value of this key code can be calculated as (letter - 'A' + 65). I.e. 65 means Alt+A, 66 means Alt+B, 67 means Alt+C and so on. Also, 48 means Alt+0, 49 means Alt+1, 50 means Alt+2 and so on. For more details, refer to Virtual-Key Codes in MSDN. 22) alt_whole_word = 87 When 'use_alt_hotkeys' is enabled (set to 1), this parameter specifies an accelerator key code for QSearch'es "Whole word" check-box. The default value of 87 means a 'W' key i.e. the accelerator is Alt+W. See 'alt_match_case' for more details. 23) alt_highlight_all = 72 When 'use_alt_hotkeys' is enabled (set to 1), this parameter specifies an accelerator key code for QSearch'es "Highlight all" check-box. The default value of 72 means a 'H' key i.e. the accelerator is Alt+H. See 'alt_match_case' for more details.

24) find_history_items = 15 Maximum number of items in the find history (drop-down list). You can set it to 0 to disable the find history. 25) history_save = 3 When set to 3, the find history "Whole word" state are saved to When set to 2, "Match case" and the System Registry. When set to 1, the find history When set to 0, the find history together with "Match case" and the System Registry. "Whole word" state are saved to is saved to the System Registry. and the state are not saved.

-------History: -------v.4.0 (December 2010) + experimental: "Whole word" while searching with special characters (when enabled, "**" matches any 0 or more non-space characters) + "Match case" and "Whole word" state can be saved (the value of 'history_save' must be set to 3 manually!) v.3.9 (October 2010) * for AkelPad 4.5.0+ v.3.8 (September 2010) * non-active AkelPad window does not intercept the keyboard focus now * icon added v.3.7 (September 2010) * 3rd anniversary of QSearch :) * 'srch_pickup_selection' behaviour changed + added: 'editor_autofocus' v.3.6 (September 2010) + small improvements v.3.5 (August 2010) - fixed: "Highlight all" did not work with 'srch_pickup_selection' + added: find history + new option: find_history_items + new option: history_save v.3.4 (August 2010) + if no selection, SelFindNext/Prev selects current word v.3.3 (July 2010) - Coder::HighLight detection improved - PMDI compatibility improved - now Uninitialize() is called at AKDN_MAIN_ONFINISH v.3.2 (June 2010) * for AkelPad 4.4.4+ + 'catch_main_esc' option extended v.3.1 (May 2010) + now QSearchDlg uses "MS Shell Dlg" font v.3.0 (March 2010) + now special characters can be used with the on-the-fly mode

v.2.9 (February 2010) - fixed: Ctrl+Z did not work after Ctrl+Del or Ctrl+BS v.2.8 (February 2010) * for AkelPad 3.7.4+/4.4.0+ + QSearchDlg: Ctrl+Del, Ctrl+BS, Ctrl+A own processing v.2.7 (October 2009) * now DialogSwitcher's SetWindowsHookEx() uses GetCurrentThreadId() v.2.6 (October 2009) + new options for QSearch panel's additional accelerator keys - fixed: now 'alt_whole_word' does not work when "Whole word" is hidden v.2.5 (October 2009) + new option: color_eof + new option: use_alt_hotkeys v.2.4 (September 2009) * DialogSwitcher works with AkelPad 4.3.2+ - fixed: input window's repainting problem when searching mode is not "on-the-f ly" - fixed: "Whole word" checkbox did not fire QSEARCH_FIRST + added: new values for the 'highlight_state' parameter v.2.3 (September 2009) * 2nd anniversary of QSearch :) + added: "Highlight all" state is saved - fixed: incorrect behaviour when Shift pressed while searching on-the-fly - fixed: sometimes QSearch proceeded to search when the hot-key was pressed v.2.2 (August 2009) + added: "Highlight all" function (the Highlight plugin must be active) * for AkelPad 3.7.3+/4.3.0+ * works with the Highlight plugin v.4.7 or higher v.2.1 (March 2009) * for AkelPad 3.7.0+/4.2.0+ v.2.0 (March 2009) - fixed (DialogSwitcher): edit window's horizontal scroll-bar was not repainted when switching from Find/Replace dialog to QSearch panel v.1.9 (December 2008) + new function: DialogSwitcher v.1.8 (October 2008) + fixed: when Shift was pressed, SelFindNext worked as SelFindPrev v.1.7 (October 2008) + fixed: continued searching in MDI mode with hidden QSearch panel v.1.6 (August 2008) + new option: srch_selfind_pickup v.1.5 (July 2008) * for AkelPad 3.6.0+ v.1.4 (June 2008)

* for AkelPad 3.5.5+ + new functions: SelFindNext, SelFindPrev v.1.3 (May 2008) * for AkelPad 3.5.5+ + catches F3 (Find next/previous) from AkelPad's main window + small improvements v.1.2 (April 2008) * for AkelPad 3.5.5+ + built-in Russian and Ukrainian interface languages + additional options and features v.1.1 (March 2008) * for AkelPad 3.5.3+ + now the plugin's window is docked + small improvements + additional options v.1.0 (September 2007) * initial version * for AkelPad 3.3.x/3.4.x The author expresses his thanks to Aleksander Shengalts aka Instructor for the AkelPad text editor ;-) --------------------------------------------------------------------------The original icon by Yusuke Kamiyamane, http://p.yusukekamiyamane.com/ The icon has been modified by DV. --------------------------------------------------------------------------(C) Sep 2007 - Dec 2010, Vitaliy Dovgan aka DV dvv81 <at> ukr <dot> net

You might also like