Make newButton and previewButton public, so that you can hide/disable them
as desired. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2544 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
57cef6a4bd
commit
745cd4204a
4
CHANGES
4
CHANGES
@ -1,5 +1,9 @@
|
|||||||
CHANGES IN FLTK 1.1.0rc5
|
CHANGES IN FLTK 1.1.0rc5
|
||||||
|
|
||||||
|
- The newButton and previewButton widgets are now public
|
||||||
|
members of the Fl_File_Chooser class. This allows
|
||||||
|
developers to disable or hide the "new directory" and
|
||||||
|
"preview" buttons as desired.
|
||||||
- Added new visible focus flag bit and methods to
|
- Added new visible focus flag bit and methods to
|
||||||
Fl_Widget, so it is now possible to do both global and
|
Fl_Widget, so it is now possible to do both global and
|
||||||
per-widget keyboard focus control.
|
per-widget keyboard focus control.
|
||||||
|
@ -52,7 +52,9 @@ private:
|
|||||||
Fl_Menu_Button *favoritesButton;
|
Fl_Menu_Button *favoritesButton;
|
||||||
inline void cb_favoritesButton_i(Fl_Menu_Button*, void*);
|
inline void cb_favoritesButton_i(Fl_Menu_Button*, void*);
|
||||||
static void cb_favoritesButton(Fl_Menu_Button*, void*);
|
static void cb_favoritesButton(Fl_Menu_Button*, void*);
|
||||||
|
public:
|
||||||
Fl_Button *newButton;
|
Fl_Button *newButton;
|
||||||
|
private:
|
||||||
inline void cb_newButton_i(Fl_Button*, void*);
|
inline void cb_newButton_i(Fl_Button*, void*);
|
||||||
static void cb_newButton(Fl_Button*, void*);
|
static void cb_newButton(Fl_Button*, void*);
|
||||||
inline void cb__i(Fl_Tile*, void*);
|
inline void cb__i(Fl_Tile*, void*);
|
||||||
@ -61,7 +63,9 @@ private:
|
|||||||
inline void cb_fileList_i(Fl_File_Browser*, void*);
|
inline void cb_fileList_i(Fl_File_Browser*, void*);
|
||||||
static void cb_fileList(Fl_File_Browser*, void*);
|
static void cb_fileList(Fl_File_Browser*, void*);
|
||||||
Fl_Box *previewBox;
|
Fl_Box *previewBox;
|
||||||
|
public:
|
||||||
Fl_Check_Button *previewButton;
|
Fl_Check_Button *previewButton;
|
||||||
|
private:
|
||||||
inline void cb_previewButton_i(Fl_Check_Button*, void*);
|
inline void cb_previewButton_i(Fl_Check_Button*, void*);
|
||||||
static void cb_previewButton(Fl_Check_Button*, void*);
|
static void cb_previewButton(Fl_Check_Button*, void*);
|
||||||
Fl_File_Input *fileName;
|
Fl_File_Input *fileName;
|
||||||
|
@ -86,6 +86,15 @@ dialogs:
|
|||||||
<P>The <TT>sort</TT> member specifies the sort function that is
|
<P>The <TT>sort</TT> member specifies the sort function that is
|
||||||
used when loading the contents of a directory.
|
used when loading the contents of a directory.
|
||||||
|
|
||||||
|
<H3>Public Members</H3>
|
||||||
|
|
||||||
|
<P>The <CODE>Fl_File_Chooser</CODE> class exports the "new
|
||||||
|
directory" (<CODE>newButton</CODE>) and "preview"
|
||||||
|
(<CODE>previewButton</CODE>) widgets so that application
|
||||||
|
developers can control their appearance and use. For more
|
||||||
|
complex customization, consider copying the FLTK file chooser
|
||||||
|
code and changing it accordingly.
|
||||||
|
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
|
@ -52,8 +52,8 @@ window->hide();} open
|
|||||||
code0 {favoritesButton->label(favorites_label);}
|
code0 {favoritesButton->label(favorites_label);}
|
||||||
} {}
|
} {}
|
||||||
Fl_Button newButton {
|
Fl_Button newButton {
|
||||||
callback {newdir();}
|
callback {newdir();} selected
|
||||||
private tooltip {Create a new directory.} image {new.xbm} xywh {455 10 25 25} labelsize 8
|
tooltip {Create a new directory.} image {new.xbm} xywh {455 10 25 25} labelsize 8
|
||||||
code0 {\#include <FL/Fl_Preferences.H>}
|
code0 {\#include <FL/Fl_Preferences.H>}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ window->hide();} open
|
|||||||
Fl_Check_Button previewButton {
|
Fl_Check_Button previewButton {
|
||||||
label Preview
|
label Preview
|
||||||
callback {preview(previewButton->value());}
|
callback {preview(previewButton->value());}
|
||||||
private xywh {405 275 75 20} down_box DOWN_BOX shortcut 0x80070 value 1
|
xywh {405 275 75 20} down_box DOWN_BOX shortcut 0x80070 value 1
|
||||||
code0 {previewButton->label(preview_label);}
|
code0 {previewButton->label(preview_label);}
|
||||||
}
|
}
|
||||||
Fl_Box {} {
|
Fl_Box {} {
|
||||||
@ -308,7 +308,7 @@ else
|
|||||||
}
|
}
|
||||||
decl {static const char *all_files_label;} {public
|
decl {static const char *all_files_label;} {public
|
||||||
}
|
}
|
||||||
decl {static const char *custom_filter_label;} {selected public
|
decl {static const char *custom_filter_label;} {public
|
||||||
}
|
}
|
||||||
decl {static const char *existing_file_label;} {public
|
decl {static const char *existing_file_label;} {public
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user