plink – A Python/Tk link editor
Technical documentation of the Python objects that underly PLink. Of
interest only to Marc, Nathan, or similar folks.
-
class plink.LinkEditor(root=None, no_arcs=False, callback=None, cb_menu=u'', manifold=None, file_name=None, title=u'PLink Editor')
A graphical link drawing tool based on the one embedded in Jeff Weeks’
original SnapPea program.
-
about()
-
alert()
-
clear()
-
clear_text()
-
clicked_on_arrow(vertex)
-
cursor_on_arrow(point)
-
destroy_arrow(arrow)
-
do_callback()
-
done(event=None)
-
double_click(event)
Event handler for mouse double-clicks.
-
end_dragging_state()
-
focus_in(event)
-
focus_out(event)
-
full_redraw()
Recolors and redraws all components, in DT order, and displays
the legend linking colors to cusp indices.
-
generic_arrow(arrow)
-
generic_vertex(vertex)
-
goto_drawing_state(x1, y1)
-
goto_start_state()
-
hide_DT()
-
howto()
-
key_press(event)
Handler for keypress events.
-
key_release(event)
Handler for keyrelease events.
-
load(file_name=None)
-
make_alternating()
Changes crossings to make the projection alternating.
Requires that all components be closed.
-
mouse_moved(event)
Handler for mouse motion events.
-
move_active(x, y)
-
not_done()
-
notice_focus()
-
reflect()
-
reopen()
-
save()
-
save_image(file_type=u'eps', colormode=u'color')
-
set_info()
-
set_start_cursor(x, y)
-
set_view_mode()
-
shift_click(event)
Event handler for mouse shift-clicks.
-
show_DT()
Display the DT hit counters next to each crossing. Crossings
that need to be flipped for the planar embedding have an
asterisk.
-
single_click(event)
Event handler for mouse clicks.
-
unpickle(vertices, arrows, crossings, hot=None)
-
update_crossings(this_arrow)
Redraw any arrows which were changed by moving this_arrow.
-
update_info()
-
update_smooth()
-
verify_drag()
-
warn_arcs()
-
write_text(string)
-
zoom_in()
-
zoom_out()
-
zoom_to_fit()
-
class plink.Arrow(start, end, canvas=None, style=u'normal', color=u'black')
An arrow in a PL link diagram.
-
draw(crossings=[], recurse=True, skip_frozen=True)
-
epsilon = 8
-
erase()
Prepare the arrow for the garbage collector.
-
expose(crossings=[])
-
find_segments(crossings, include_overcrossings=False, gapsize=9.0)
Return a list of segments that make up this arrow, each
segment being a list of 4 coordinates [x0,y0,x1,y1]. The
first segment starts at the start vertex, and the last one
ends at the end vertex. Otherwise, endpoints are near
crossings where this arrow goes under, leaving a gap between
the endpoint and the crossing point. If the
include_overcrossings flag is True, then the segments are
also split at overcrossings, with no gap.
-
freeze()
-
frozen
-
hidden
-
hide()
-
make_faint()
-
reverse(crossings=[])
-
set_color(color)
-
set_end(vertex, crossings=[])
-
set_start(vertex, crossings=[])
-
too_close(vertex)
-
vectorize()
-
class plink.Crossing(over, under, is_virtual=False)
A pair of crossing arrows in a PL link diagram.
-
DT_hit(count, ecrossing)
Count the crossing, using DT conventions. Return True on the
first hit if the count is odd and the crossing is shared by
two components of the diagram. As a side effect, set the
flipped attribute on the first hit.
-
clear_marks()
-
height(arrow)
-
locate()
-
mark_component(component)
-
reverse()
-
sign()
-
strand(arrow)
-
class plink.ECrossing(crossing, arrow)
A pair: (Crossing, Arrow), where the Arrow is involved in the Crossing.
The ECrossings correspond 1-1 with edges of the link diagram.
-
goes_over()
-
pair()