łň ;cFc@s dZdefd„ƒYZdS(s This module documents a class that creates a trigger to perform paragraph operations. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright Š 2007 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com tTriggercBsheZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z RS( sś This class creates triggers for paragraph operations. Operations: - select paragraph - move cursor to next paragraph - move cursor to previous paragraph - paragraph fill cCs˘|i|ƒ|iƒ|iid|iƒ|_|iid|iƒ|_|i id|i ƒ|_ |i id|i ƒ|_|iid|iƒ|_dS(s Initialize the trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param editor: Reference to the text editor. @type editor: An Editor object. tactivatespopulate-popupN(t_Trigger__init_attributest_Trigger__create_triggerst"_Trigger__select_paragraph_triggertconnectt_Trigger__select_cbt_Trigger__signal_id_1t _Trigger__next_paragraph_triggert_Trigger__next_cbt_Trigger__signal_id_2t$_Trigger__previous_paragraph_triggert_Trigger__previous_cbt_Trigger__signal_id_3t"_Trigger__reflow_paragraph_triggert_Trigger__reflow_cbt_Trigger__signal_id_4ttextviewt connect_aftert_Trigger__popup_cbt_Trigger__signal_id_5(tselfteditor((splugins/Paragraph/Trigger.pyt__init__*s  cCsg||_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ dS(sĎ Initialize the trigger's attributes. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param editor: Reference to the text editor. @type editor: An Editor object. N( t_Trigger__editortNonet_Trigger__managerRRR RR RR RR(RR((splugins/Paragraph/Trigger.pyt__init_attributes<s           cCs¨ddkl}|dƒ|_|ii|idƒ|dƒ|_|ii|idƒ|dƒ|_|ii|idƒ|d ƒ|_|ii|id ƒd S( sl Create the trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. i˙˙˙˙(Rtselect_paragraphsalt - ptnext_paragraphs alt - Downtprevious_paragraphsalt - Uptreflow_paragraphsalt - qN(tSCRIBES.triggerRRRt add_triggerRR R(RR((splugins/Paragraph/Trigger.pyt__create_triggersSscCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. i˙˙˙˙(tManagerN(RRtAttributeErrorR#R(RttriggerR#((splugins/Paragraph/Trigger.pyt __select_cbls cCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. i˙˙˙˙(R#N(RRR$R#R(RR%R#((splugins/Paragraph/Trigger.pyt __previous_cb~s cCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. i˙˙˙˙(R#N(RRR$R#R(RR%R#((splugins/Paragraph/Trigger.pyt __next_cbs cCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. i˙˙˙˙(R#N(RRR$R#R(RR%R#((splugins/Paragraph/Trigger.pyt __reflow_cb˘s cCsddkl}l}|i|i|i|ig}||i|iƒ||i|iƒ||i |iƒ||i |iƒ||i |i i ƒ|i i|iƒ|i i|iƒ|i i|iƒ|i i|iƒ|io|iiƒn||ƒ~d}dS(si Destroy trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. i˙˙˙˙(tdisconnect_signaltdelete_attributesN(t SCRIBES.utilsR*R+RR RRRR R RRRRtremove_triggerRtdestroyR(RR*R+ttriggers((splugins/Paragraph/Trigger.pyt __destroy´s"  cCs|iƒdS(si Destroy trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. N(t_Trigger__destroy(R((splugins/Paragraph/Trigger.pyR.Ís cCs4ddkl}|i||iƒƒ|iƒtS(s– Handles callback when the "populate-popup" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. i˙˙˙˙(t PopupMenuItem(R2tprependRtshow_alltFalse(RRtmenuR2((splugins/Paragraph/Trigger.pyt __popup_cb×s ( t__name__t __module__t__doc__RRRRR R RR1R.R(((splugins/Paragraph/Trigger.pyR s         N(R:tobjectR(((splugins/Paragraph/Trigger.pyss