mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 11:25:22 +08:00
Added callback when double-clicking file in a file chooser (STR#2346)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7783 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
CHANGES IN FLTK 1.3.0
|
CHANGES IN FLTK 1.3.0
|
||||||
|
|
||||||
|
- Added callback when double-clicking file in a file chooser
|
||||||
|
(STR #2346)
|
||||||
- Fixed label alignment (STR #2436)
|
- Fixed label alignment (STR #2436)
|
||||||
- Added interface to set color chooser mode (STR #2407)
|
- Added interface to set color chooser mode (STR #2407)
|
||||||
- Fixed compile errors when HAVE_LIBJPEG was not defined
|
- Fixed compile errors when HAVE_LIBJPEG was not defined
|
||||||
|
|||||||
@@ -156,8 +156,6 @@ public:
|
|||||||
// char export( const char *filename, Type fileFormat );
|
// char export( const char *filename, Type fileFormat );
|
||||||
// char import( const char *filename );
|
// char import( const char *filename );
|
||||||
|
|
||||||
// char copyTo(class Fl_Tree*); // deprecated, use Fl_Tree::load(Fl_Preferences&)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
'Name' provides a simple method to create numerical or more complex
|
'Name' provides a simple method to create numerical or more complex
|
||||||
procedural names for entries and groups on the fly.
|
procedural names for entries and groups on the fly.
|
||||||
|
|||||||
@@ -727,6 +727,7 @@ Fl_File_Chooser::fileListCB()
|
|||||||
{
|
{
|
||||||
// Hide the window - picked the file...
|
// Hide the window - picked the file...
|
||||||
window->hide();
|
window->hide();
|
||||||
|
if (callback_) (*callback_)(this, data_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/Fl_Preferences.H>
|
#include <FL/Fl_Preferences.H>
|
||||||
#include <FL/Fl_Plugin.H>
|
#include <FL/Fl_Plugin.H>
|
||||||
#include <FL/Fl_Tree.H>
|
|
||||||
#include <FL/filename.H>
|
#include <FL/filename.H>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ void file_cb(const char *n) {
|
|||||||
|
|
||||||
void button_cb(Fl_Widget *,void *) {
|
void button_cb(Fl_Widget *,void *) {
|
||||||
fl_file_chooser_callback(file_cb);
|
fl_file_chooser_callback(file_cb);
|
||||||
fl_file_chooser("Image file?","*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm}", name);
|
puts(fl_file_chooser("Image file?","*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm}", name));
|
||||||
fl_file_chooser_callback(0);
|
fl_file_chooser_callback(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user