32 while (w->numChildren() != 0) {
33 FXWindow* child = w->childAtIndex(0);
41 const FXString& file) {
42 if (!FXStat::exists(file)) {
46 FXMessageBox::question(parent, MBOX_YES_NO,
"File Exists",
"Overwrite '%s'?", file.text());
47 if (answer == MBOX_CLICKED_NO) {
56 return FXPath::name(filename);
62 if (filename.length() == 0) {
71 FXString ext = FXPath::extension(filename);
73 if (filename.rfind(
'.') == filename.length() - 1) {
74 return filename + defaultExtension;
76 return filename +
"." + defaultExtension;
84 const FXString& header,
const FXString& extension,
85 FXIcon* icon, FXString& currentFolder) {
87 FXFileDialog opendialog(parent, header);
88 opendialog.setIcon(icon);
89 opendialog.setSelectMode(SELECTFILE_ANY);
90 opendialog.setPatternList(
"*" + extension);
91 if (currentFolder.length() != 0) {
92 opendialog.setDirectory(currentFolder);
94 if (!opendialog.execute()) {
97 FXString file =
assureExtension(opendialog.getFilename(), extension.after(
'.')).text();
101 currentFolder = opendialog.getDirectory();
108 return RGBColor(FXREDVAL(col), FXGREENVAL(col), FXBLUEVAL(col), FXALPHAVAL(col));