summaryrefslogtreecommitdiff
path: root/src/Fl_File_Chooser.fl
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_File_Chooser.fl')
-rw-r--r--src/Fl_File_Chooser.fl29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl
index d222bd1c8..7cf01e1c7 100644
--- a/src/Fl_File_Chooser.fl
+++ b/src/Fl_File_Chooser.fl
@@ -66,7 +66,8 @@ class FL_EXPORT Fl_File_Chooser {open
}
decl {void update_preview();} {private local
}
- Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {} {
+ Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {open
+ } {
code {if (!prefs_) {
prefs_ = new Fl_Preferences(Fl_Preferences::CORE_USER, "fltk.org", "filechooser");
}} {}
@@ -77,11 +78,11 @@ class FL_EXPORT Fl_File_Chooser {open
fileList->deselect();
Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
window->hide();} open
- private xywh {507 327 490 380} type Double hide resizable
+ private xywh {1171 438 490 380} type Double resizable
code0 {if (title) window->label(title);}
code1 {\#include <stdio.h>}
code2 {\#include <stdlib.h>}
- code3 {\#include <string.h>} modal
+ code3 {\#include <string.h>} modal visible
} {
Fl_Group {} {open
private xywh {10 10 470 25}
@@ -106,14 +107,18 @@ window->hide();} open
}
}
Fl_Tile {} {
- callback {update_preview();}
+ callback {update_preview();} open
private xywh {10 45 470 225} resizable
} {
Fl_File_Browser fileList {
callback {fileListCB();}
- private xywh {10 45 295 225} type Hold hotspot
+ private xywh {10 45 295 225} type Hold box DOWN_BOX hotspot
code0 {\#include <FL/Fl_File_Browser.H>}
}
+ Fl_Box errorBox {
+ label {dynamic error display} selected
+ private xywh {10 45 295 225} box DOWN_BOX color 7 labelsize 18 labelcolor 1 align 149 hide
+ }
Fl_Box previewBox {
label {?}
private xywh {305 45 175 225} box DOWN_BOX labelsize 100 align 80
@@ -349,7 +354,7 @@ okButton->parent()->init_sizes();} {}
} {
code {fileList->textfont(f);} {}
}
- Function {textfont()} {selected return_type Fl_Font
+ Function {textfont()} {return_type Fl_Font
} {
code {return (fileList->textfont());} {}
}
@@ -475,6 +480,18 @@ window->resizable(svres);} {}
}
code {return ret;} {}
}
+ Function {show_error_box(int val)} {
+ comment {Show error box if val=1, hide if val=0} open protected return_type void
+ } {
+ code {if ( val ) {
+ errorBox->color(fileList->color()); // inherit fileList's bg color
+ errorBox->show();
+ fileList->hide();
+} else {
+ errorBox->hide();
+ fileList->show();
+}} {}
+ }
}
decl {FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);} {public local