Methods
|
|
|
|
__get_arrows
|
__get_arrows ( self )
arrows
|
|
__get_full_path
|
__get_full_path ( self )
|
|
__get_molecules
|
__get_molecules ( self )
molecules
|
|
__get_pluses
|
__get_pluses ( self )
pluses
|
|
__get_texts
|
__get_texts ( self )
texts
|
|
__get_top_levels
|
__get_top_levels ( self )
top_levels
|
|
__get_vectors
|
__get_vectors ( self )
vectors
|
|
__get_window_name
|
__get_window_name ( self )
|
|
__init__
|
__init__ (
self,
master=None,
app=None,
file_name={},
**kw,
)
|
|
_drag1
|
_drag1 ( self, event )
|
|
_enter
|
_enter ( self, event )
|
|
_leave
|
_leave ( self, event )
|
|
_move
|
_move ( self, event )
|
|
_n_pressed1
|
_n_pressed1 ( self, event )
button 1 without anything
|
|
_n_pressed2
|
_n_pressed2 ( self, event )
|
|
_n_pressed3
|
_n_pressed3 ( self, event )
|
|
_open_debug_console
|
_open_debug_console ( self )
|
|
_release1
|
_release1 ( self, event )
|
|
_s_pressed1
|
_s_pressed1 ( self, event )
button 1 with shift
|
|
add_bindings
|
add_bindings ( self, active_names=() )
|
|
add_molecule
|
add_molecule ( self, mol )
|
|
add_object_from_package
|
add_object_from_package ( self, package )
|
|
align_selected
|
align_selected ( self, mode )
aligns selected items according to mode - t=top, b=bottom,
l=left, r=right, h=horizontal center, v=vertical center
|
|
any_color_to_rgb_string
|
any_color_to_rgb_string ( self, color )
|
|
any_to_px
|
any_to_px ( self, xyz )
|
|
apply_current_standard
|
apply_current_standard (
self,
objects=[],
old_standard=None,
template_mode=0,
)
if no objects are given all are used, if old_standard is given only the values
that have changed are applied; in template mode no changes of paper format are made
|
|
arrows_to_update
|
arrows_to_update ( self )
|
|
atoms_to_update
|
atoms_to_update ( self )
|
|
bonds_to_update
|
bonds_to_update ( self )
|
|
bonds_to_update2
|
bonds_to_update2 ( self )
|
|
bonds_to_update3
|
bonds_to_update3 ( self )
|
|
check_chemistry_of_selected
|
check_chemistry_of_selected ( self )
|
|
clean_paper
|
clean_paper ( self )
removes all items from paper and deletes them from molecules and items
|
|
cm_to_px
|
cm_to_px ( self, cm )
transforms coord from cm to px
|
|
config_selected
|
config_selected ( self )
|
|
create_background
|
create_background ( self )
|
|
create_window_name
|
create_window_name ( name_dict )
|
|
del_container
|
del_container ( self, container )
|
|
delete_selected
|
delete_selected ( self )
|
|
display_info_on_selected
|
display_info_on_selected ( self )
|
|
display_weight_of_selected
|
display_weight_of_selected ( self )
|
|
enter_item
|
enter_item ( self, event )
|
|
expand_groups
|
expand_groups ( self, selected=1 )
expands groups, if selected==1 only for selected, otherwise for all
|
|
flush_first_selected_mol_to_graph_file
|
flush_first_selected_mol_to_graph_file ( self )
|
|
get_base_name
|
get_base_name ( self )
|
|
get_package
|
get_package ( self )
|
|
get_paper_property
|
get_paper_property ( self, name )
|
|
get_personal_standard
|
get_personal_standard ( self )
|
|
handle_overlap
|
handle_overlap ( self )
puts overlaping molecules together to one and then calles handle_overlap(a1, a2) for that molecule
|
|
id_to_object
|
id_to_object ( self, id )
|
|
initialise
|
initialise ( self )
|
|
is_registered_id
|
is_registered_id ( self, id )
|
|
is_registered_object
|
is_registered_object ( self, o )
has this object a registered id?
|
|
key_pressed
|
key_pressed ( self, event )
|
|
key_released
|
key_released ( self, event )
|
|
leave_item
|
leave_item ( self, event )
|
|
lift_selected_to_top
|
lift_selected_to_top ( self )
|
|
list_bbox
|
list_bbox ( self, items )
extension of Canvas.bbox to provide support for lists of items
|
|
lower_selected_to_bottom
|
lower_selected_to_bottom ( self )
|
|
mm_to_px
|
mm_to_px ( self, mm )
transforms coord from mm to px
|
|
mrproper
|
mrproper ( self )
|
|
new_arrow
|
new_arrow (
self,
points=[],
spline=0,
)
|
|
new_circle
|
new_circle ( self, coords )
|
|
new_molecule
|
new_molecule ( self )
|
|
new_oval
|
new_oval ( self, coords )
|
|
new_plus
|
new_plus (
self,
x,
y,
)
|
|
new_polygon
|
new_polygon ( self, coords )
|
|
new_rect
|
new_rect ( self, coords )
|
|
new_square
|
new_square ( self, coords )
|
|
new_text
|
new_text (
self,
x,
y,
text='',
)
|
|
onread_id_sandbox_activate
|
onread_id_sandbox_activate ( self )
For reading we provide a new, clean id_manager as a sandbox to prevent
clashes between ids that might be already on the paper and ids that are in the file.
This is especialy needed for copying and template addition (although this is done somewhere else)
|
|
onread_id_sandbox_finish
|
onread_id_sandbox_finish ( self, apply_to=None )
|
|
paste_clipboard
|
paste_clipboard ( self, xy )
pastes items from clipboard to position xy
|
|
px_to_cm
|
px_to_cm ( self, px )
transforms coord from px to cm
|
|
px_to_text_with_unit
|
px_to_text_with_unit (
self,
xyz,
unit='cm',
round_to=3,
)
|
|
px_to_unit
|
px_to_unit (
self,
xyz,
unit='cm',
round_to=3,
)
|
|
read_package
|
read_package ( self, CDML )
|
|
read_standard_from_dom
|
read_standard_from_dom ( self, d )
|
|
read_xml_point
|
read_xml_point ( self, point )
|
|
real_to_screen_coords
|
real_to_screen_coords ( self, coords )
transforms set of x,y coordinates to screen coordinates, input list must have even length
Exceptions
|
|
"only even number of coordinates could be transformed"
|
|
|
real_to_screen_ratio
|
real_to_screen_ratio ( self )
|
|
redo
|
redo ( self )
|
|
register_id
|
register_id (
self,
id,
object,
)
|
|
remove_bindings
|
remove_bindings ( self )
|
|
save_personal_standard
|
save_personal_standard ( self, st )
|
|
scale_selected
|
scale_selected (
self,
ratio_x,
ratio_y,
scale_font=1,
)
|
|
screen_to_real_coords
|
screen_to_real_coords ( self, coords )
transforms set of x,y coordinates to real coordinates, input list must have even length
Exceptions
|
|
"only even number of coordinates could be transformed"
|
|
|
screen_to_real_ratio
|
screen_to_real_ratio ( self )
|
|
select
|
select ( self, items )
adds an object to the list of other selected objects and calls their select() method
|
|
select_all
|
select_all ( self )
|
|
selected_to_clipboard
|
selected_to_clipboard ( self, delete_afterwards=0 )
|
|
selected_to_real_clipboard_as_SVG
|
selected_to_real_clipboard_as_SVG ( self )
exports selected top_levels as SVG to system clipboard
|
|
selected_to_unique_top_levels
|
selected_to_unique_top_levels ( self )
maps all items in self.selected to their top_levels (atoms->molecule etc.),
filters them to be unique and returns tuple of (unique_top_levels, unique)
where unique is true when there was only one item from each container
|
|
set_bindings
|
set_bindings ( self )
|
|
set_default_paper_properties
|
set_default_paper_properties ( self )
|
|
set_name_to_selected
|
set_name_to_selected (
self,
name,
interpret=1,
)
sets name to all selected atoms and texts,
also records it in an undo !!!
|
|
set_paper_properties
|
set_paper_properties (
self,
type=None,
orientation=None,
x=None,
y=None,
crop_svg=None,
all=None,
)
|
|
set_viewport
|
set_viewport ( self, view=( 0, 0, 640, 480 ) )
|
|
signal_to_app
|
signal_to_app (
self,
signal,
time=4,
)
|
|
start_new_undo_record
|
start_new_undo_record ( self, name='' )
|
|
swap_selected_on_stack
|
swap_selected_on_stack ( self )
|
|
swap_sides_of_selected
|
swap_sides_of_selected ( self, mode="vertical" )
mirrors the selected things, vertical uses y-axis as a mirror plane,
horizontal x-axis
|
|
take_focus
|
take_focus ( self, event )
|
|
toggle_center_for_selected
|
toggle_center_for_selected ( self )
|
|
undo
|
undo ( self )
|
|
unregister_id
|
unregister_id ( self, id )
|
|
unselect
|
unselect ( self, items )
reverse of select()
|
|
unselect_all
|
unselect_all ( self )
|