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

Notation box window ##. More...

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

List of all members.

Public Member Functions

def __init__
def print_text
def delete_note
def cancel_delete

Public Attributes

 canvas
 event
 note
 anchors
 seltext
 numnote

Private Member Functions

def _get_axes_from_pos
def _oldpos2new
 WORKAROUND for old matplotlib.
def _convert_pix2dat
def _get_selected_text
def _get_text_dist2
def _remove_seltext

Detailed Description

Notation box window ##.

A base class to define the functions that the backend-based
GUI notation class must implement to print/modify/delete notes on a canvas.

The following methods *must* be implemented in the backend-based
parent class:
    _get_note : get text in text box
    _get_anchval : get anchor value selected

Definition at line 424 of file customgui_base.py.


Constructor & Destructor Documentation

def asap.customgui_base.NotationWindowCommon.__init__ (   self,
  master = None 
)

Member Function Documentation

def asap.customgui_base.NotationWindowCommon._convert_pix2dat (   self,
  pos,
  axes 
) [private]
helper function to convert a position in figure-coord (0-1) to
data-coordinate of the axes        

Definition at line 568 of file customgui_base.py.

References asap.customgui_base.NotationWindowCommon._oldpos2new().

Referenced by asap.customgui_base.NotationWindowCommon.print_text().

def asap.customgui_base.NotationWindowCommon._get_axes_from_pos (   self,
  pos,
  canvas 
) [private]
def asap.customgui_base.NotationWindowCommon._get_selected_text (   self,
  event 
) [private]
helper function to return a dictionary of the nearest note to the event.

Definition at line 596 of file customgui_base.py.

References asap.customgui_base.NotationWindowCommon._get_text_dist2().

Referenced by asap.customgui_tkagg.NotationWindowTkAgg.load_modmenu(), and asap.customgui_qt4agg.NotationWindowQT4Agg.load_modmenu().

def asap.customgui_base.NotationWindowCommon._get_text_dist2 (   self,
  event,
  textobj 
) [private]
helper function to calculate square of distance between
a event position and a text object. 

Definition at line 633 of file customgui_base.py.

Referenced by asap.customgui_base.NotationWindowCommon._get_selected_text().

def asap.customgui_base.NotationWindowCommon._oldpos2new (   self,
  oldpos = None 
) [private]
Cancel deleting the selected note.
Called when 'cancel' button selected on confirmation dialog.

Definition at line 671 of file customgui_base.py.

References asap.customgui_base.NotationWindowCommon.seltext.

Referenced by asap.customgui_tkagg.NotationWindowTkAgg._delnote_dialog(), and asap.customgui_qt4agg.NotationWindowQT4Agg._delnote_dialog().


Member Data Documentation

Definition at line 438 of file customgui_base.py.


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