Notation box window ##. More...
Public Member Functions | |
def | __init__ |
def | load_textwindow |
def | show_textwindow |
def | close_textwindow |
def | load_modmenu |
def | close_modmenu |
def | close_widgets |
close all widgets | |
Public Attributes | |
parent | |
anchval | |
textwin | |
menu | |
textbox | |
radio | |
actionbs | |
rFig | |
rAxis | |
rData | |
event | |
seltext | |
Private Member Functions | |
def | _create_textwindow |
Notation window widget. | |
def | _NotationBox |
def | _AnchorRadio |
def | _NewRadioButton |
def | _enable_radio |
def | _reset_radio |
def | _select_radio |
def | _get_anchval |
def | _get_note |
def | _clear_textbox |
def | _set_note |
def | _ActionButtons |
def | _NewButton |
def | _cancel_text |
def | _print_text |
def | _create_modmenu |
Modify/Delete menu widget. | |
def | _modify_note |
load text window for modification | |
def | _delnote_dialog |
dialog to confirm deleting note | |
def | _disppix2screen |
helper functions |
Notation box window ##.
Backend based class to create widgets to add, modify, or delete note on the plot. Note: Press LEFT-mouse button on the plot to ADD a note on the canvas. A notation window will be loaded for specifying note string and anchor. The note will be anchored on a position in whether figure- (0-1 relative in a figure), panel- (0-1 relative in a plot axes), or data-coordinate (data value in a plot axes). Press RIGHT-mouse button on a note to MODIFY/DELETE it. A cascade menu will be displayed and you can select an operation.
Definition at line 204 of file customgui_tkagg.py.
def asap.customgui_tkagg.NotationWindowTkAgg.__init__ | ( | self, | |
master = None |
|||
) |
Reimplemented from asap.customgui_base.NotationWindowCommon.
Definition at line 218 of file customgui_tkagg.py.
def asap.customgui_tkagg.NotationWindowTkAgg._ActionButtons | ( | self, | |
parent = None |
|||
) | [private] |
Definition at line 320 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg._cancel_text(), asap.customgui_qt4agg.NotationWindowQT4Agg._cancel_text(), asap.customgui_tkagg.CustomToolbarTkAgg._NewButton(), asap.customgui_qt4agg.CustomToolbarQT4Agg._NewButton(), asap.customgui_tkagg.NotationWindowTkAgg._NewButton(), asap.customgui_qt4agg.NotationWindowQT4Agg._NewButton(), asap.customgui_qt4agg.CustomFlagToolbarQT4Agg._NewButton(), asap.customgui_tkagg.NotationWindowTkAgg._print_text(), and asap.customgui_qt4agg.NotationWindowQT4Agg._print_text().
def asap.customgui_tkagg.NotationWindowTkAgg._AnchorRadio | ( | self, | |
parent = None |
|||
) | [private] |
Definition at line 252 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg.anchval, and asap.customgui_qt4agg.NotationWindowQT4Agg.anchval.
def asap.customgui_tkagg.NotationWindowTkAgg._cancel_text | ( | self | ) | [private] |
Cancel adding/modifying a note and close notaion window. called when 'cancel' is selected.
Definition at line 334 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg.close_textwindow(), and asap.customgui_qt4agg.NotationWindowQT4Agg.close_textwindow().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._ActionButtons().
def asap.customgui_tkagg.NotationWindowTkAgg._clear_textbox | ( | self | ) | [private] |
Clear the text box
Definition at line 310 of file customgui_tkagg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._set_note().
def asap.customgui_tkagg.NotationWindowTkAgg._create_modmenu | ( | self, | |
master = None |
|||
) | [private] |
Modify/Delete menu widget.
Create modify/delete menu widget
Definition at line 401 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg._delnote_dialog(), asap.customgui_qt4agg.NotationWindowQT4Agg._delnote_dialog(), asap.customgui_tkagg.NotationWindowTkAgg._modify_note(), asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note(), asap.customgui_tkagg.NotationWindowTkAgg.parent, and asap.customgui_qt4agg.NotationWindowQT4Agg.parent.
def asap.customgui_tkagg.NotationWindowTkAgg._create_textwindow | ( | self, | |
master = None |
|||
) | [private] |
Notation window widget.
Create notation window widget and iconfy it
Definition at line 226 of file customgui_tkagg.py.
def asap.customgui_tkagg.NotationWindowTkAgg._delnote_dialog | ( | self | ) | [private] |
dialog to confirm deleting note
Load dialog to confirm deletion of the text
Definition at line 460 of file customgui_tkagg.py.
References asap.customgui_base.NotationWindowCommon.cancel_delete(), asap.customgui_base.NotationWindowCommon.delete_note(), asap.customgui_tkagg.NotationWindowTkAgg.parent, asap.customgui_qt4agg.NotationWindowQT4Agg.parent, and asap.customgui_base.NotationWindowCommon.seltext.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._create_modmenu().
def asap.customgui_tkagg.NotationWindowTkAgg._disppix2screen | ( | self, | |
xpixd, | |||
ypixd | |||
) | [private] |
helper functions
helper function to calculate a pixel position form Upper-left corner of the SCREEN from a pixel position (xpixd, ypixd) from Lower-left of the CANVAS (which, e.g., event.x/y returns) Returns: (x, y): pixel position from Upper-left corner of the SCREEN.
Definition at line 472 of file customgui_tkagg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note().
def asap.customgui_tkagg.NotationWindowTkAgg._enable_radio | ( | self | ) | [private] |
Enable 'panel' and 'data' radio button
Definition at line 275 of file customgui_tkagg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg.show_textwindow().
def asap.customgui_tkagg.NotationWindowTkAgg._get_anchval | ( | self | ) | [private] |
Returns a integer of a selected radio button
Definition at line 300 of file customgui_tkagg.py.
Referenced by asap.customgui_base.NotationWindowCommon.print_text().
def asap.customgui_tkagg.NotationWindowTkAgg._get_note | ( | self | ) | [private] |
Returns a note string specified in the text box
Definition at line 304 of file customgui_tkagg.py.
Referenced by asap.customgui_base.NotationWindowCommon.print_text().
def asap.customgui_tkagg.NotationWindowTkAgg._modify_note | ( | self | ) | [private] |
load text window for modification
helper function to load text window to modify selected note
Definition at line 435 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg._disppix2screen(), asap.customgui_qt4agg.NotationWindowQT4Agg._disppix2screen(), asap.customgui_base.NotationWindowCommon._get_axes_from_pos(), asap.customgui_tkagg.NotationWindowTkAgg._select_radio(), asap.customgui_qt4agg.NotationWindowQT4Agg._select_radio(), asap.customgui_tkagg.NotationWindowTkAgg._set_note(), asap.customgui_qt4agg.NotationWindowQT4Agg._set_note(), asap.asaplot.asaplot.canvas, asap.asaplotgui_qt4.asaplotgui.canvas, asap.asaplotgui.asaplotgui.canvas, asap.asaplotgui_gtk.asaplotgui.canvas, asap.asaplotbase.asaplotbase.canvas, asap.customgui_base.NotationWindowCommon.canvas, asap.customgui_base.NotationWindowCommon.seltext, asap.customgui_tkagg.NotationWindowTkAgg.show_textwindow(), and asap.customgui_qt4agg.NotationWindowQT4Agg.show_textwindow().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._create_modmenu().
def asap.customgui_tkagg.NotationWindowTkAgg._NewButton | ( | self, | |
parent, | |||
text, | |||
command, | |||
side = Tk.LEFT |
|||
) | [private] |
Definition at line 326 of file customgui_tkagg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._ActionButtons().
def asap.customgui_tkagg.NotationWindowTkAgg._NewRadioButton | ( | self, | |
parent, | |||
text, | |||
state = Tk.NORMAL , |
|||
variable = None , |
|||
value = None , |
|||
side = Tk.LEFT |
|||
) | [private] |
Definition at line 269 of file customgui_tkagg.py.
def asap.customgui_tkagg.NotationWindowTkAgg._NotationBox | ( | self, | |
parent = None |
|||
) | [private] |
Definition at line 244 of file customgui_tkagg.py.
def asap.customgui_tkagg.NotationWindowTkAgg._print_text | ( | self | ) | [private] |
Add/Modify a note. Called when 'print' is selected on the notation window.
Definition at line 341 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg.close_textwindow(), asap.customgui_qt4agg.NotationWindowQT4Agg.close_textwindow(), and asap.customgui_base.NotationWindowCommon.print_text().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._ActionButtons().
def asap.customgui_tkagg.NotationWindowTkAgg._reset_radio | ( | self | ) | [private] |
Disable 'panel' and 'data' radio button
Definition at line 282 of file customgui_tkagg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg.show_textwindow().
def asap.customgui_tkagg.NotationWindowTkAgg._select_radio | ( | self, | |
selection | |||
) | [private] |
Select a specified radio button
Definition at line 289 of file customgui_tkagg.py.
References asap.customgui_base.NotationWindowCommon.anchors.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note().
def asap.customgui_tkagg.NotationWindowTkAgg._set_note | ( | self, | |
note = None |
|||
) | [private] |
Set a note string to the text box
Definition at line 314 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg._clear_textbox(), and asap.customgui_qt4agg.NotationWindowQT4Agg._clear_textbox().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note().
Close cascade menu.
Definition at line 429 of file customgui_tkagg.py.
References asap.customgui_base.NotationWindowCommon.seltext.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg.close_widgets(), and asap.customgui_tkagg.NotationWindowTkAgg.load_textwindow().
Close text window.
Definition at line 392 of file customgui_tkagg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._cancel_text(), asap.customgui_tkagg.NotationWindowTkAgg._print_text(), asap.customgui_tkagg.NotationWindowTkAgg.close_widgets(), and asap.customgui_tkagg.NotationWindowTkAgg.load_modmenu().
close all widgets
Close note window and menu
Definition at line 454 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg.close_modmenu(), asap.customgui_qt4agg.NotationWindowQT4Agg.close_modmenu(), asap.customgui_tkagg.NotationWindowTkAgg.close_textwindow(), and asap.customgui_qt4agg.NotationWindowQT4Agg.close_textwindow().
def asap.customgui_tkagg.NotationWindowTkAgg.load_modmenu | ( | self, | |
event | |||
) |
Load cascade menu at a event position to modify or delete selected text. Parameter: event: an even object to specify the position to load text window.
Definition at line 412 of file customgui_tkagg.py.
References asap.customgui_base.NotationWindowCommon._get_selected_text(), asap.customgui_tkagg.NotationWindowTkAgg.close_textwindow(), asap.customgui_qt4agg.NotationWindowQT4Agg.close_textwindow(), and asap.customgui_base.NotationWindowCommon.seltext.
def asap.customgui_tkagg.NotationWindowTkAgg.load_textwindow | ( | self, | |
event | |||
) |
Load text window at a event position to add a note on a plot. Parameter: event: an even object to specify the position to load text window.
Definition at line 349 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg.close_modmenu(), asap.customgui_qt4agg.NotationWindowQT4Agg.close_modmenu(), asap.customgui_tkagg.NotationWindowTkAgg.parent, and asap.customgui_qt4agg.NotationWindowQT4Agg.parent.
def asap.customgui_tkagg.NotationWindowTkAgg.show_textwindow | ( | self, | |
xpix, | |||
ypix, | |||
basetext = None , |
|||
enableaxes = False |
|||
) |
Load text window at a position of screen to add a note on a plot. Parameters: xpix, ypix: a pixel position from Upper-left corner of the screen. basetext: None (default) or any string. A string to be printed on text box when loaded. enable axes: False (default) or True. If True, 'panel' & 'data' radio button is enabled.
Definition at line 366 of file customgui_tkagg.py.
References asap.customgui_tkagg.NotationWindowTkAgg._enable_radio(), asap.customgui_qt4agg.NotationWindowQT4Agg._enable_radio(), asap.customgui_tkagg.NotationWindowTkAgg._reset_radio(), asap.customgui_qt4agg.NotationWindowQT4Agg._reset_radio(), asap.customgui_tkagg.NotationWindowTkAgg.textwin, and asap.customgui_qt4agg.NotationWindowQT4Agg.textwin.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note().
Definition at line 233 of file customgui_tkagg.py.
Definition at line 221 of file customgui_tkagg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._AnchorRadio().
Reimplemented from asap.customgui_base.NotationWindowCommon.
Definition at line 360 of file customgui_tkagg.py.
Referenced by asap.interactivemask.interactivemask.finish_selection(), asap.interactivemask.interactivemask.select_mask(), and asap.interactivemask.interactivemask.set_startevent().
Definition at line 223 of file customgui_tkagg.py.
Definition at line 219 of file customgui_tkagg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._create_modmenu(), asap.customgui_tkagg.NotationWindowTkAgg._delnote_dialog(), and asap.customgui_tkagg.NotationWindowTkAgg.load_textwindow().
Definition at line 232 of file customgui_tkagg.py.
Definition at line 259 of file customgui_tkagg.py.
Definition at line 262 of file customgui_tkagg.py.
Definition at line 256 of file customgui_tkagg.py.
Reimplemented from asap.customgui_base.NotationWindowCommon.
Definition at line 394 of file customgui_tkagg.py.
Definition at line 231 of file customgui_tkagg.py.
Definition at line 222 of file customgui_tkagg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg.show_textwindow().