casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | Private Member Functions
asap.customgui_tkagg.NotationWindowTkAgg Class Reference

Notation box window ##. More...

Inheritance diagram for asap.customgui_tkagg.NotationWindowTkAgg:
asap.customgui_base.NotationWindowCommon

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

def asap.customgui_tkagg.NotationWindowTkAgg.__init__ (   self,
  master = None 
)

Reimplemented from asap.customgui_base.NotationWindowCommon.

Definition at line 218 of file customgui_tkagg.py.


Member Function Documentation

def asap.customgui_tkagg.NotationWindowTkAgg._ActionButtons (   self,
  parent = None 
) [private]
def asap.customgui_tkagg.NotationWindowTkAgg._AnchorRadio (   self,
  parent = None 
) [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().

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]
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._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().

Enable 'panel' and 'data' radio button

Definition at line 275 of file customgui_tkagg.py.

Referenced by asap.customgui_tkagg.NotationWindowTkAgg.show_textwindow().

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().

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._NewButton (   self,
  parent,
  text,
  command,
  side = Tk.LEFT 
) [private]
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.

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]
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.

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().


Member Data Documentation

Definition at line 233 of file customgui_tkagg.py.

Definition at line 223 of file customgui_tkagg.py.

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.


The documentation for this class was generated from the following file: