ConsoleUser

Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com

This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.

All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.

class Platform.Platform(system, config)

I am the abstract parent of OS/Platform interactions. Most have some common things to be done, so to the degree possible stuff that is truly common will find its way here.

handle_load_dialog(path)

After load() or some other method opens a dialog to select a file to load, this method will navigate that dialog to the correct path.

Parameters:

  • path: the string path to the file to load

has_error_dialog()

Check if there is a visible error dialog

Preconditions:

Postconditions:

  • The system is unchanged except possibly for the mouse moving

Return: True if there is a visible error dialog, False otherwise

load(path)

Load a file from the given path.

Parameters:

  • path: the path to the target path

open_menu(menu_region, validation_region)

Given an region that marks the region to click to expand the menu and the region that can be used to validate that the menu did expand, expand the desired menu.

Parameters:

  • menu_region: the <no title> that is the “button” to click to expand the menu

  • validation_region: the <no title> that will be seen when the menu is expanded

Return: True if the menu is expanded, False otherwise

open_start()

Open the start menu (typically in the bottom left of the screen)

Return: True if the Start Menu is open, False otherwise

save()

Save the current document to the default filename.

Subclasses may well want to do this in more specific ways.

save_as(path)

Save the current document to the given filename.

Subclasses may well want to do this in more specific ways.

Parameters:

  • path: the string to enter in the filename field for where to save this file

try_config()

Stub so platforms don’t choke and die if this is called and they don’t know how to configure themselves.