2011-10-18 18:40:07 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
Dialog prototypes.
|
|
|
|
|
|
|
|
These are loaded before any others. So if a specific platform implementation doesn't
|
|
|
|
have all functions, these will make sure a NotImplemtedError is raised.
|
2011-10-23 09:58:22 +00:00
|
|
|
|
2011-10-18 18:40:07 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
"AskString",
|
|
|
|
"AskYesNoCancel",
|
|
|
|
"FindGlyph",
|
|
|
|
"GetFile",
|
|
|
|
"GetFolder",
|
2011-12-27 14:02:11 +00:00
|
|
|
"GetFileOrFolder",
|
2011-10-18 18:40:07 +00:00
|
|
|
"Message",
|
|
|
|
"OneList",
|
|
|
|
"PutFile",
|
|
|
|
"SearchList",
|
|
|
|
"SelectFont",
|
|
|
|
"SelectGlyph",
|
|
|
|
"TwoChecks",
|
|
|
|
"TwoFields",
|
|
|
|
"ProgressBar",
|
|
|
|
]
|
|
|
|
|
|
|
|
# start with all the defaults.
|
|
|
|
|
2011-12-27 14:02:11 +00:00
|
|
|
def AskString(message, value='', title='RoboFab'):
|
2011-10-23 10:01:35 +00:00
|
|
|
"""Prototype for AskString dialog. Should show a prompt, a text input box and OK button."""
|
2011-10-18 18:40:07 +00:00
|
|
|
raise NotImplementedError
|
|
|
|
|
2011-12-27 14:02:11 +00:00
|
|
|
def AskYesNoCancel(message, title='RoboFab', default=0):
|
2011-10-23 10:01:35 +00:00
|
|
|
"""Prototype for AskYesNoCancel dialog. Should show a prompt, Yes, No, Cancel buttons."""
|
2011-10-18 18:40:07 +00:00
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def FindGlyph(font, message="Search for a glyph:", title='RoboFab'):
|
2011-10-23 10:01:35 +00:00
|
|
|
"""Prototype for FindGlyph dialog. Should show a list of glyph names of the current font, OK and Cancel buttons"""
|
2011-10-18 18:40:07 +00:00
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def GetFile(message=None):
|
2011-10-23 10:01:35 +00:00
|
|
|
"""Prototype for GetFile dialog. Should offer a standard OS get file dialog."""
|
2011-10-18 18:40:07 +00:00
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def GetFolder(message=None):
|
2011-10-23 10:01:35 +00:00
|
|
|
"""Prototype for GetFolder dialog. Should offer a standard OS get folder dialog."""
|
2011-10-18 18:40:07 +00:00
|
|
|
raise NotImplementedError
|
|
|
|
|
2011-12-27 14:02:11 +00:00
|
|
|
def GetFileOrFolder(message=None):
|
|
|
|
raise NotImplementedError
|
|
|
|
|
2011-10-18 18:40:07 +00:00
|
|
|
def Message(message, title='RoboFab'):
|
2011-10-23 10:01:35 +00:00
|
|
|
"""Prototype for Message dialog. Should offer a window with the message, OK button."""
|
2011-10-18 18:40:07 +00:00
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def OneList(list, message="Select an item:", title='RoboFab'):
|
2011-10-23 10:01:35 +00:00
|
|
|
"""Prototype for OneList dialog."""
|
2011-10-18 18:40:07 +00:00
|
|
|
raise NotImplementedError
|
|
|
|
|
2011-12-27 14:02:11 +00:00
|
|
|
def PutFile(message=None, fileName=None):
|
2011-10-18 18:40:07 +00:00
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def SearchList(list, message="Select an item:", title='RoboFab'):
|
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def SelectFont(message="Select a font:", title='RoboFab'):
|
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def SelectGlyph(font, message="Select a glyph:", title='RoboFab'):
|
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def TwoChecks(title_1="One", title_2="Two", value1=1, value2=1, title='RoboFab'):
|
2011-12-27 14:02:11 +00:00
|
|
|
raise PendingDeprecationWarning
|
2011-10-18 18:40:07 +00:00
|
|
|
|
|
|
|
def TwoFields(title_1="One:", value_1="0", title_2="Two:", value_2="0", title='RoboFab'):
|
2011-12-27 14:02:11 +00:00
|
|
|
raise PendingDeprecationWarning
|
2011-10-18 18:40:07 +00:00
|
|
|
|
|
|
|
class ProgressBar(object):
|
|
|
|
pass
|
|
|
|
|