diff options
| author | yuri <yuri> | 2008-05-01 18:03:45 +0000 |
|---|---|---|
| committer | yuri <yuri> | 2008-05-01 18:03:45 +0000 |
| commit | 385c38912e8227f45891db52fc682bb5782e1d29 (patch) | |
| tree | 8d935b51157ce0b9b33c24cd2f5b27e96b84e8cf /src/Fl_File_Chooser.cxx | |
| parent | a19a1da794e27571e8c5c9391e29d4da1e4524f4 (diff) | |
STR #1908 add Fl_Widget* add_extra(Fl_Widget*) function to Fl_File_Chooser class
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6120 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Chooser.cxx')
| -rw-r--r-- | src/Fl_File_Chooser.cxx | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx index 842e7f5bb..fb588cb7d 100644 --- a/src/Fl_File_Chooser.cxx +++ b/src/Fl_File_Chooser.cxx @@ -25,7 +25,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0108 +// generated by Fast Light User Interface Designer (fluid) version 1.0300 #include "../FL/Fl_File_Chooser.H" #include <FL/fl_draw.H> @@ -202,9 +202,9 @@ Fl_File_Chooser::Fl_File_Chooser(const char *d, const char *p, int t, const char { Fl_Group* o = new Fl_Group(10, 275, 470, 95); { Fl_Group* o = new Fl_Group(10, 275, 470, 20); { previewButton = new Fl_Check_Button(10, 275, 73, 20, "Preview"); + previewButton->shortcut(0x80070); previewButton->down_box(FL_DOWN_BOX); previewButton->value(1); - previewButton->shortcut(0x80070); previewButton->callback((Fl_Callback*)cb_previewButton); previewButton->label(preview_label); } // Fl_Check_Button* previewButton @@ -298,10 +298,12 @@ int e; prefs_.get("preview", e, 1); preview(e); Fl_Group::current(prev_current); + ext_group=(Fl_Widget*)0; } Fl_File_Chooser::~Fl_File_Chooser() { Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this); +if(ext_group)window->remove(ext_group); delete window; delete favWindow; } @@ -391,19 +393,19 @@ Fl_Color Fl_File_Chooser::textcolor() { return (fileList->textcolor()); } -void Fl_File_Chooser::textfont(Fl_Font f) { +void Fl_File_Chooser::textfont(uchar f) { fileList->textfont(f); } -Fl_Font Fl_File_Chooser::textfont() { +uchar Fl_File_Chooser::textfont() { return (fileList->textfont()); } -void Fl_File_Chooser::textsize(Fl_Font_Size s) { +void Fl_File_Chooser::textsize(uchar s) { fileList->textsize(s); } -Fl_Font_Size Fl_File_Chooser::textsize() { +uchar Fl_File_Chooser::textsize() { return (fileList->textsize()); } @@ -439,6 +441,33 @@ int Fl_File_Chooser::visible() { return window->visible(); } +Fl_Widget* Fl_File_Chooser::add_extra(Fl_Widget* gr) { + Fl_Widget* ret=ext_group; + if (gr==ext_group) { + return ret; + } + if (ext_group) { + int sh=ext_group->h()+4; +Fl_Widget* svres=window->resizable(); +window->resizable(NULL); +window->size(window->w(),window->h()-sh); +window->remove(ext_group); +ext_group=NULL; +window->resizable(svres); + } + if (gr) { + int nh=window->h()+gr->h()+4; +Fl_Widget* svres=window->resizable(); +window->resizable(NULL); +window->size(window->w(),nh); +gr->position(2,okButton->y()+okButton->h()+2); +window->add(gr); +ext_group=gr; +window->resizable(svres); + } + return ret; +} + // // End of "$Id$". // |
