polygonwindow module

class polygonwindow.TPolygonWindow(master, app, polygon)

Bases: tkinter.simpledialog.Dialog

Class represents a polygon vertices edit window.

Parameters:
  • master (tkinter.Tk) – master window object.
  • app (TApp) – main app object.
  • polygon (TPolygon) – edited polygon object.
add_vertex()

Add a vertex to the polygon.

apply()

Destroy window upon clicking Apply button.

body(master)

Initialise widgets.

Parameters:master (tkinter.Tk) – master window object.
buttonbox()

Redefine default Ok/Cancel buttons in the bottom of the window with Apply/Add/Delete.

delete_vertex()

Delete a vertex from the polygon.

get_current_selection()

Retrieve the selected vertex index.

Return type:integer
update_vertices_list()

Update entries in the vertices listbox.

vertices_list_selected_item(event)

Display and edit selected vertex parameters.

Parameters:event (tkinter.Event) – listbox LMB click event.