campy.graphics.goptionpane module

This file defines the <code>GOptionPane</code> class which supports popping up graphical dialog boxes for user input.

This class is inspired by, extremely similar to, and implemented on the back-end by, Java’s JOptionPane class, so you may wish to consult that class’s documentation in the Java API Specification for more information.

class campy.graphics.goptionpane.ConfirmResult[source]

Bases: enum.Enum

The various results that can be returned from some option dialogs.

CANCEL = -1
NO = 0
OK = 2
YES = 1
class campy.graphics.goptionpane.ConfirmType[source]

Bases: enum.Enum

The three types of confirm dialogs: Yes/No, Yes/No/Cancel, or OK/Cancel.

OK_CANCEL = 2
YES_NO = 0
YES_NO_CANCEL = 1
class campy.graphics.goptionpane.GOptionPane[source]

Bases: object

class InternalResult[source]

Bases: enum.Enum

The results that can come back from showConfirmDialog.

These are converted into Result enum values.

CANCEL_OPTION = 2
CLOSED_OPTION = -1
NO_OPTION = 1
OK_OPTION = 0
YES_OPTION = 0
classmethod show_confirm_dialog(message, title='', confirm_type=<ConfirmType.YES_NO: 0>)[source]
classmethod show_input_dialog(message, title='')[source]
classmethod show_message_dialog(message, title='', message_type=<MessageType.PLAIN: -1>)[source]
classmethod show_option_dialog(message, options, title='', initially_selected='')[source]
classmethod show_text_file_dialog(message, title='', rows=-1, cols=-1)[source]
class campy.graphics.goptionpane.MessageType[source]

Bases: enum.Enum

ERROR = 0
INFORMATION = 1
PLAIN = -1
QUESTION = 3
WARNING = 2