ؿEc@s dZdefdYZdS(s This module documents a class that creates an object that searches for text in the text editor's buffer. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright © 2005 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com tSearchPreviouscBs_eZdZdZdZdZdZdZdZdZ dZ d Z RS( s This class implements an object that searches for a text in the text editor's buffer without showing the any search interfaces. The text to be searched is determined by the last query in the search and replace manager. cCs|id|i||iid|i|_|iid|i|_|iid|i |_ |id|i |_ |i dS(s Initialize the object. @param self: Reference to the SearchPrevious instance. @type self: A SearchPrevious object. @param editor: Reference to the text editor. @type editor: An Editor object. t!initialize_search_replace_managersbutton-press-eventskey-press-events insert-texttdestroyN(ttriggert _SearchPrevious__init_attributesttextviewtconnectt&_SearchPrevious__button_press_event_cbt_SearchPrevious__signal_id_1t#_SearchPrevious__key_press_event_cbt_SearchPrevious__signal_id_2t textbuffert_SearchPrevious__insert_text_cbt_SearchPrevious__signal_id_3t_SearchPrevious__destroy_cbt_SearchPrevious__signal_id_4t_SearchPrevious__block_signals(tselfRteditor((s&plugins/SearchPreviousNext/Previous.pyt__init__(s   cCsF||_|iid|_d|_d|_d|_t|_ dS(s Initialize data attributes. @param self: Reference to the SearchPrevious instance. @type self: A SearchPrevious object. @param editor: Reference to the text editor. @type editor: An Editor object. tSearchReplaceManagerN( t_SearchPrevious__editortstoret get_objectt'_SearchPrevious__search_replace_managertNoneRR R tFalset"_SearchPrevious__signal_is_blocked(RR((s&plugins/SearchPreviousNext/Previous.pyt__init_attributes;s     cCs|iip|iiddSn|iidjo.ddkl}|iii |ddSn|i o|i n|ii dS(s Search for text in the buffer. @param self: Reference to the SearchPrevious instance. @type self: A SearchPrevious object. t show_findbarNi(tmsg0001twarning( RtqueriesRRtindexRti18nRtfeedbacktupdate_status_messageRt _SearchPrevious__unblock_signalstprevious(RR((s&plugins/SearchPreviousNext/Previous.pyR&Ms   cCs+|i|iit|iitS(s Handles callback when the "button-press-event" is emitted. @param self: Reference to the SearchPrevious instance. @type self: A SearchPrevious object. @param textview: The text editor's view. @type textview: A ScribesTextView object. @param event: An event that happens when the mouse buttons are pressed. @type event: An Event object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. (RRtenable_incremental_searchingRtreset(RRtevent((s&plugins/SearchPreviousNext/Previous.pyt__button_press_event_cb`s  cGs+|i|iit|iitS(s< Handles callback when the "insert-text" signal is emitted. @param self: Reference to the SearchPrevious instance. @type self: A SearchPrevious object. @param *args: The callback arguments. @type *args: A List object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. (RRR'RR((Rtargs((s&plugins/SearchPreviousNext/Previous.pyt__insert_text_cbus  cCsUddkl}||idjo+|i|iit|iintS(s Handles callback when the "key-press-event" is emitted. @param self: Reference to the SearchPrevious instance. @type self: A SearchPrevious object. @param textview: The text editor's view. @type textview: A ScribesTextView object. @param event: An event that happens when the mouse buttons are pressed. @type event: An Event object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. i(t keyval_nametEscape(R.(tgtk.gdkR-tkeyvalRRR'RR((RRR)R-((s&plugins/SearchPreviousNext/Previous.pyt__key_press_event_cbs  cCsO|iii|i|iii|i|iii|it|_dS(s Block signals associated with this object. @param self: Reference to the SearchPrevious instance. @type self: A SearchPrevious object. N( RRt handler_blockRR R R tTrueR(R((s&plugins/SearchPreviousNext/Previous.pyt__block_signalss  cCsO|iii|i|iii|i|iii|it|_dS(s Unblock signals associated with this object. @param self: Reference to the SearchPrevious instance. @type self: A SearchPrevious object. N( RRthandler_unblockRR R R RR(R((s&plugins/SearchPreviousNext/Previous.pyt__unblock_signalss  cCsddkl}l}||i|ii||i|ii||i|ii||i |||d}~dS(s Handles callback when the "destroy" signal is emitted. @param self: Reference to the SearchNext instance. @type self: A SearchNext object. @param trigger: Trigger to activate searching. @type trigger: A Trigger object. i(tdelete_attributestdisconnect_signalN( t SCRIBES.utilsR7R8RRRR R R RR(RRR7R8((s&plugins/SearchPreviousNext/Previous.pyt __destroy_cbs  ( t__name__t __module__t__doc__RRR&RR R RR%R(((s&plugins/SearchPreviousNext/Previous.pyR s       N(R=tobjectR(((s&plugins/SearchPreviousNext/Previous.pyss