materialswindow module

class materialswindow.TMaterialsWindow(master, TApp, TShapesWindow)

Bases: tkinter.Frame

Class represents auxiliary window containg materials database.

add_material()

Add a material to the database.

delete_material()

Delete a material from the database.

get_selected_item_num()

Retrieve a index of a selected material on the list.

Return type:integer
init_widgets()

Initialise widgets.

is_binary(filename)

Check whether given file is binary (that is non-text).

material_list_selected_item(event)

Display selected material parameters in the text fields.

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

Read an ASCII file containing materials data.

save_file()

Save current materials database to an ASCII file.

store_material_parameters()

Update material parameters from values entered in the text fields.

update_list(materials)

Update shapes list.

Parameters:materials (list) – new materials database.