33 while (w->numChildren() != 0) {
34 FXWindow* child = w->childAtIndex(0);
42 const FXString& file) {
43 if (!FXStat::exists(file)) {
47 FXMessageBox::question(parent, MBOX_YES_NO,
"File Exists",
"Overwrite '%s'?", file.text());
48 if (answer == MBOX_CLICKED_NO) {
57 return FXPath::name(filename);
63 if (filename.length() == 0) {
72 FXString ext = FXPath::extension(filename);
74 if (filename.rfind(
'.') == filename.length() - 1) {
75 return filename + defaultExtension;
77 return filename +
"." + defaultExtension;
85 const FXString& header,
const FXString& extension,
86 FXIcon* icon, FXString& currentFolder) {
88 FXFileDialog opendialog(parent, header);
89 opendialog.setIcon(icon);
90 opendialog.setSelectMode(SELECTFILE_ANY);
91 opendialog.setPatternList(
"*" + extension);
92 if (currentFolder.length() != 0) {
93 opendialog.setDirectory(currentFolder);
95 if (!opendialog.execute()) {
98 FXString file =
assureExtension(opendialog.getFilename(), extension.after(
'.')).text();
102 currentFolder = opendialog.getDirectory();
109 return RGBColor(FXREDVAL(col), FXGREENVAL(col), FXBLUEVAL(col), FXALPHAVAL(col));