summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-08-08 00:50:02 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-08-08 00:50:02 +0000
commitc9f9b4faa0f3d0e307835b20e6b8852910380e3f (patch)
treec9e13bc82f02ad562df26a14d10806b494bf48b7
parentb8dcdf4c648a36182aff048a618463087de41c7c (diff)
Fl_File_Chooser did not implement the user_data() methods (STR
#970) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4473 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rw-r--r--FL/Fl_File_Chooser.H2
-rw-r--r--src/Fl_File_Chooser.cxx8
-rw-r--r--src/Fl_File_Chooser.fl16
4 files changed, 24 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 549aef57b..4c85a22b0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745, STR #942, STR #931)
+ - Fl_File_Chooser did not implement the user_data()
+ methods (STR #970)
- Compilation could fail if a previous installation of
FLTK was in the same (non-standard) directory as an
image library (STR #926)
diff --git a/FL/Fl_File_Chooser.H b/FL/Fl_File_Chooser.H
index b4706c35e..a1ab93fc5 100644
--- a/FL/Fl_File_Chooser.H
+++ b/FL/Fl_File_Chooser.H
@@ -155,6 +155,8 @@ public:
uchar textsize();
void type(int t);
int type();
+ void * user_data() const;
+ void user_data(void *d);
const char *value(int f = 1);
void value(const char *filename);
int visible();
diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx
index a5472964e..107b377cc 100644
--- a/src/Fl_File_Chooser.cxx
+++ b/src/Fl_File_Chooser.cxx
@@ -426,6 +426,14 @@ int Fl_File_Chooser::type() {
return (type_);
}
+void * Fl_File_Chooser::user_data() const {
+ return (data_);
+}
+
+void Fl_File_Chooser::user_data(void *d) {
+ data_ = d;
+}
+
int Fl_File_Chooser::visible() {
return window->visible();
}
diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl
index 8576af485..7e52e1912 100644
--- a/src/Fl_File_Chooser.fl
+++ b/src/Fl_File_Chooser.fl
@@ -31,8 +31,7 @@ comment {//
} {in_source in_header
}
-decl {\#include <FL/fl_draw.H>} {selected
-}
+decl {\#include <FL/fl_draw.H>} {}
class FL_EXPORT Fl_File_Chooser {open
} {
@@ -160,8 +159,8 @@ window->hide();}
}
Fl_Window favWindow {
label {Manage Favorites}
- private xywh {580 50 355 150} type Double resizable
- code0 {favWindow->label(manage_favorites_label);} modal visible
+ private xywh {580 50 355 150} type Double hide resizable
+ code0 {favWindow->label(manage_favorites_label);} modal
} {
Fl_File_Browser favList {
callback {favoritesCB(favList);}
@@ -356,6 +355,15 @@ else
} {
code {return (type_);} {}
}
+ Function {user_data() const} {selected return_type {void *}
+ } {
+ code {return (data_);} {selected
+ }
+ }
+ Function {user_data(void *d)} {selected return_type void
+ } {
+ code {data_ = d;} {}
+ }
decl {const char *value(int f = 1);} {public
}
decl {void value(const char *filename);} {public