34 #ifdef CHECK_MEMORY_LEAKS
36 #endif // CHECK_MEMORY_LEAKS
44 while (w->numChildren() != 0) {
45 FXWindow* child = w->childAtIndex(0);
53 const FXString& file) {
54 if (!FXStat::exists(file)) {
58 FXMessageBox::question(parent, MBOX_YES_NO,
"File Exists",
"Overwrite '%s'?", file.text());
59 if (answer == MBOX_CLICKED_NO) {
68 return FXPath::name(filename);
74 if (filename.length() == 0) {
83 FXString ext = FXPath::extension(filename);
85 if (filename.rfind(
'.') == filename.length() - 1) {
86 return filename + defaultExtension;
88 return filename +
"." + defaultExtension;
96 const FXString& header,
const FXString& extension,
97 FXIcon* icon, FXString& currentFolder) {
99 FXFileDialog opendialog(parent, header);
100 opendialog.setIcon(icon);
101 opendialog.setSelectMode(SELECTFILE_ANY);
102 opendialog.setPatternList(
"*" + extension);
103 if (currentFolder.length() != 0) {
104 opendialog.setDirectory(currentFolder);
106 if (!opendialog.execute()) {
109 FXString file =
assureExtension(opendialog.getFilename(), extension.after(
'.')).text();
113 currentFolder = opendialog.getDirectory();
120 return RGBColor(FXREDVAL(col) / 255.0, FXGREENVAL(col) / 255.0, FXBLUEVAL(col) / 255.0);
126 return FXRGB(col.
red() * 255, col.
green() * 255, col.
blue() * 255);