Base Classes
|
|
meta_enabled
line_colored
drawable
with_line
interactive
child_with_paper
oasa.bond
|
Methods
|
|
|
|
__init__
|
__init__ (
self,
standard=None,
atoms=(),
package=None,
molecule=None,
type='n',
order=1,
simple_double=1,
)
|
|
bbox
|
bbox ( self )
returns the bounding box of the object as a list of [x1,y1,x2,y2]
|
|
change_atoms
|
change_atoms (
self,
a1,
a2,
)
used in overlap situations, it replaces reference to atom a1 with
reference to atom a2
|
|
delete
|
delete ( self )
|
|
draw
|
draw ( self, automatic="none" )
call the appropriate draw method, automatic specifies what to automatically compute -
all, sign, none (sign is often needed to retain the look after transformation)
|
|
focus
|
focus ( self )
|
|
get_atoms
|
get_atoms ( self )
|
|
get_exportable_items
|
get_exportable_items ( self )
helper function for exporters,
it returns a tuple in form of (line_items, items) where
line_items are items that are exported as lines,
items are items that are exported according to the bond type;
as this code is a ugly mix of conditionals it makes sense to put it into one
place co that the exporters do not have to reinvent it themself.
|
|
get_package
|
get_package ( self, doc )
returns a DOM element describing the object in CDML,
doc is the parent document which is used for element creation
(the returned element is not inserted into the document)
|
|
lift
|
lift ( self )
|
|
move
|
move (
self,
dx,
dy,
)
moves object with his selector (when present)
|
|
post_read_analysis
|
post_read_analysis ( self )
this method is called by molecule after the whole molecule is
read to perform a post-load analysis of double bond positioning
|
|
read_package
|
read_package ( self, package )
reads the dom element package and sets internal state according to it
|
|
read_standard_values
|
read_standard_values (
self,
standard,
old_standard=None,
)
|
|
redraw
|
redraw ( self, recalc_side=0 )
|
|
select
|
select ( self )
|
|
simple_redraw
|
simple_redraw ( self )
very fast redraw that draws only a simple line instead of the bond,
used in 3d rotation only (as for bkchem 0.5.0)
|
|
switch_to_order
|
switch_to_order ( self, order )
|
|
switch_to_type
|
switch_to_type ( self, type )
|
|
toggle_type
|
toggle_type (
self,
only_shift=0,
to_type='n',
to_order=1,
simple_double=1,
)
|
|
transform
|
transform ( self, tr )
|
|
unfocus
|
unfocus ( self )
|
|
unselect
|
unselect ( self )
|
|