robofab.interface.all.dialogs
index
/code/projects/robofab/Lib/robofab/interface/all/dialogs.py

Dialogs. Not just for FontLab any more.
Cross-platform and cross-application compatible. Mostly anyway.
(Not all dialogs work on PCs outside of FontLab. Some dialogs are for FontLab only. Sorry.)
 
Mac and FontLab implementation written by the RoboFab development team.
PC implementation by Eigi Eigendorf and is (C)2002 Eigi Eigendorf.

 
Modules
       
os
sys

 
Classes
       
ProgressBar

 
class ProgressBar
     Methods defined here:
__init__(self, title='RoboFab...', ticks=0, label='')
A progress bar.
Availability: FontLab, Mac
close(self)
Close the progressbar.
Availability: FontLab, Mac
getCurrentTick(self)
label(self, label)
Set the label on the progress bar.
Availability: Mac
tick(self, tickValue=None)
Tick the progress bar.
Availability: FontLab, Mac

 
Functions
       
AskString(prompt, value='', title='RoboFab')
Returns entered string.
Availability: FontLab, Macintosh
AskYesNoCancel(prompt, title='RoboFab', default=0)
Returns 1 for 'Yes', 0 for 'No' and -1 for 'Cancel'.
Availability: FontLab, Macintosh
("default" argument only available on Macintosh)
FindGlyph(font, message='Search for a glyph:', title='RoboFab')
Returns glyph instance if there is one, otherwise it returns None.
Availability: FontLab
GetDirectory = GetFolder(message=None)
Select folder dialog. Returns path if one is selected. Otherwise it returns None.
Availability: FontLab, Macintosh, PC
GetFile(message=None)
Select file dialog. Returns path if one is selected. Otherwise it returns None.
Availability: FontLab, Macintosh, PC
GetFolder(message=None)
Select folder dialog. Returns path if one is selected. Otherwise it returns None.
Availability: FontLab, Macintosh, PC
Message(message, title='RoboFab')
A simple message dialog.
Availability: FontLab, Macintosh
OneList(list, message='Select an item:', title='RoboFab')
Returns selected item, otherwise it returns None.
Availability: FontLab, Macintosh
PutFile(message=None, defaultName=None)
Save file dialog. Returns path if one is entered. Otherwise it returns None.
Availability: FontLab, Macintosh, PC
SearchList(list, message='Select an item:', title='RoboFab')
Returns selected item, otherwise it returns None.
Availability: FontLab
SelectFont(message='Select a font:', title='RoboFab')
Returns font instance if there is one, otherwise it returns None.
Availability: FontLab
SelectGlyph(font, message='Select a glyph:', title='RoboFab')
Returns glyph instance if there is one, otherwise it returns None.
Availability: FontLab
TwoChecks(title_1='One', title_2='Two', value1=1, value2=1, title='RoboFab')
Returns check value:
1 if check box 1 is checked
2 if check box 2 is checked
3 if both are checked
0 if neither are checked
None if cancel is clicked.
 
Availability: FontLab, Macintosh
TwoFields(title_1='One:', value_1='0', title_2='Two:', value_2='0', title='RoboFab')
Returns (value 1, value 2).
Availability: FontLab

 
Data
        MAC = True
PC = False
RoboFabError = 'RoboFabError'
haveMacfs = False
inFontLab = False
pyVersion = (2, 3, 5)