tkgui.child_windows module
Contains base class used for child windows.
-
class tkgui.child_windows.ChildWindow(parent, title)[source]
Bases: object
Base class for child windows.
-
close()[source]
Called when the window is closed.
-
create_controls(container)[source]
Constructs controls for the window. To be overridden in child classes.
- Parameters:
container – the frame the controls are to be created in.
-
make_modal(on_cancel)[source]
Change the window to work as a modal dialog.
- Parameters:
on_cancel – method to be called if the user closes the window.
-
class tkgui.child_windows.ConfirmRun(parent, path, is_df)[source]
Bases: ChildWindow
Confirmation dialog for already running programs.
-
create_controls(container)[source]
Constructs controls for the window. To be overridden in child classes.
- Parameters:
container – the frame the controls are to be created in.
-
yes()[source]
Called when the Yes button is clicked.
-
class tkgui.child_windows.DualTextWindow(parent, title)[source]
Bases: ChildWindow
Window containing a row of buttons and two scrollable text fields.
-
create_buttons(container)[source]
Creates buttons for this window. Must be overriden in child classes.
- Parameters:
container – the frame the controls are to be created in.
-
create_controls(container)[source]
Constructs controls for the window. To be overridden in child classes.
- Parameters:
container – the frame the controls are to be created in.
-
class tkgui.child_windows.InitEditor(parent, gui)[source]
Bases: DualTextWindow
Basic editor for d_init.txt and init.txt.
-
create_buttons(container)[source]
Creates buttons for this window. Must be overriden in child classes.
- Parameters:
container – the frame the controls are to be created in.
-
load()[source]
Loads configuration data into the text widgets.
-
save()[source]
Saves configuration data from the text widgets.
-
class tkgui.child_windows.LogWindow(parent)[source]
Bases: DualTextWindow
Window used for displaying an error log.
-
create_buttons(container)[source]
Creates buttons for this window. Must be overriden in child classes.
- Parameters:
container – the frame the controls are to be created in.
-
load()[source]
Loads log data into the text widgets.
-
class tkgui.child_windows.SelectDF(parent, folders)[source]
Bases: ChildWindow
Window to select an instance of Dwarf Fortress to operate on.
-
cancel()[source]
Called when the Cancel button is clicked.
-
create_controls(container)[source]
Constructs controls for the window. To be overridden in child classes.
- Parameters:
container – the frame the controls are to be created in.
-
ok()[source]
Called when the OK button is clicked.
-
class tkgui.child_windows.TerminalSelector(parent, first_run)[source]
Bases: ChildWindow
Used to select a terminal for launching child programs on Linux.
-
close()[source]
Called when the window is closed.
-
create_controls(container)[source]
Constructs controls for the window. To be overridden in child classes.
- Parameters:
container – the frame the controls are to be created in.
-
run_test()[source]
Tests the custom terminal provided to see if it works correctly.
-
class tkgui.child_windows.UpdateWindow(parent)[source]
Bases: ChildWindow
Notification of a new update.
-
browser()[source]
Called when the browser button is clicked.
-
create_controls(container)[source]
Constructs controls for the window. To be overridden in child classes.
- Parameters:
container – the frame the controls are to be created in.
-
download()[source]
Called when the download button is clicked.