shapeswindow module

class shapeswindow.TShapesWindow(master, TApp)

Bases: tkinter.Frame

Class represents auxiliary window containg shapes information.

Parameters:
  • master (tkinter.Tk) – master window object.
  • app (TApp) – main app object.
add_vertex_to_polygon()

Add a vertex to selected polygon on the shapes list.

assign_material_to_shape(event)

Assign material to a shape.

Parameters:event (tkinter.Event) – event evoking this method (listbox select).
change_shape_colour()

Change selected shape on the shapes list colour.

copy_shape()

Copy selected shape on the shapes list.

edit_shape()

Edit selected shape on the shapes list.

init_popup_menu()

Init shapes pane pup-up menu.

init_widgets()

Init frame widgets.

move_shape_bottom()

Move a shape to the bottom of the shapes list.

move_shape_down()

Move a shape one place down the shapes list.

move_shape_top()

Move a shape to the top of the shapes list.

move_shape_up()

Move a shape one place up the shapes list.

paste_shape(*, deltax=15, deltay=15)

Paste selected shape from buffer.

Parameters:
  • deltax (integer) – pasted shape offset in x direction in pixels.
  • deltay (integer) – pasted shape offset in y direction in pixels.
remove_shape(event=None)

Remove selected shape on the shapes list.

shapes_list_selected_item(event)

Handle listbox selection event.

Parameters:event (tkinter.Event) – event evoking this method (listbox select).
show_popoup_menu(event)

Show shapes list pop-up menu.

Parameters:event (tkinter.Event) – event evoking this method (RMB click).
update_list(shapes, *, swap=False)

Update shapes list.

Parameters:swap (boolean) – shapes list selection swap toggle.