summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_File_Browser.cxx (renamed from src/Fl_FileBrowser.cxx)72
-rw-r--r--src/Fl_File_Chooser.cxx (renamed from src/Fl_FileChooser.cxx)110
-rw-r--r--src/Fl_File_Chooser.fl (renamed from src/Fl_FileChooser.fl)28
-rw-r--r--src/Fl_File_Chooser2.cxx (renamed from src/Fl_FileChooser2.cxx)89
-rw-r--r--src/Fl_File_Icon.cxx (renamed from src/Fl_FileIcon.cxx)160
-rw-r--r--src/Fl_Help_Dialog.cxx (renamed from src/Fl_HelpDialog.cxx)72
-rw-r--r--src/Fl_Help_Dialog.fl (renamed from src/Fl_HelpDialog.fl)12
-rw-r--r--src/Fl_Help_View.cxx (renamed from src/Fl_HelpView.cxx)258
-rw-r--r--src/Makefile16
-rw-r--r--src/fl_file_chooser.cxx37
-rw-r--r--src/makedepend83
11 files changed, 483 insertions, 454 deletions
diff --git a/src/Fl_FileBrowser.cxx b/src/Fl_File_Browser.cxx
index 63587bcf4..d1a5af82f 100644
--- a/src/Fl_FileBrowser.cxx
+++ b/src/Fl_File_Browser.cxx
@@ -1,7 +1,7 @@
//
-// "$Id: Fl_FileBrowser.cxx,v 1.13.2.5 2001/09/04 13:13:29 easysw Exp $"
+// "$Id: Fl_File_Browser.cxx,v 1.1.2.1 2001/09/29 14:38:59 easysw Exp $"
//
-// Fl_FileBrowser routines.
+// Fl_File_Browser routines.
//
// Copyright 1999-2001 by Michael Sweet.
//
@@ -24,20 +24,20 @@
//
// Contents:
//
-// Fl_FileBrowser::full_height() - Return the height of the list.
-// Fl_FileBrowser::item_height() - Return the height of a list item.
-// Fl_FileBrowser::item_width() - Return the width of a list item.
-// Fl_FileBrowser::item_draw() - Draw a list item.
-// Fl_FileBrowser::Fl_FileBrowser() - Create a Fl_FileBrowser widget.
-// Fl_FileBrowser::load() - Load a directory into the browser.
-// Fl_FileBrowser::filter() - Set the filename filter.
+// Fl_File_Browser::full_height() - Return the height of the list.
+// Fl_File_Browser::item_height() - Return the height of a list item.
+// Fl_File_Browser::item_width() - Return the width of a list item.
+// Fl_File_Browser::item_draw() - Draw a list item.
+// Fl_File_Browser::Fl_File_Browser() - Create a Fl_File_Browser widget.
+// Fl_File_Browser::load() - Load a directory into the browser.
+// Fl_File_Browser::filter() - Set the filename filter.
//
//
// Include necessary header files...
//
-#include <FL/Fl_FileBrowser.H>
+#include <FL/Fl_File_Browser.H>
#include <FL/fl_draw.H>
#include <FL/filename.H>
#include <stdio.h>
@@ -82,11 +82,11 @@ struct FL_BLINE // data is in a linked list of these
//
-// 'Fl_FileBrowser::full_height()' - Return the height of the list.
+// 'Fl_File_Browser::full_height()' - Return the height of the list.
//
int // O - Height in pixels
-Fl_FileBrowser::full_height() const
+Fl_File_Browser::full_height() const
{
int i, // Looping var
th; // Total height of list.
@@ -100,11 +100,11 @@ Fl_FileBrowser::full_height() const
//
-// 'Fl_FileBrowser::item_height()' - Return the height of a list item.
+// 'Fl_File_Browser::item_height()' - Return the height of a list item.
//
int // O - Height in pixels
-Fl_FileBrowser::item_height(void *p) const // I - List item data
+Fl_File_Browser::item_height(void *p) const // I - List item data
{
FL_BLINE *line; // Pointer to line
char *text; // Pointer into text
@@ -128,7 +128,7 @@ Fl_FileBrowser::item_height(void *p) const // I - List item data
height += textheight;
// If we have enabled icons then add space for them...
- if (Fl_FileIcon::first() != NULL && height < iconsize_)
+ if (Fl_File_Icon::first() != NULL && height < iconsize_)
height = iconsize_;
// Add space for the selection border..
@@ -140,11 +140,11 @@ Fl_FileBrowser::item_height(void *p) const // I - List item data
//
-// 'Fl_FileBrowser::item_width()' - Return the width of a list item.
+// 'Fl_File_Browser::item_width()' - Return the width of a list item.
//
int // O - Width in pixels
-Fl_FileBrowser::item_width(void *p) const // I - List item data
+Fl_File_Browser::item_width(void *p) const // I - List item data
{
int i; // Looping var
FL_BLINE *line; // Pointer to line
@@ -228,7 +228,7 @@ Fl_FileBrowser::item_width(void *p) const // I - List item data
}
// If we have enabled icons then add space for them...
- if (Fl_FileIcon::first() != NULL)
+ if (Fl_File_Icon::first() != NULL)
width += iconsize_ + 8;
// Add space for the selection border..
@@ -240,11 +240,11 @@ Fl_FileBrowser::item_width(void *p) const // I - List item data
//
-// 'Fl_FileBrowser::item_draw()' - Draw a list item.
+// 'Fl_File_Browser::item_draw()' - Draw a list item.
//
void
-Fl_FileBrowser::item_draw(void *p, // I - List item data
+Fl_File_Browser::item_draw(void *p, // I - List item data
int x, // I - Upper-lefthand X coordinate
int y, // I - Upper-lefthand Y coordinate
int w, // I - Width of item
@@ -277,7 +277,7 @@ Fl_FileBrowser::item_draw(void *p, // I - List item data
else
c = textcolor();
- if (Fl_FileIcon::first() == NULL)
+ if (Fl_File_Icon::first() == NULL)
{
// No icons, just draw the text...
x ++;
@@ -287,7 +287,7 @@ Fl_FileBrowser::item_draw(void *p, // I - List item data
{
// Draw the icon if it is set...
if (line->data)
- ((Fl_FileIcon *)line->data)->draw(x, y, iconsize_, iconsize_,
+ ((Fl_File_Icon *)line->data)->draw(x, y, iconsize_, iconsize_,
(line->flags & SELECTED) ? FL_YELLOW :
FL_LIGHT2,
active_r());
@@ -368,10 +368,10 @@ Fl_FileBrowser::item_draw(void *p, // I - List item data
//
-// 'Fl_FileBrowser::Fl_FileBrowser()' - Create a Fl_FileBrowser widget.
+// 'Fl_File_Browser::Fl_File_Browser()' - Create a Fl_File_Browser widget.
//
-Fl_FileBrowser::Fl_FileBrowser(int x, // I - Upper-lefthand X coordinate
+Fl_File_Browser::Fl_File_Browser(int x, // I - Upper-lefthand X coordinate
int y, // I - Upper-lefthand Y coordinate
int w, // I - Width in pixels
int h, // I - Height in pixels
@@ -387,20 +387,20 @@ Fl_FileBrowser::Fl_FileBrowser(int x, // I - Upper-lefthand X coordinate
//
-// 'Fl_FileBrowser::load()' - Load a directory into the browser.
+// 'Fl_File_Browser::load()' - Load a directory into the browser.
//
int // O - Number of files loaded
-Fl_FileBrowser::load(const char *directory)// I - Directory to load
+Fl_File_Browser::load(const char *directory)// I - Directory to load
{
int i; // Looping var
int num_files; // Number of files in directory
int num_dirs; // Number of directories in list
char filename[4096]; // Current file
- Fl_FileIcon *icon; // Icon to use
+ Fl_File_Icon *icon; // Icon to use
-// printf("Fl_FileBrowser::load(\"%s\")\n", directory);
+// printf("Fl_File_Browser::load(\"%s\")\n", directory);
clear();
directory_ = directory;
@@ -413,8 +413,8 @@ Fl_FileBrowser::load(const char *directory)// I - Directory to load
//
num_files = 0;
- if ((icon = Fl_FileIcon::find("any", Fl_FileIcon::DEVICE)) == NULL)
- icon = Fl_FileIcon::find("any", Fl_FileIcon::DIRECTORY);
+ if ((icon = Fl_File_Icon::find("any", Fl_File_Icon::DEVICE)) == NULL)
+ icon = Fl_File_Icon::find("any", Fl_File_Icon::DIRECTORY);
#if defined(WIN32)
DWORD drives; // Drive available bits
@@ -478,7 +478,7 @@ Fl_FileBrowser::load(const char *directory)// I - Directory to load
strncat(filename, "/", sizeof(filename) - 1);
-// printf("Fl_FileBrowser::load() - adding \"%s\" to list...\n", filename);
+// printf("Fl_File_Browser::load() - adding \"%s\" to list...\n", filename);
add(filename, icon);
num_files ++;
}
@@ -530,11 +530,11 @@ Fl_FileBrowser::load(const char *directory)// I - Directory to load
snprintf(name, sizeof(name), "%s/", files[i]->d_name);
num_dirs ++;
- insert(num_dirs, name, Fl_FileIcon::find(filename));
+ insert(num_dirs, name, Fl_File_Icon::find(filename));
}
else if (filetype_ == FILES &&
filename_match(files[i]->d_name, pattern_))
- add(files[i]->d_name, Fl_FileIcon::find(filename));
+ add(files[i]->d_name, Fl_File_Icon::find(filename));
}
free(files[i]);
@@ -548,11 +548,11 @@ Fl_FileBrowser::load(const char *directory)// I - Directory to load
//
-// 'Fl_FileBrowser::filter()' - Set the filename filter.
+// 'Fl_File_Browser::filter()' - Set the filename filter.
//
void
-Fl_FileBrowser::filter(const char *pattern) // I - Pattern string
+Fl_File_Browser::filter(const char *pattern) // I - Pattern string
{
// If pattern is NULL set the pattern to "*"...
if (pattern)
@@ -566,5 +566,5 @@ Fl_FileBrowser::filter(const char *pattern) // I - Pattern string
//
-// End of "$Id: Fl_FileBrowser.cxx,v 1.13.2.5 2001/09/04 13:13:29 easysw Exp $".
+// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.1 2001/09/29 14:38:59 easysw Exp $".
//
diff --git a/src/Fl_FileChooser.cxx b/src/Fl_File_Chooser.cxx
index 724324f8c..42e4747a0 100644
--- a/src/Fl_FileChooser.cxx
+++ b/src/Fl_File_Chooser.cxx
@@ -1,55 +1,55 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0100
-#include "../FL/Fl_FileChooser.H"
+#include "../FL/Fl_File_Chooser.H"
-inline void Fl_FileChooser::cb_window_i(Fl_Window*, void*) {
+inline void Fl_File_Chooser::cb_window_i(Fl_Window*, void*) {
fileList->deselect();
fileName->value("");
window->hide();
}
-void Fl_FileChooser::cb_window(Fl_Window* o, void* v) {
- ((Fl_FileChooser*)(o->user_data()))->cb_window_i(o,v);
+void Fl_File_Chooser::cb_window(Fl_Window* o, void* v) {
+ ((Fl_File_Chooser*)(o->user_data()))->cb_window_i(o,v);
}
-inline void Fl_FileChooser::cb_fileList_i(Fl_FileBrowser*, void*) {
+inline void Fl_File_Chooser::cb_fileList_i(Fl_File_Browser*, void*) {
fileListCB();
}
-void Fl_FileChooser::cb_fileList(Fl_FileBrowser* o, void* v) {
- ((Fl_FileChooser*)(o->parent()->user_data()))->cb_fileList_i(o,v);
+void Fl_File_Chooser::cb_fileList(Fl_File_Browser* o, void* v) {
+ ((Fl_File_Chooser*)(o->parent()->user_data()))->cb_fileList_i(o,v);
}
-inline void Fl_FileChooser::cb_Cancel_i(Fl_Button*, void*) {
+inline void Fl_File_Chooser::cb_Cancel_i(Fl_Button*, void*) {
fileList->deselect();
fileName->value("");
window->hide();
}
-void Fl_FileChooser::cb_Cancel(Fl_Button* o, void* v) {
- ((Fl_FileChooser*)(o->parent()->user_data()))->cb_Cancel_i(o,v);
+void Fl_File_Chooser::cb_Cancel(Fl_Button* o, void* v) {
+ ((Fl_File_Chooser*)(o->parent()->user_data()))->cb_Cancel_i(o,v);
}
-inline void Fl_FileChooser::cb_okButton_i(Fl_Return_Button*, void*) {
+inline void Fl_File_Chooser::cb_okButton_i(Fl_Return_Button*, void*) {
// Do any callback that is registered...
if (callback_)
(*callback_)(this, data_);
window->hide();
}
-void Fl_FileChooser::cb_okButton(Fl_Return_Button* o, void* v) {
- ((Fl_FileChooser*)(o->parent()->user_data()))->cb_okButton_i(o,v);
+void Fl_File_Chooser::cb_okButton(Fl_Return_Button* o, void* v) {
+ ((Fl_File_Chooser*)(o->parent()->user_data()))->cb_okButton_i(o,v);
}
-inline void Fl_FileChooser::cb_fileName_i(Fl_Input*, void*) {
+inline void Fl_File_Chooser::cb_fileName_i(Fl_Input*, void*) {
fileNameCB();
}
-void Fl_FileChooser::cb_fileName(Fl_Input* o, void* v) {
- ((Fl_FileChooser*)(o->parent()->user_data()))->cb_fileName_i(o,v);
+void Fl_File_Chooser::cb_fileName(Fl_Input* o, void* v) {
+ ((Fl_File_Chooser*)(o->parent()->user_data()))->cb_fileName_i(o,v);
}
-inline void Fl_FileChooser::cb_upButton_i(Fl_Button*, void*) {
+inline void Fl_File_Chooser::cb_upButton_i(Fl_Button*, void*) {
up();
}
-void Fl_FileChooser::cb_upButton(Fl_Button* o, void* v) {
- ((Fl_FileChooser*)(o->parent()->user_data()))->cb_upButton_i(o,v);
+void Fl_File_Chooser::cb_upButton(Fl_Button* o, void* v) {
+ ((Fl_File_Chooser*)(o->parent()->user_data()))->cb_upButton_i(o,v);
}
#include <FL/Fl_Bitmap.H>
@@ -58,11 +58,11 @@ static unsigned char bits_up[] =
\200\1\200\377\377\0\0";
static Fl_Bitmap bitmap_up(bits_up, 16, 16);
-inline void Fl_FileChooser::cb_newButton_i(Fl_Button*, void*) {
+inline void Fl_File_Chooser::cb_newButton_i(Fl_Button*, void*) {
newdir();
}
-void Fl_FileChooser::cb_newButton(Fl_Button* o, void* v) {
- ((Fl_FileChooser*)(o->parent()->user_data()))->cb_newButton_i(o,v);
+void Fl_File_Chooser::cb_newButton(Fl_Button* o, void* v) {
+ ((Fl_File_Chooser*)(o->parent()->user_data()))->cb_newButton_i(o,v);
}
static unsigned char bits_new[] =
@@ -70,7 +70,7 @@ static unsigned char bits_new[] =
\200\1\200\377\377\0\0";
static Fl_Bitmap bitmap_new(bits_new, 16, 16);
-inline void Fl_FileChooser::cb_dirMenu_i(Fl_Choice*, void*) {
+inline void Fl_File_Chooser::cb_dirMenu_i(Fl_Choice*, void*) {
char pathname[1024];
int i;
@@ -79,11 +79,11 @@ for (i = 1; i <= dirMenu->value(); i ++)
strcat(pathname, dirMenu->text(i));
directory(pathname);
}
-void Fl_FileChooser::cb_dirMenu(Fl_Choice* o, void* v) {
- ((Fl_FileChooser*)(o->parent()->user_data()))->cb_dirMenu_i(o,v);
+void Fl_File_Chooser::cb_dirMenu(Fl_Choice* o, void* v) {
+ ((Fl_File_Chooser*)(o->parent()->user_data()))->cb_dirMenu_i(o,v);
}
-inline void Fl_FileChooser::cb__i(Fl_Button*, void*) {
+inline void Fl_File_Chooser::cb__i(Fl_Button*, void*) {
const char *f;
if ((f = fl_input("New Filter?",
fileList->filter())) != NULL)
@@ -92,21 +92,21 @@ if ((f = fl_input("New Filter?",
rescan();
};
}
-void Fl_FileChooser::cb_(Fl_Button* o, void* v) {
- ((Fl_FileChooser*)(o->parent()->user_data()))->cb__i(o,v);
+void Fl_File_Chooser::cb_(Fl_Button* o, void* v) {
+ ((Fl_File_Chooser*)(o->parent()->user_data()))->cb__i(o,v);
}
static unsigned char bits_allfiles[] =
"\374?\4 \4 \4 \204!\244%\304#\364/\364/\304#\244%\204!\4 \4 \4 \374?";
static Fl_Bitmap bitmap_allfiles(bits_allfiles, 16, 16);
-Fl_FileChooser::Fl_FileChooser(const char *d, const char *p, int t, const char *title) {
+Fl_File_Chooser::Fl_File_Chooser(const char *d, const char *p, int t, const char *title) {
Fl_Window* w;
{ Fl_Window* o = window = new Fl_Window(375, 315, "Pick a File");
w = o;
o->callback((Fl_Callback*)cb_window, (void*)(this));
w->hotspot(o);
- { Fl_FileBrowser* o = fileList = new Fl_FileBrowser(10, 45, 355, 180);
+ { Fl_File_Browser* o = fileList = new Fl_File_Browser(10, 45, 355, 180);
o->type(2);
o->callback((Fl_Callback*)cb_fileList);
Fl_Group::current()->resizable(o);
@@ -159,97 +159,101 @@ callback_ = 0;
data_ = 0;
}
-void Fl_FileChooser::callback(void (*cb)(Fl_FileChooser *, void *), void *d) {
+void Fl_File_Chooser::callback(void (*cb)(Fl_File_Chooser *, void *), void *d) {
callback_ = cb;
data_ = d;
}
-void Fl_FileChooser::color(Fl_Color c) {
+void Fl_File_Chooser::color(Fl_Color c) {
fileList->color(c);
}
-Fl_Color Fl_FileChooser::color() {
+Fl_Color Fl_File_Chooser::color() {
return (fileList->color());
}
-char * Fl_FileChooser::directory() {
+char * Fl_File_Chooser::directory() {
return directory_;
}
-void Fl_FileChooser::filter(const char *p) {
+void Fl_File_Chooser::filter(const char *p) {
fileList->filter(p);
rescan();
}
-const char * Fl_FileChooser::filter() {
+const char * Fl_File_Chooser::filter() {
return (fileList->filter());
}
-void Fl_FileChooser::hide() {
+void Fl_File_Chooser::hide() {
window->hide();
}
-void Fl_FileChooser::iconsize(uchar s) {
+void Fl_File_Chooser::iconsize(uchar s) {
fileList->iconsize(s);
}
-uchar Fl_FileChooser::iconsize() {
+uchar Fl_File_Chooser::iconsize() {
return (fileList->iconsize());
}
-void Fl_FileChooser::label(const char *l) {
+void Fl_File_Chooser::label(const char *l) {
window->label(l);
}
-const char * Fl_FileChooser::label() {
+const char * Fl_File_Chooser::label() {
return (window->label());
}
-void Fl_FileChooser::show() {
+void Fl_File_Chooser::show() {
window->show();
fileList->deselect();
}
-void Fl_FileChooser::textcolor(Fl_Color c) {
+void Fl_File_Chooser::textcolor(Fl_Color c) {
fileList->textcolor(c);
}
-Fl_Color Fl_FileChooser::textcolor() {
+Fl_Color Fl_File_Chooser::textcolor() {
return (fileList->textcolor());
}
-void Fl_FileChooser::textfont(uchar f) {
+void Fl_File_Chooser::textfont(uchar f) {
fileList->textfont(f);
}
-uchar Fl_FileChooser::textfont() {
+uchar Fl_File_Chooser::textfont() {
return (fileList->textfont());
}
-void Fl_FileChooser::textsize(uchar s) {
+void Fl_File_Chooser::textsize(uchar s) {
fileList->textsize(s);
}
-uchar Fl_FileChooser::textsize() {
+uchar Fl_File_Chooser::textsize() {
return (fileList->textsize());
}
-void Fl_FileChooser::type(int t) {
+void Fl_File_Chooser::type(int t) {
type_ = t;
-if (t == MULTI)
+if (t & MULTI)
fileList->type(FL_MULTI_BROWSER);
else
fileList->type(FL_HOLD_BROWSER);
-if (t != CREATE)
+if (t & CREATE)
newButton->deactivate();
else
newButton->activate();
+if (t & DIRECTORY)
+ fileList->filetype(Fl_File_Browser::DIRECTORIES);
+else
+ fileList->filetype(Fl_File_Browser::FILES);
}
-int Fl_FileChooser::type() {
+int Fl_File_Chooser::type() {
return (type_);
}
-int Fl_FileChooser::visible() {
+int Fl_File_Chooser::visible() {
return window->visible();
}
diff --git a/src/Fl_FileChooser.fl b/src/Fl_File_Chooser.fl
index ac11c961b..1302d773f 100644
--- a/src/Fl_FileChooser.fl
+++ b/src/Fl_File_Chooser.fl
@@ -1,15 +1,15 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0100
-header_name {../FL/Fl_FileChooser.H}
+header_name {../FL/Fl_File_Chooser.H}
code_name {.cxx}
gridx 5
gridy 5
snap 3
-class Fl_FileChooser {open
+class Fl_File_Chooser {open
} {
- decl {enum { SINGLE, MULTI, CREATE };} {public
+ decl {enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };} {selected public
}
- Function {Fl_FileChooser(const char *d, const char *p, int t, const char *title)} {open
+ Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {open
} {
Fl_Window window {
label {Pick a File}
@@ -25,8 +25,8 @@ window->hide();} open
Fl_Browser fileList {
callback {fileListCB();}
private xywh {10 45 355 180} type Hold resizable hotspot
- code0 {\#include <FL/Fl_FileBrowser.H>}
- class Fl_FileBrowser
+ code0 {\#include <FL/Fl_File_Browser.H>}
+ class Fl_File_Browser
}
Fl_Button {} {
label Cancel
@@ -54,7 +54,7 @@ window->hide();}
code0 {fileName->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY_ALWAYS);}
}
Fl_Button upButton {
- callback {up();} selected
+ callback {up();}
private image {up.xbm} xywh {280 10 25 25} labelsize 8
}
Fl_Button newButton {
@@ -91,7 +91,7 @@ value(d);
callback_ = 0;
data_ = 0;} {}
}
- decl {void (*callback_)(Fl_FileChooser*, void *);} {}
+ decl {void (*callback_)(Fl_File_Chooser*, void *);} {}
decl {void *data_;} {}
decl {char directory_[1024];} {}
decl {int type_;} {}
@@ -99,7 +99,7 @@ data_ = 0;} {}
decl {void fileNameCB();} {}
decl {void newdir();} {}
decl {void up();} {}
- Function {callback(void (*cb)(Fl_FileChooser *, void *), void *d)} {return_type void
+ Function {callback(void (*cb)(Fl_File_Chooser *, void *), void *d)} {return_type void
} {
code {callback_ = cb;
data_ = d;} {}
@@ -182,14 +182,18 @@ fileList->deselect();} {}
Function {type(int t)} {return_type void
} {
code {type_ = t;
-if (t == MULTI)
+if (t & MULTI)
fileList->type(FL_MULTI_BROWSER);
else
fileList->type(FL_HOLD_BROWSER);
-if (t != CREATE)
+if (t & CREATE)
newButton->deactivate();
else
- newButton->activate();} {}
+ newButton->activate();
+if (t & DIRECTORY)
+ fileList->filetype(Fl_File_Browser::DIRECTORIES);
+else
+ fileList->filetype(Fl_File_Browser::FILES);} {}
}
Function {type()} {return_type int
} {
diff --git a/src/Fl_FileChooser2.cxx b/src/Fl_File_Chooser2.cxx
index e353f56f2..801c6050d 100644
--- a/src/Fl_FileChooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -1,7 +1,7 @@
//
-// "$Id: Fl_FileChooser2.cxx,v 1.15.2.2 2001/08/04 12:21:33 easysw Exp $"
+// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.1 2001/09/29 14:38:59 easysw Exp $"
//
-// More Fl_FileChooser routines.
+// More Fl_File_Chooser routines.
//
// Copyright 1999-2001 by Michael Sweet.
//
@@ -24,22 +24,22 @@
//
// Contents:
//
-// Fl_FileChooser::directory() - Set the directory in the file chooser.
-// Fl_FileChooser::count() - Return the number of selected files.
-// Fl_FileChooser::value() - Return a selected filename.
-// Fl_FileChooser::up() - Go up one directory.
-// Fl_FileChooser::newdir() - Make a new directory.
-// Fl_FileChooser::rescan() - Rescan the current directory.
-// Fl_FileChooser::fileListCB() - Handle clicks (and double-clicks) in the
+// Fl_File_Chooser::directory() - Set the directory in the file chooser.
+// Fl_File_Chooser::count() - Return the number of selected files.
+// Fl_File_Chooser::value() - Return a selected filename.
+// Fl_File_Chooser::up() - Go up one directory.
+// Fl_File_Chooser::newdir() - Make a new directory.
+// Fl_File_Chooser::rescan() - Rescan the current directory.
+// Fl_File_Chooser::fileListCB() - Handle clicks (and double-clicks) in the
// FileBrowser.
-// Fl_FileChooser::fileNameCB() - Handle text entry in the FileBrowser.
+// Fl_File_Chooser::fileNameCB() - Handle text entry in the FileBrowser.
//
//
// Include necessary headers.
//
-#include <FL/Fl_FileChooser.H>
+#include <FL/Fl_File_Chooser.H>
#include <FL/filename.H>
#include <FL/fl_ask.H>
#include <FL/x.H>
@@ -63,11 +63,11 @@
//
-// 'Fl_FileChooser::directory()' - Set the directory in the file chooser.
+// 'Fl_File_Chooser::directory()' - Set the directory in the file chooser.
//
void
-Fl_FileChooser::directory(const char *d) // I - Directory to change to
+Fl_File_Chooser::directory(const char *d) // I - Directory to change to
{
char pathname[1024], // Full path of directory
*pathptr, // Pointer into full path
@@ -75,7 +75,7 @@ Fl_FileChooser::directory(const char *d) // I - Directory to change to
int levels; // Number of levels in directory
-// printf("Fl_FileChooser::directory(\"%s\")\n", d == NULL ? "(null)" : d);
+// printf("Fl_File_Chooser::directory(\"%s\")\n", d == NULL ? "(null)" : d);
// NULL == current directory
if (d == NULL)
@@ -148,11 +148,11 @@ Fl_FileChooser::directory(const char *d) // I - Directory to change to
//
-// 'Fl_FileChooser::count()' - Return the number of selected files.
+// 'Fl_File_Chooser::count()' - Return the number of selected files.
//
int // O - Number of selected files
-Fl_FileChooser::count()
+Fl_File_Chooser::count()
{
int i; // Looping var
int count; // Number of selected files
@@ -160,7 +160,7 @@ Fl_FileChooser::count()
char pathname[1024]; // Full path to file
- if (type_ != MULTI)
+ if (!(type_ & MULTI))
{
// Check to see if the file name input field is blank...
filename = fileName->value();
@@ -204,11 +204,11 @@ Fl_FileChooser::count()
//
-// 'Fl_FileChooser::value()' - Return a selected filename.
+// 'Fl_File_Chooser::value()' - Return a selected filename.
//
const char * // O - Filename or NULL
-Fl_FileChooser::value(int f) // I - File number
+Fl_File_Chooser::value(int f) // I - File number
{
int i; // Looping var
int count; // Number of selected files
@@ -216,7 +216,7 @@ Fl_FileChooser::value(int f) // I - File number
static char pathname[1024]; // Filename + directory
- if (type_ != MULTI)
+ if (!(type_ & MULTI))
{
name = fileName->value();
if (name[0] == '\0')
@@ -247,11 +247,11 @@ Fl_FileChooser::value(int f) // I - File number
//
-// 'Fl_FileChooser::value()' - Set the current filename.
+// 'Fl_File_Chooser::value()' - Set the current filename.
//
void
-Fl_FileChooser::value(const char *filename) // I - Filename + directory
+Fl_File_Chooser::value(const char *filename) // I - Filename + directory
{
int i, // Looping var
count; // Number of items in list
@@ -259,7 +259,7 @@ Fl_FileChooser::value(const char *filename) // I - Filename + directory
char pathname[1024]; // Local copy of filename
-// printf("Fl_FileChooser::value(\"%s\")\n", filename == NULL ? "(null)" : filename);
+// printf("Fl_File_Chooser::value(\"%s\")\n", filename == NULL ? "(null)" : filename);
// See if the filename is actually a directory...
if (filename == NULL || !filename[0] || filename_isdir(filename))
@@ -270,7 +270,7 @@ Fl_FileChooser::value(const char *filename) // I - Filename + directory
}
// Switch to single-selection mode as needed
- if (type_ == MULTI)
+ if (type_ & MULTI)
type(SINGLE);
// See if there is a directory in there...
@@ -307,11 +307,11 @@ Fl_FileChooser::value(const char *filename) // I - Filename + directory
//
-// 'Fl_FileChooser::up()' - Go up one directory.
+// 'Fl_File_Chooser::up()' - Go up one directory.
//
void
-Fl_FileChooser::up()
+Fl_File_Chooser::up()
{
char *slash; // Trailing slash
@@ -335,11 +335,11 @@ Fl_FileChooser::up()
//
-// 'Fl_FileChooser::newdir()' - Make a new directory.
+// 'Fl_File_Chooser::newdir()' - Make a new directory.
//
void
-Fl_FileChooser::newdir()
+Fl_File_Chooser::newdir()
{
const char *dir; // New directory name
char pathname[1024]; // Full path of directory
@@ -380,13 +380,13 @@ Fl_FileChooser::newdir()
//
-// 'Fl_FileChooser::rescan()' - Rescan the current directory.
+// 'Fl_File_Chooser::rescan()' - Rescan the current directory.
//
void
-Fl_FileChooser::rescan()
+Fl_File_Chooser::rescan()
{
-// printf("Fl_FileChooser::rescan(); directory = \"%s\"\n", directory_);
+// printf("Fl_File_Chooser::rescan(); directory = \"%s\"\n", directory_);
// Clear the current filename
fileName->value("");
@@ -398,12 +398,12 @@ Fl_FileChooser::rescan()
//
-// 'Fl_FileChooser::fileListCB()' - Handle clicks (and double-clicks) in the
+// 'Fl_File_Chooser::fileListCB()' - Handle clicks (and double-clicks) in the
// FileBrowser.
//
void
-Fl_FileChooser::fileListCB()
+Fl_File_Chooser::fileListCB()
{
char *filename, // New filename
pathname[1024]; // Full pathname to file
@@ -444,18 +444,18 @@ Fl_FileChooser::fileListCB()
{
fileName->value(filename);
- if (!filename_isdir(pathname))
+ if (!filename_isdir(pathname) || (type_ & DIRECTORY))
okButton->activate();
}
}
//
-// 'Fl_FileChooser::fileNameCB()' - Handle text entry in the FileBrowser.
+// 'Fl_File_Chooser::fileNameCB()' - Handle text entry in the FileBrowser.
//
void
-Fl_FileChooser::fileNameCB()
+Fl_File_Chooser::fileNameCB()
{
char *filename, // New filename
*slash, // Pointer to trailing slash
@@ -542,11 +542,11 @@ Fl_FileChooser::fileNameCB()
if (filename_isdir(pathname))
#endif /* WIN32 || __EMX__ */
directory(pathname);
- else if (type_ == CREATE || access(pathname, 0) == 0)
+ else if ((type_ & CREATE) || access(pathname, 0) == 0)
{
// New file or file exists... If we are in multiple selection mode,
// switch to single selection mode...
- if (type_ == MULTI)
+ if (type_ & MULTI)
type(SINGLE);
// Do any callback that is registered...
@@ -559,13 +559,6 @@ Fl_FileChooser::fileNameCB()
else
{
// File doesn't exist, so beep at and alert the user...
- // TODO: NEED TO ADD fl_beep() FUNCTION TO 2.0!
-#ifdef WIN32
- MessageBeep(MB_ICONEXCLAMATION);
-#else
- XBell(fl_display, 100);
-#endif // WIN32
-
fl_alert("Please choose an existing file!");
}
}
@@ -681,8 +674,8 @@ Fl_FileChooser::fileNameCB()
// See if we need to enable the OK button...
sprintf(pathname, "%s/%s", directory_, fileName->value());
- if ((type_ == CREATE || access(pathname, 0) == 0) &&
- !filename_isdir(pathname))
+ if ((type_ & CREATE || access(pathname, 0) == 0) &&
+ (!filename_isdir(pathname) || type_ & DIRECTORY))
okButton->activate();
else
okButton->deactivate();
@@ -691,5 +684,5 @@ Fl_FileChooser::fileNameCB()
//
-// End of "$Id: Fl_FileChooser2.cxx,v 1.15.2.2 2001/08/04 12:21:33 easysw Exp $".
+// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.1 2001/09/29 14:38:59 easysw Exp $".
//
diff --git a/src/Fl_FileIcon.cxx b/src/Fl_File_Icon.cxx
index dc0273d95..5c711235a 100644
--- a/src/Fl_FileIcon.cxx
+++ b/src/Fl_File_Icon.cxx
@@ -1,7 +1,7 @@
//
-// "$Id: Fl_FileIcon.cxx,v 1.10.2.1 2001/08/02 16:17:04 easysw Exp $"
+// "$Id: Fl_File_Icon.cxx,v 1.1.2.1 2001/09/29 14:38:59 easysw Exp $"
//
-// Fl_FileIcon routines.
+// Fl_File_Icon routines.
//
// KDE icon code donated by Maarten De Boer.
//
@@ -26,17 +26,17 @@
//
// Contents:
//
-// Fl_FileIcon::Fl_FileIcon() - Create a new file icon.
-// Fl_FileIcon::~Fl_FileIcon() - Remove a file icon.
-// Fl_FileIcon::add() - Add data to an icon.
-// Fl_FileIcon::find() - Find an icon based upon a given file.
-// Fl_FileIcon::draw() - Draw an icon.
-// Fl_FileIcon::label() - Set the widgets label to an icon.
-// Fl_FileIcon::labeltype() - Draw the icon label.
-// Fl_FileIcon::load() - Load an icon file...
-// Fl_FileIcon::load_fti() - Load an SGI-format FTI file...
-// Fl_FileIcon::load_xpm() - Load an XPM icon file...
-// Fl_FileIcon::load_system_icons() - Load the standard system icons/filetypes.
+// Fl_File_Icon::Fl_File_Icon() - Create a new file icon.
+// Fl_File_Icon::~Fl_File_Icon() - Remove a file icon.
+// Fl_File_Icon::add() - Add data to an icon.
+// Fl_File_Icon::find() - Find an icon based upon a given file.
+// Fl_File_Icon::draw() - Draw an icon.
+// Fl_File_Icon::label() - Set the widgets label to an icon.
+// Fl_File_Icon::labeltype() - Draw the icon label.
+// Fl_File_Icon::load() - Load an icon file...
+// Fl_File_Icon::load_fti() - Load an SGI-format FTI file...
+// Fl_File_Icon::load_xpm() - Load an XPM icon file...
+// Fl_File_Icon::load_system_icons() - Load the standard system icons/filetypes.
//
//
@@ -63,7 +63,7 @@
# include <unistd.h>
#endif /* WIN32 || __EMX__ */
-#include <FL/Fl_FileIcon.H>
+#include <FL/Fl_File_Icon.H>
#include <FL/Fl_Widget.H>
#include <FL/fl_draw.H>
#include <FL/filename.H>
@@ -86,7 +86,7 @@
// Icon cache...
//
-Fl_FileIcon *Fl_FileIcon::first_ = (Fl_FileIcon *)0;
+Fl_File_Icon *Fl_File_Icon::first_ = (Fl_File_Icon *)0;
//
@@ -100,10 +100,10 @@ static char *get_kde_val(char *str, const char *key);
//
-// 'Fl_FileIcon::Fl_FileIcon()' - Create a new file icon.
+// 'Fl_File_Icon::Fl_File_Icon()' - Create a new file icon.
//
-Fl_FileIcon::Fl_FileIcon(const char *p, /* I - Filename pattern */
+Fl_File_Icon::Fl_File_Icon(const char *p, /* I - Filename pattern */
int t, /* I - File type */
int nd, /* I - Number of data values */
short *d) /* I - Data values */
@@ -133,18 +133,18 @@ Fl_FileIcon::Fl_FileIcon(const char *p, /* I - Filename pattern */
//
-// 'Fl_FileIcon::~Fl_FileIcon()' - Remove a file icon.
+// 'Fl_File_Icon::~Fl_File_Icon()' - Remove a file icon.
//
-Fl_FileIcon::~Fl_FileIcon()
+Fl_File_Icon::~Fl_File_Icon()
{
- Fl_FileIcon *current, // Current icon in list
+ Fl_File_Icon *current, // Current icon in list
*prev; // Previous icon in list
// Find the icon in the list...
- for (current = first_, prev = (Fl_FileIcon *)0;
- current != this && current != (Fl_FileIcon *)0;
+ for (current = first_, prev = (Fl_File_Icon *)0;
+ current != this && current != (Fl_File_Icon *)0;
prev = current, current = current->next_);
// Remove the icon from the list as needed...
@@ -163,11 +163,11 @@ Fl_FileIcon::~Fl_FileIcon()
//
-// 'Fl_FileIcon::add()' - Add data to an icon.
+// 'Fl_File_Icon::add()' - Add data to an icon.
//
short * // O - Pointer to new data value
-Fl_FileIcon::add(short d) // I - Data to add
+Fl_File_Icon::add(short d) // I - Data to add
{
short *dptr; // Pointer to new data value
@@ -197,14 +197,14 @@ Fl_FileIcon::add(short d) // I - Data to add
//
-// 'Fl_FileIcon::find()' - Find an icon based upon a given file.
+// 'Fl_File_Icon::find()' - Find an icon based upon a given file.
//
-Fl_FileIcon * // O - Matching file icon or NULL
-Fl_FileIcon::find(const char *filename, // I - Name of file */
+Fl_File_Icon * // O - Matching file icon or NULL
+Fl_File_Icon::find(const char *filename, // I - Name of file */
int filetype) // I - Enumerated file type
{
- Fl_FileIcon *current; // Current file in list
+ Fl_File_Icon *current; // Current file in list
struct stat fileinfo; // Information on file
@@ -232,7 +232,7 @@ Fl_FileIcon::find(const char *filename, // I - Name of file */
// Loop through the available file types and return any match that
// is found...
- for (current = first_; current != (Fl_FileIcon *)0; current = current->next_)
+ for (current = first_; current != (Fl_File_Icon *)0; current = current->next_)
if ((current->type_ == filetype || current->type_ == ANY) &&
filename_match(filename, current->pattern_))
break;
@@ -243,11 +243,11 @@ Fl_FileIcon::find(const char *filename, // I - Name of file */
//
-// 'Fl_FileIcon::draw()' - Draw an icon.
+// 'Fl_File_Icon::draw()' - Draw an icon.
//
void
-Fl_FileIcon::draw(int x, // I - Upper-lefthand X
+Fl_File_Icon::draw(int x, // I - Upper-lefthand X
int y, // I - Upper-lefthand Y
int w, // I - Width of bounding box
int h, // I - Height of bounding box
@@ -434,11 +434,11 @@ Fl_FileIcon::draw(int x, // I - Upper-lefthand X
//
-// 'Fl_FileIcon::label()' - Set the widget's label to an icon.
+// 'Fl_File_Icon::label()' - Set the widget's label to an icon.
//
void
-Fl_FileIcon::label(Fl_Widget *w) // I - Widget to label
+Fl_File_Icon::label(Fl_Widget *w) // I - Widget to label
{
Fl::set_labeltype(_FL_ICON_LABEL, labeltype, 0);
w->label(_FL_ICON_LABEL, (const char*)this);
@@ -446,41 +446,41 @@ Fl_FileIcon::label(Fl_Widget *w) // I - Widget to label
//
-// 'Fl_FileIcon::labeltype()' - Draw the icon label.
+// 'Fl_File_Icon::labeltype()' - Draw the icon label.
//
void
-Fl_FileIcon::labeltype(const Fl_Label *o, // I - Label data
+Fl_File_Icon::labeltype(const Fl_Label *o, // I - Label data
int x, // I - X position of label
int y, // I - Y position of label
int w, // I - Width of label
int h, // I - Height of label
Fl_Align a) // I - Label alignment (not used)
{
- Fl_FileIcon *icon; // Pointer to icon data
+ Fl_File_Icon *icon; // Pointer to icon data
(void)a;
- icon = (Fl_FileIcon *)(o->value);
+ icon = (Fl_File_Icon *)(o->value);
icon->draw(x, y, w, h, (Fl_Color)(o->color));
}
//
-// 'Fl_FileIcon::load()' - Load an icon file...
+// 'Fl_File_Icon::load()' - Load an icon file...
//
void
-Fl_FileIcon::load(const char *f) // I - File to read from
+Fl_File_Icon::load(const char *f) // I - File to read from
{
const char *ext; // File extension
if ((ext = filename_ext(f)) == NULL)
{
- fprintf(stderr, "Fl_FileIcon::load(): Unknown file type for \"%s\".\n", f);
+ fprintf(stderr, "Fl_File_Icon::load(): Unknown file type for \"%s\".\n", f);
return;
}
@@ -494,18 +494,18 @@ Fl_FileIcon::load(const char *f) // I - File to read from
#endif /* 0 */
else
{
- fprintf(stderr, "Fl_FileIcon::load(): Unknown file type for \"%s\".\n", f);
+ fprintf(stderr, "Fl_File_Icon::load(): Unknown file type for \"%s\".\n", f);
return;
}
}
//
-// 'Fl_FileIcon::load_fti()' - Load an SGI-format FTI file...
+// 'Fl_File_Icon::load_fti()' - Load an SGI-format FTI file...
//
void
-Fl_FileIcon::load_fti(const char *fti) // I - File to read from
+Fl_File_Icon::load_fti(const char *fti) // I - File to read from
{
FILE *fp; // File pointer
int ch; // Current character
@@ -518,7 +518,7 @@ Fl_FileIcon::load_fti(const char *fti) // I - File to read from
// Try to open the file...
if ((fp = fopen(fti, "rb")) == NULL)
{
- fprintf(stderr, "Fl_FileIcon::load_fti(): Unable to open \"%s\" - %s\n",
+ fprintf(stderr, "Fl_File_Icon::load_fti(): Unable to open \"%s\" - %s\n",
fti, strerror(errno));
return;
}
@@ -548,7 +548,7 @@ Fl_FileIcon::load_fti(const char *fti) // I - File to read from
// OK, this character better be a letter...
if (!isalpha(ch))
{
- fprintf(stderr, "Fl_FileIcon::load_fti(): Expected a letter at file position %ld (saw '%c')\n",
+ fprintf(stderr, "Fl_File_Icon::load_fti(): Expected a letter at file position %ld (saw '%c')\n",
ftell(fp) - 1, ch);
break;
}
@@ -570,7 +570,7 @@ Fl_FileIcon::load_fti(const char *fti) // I - File to read from
// Make sure we stopped on a parenthesis...
if (ch != '(')
{
- fprintf(stderr, "Fl_FileIcon::load_fti(): Expected a ( at file position %ld (saw '%c')\n",
+ fprintf(stderr, "Fl_File_Icon::load_fti(): Expected a ( at file position %ld (saw '%c')\n",
ftell(fp) - 1, ch);
break;
}
@@ -591,7 +591,7 @@ Fl_FileIcon::load_fti(const char *fti) // I - File to read from
// Make sure we stopped on a parenthesis...
if (ch != ')')
{
- fprintf(stderr, "Fl_FileIcon::load_fti(): Expected a ) at file position %ld (saw '%c')\n",
+ fprintf(stderr, "Fl_File_Icon::load_fti(): Expected a ) at file position %ld (saw '%c')\n",
ftell(fp) - 1, ch);
break;
}
@@ -599,7 +599,7 @@ Fl_FileIcon::load_fti(const char *fti) // I - File to read from
// Make sure the next character is a semicolon...
if ((ch = getc(fp)) != ';')
{
- fprintf(stderr, "Fl_FileIcon::load_fti(): Expected a ; at file position %ld (saw '%c')\n",
+ fprintf(stderr, "Fl_File_Icon::load_fti(): Expected a ; at file position %ld (saw '%c')\n",
ftell(fp) - 1, ch);
break;
}
@@ -613,7 +613,7 @@ Fl_FileIcon::load_fti(const char *fti) // I - File to read from
//
// name FLTK color
// ------------- ----------
- // iconcolor 256; mapped to the icon color in Fl_FileIcon::draw()
+ // iconcolor 256; mapped to the icon color in Fl_File_Icon::draw()
// shadowcolor FL_DARK3
// outlinecolor FL_BLACK
if (strcmp(params, "iconcolor") == 0)
@@ -690,7 +690,7 @@ Fl_FileIcon::load_fti(const char *fti) // I - File to read from
}
else
{
- fprintf(stderr, "Fl_FileIcon::load_fti(): Unknown command \"%s\" at file position %ld.\n",
+ fprintf(stderr, "Fl_File_Icon::load_fti(): Unknown command \"%s\" at file position %ld.\n",
command, ftell(fp) - 1);
break;
}
@@ -708,11 +708,11 @@ Fl_FileIcon::load_fti(const char *fti) // I - File to read from
//
-// 'Fl_FileIcon::load_xpm()' - Load an XPM icon file...
+// 'Fl_File_Icon::load_xpm()' - Load an XPM icon file...
//
void
-Fl_FileIcon::load_xpm(const char *xpm) // I - File to read from
+Fl_File_Icon::load_xpm(const char *xpm) // I - File to read from
{
FILE *fp; // File pointer
int i, j; // Looping vars
@@ -912,12 +912,12 @@ Fl_FileIcon::load_xpm(const char *xpm) // I - File to read from
//
-// 'Fl_FileIcon::load_system_icons()' - Load the standard system icons/filetypes.
+// 'Fl_File_Icon::load_system_icons()' - Load the standard system icons/filetypes.
void
-Fl_FileIcon::load_system_icons(void)
+Fl_File_Icon::load_system_icons(void)
{
- Fl_FileIcon *icon; // New icons
+ Fl_File_Icon *icon; // New icons
static int init = 0; // Have the icons been initialized?
static short plain[] = // Plain file icon
{
@@ -991,7 +991,7 @@ Fl_FileIcon::load_system_icons(void)
if (!access("/usr/share/mimelnk", F_OK))
{
// Load KDE icons...
- icon = new Fl_FileIcon("*", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
icon->load_xpm("/usr/share/icons/unknown.xpm");
load_kde_icons("/usr/share/mimelnk");
@@ -999,82 +999,82 @@ Fl_FileIcon::load_system_icons(void)
else if (!access("/usr/share/icons/folder.xpm", F_OK))
{
// Load GNOME icons...
- icon = new Fl_FileIcon("*", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
icon->load_xpm("/usr/share/icons/page.xpm");
- icon = new Fl_FileIcon("*", Fl_FileIcon::DIRECTORY);
+ icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
icon->load_xpm("/usr/share/icons/folder.xpm");
}
else if (!access("/usr/dt/appconfig/icons", F_OK))
{
// Load CDE icons...
- icon = new Fl_FileIcon("*", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
icon->load_xpm("/usr/dt/appconfig/icons/C/Dtdata.m.pm");
- icon = new Fl_FileIcon("*", Fl_FileIcon::DIRECTORY);
+ icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
icon->load_xpm("/usr/dt/appconfig/icons/C/DtdirB.m.pm");
- icon = new Fl_FileIcon("core", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("core", Fl_File_Icon::PLAIN);
icon->load_xpm("/usr/dt/appconfig/icons/C/Dtcore.m.pm");
- icon = new Fl_FileIcon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_File_Icon::PLAIN);
icon->load_xpm("/usr/dt/appconfig/icons/C/Dtimage.m.pm");
- icon = new Fl_FileIcon("*.{eps|pdf|ps}", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*.{eps|pdf|ps}", Fl_File_Icon::PLAIN);
icon->load_xpm("/usr/dt/appconfig/icons/C/Dtps.m.pm");
- icon = new Fl_FileIcon("*.ppd", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*.ppd", Fl_File_Icon::PLAIN);
icon->load_xpm("/usr/dt/appconfig/icons/C/DtPrtpr.m.pm");
}
else if (!access("/usr/lib/filetype", F_OK))
{
// Load SGI icons...
- icon = new Fl_FileIcon("*", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
icon->load_fti("/usr/lib/filetype/iconlib/generic.doc.fti");
- icon = new Fl_FileIcon("*", Fl_FileIcon::DIRECTORY);
+ icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
icon->load_fti("/usr/lib/filetype/iconlib/generic.folder.closed.fti");
- icon = new Fl_FileIcon("core", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("core", Fl_File_Icon::PLAIN);
icon->load_fti("/usr/lib/filetype/default/iconlib/CoreFile.fti");
- icon = new Fl_FileIcon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_File_Icon::PLAIN);
icon->load_fti("/usr/lib/filetype/system/iconlib/ImageFile.fti");
if (!access("/usr/lib/filetype/install/iconlib/acroread.doc.fti", F_OK))
{
- icon = new Fl_FileIcon("*.{eps|ps}", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*.{eps|ps}", Fl_File_Icon::PLAIN);
icon->load_fti("/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
- icon = new Fl_FileIcon("*.pdf", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*.pdf", Fl_File_Icon::PLAIN);
icon->load_fti("/usr/lib/filetype/install/iconlib/acroread.doc.fti");
}
else
{
- icon = new Fl_FileIcon("*.{eps|pdf|ps}", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*.{eps|pdf|ps}", Fl_File_Icon::PLAIN);
icon->load_fti("/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
}
if (!access("/usr/lib/filetype/install/iconlib/html.fti", F_OK))
{
- icon = new Fl_FileIcon("*.{htm|html|shtml}", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*.{htm|html|shtml}", Fl_File_Icon::PLAIN);
icon->load_fti("/usr/lib/filetype/iconlib/generic.doc.fti");
icon->load_fti("/usr/lib/filetype/install/iconlib/html.fti");
}
if (!access("/usr/lib/filetype/install/iconlib/color.ps.idle.fti", F_OK))
{
- icon = new Fl_FileIcon("*.ppd", Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon("*.ppd", Fl_File_Icon::PLAIN);
icon->load_fti("/usr/lib/filetype/install/iconlib/color.ps.idle.fti");
}
}
else
{
// Create the default icons...
- new Fl_FileIcon("*", Fl_FileIcon::PLAIN, sizeof(plain) / sizeof(plain[0]), plain);
- new Fl_FileIcon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_FileIcon::PLAIN,
+ new Fl_File_Icon("*", Fl_File_Icon::PLAIN, sizeof(plain) / sizeof(plain[0]), plain);
+ new Fl_File_Icon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_File_Icon::PLAIN,
sizeof(image) / sizeof(image[0]), image);
- new Fl_FileIcon("*", Fl_FileIcon::DIRECTORY, sizeof(dir) / sizeof(dir[0]), dir);
+ new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY, sizeof(dir) / sizeof(dir[0]), dir);
}
// Mark things as initialized...
@@ -1134,7 +1134,7 @@ load_kde_mimelnk(const char *filename)
char mimetype[1024];
char *val;
char full_iconfilename[1024];
- Fl_FileIcon *icon;
+ Fl_File_Icon *icon;
if ((fp = fopen(filename, "rb")) != NULL)
@@ -1154,9 +1154,9 @@ load_kde_mimelnk(const char *filename)
sprintf(full_iconfilename, "/usr/share/icons/%s", iconfilename);
if (strcmp(mimetype, "inode/directory") == 0)
- icon = new Fl_FileIcon("*", Fl_FileIcon::DIRECTORY);
+ icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
else
- icon = new Fl_FileIcon(kde_to_fltk_pattern(pattern), Fl_FileIcon::PLAIN);
+ icon = new Fl_File_Icon(kde_to_fltk_pattern(pattern), Fl_File_Icon::PLAIN);
icon->load_xpm(full_iconfilename);
}
@@ -1221,5 +1221,5 @@ get_kde_val(char *str,
//
-// End of "$Id: Fl_FileIcon.cxx,v 1.10.2.1 2001/08/02 16:17:04 easysw Exp $".
+// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.1 2001/09/29 14:38:59 easysw Exp $".
//
diff --git a/src/Fl_HelpDialog.cxx b/src/Fl_Help_Dialog.cxx
index 71e04e8a8..feacd52de 100644
--- a/src/Fl_HelpDialog.cxx
+++ b/src/Fl_Help_Dialog.cxx
@@ -1,8 +1,8 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0100
-#include "../FL/Fl_HelpDialog.H"
+#include "../FL/Fl_Help_Dialog.H"
-inline void Fl_HelpDialog::cb_view__i(Fl_HelpView*, void*) {
+inline void Fl_Help_Dialog::cb_view__i(Fl_Help_View*, void*) {
if (view_->changed())
{
index_ ++;
@@ -34,18 +34,18 @@ else if (view_->filename())
line_[index_] = view_->topline();
};
}
-void Fl_HelpDialog::cb_view_(Fl_HelpView* o, void* v) {
- ((Fl_HelpDialog*)(o->parent()->user_data()))->cb_view__i(o,v);
+void Fl_Help_Dialog::cb_view_(Fl_Help_View* o, void* v) {
+ ((Fl_Help_Dialog*)(o->parent()->user_data()))->cb_view__i(o,v);
}
-inline void Fl_HelpDialog::cb_Close_i(Fl_Button*, void*) {
+inline void Fl_Help_Dialog::cb_Close_i(Fl_Button*, void*) {
window_->hide();
}
-void Fl_HelpDialog::cb_Close(Fl_Button* o, void* v) {
- ((Fl_HelpDialog*)(o->parent()->user_data()))->cb_Close_i(o,v);
+void Fl_Help_Dialog::cb_Close(Fl_Button* o, void* v) {
+ ((Fl_Help_Dialog*)(o->parent()->user_data()))->cb_Close_i(o,v);
}
-inline void Fl_HelpDialog::cb_back__i(Fl_Button*, void*) {
+inline void Fl_Help_Dialog::cb_back__i(Fl_Button*, void*) {
if (index_ > 0)
index_ --;
@@ -59,11 +59,11 @@ if (strcmp(view_->filename(), file_[index_]) != 0)
view_->topline(line_[index_]);
}
-void Fl_HelpDialog::cb_back_(Fl_Button* o, void* v) {
- ((Fl_HelpDialog*)(o->parent()->user_data()))->cb_back__i(o,v);
+void Fl_Help_Dialog::cb_back_(Fl_Button* o, void* v) {
+ ((Fl_Help_Dialog*)(o->parent()->user_data()))->cb_back__i(o,v);
}
-inline void Fl_HelpDialog::cb_forward__i(Fl_Button*, void*) {
+inline void Fl_Help_Dialog::cb_forward__i(Fl_Button*, void*) {
if (index_ < max_)
index_ ++;
@@ -77,11 +77,11 @@ if (strcmp(view_->filename(), file_[index_]) != 0)
view_->topline(line_[index_]);
}
-void Fl_HelpDialog::cb_forward_(Fl_Button* o, void* v) {
- ((Fl_HelpDialog*)(o->parent()->user_data()))->cb_forward__i(o,v);
+void Fl_Help_Dialog::cb_forward_(Fl_Button* o, void* v) {
+ ((Fl_Help_Dialog*)(o->parent()->user_data()))->cb_forward__i(o,v);
}
-inline void Fl_HelpDialog::cb_smaller__i(Fl_Button*, void*) {
+inline void Fl_Help_Dialog::cb_smaller__i(Fl_Button*, void*) {
if (view_->textsize() > 8)
view_->textsize(view_->textsize() - 2);
@@ -89,11 +89,11 @@ if (view_->textsize() <= 8)
smaller_->deactivate();
larger_->activate();
}
-void Fl_HelpDialog::cb_smaller_(Fl_Button* o, void* v) {
- ((Fl_HelpDialog*)(o->parent()->user_data()))->cb_smaller__i(o,v);
+void Fl_Help_Dialog::cb_smaller_(Fl_Button* o, void* v) {
+ ((Fl_Help_Dialog*)(o->parent()->user_data()))->cb_smaller__i(o,v);
}
-inline void Fl_HelpDialog::cb_larger__i(Fl_Button*, void*) {
+inline void Fl_Help_Dialog::cb_larger__i(Fl_Button*, void*) {
if (view_->textsize() < 18)
view_->textsize(view_->textsize() + 2);
@@ -101,16 +101,16 @@ if (view_->textsize() >= 18)
larger_->deactivate();
smaller_->activate();
}
-void Fl_HelpDialog::cb_larger_(Fl_Button* o, void* v) {
- ((Fl_HelpDialog*)(o->parent()->user_data()))->cb_larger__i(o,v);
+void Fl_Help_Dialog::cb_larger_(Fl_Button* o, void* v) {
+ ((Fl_Help_Dialog*)(o->parent()->user_data()))->cb_larger__i(o,v);
}
-Fl_HelpDialog::Fl_HelpDialog() {
+Fl_Help_Dialog::Fl_Help_Dialog() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = window_ = new Fl_Double_Window(530, 385, "Help Dialog");
w = o;
o->user_data((void*)(this));
- { Fl_HelpView* o = view_ = new Fl_HelpView(10, 10, 510, 330);
+ { Fl_Help_View* o = view_ = new Fl_Help_View(10, 10, 510, 330);
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_view_);
o->end();
@@ -148,37 +148,37 @@ index_ = -1;
max_ = 0;
}
-Fl_HelpDialog::~Fl_HelpDialog() {
+Fl_Help_Dialog::~Fl_Help_Dialog() {
delete window_;
}
-int Fl_HelpDialog::h() {
+int Fl_Help_Dialog::h() {
return (window_->h());
}
-void Fl_HelpDialog::hide() {
+void Fl_Help_Dialog::hide() {
window_->hide();
}
-void Fl_HelpDialog::load(const char *f) {
+void Fl_Help_Dialog::load(const char *f) {
view_->set_changed();
view_->load(f);
window_->label(view_->title());
}
-void Fl_HelpDialog::position(int xx, int yy) {
+void Fl_Help_Dialog::position(int xx, int yy) {
window_->position(xx, yy);
}
-void Fl_HelpDialog::resize(int xx, int yy, int ww, int hh) {
+void Fl_Help_Dialog::resize(int xx, int yy, int ww, int hh) {
window_->resize(xx, yy, ww, hh);
}
-void Fl_HelpDialog::show() {
+void Fl_Help_Dialog::show() {
window_->show();
}
-void Fl_HelpDialog::textsize(uchar s) {
+void Fl_Help_Dialog::textsize(uchar s) {
view_->textsize(s);
if (s <= 8)
@@ -192,30 +192,30 @@ else
larger_->activate();
}
-uchar Fl_HelpDialog::textsize() {
+uchar Fl_Help_Dialog::textsize() {
return (view_->textsize());
}
-void Fl_HelpDialog::topline(const char *n) {
+void Fl_Help_Dialog::topline(const char *n) {
view_->topline(n);
}
-void Fl_HelpDialog::topline(int n) {
+void Fl_Help_Dialog::topline(int n) {
view_->topline(n);
}
-int Fl_HelpDialog::visible() {
+int Fl_Help_Dialog::visible() {
return (window_->visible());
}
-int Fl_HelpDialog::w() {
+int Fl_Help_Dialog::w() {
return (window_->w());
}
-int Fl_HelpDialog::x() {
+int Fl_Help_Dialog::x() {
return (window_->x());
}
-int Fl_HelpDialog::y() {
+int Fl_Help_Dialog::y() {
return (window_->y());
}
diff --git a/src/Fl_HelpDialog.fl b/src/Fl_Help_Dialog.fl
index 53f7fe698..79b27b012 100644
--- a/src/Fl_HelpDialog.fl
+++ b/src/Fl_Help_Dialog.fl
@@ -1,17 +1,17 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0100
-header_name {../FL/Fl_HelpDialog.H}
+header_name {../FL/Fl_Help_Dialog.H}
code_name {.cxx}
gridx 5
gridy 5
snap 3
-class Fl_HelpDialog {open
+class Fl_Help_Dialog {open
} {
decl {int index_;} {}
decl {int max_;} {}
decl {int line_[100];} {}
decl {char file_[100][256];} {}
- Function {Fl_HelpDialog()} {open
+ Function {Fl_Help_Dialog()} {open
} {
Fl_Window window_ {
label {Help Dialog} open selected
@@ -50,8 +50,8 @@ else if (view_->filename())
line_[index_] = view_->topline();
}} open
private xywh {10 10 510 330} box DOWN_BOX resizable
- code0 {\#include <FL/Fl_HelpView.H>}
- class Fl_HelpView
+ code0 {\#include <FL/Fl_Help_View.H>}
+ class Fl_Help_View
} {}
Fl_Button {} {
label Close
@@ -117,7 +117,7 @@ forward_->deactivate();
index_ = -1;
max_ = 0;} {}
}
- Function {~Fl_HelpDialog()} {} {
+ Function {~Fl_Help_Dialog()} {} {
code {delete window_;} {}
}
Function {h()} {return_type int
diff --git a/src/Fl_HelpView.cxx b/src/Fl_Help_View.cxx
index 479e8865d..f5b8063ab 100644
--- a/src/Fl_HelpView.cxx
+++ b/src/Fl_Help_View.cxx
@@ -1,7 +1,7 @@
//
-// "$Id: Fl_HelpView.cxx,v 1.1.2.5 2001/09/10 03:09:43 easysw Exp $"
+// "$Id: Fl_Help_View.cxx,v 1.1.2.1 2001/09/29 14:38:59 easysw Exp $"
//
-// Fl_HelpView widget routines.
+// Fl_Help_View widget routines.
//
// Copyright 1997-2001 by Easy Software Products.
// Image support donated by Matthias Melcher, Copyright 2000.
@@ -25,32 +25,32 @@
//
// Contents:
//
-// Fl_HelpView::add_block() - Add a text block to the list.
-// Fl_HelpView::add_image() - Add an image to the image cache.
-// Fl_HelpView::add_link() - Add a new link to the list.
-// Fl_HelpView::add_target() - Add a new target to the list.
-// Fl_HelpView::compare_targets() - Compare two targets.
-// Fl_HelpView::do_align() - Compute the alignment for a line in
+// Fl_Help_View::add_block() - Add a text block to the list.
+// Fl_Help_View::add_image() - Add an image to the image cache.
+// Fl_Help_View::add_link() - Add a new link to the list.
+// Fl_Help_View::add_target() - Add a new target to the list.
+// Fl_Help_View::compare_targets() - Compare two targets.
+// Fl_Help_View::do_align() - Compute the alignment for a line in
// a block.
-// Fl_HelpView::draw() - Draw the Fl_HelpView widget.
-// Fl_HelpView::find_image() - Find an image by name
-// Fl_HelpView::format() - Format the help text.
-// Fl_HelpView::format_table() - Format a table...
-// Fl_HelpView::get_align() - Get an alignment attribute.
-// Fl_HelpView::get_attr() - Get an attribute value from the string.
-// Fl_HelpView::get_color() - Get an alignment attribute.
-// Fl_HelpView::handle() - Handle events in the widget.
-// Fl_HelpView::Fl_HelpView() - Build a Fl_HelpView widget.
-// Fl_HelpView::~Fl_HelpView() - Destroy a Fl_HelpView widget.
-// Fl_HelpView::load() - Load the specified file.
-// Fl_HelpView::load_gif() - Load a GIF image file...
-// Fl_HelpView::load_jpeg() - Load a JPEG image file.
-// Fl_HelpView::load_png() - Load a PNG image file.
-// Fl_HelpView::resize() - Resize the help widget.
-// Fl_HelpView::topline() - Set the top line to the named target.
-// Fl_HelpView::topline() - Set the top line by number.
-// Fl_HelpView::value() - Set the help text directly.
-// Fl_HelpView::compare_blocks() - Compare two blocks.
+// Fl_Help_View::draw() - Draw the Fl_Help_View widget.
+// Fl_Help_View::find_image() - Find an image by name
+// Fl_Help_View::format() - Format the help text.
+// Fl_Help_View::format_table() - Format a table...
+// Fl_Help_View::get_align() - Get an alignment attribute.
+// Fl_Help_View::get_attr() - Get an attribute value from the string.
+// Fl_Help_View::get_color() - Get an alignment attribute.
+// Fl_Help_View::handle() - Handle events in the widget.
+// Fl_Help_View::Fl_Help_View() - Build a Fl_Help_View widget.
+// Fl_Help_View::~Fl_Help_View() - Destroy a Fl_Help_View widget.
+// Fl_Help_View::load() - Load the specified file.
+// Fl_Help_View::load_gif() - Load a GIF image file...
+// Fl_Help_View::load_jpeg() - Load a JPEG image file.
+// Fl_Help_View::load_png() - Load a PNG image file.
+// Fl_Help_View::resize() - Resize the help widget.
+// Fl_Help_View::topline() - Set the top line to the named target.
+// Fl_Help_View::topline() - Set the top line by number.
+// Fl_Help_View::value() - Set the help text directly.
+// Fl_Help_View::compare_blocks() - Compare two blocks.
// gif_read_cmap() - Read the colormap from a GIF file...
// gif_get_block() - Read a GIF data block...
// gif_get_code() - Get a LZW code from the file...
@@ -63,7 +63,7 @@
// Include necessary header files...
//
-#include <FL/Fl_HelpView.H>
+#include <FL/Fl_Help_View.H>
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
@@ -433,24 +433,24 @@ static int gif_read_cmap(FILE *fp, int ncolors, gif_cmap_t cmap);
static int gif_get_block(FILE *fp, unsigned char *buffer);
static int gif_get_code (FILE *fp, int code_size, int first_time);
static int gif_read_lzw(FILE *fp, int first_time, int input_code_size);
-static int gif_read_image(FILE *fp, Fl_HelpImage *img, gif_cmap_t cmap,
+static int gif_read_image(FILE *fp, Fl_Help_Image *img, gif_cmap_t cmap,
int interlace);
static void scrollbar_callback(Fl_Widget *s, void *);
//
-// 'Fl_HelpView::add_block()' - Add a text block to the list.
+// 'Fl_Help_View::add_block()' - Add a text block to the list.
//
-Fl_HelpBlock * // O - Pointer to new block
-Fl_HelpView::add_block(const char *s, // I - Pointer to start of block text
+Fl_Help_Block * // O - Pointer to new block
+Fl_Help_View::add_block(const char *s, // I - Pointer to start of block text
int xx, // I - X position of block
int yy, // I - Y position of block
int ww, // I - Right margin of block
int hh, // I - Height of block
unsigned char border) // I - Draw border?
{
- Fl_HelpBlock *temp; // New block
+ Fl_Help_Block *temp; // New block
// printf("add_block(s = %p, xx = %d, yy = %d, ww = %d, hh = %d, border = %d)\n",
@@ -461,9 +461,9 @@ Fl_HelpView::add_block(const char *s, // I - Pointer to start of block text
ablocks_ += 16;
if (ablocks_ == 16)
- blocks_ = (Fl_HelpBlock *)malloc(sizeof(Fl_HelpBlock) * ablocks_);
+ blocks_ = (Fl_Help_Block *)malloc(sizeof(Fl_Help_Block) * ablocks_);
else
- blocks_ = (Fl_HelpBlock *)realloc(blocks_, sizeof(Fl_HelpBlock) * ablocks_);
+ blocks_ = (Fl_Help_Block *)realloc(blocks_, sizeof(Fl_Help_Block) * ablocks_);
}
temp = blocks_ + nblocks_;
@@ -480,16 +480,16 @@ Fl_HelpView::add_block(const char *s, // I - Pointer to start of block text
//
-// 'Fl_HelpView::add_image()' - Add an image to the image cache.
+// 'Fl_Help_View::add_image()' - Add an image to the image cache.
//
-Fl_HelpImage * // O - Image or NULL if not found
-Fl_HelpView::add_image(const char *name, // I - Path of image
+Fl_Help_Image * // O - Image or NULL if not found
+Fl_Help_View::add_image(const char *name, // I - Path of image
const char *wattr, // I - Width attribute
const char *hattr, // I - Height attribute
int make) // I - Make the image?
{
- Fl_HelpImage *img, // New image
+ Fl_Help_Image *img, // New image
*orig; // Original image
FILE *fp; // File pointer
unsigned char header[16]; // First 16 bytes of file
@@ -503,7 +503,7 @@ Fl_HelpView::add_image(const char *name, // I - Path of image
// See if the image has already been loaded...
- if ((img = find_image(name, wattr, hattr)) != (Fl_HelpImage *)0)
+ if ((img = find_image(name, wattr, hattr)) != (Fl_Help_Image *)0)
{
// Make the image if needed...
if (!img->image)
@@ -521,9 +521,9 @@ Fl_HelpView::add_image(const char *name, // I - Path of image
aimage_ += 16;
if (aimage_ == 16)
- image_ = (Fl_HelpImage *)malloc(sizeof(Fl_HelpImage) * aimage_);
+ image_ = (Fl_Help_Image *)malloc(sizeof(Fl_Help_Image) * aimage_);
else
- image_ = (Fl_HelpImage *)realloc(image_, sizeof(Fl_HelpImage) * aimage_);
+ image_ = (Fl_Help_Image *)realloc(image_, sizeof(Fl_Help_Image) * aimage_);
}
img = image_ + nimage_;
@@ -572,17 +572,17 @@ Fl_HelpView::add_image(const char *name, // I - Path of image
localname = name;
if (!localname)
- return ((Fl_HelpImage *)0);
+ return ((Fl_Help_Image *)0);
if (strncmp(localname, "file:", 5) == 0)
localname += 5;
// Figure out the file type...
if ((fp = fopen(localname, "rb")) == NULL)
- return ((Fl_HelpImage *)0);
+ return ((Fl_Help_Image *)0);
if (fread(header, 1, sizeof(header), fp) == 0)
- return ((Fl_HelpImage *)0);
+ return ((Fl_Help_Image *)0);
rewind(fp);
@@ -607,7 +607,7 @@ Fl_HelpView::add_image(const char *name, // I - Path of image
if (!status)
{
free(img->name);
- return ((Fl_HelpImage *)0);
+ return ((Fl_Help_Image *)0);
}
img->wattr[0] = '\0';
@@ -619,7 +619,7 @@ Fl_HelpView::add_image(const char *name, // I - Path of image
if (aimage_ == nimage_)
{
aimage_ += 16;
- image_ = (Fl_HelpImage *)realloc(image_, sizeof(Fl_HelpImage) * aimage_);
+ image_ = (Fl_Help_Image *)realloc(image_, sizeof(Fl_Help_Image) * aimage_);
}
orig = image_ + nimage_ - 1;
@@ -756,17 +756,17 @@ Fl_HelpView::add_image(const char *name, // I - Path of image
//
-// 'Fl_HelpView::add_link()' - Add a new link to the list.
+// 'Fl_Help_View::add_link()' - Add a new link to the list.
//
void
-Fl_HelpView::add_link(const char *n, // I - Name of link
+Fl_Help_View::add_link(const char *n, // I - Name of link
int xx, // I - X position of link
int yy, // I - Y position of link
int ww, // I - Width of link text
int hh) // I - Height of link text
{
- Fl_HelpLink *temp; // New link
+ Fl_Help_Link *temp; // New link
char *target; // Pointer to target name
@@ -775,9 +775,9 @@ Fl_HelpView::add_link(const char *n, // I - Name of link
alinks_ += 16;
if (alinks_ == 16)
- links_ = (Fl_HelpLink *)malloc(sizeof(Fl_HelpLink) * alinks_);
+ links_ = (Fl_Help_Link *)malloc(sizeof(Fl_Help_Link) * alinks_);
else
- links_ = (Fl_HelpLink *)realloc(links_, sizeof(Fl_HelpLink) * alinks_);
+ links_ = (Fl_Help_Link *)realloc(links_, sizeof(Fl_Help_Link) * alinks_);
}
temp = links_ + nlinks_;
@@ -804,14 +804,14 @@ Fl_HelpView::add_link(const char *n, // I - Name of link
//
-// 'Fl_HelpView::add_target()' - Add a new target to the list.
+// 'Fl_Help_View::add_target()' - Add a new target to the list.
//
void
-Fl_HelpView::add_target(const char *n, // I - Name of target
+Fl_Help_View::add_target(const char *n, // I - Name of target
int yy) // I - Y position of target
{
- Fl_HelpTarget *temp; // New target
+ Fl_Help_Target *temp; // New target
if (ntargets_ >= atargets_)
@@ -819,9 +819,9 @@ Fl_HelpView::add_target(const char *n, // I - Name of target
atargets_ += 16;
if (atargets_ == 16)
- targets_ = (Fl_HelpTarget *)malloc(sizeof(Fl_HelpTarget) * atargets_);
+ targets_ = (Fl_Help_Target *)malloc(sizeof(Fl_Help_Target) * atargets_);
else
- targets_ = (Fl_HelpTarget *)realloc(targets_, sizeof(Fl_HelpTarget) * atargets_);
+ targets_ = (Fl_Help_Target *)realloc(targets_, sizeof(Fl_Help_Target) * atargets_);
}
temp = targets_ + ntargets_;
@@ -835,23 +835,23 @@ Fl_HelpView::add_target(const char *n, // I - Name of target
//
-// 'Fl_HelpView::compare_targets()' - Compare two targets.
+// 'Fl_Help_View::compare_targets()' - Compare two targets.
//
int // O - Result of comparison
-Fl_HelpView::compare_targets(const Fl_HelpTarget *t0, // I - First target
- const Fl_HelpTarget *t1) // I - Second target
+Fl_Help_View::compare_targets(const Fl_Help_Target *t0, // I - First target
+ const Fl_Help_Target *t1) // I - Second target
{
return (strcasecmp(t0->name, t1->name));
}
//
-// 'Fl_HelpView::do_align()' - Compute the alignment for a line in a block.
+// 'Fl_Help_View::do_align()' - Compute the alignment for a line in a block.
//
int // O - New line
-Fl_HelpView::do_align(Fl_HelpBlock *block, // I - Block to add to
+Fl_Help_View::do_align(Fl_Help_Block *block, // I - Block to add to
int line, // I - Current line
int xx, // I - Current X position
int a, // I - Current alignment
@@ -890,14 +890,14 @@ Fl_HelpView::do_align(Fl_HelpBlock *block, // I - Block to add to
//
-// 'Fl_HelpView::draw()' - Draw the Fl_HelpView widget.
+// 'Fl_Help_View::draw()' - Draw the Fl_Help_View widget.
//
void
-Fl_HelpView::draw()
+Fl_Help_View::draw()
{
int i; // Looping var
- const Fl_HelpBlock *block; // Pointer to current block
+ const Fl_Help_Block *block; // Pointer to current block
const char *ptr, // Pointer to text in block
*attrs; // Pointer to start of element attributes
char *s, // Pointer into buffer
@@ -1185,7 +1185,7 @@ Fl_HelpView::draw()
}
else if (strcasecmp(buf, "IMG") == 0)
{
- Fl_HelpImage *img = (Fl_HelpImage *)0;
+ Fl_Help_Image *img = (Fl_Help_Image *)0;
int width = 16;
int height = 24;
char wattr[8], hattr[8];
@@ -1198,7 +1198,7 @@ Fl_HelpView::draw()
if ((img = add_image(attr, wattr, hattr)) != NULL)
{
if (!img->image)
- img = (Fl_HelpImage *)0;
+ img = (Fl_Help_Image *)0;
}
if (img)
@@ -1351,16 +1351,16 @@ Fl_HelpView::draw()
//
-// 'Fl_HelpView::find_image()' - Find an image by name
+// 'Fl_Help_View::find_image()' - Find an image by name
//
-Fl_HelpImage * // O - Image or NULL if not found
-Fl_HelpView::find_image(const char *name, // I - Path and name of image
+Fl_Help_Image * // O - Image or NULL if not found
+Fl_Help_View::find_image(const char *name, // I - Path and name of image
const char *wattr, // I - Width attribute of image
const char *hattr) // I - Height attribute of image
{
int i; // Looping var
- Fl_HelpImage *img; // Current image
+ Fl_Help_Image *img; // Current image
for (i = nimage_, img = image_; i > 0; i --, img ++)
@@ -1369,19 +1369,19 @@ Fl_HelpView::find_image(const char *name, // I - Path and name of image
strcmp(img->hattr, hattr) == 0)
return (img);
- return ((Fl_HelpImage *)0);
+ return ((Fl_Help_Image *)0);
}
//
-// 'Fl_HelpView::format()' - Format the help text.
+// 'Fl_Help_View::format()' - Format the help text.
//
void
-Fl_HelpView::format()
+Fl_Help_View::format()
{
int i; // Looping var
- Fl_HelpBlock *block, // Current block
+ Fl_Help_Block *block, // Current block
*cell; // Current table cell
int row; // Current table row (block number)
const char *ptr, // Pointer into block
@@ -1434,7 +1434,7 @@ Fl_HelpView::format()
delete image_[i].image;
nimage_ --;
if (i < nimage_)
- memcpy(image_ + i, image_ + i + 1, (nimage_ - i) * sizeof(Fl_HelpImage));
+ memcpy(image_ + i, image_ + i + 1, (nimage_ - i) * sizeof(Fl_Help_Image));
i --;
}
@@ -1864,7 +1864,7 @@ Fl_HelpView::format()
popfont(font, size);
else if (strcasecmp(buf, "IMG") == 0)
{
- Fl_HelpImage *img = (Fl_HelpImage *)0;
+ Fl_Help_Image *img = (Fl_Help_Image *)0;
int width = 16;
int height = 24;
@@ -1873,9 +1873,9 @@ Fl_HelpView::format()
get_attr(attrs, "HEIGHT", hattr, sizeof(hattr));
if (get_attr(attrs, "SRC", attr, sizeof(attr)))
- if ((img = add_image(attr, wattr, hattr)) != (Fl_HelpImage *)0 &&
+ if ((img = add_image(attr, wattr, hattr)) != (Fl_Help_Image *)0 &&
img->image == NULL)
- img = (Fl_HelpImage *)0;
+ img = (Fl_Help_Image *)0;
if (img)
{
@@ -2016,11 +2016,11 @@ Fl_HelpView::format()
size_ = yy + hh;
if (ntargets_ > 1)
- qsort(targets_, ntargets_, sizeof(Fl_HelpTarget),
+ qsort(targets_, ntargets_, sizeof(Fl_Help_Target),
(compare_func_t)compare_targets);
if (nblocks_ > 1)
- qsort(blocks_, nblocks_, sizeof(Fl_HelpBlock),
+ qsort(blocks_, nblocks_, sizeof(Fl_Help_Block),
(compare_func_t)compare_blocks);
if (size_ < (h() - 8))
@@ -2033,11 +2033,11 @@ Fl_HelpView::format()
//
-// 'Fl_HelpView::format_table()' - Format a table...
+// 'Fl_Help_View::format_table()' - Format a table...
//
void
-Fl_HelpView::format_table(int *table_width, // O - Total table width
+Fl_Help_View::format_table(int *table_width, // O - Total table width
int *columns, // O - Column widths
const char *table) // I - Pointer to start of table
{
@@ -2308,16 +2308,16 @@ Fl_HelpView::format_table(int *table_width, // O - Total table width
popfont(font, size);
else if (strcasecmp(buf, "IMG") == 0 && incell)
{
- Fl_HelpImage *img = (Fl_HelpImage *)0;
+ Fl_Help_Image *img = (Fl_Help_Image *)0;
get_attr(attrs, "WIDTH", wattr, sizeof(wattr));
get_attr(attrs, "HEIGHT", hattr, sizeof(hattr));
if (get_attr(attrs, "SRC", attr, sizeof(attr)))
- if ((img = add_image(attr, wattr, hattr)) != (Fl_HelpImage *)0 &&
+ if ((img = add_image(attr, wattr, hattr)) != (Fl_Help_Image *)0 &&
img->image == NULL)
- img = (Fl_HelpImage *)0;
+ img = (Fl_Help_Image *)0;
if (img)
temp_width = img->w;
@@ -2462,11 +2462,11 @@ Fl_HelpView::format_table(int *table_width, // O - Total table width
//
-// 'Fl_HelpView::get_align()' - Get an alignment attribute.
+// 'Fl_Help_View::get_align()' - Get an alignment attribute.
//
int // O - Alignment
-Fl_HelpView::get_align(const char *p, // I - Pointer to start of attrs
+Fl_Help_View::get_align(const char *p, // I - Pointer to start of attrs
int a) // I - Default alignment
{
char buf[255]; // Alignment value
@@ -2485,11 +2485,11 @@ Fl_HelpView::get_align(const char *p, // I - Pointer to start of attrs
//
-// 'Fl_HelpView::get_attr()' - Get an attribute value from the string.
+// 'Fl_Help_View::get_attr()' - Get an attribute value from the string.
//
const char * // O - Pointer to buf or NULL
-Fl_HelpView::get_attr(const char *p, // I - Pointer to start of attributes
+Fl_Help_View::get_attr(const char *p, // I - Pointer to start of attributes
const char *n, // I - Name of attribute
char *buf, // O - Buffer for attribute value
int bufsize) // I - Size of buffer
@@ -2560,11 +2560,11 @@ Fl_HelpView::get_attr(const char *p, // I - Pointer to start of attributes
//
-// 'Fl_HelpView::get_color()' - Get an alignment attribute.
+// 'Fl_Help_View::get_color()' - Get an alignment attribute.
//
Fl_Color // O - Color value
-Fl_HelpView::get_color(const char *n, // I - Color name
+Fl_Help_View::get_color(const char *n, // I - Color name
Fl_Color c) // I - Default color value
{
int rgb, r, g, b; // RGB values
@@ -2627,15 +2627,15 @@ Fl_HelpView::get_color(const char *n, // I - Color name
//
-// 'Fl_HelpView::handle()' - Handle events in the widget.
+// 'Fl_Help_View::handle()' - Handle events in the widget.
//
int // O - 1 if we handled it, 0 otherwise
-Fl_HelpView::handle(int event) // I - Event to handle
+Fl_Help_View::handle(int event) // I - Event to handle
{
int i; // Looping var
int xx, yy; // Adjusted mouse position
- Fl_HelpLink *link; // Current link
+ Fl_Help_Link *link; // Current link
char target[32]; // Current target
@@ -2727,10 +2727,10 @@ Fl_HelpView::handle(int event) // I - Event to handle
//
-// 'Fl_HelpView::Fl_HelpView()' - Build a Fl_HelpView widget.
+// 'Fl_Help_View::Fl_Help_View()' - Build a Fl_Help_View widget.
//
-Fl_HelpView::Fl_HelpView(int xx, // I - Left position
+Fl_Help_View::Fl_Help_View(int xx, // I - Left position
int yy, // I - Top position
int ww, // I - Width in pixels
int hh, // I - Height in pixels
@@ -2738,29 +2738,29 @@ Fl_HelpView::Fl_HelpView(int xx, // I - Left position
: Fl_Group(xx, yy, ww, hh, l),
scrollbar_(xx + ww - 17, yy, 17, hh)
{
- link_ = (Fl_HelpFunc *)0;
+ link_ = (Fl_Help_Func *)0;
filename_[0] = '\0';
value_ = NULL;
ablocks_ = 0;
nblocks_ = 0;
- blocks_ = (Fl_HelpBlock *)0;
+ blocks_ = (Fl_Help_Block *)0;
nimage_ = 0;
aimage_ = 0;
- image_ = (Fl_HelpImage *)0;
+ image_ = (Fl_Help_Image *)0;
if (!broken_image)
broken_image = new Fl_Pixmap((char **)broken_xpm);
alinks_ = 0;
nlinks_ = 0;
- links_ = (Fl_HelpLink *)0;
+ links_ = (Fl_Help_Link *)0;
atargets_ = 0;
ntargets_ = 0;
- targets_ = (Fl_HelpTarget *)0;
+ targets_ = (Fl_Help_Target *)0;
nfonts_ = 0;
textfont_ = FL_TIMES;
@@ -2783,13 +2783,13 @@ Fl_HelpView::Fl_HelpView(int xx, // I - Left position
//
-// 'Fl_HelpView::~Fl_HelpView()' - Destroy a Fl_HelpView widget.
+// 'Fl_Help_View::~Fl_Help_View()' - Destroy a Fl_Help_View widget.
//
-Fl_HelpView::~Fl_HelpView()
+Fl_Help_View::~Fl_Help_View()
{
int i; // Looping var
- Fl_HelpImage *img; // Current image
+ Fl_Help_Image *img; // Current image
if (nblocks_)
@@ -2814,11 +2814,11 @@ Fl_HelpView::~Fl_HelpView()
//
-// 'Fl_HelpView::load()' - Load the specified file.
+// 'Fl_Help_View::load()' - Load the specified file.
//
int // O - 0 on success, -1 on error
-Fl_HelpView::load(const char *f)// I - Filename to load (may also have target)
+Fl_Help_View::load(const char *f)// I - Filename to load (may also have target)
{
FILE *fp; // File to read from
long len; // Length of file
@@ -2898,11 +2898,11 @@ Fl_HelpView::load(const char *f)// I - Filename to load (may also have target)
//
-// 'Fl_HelpView::load_gif()' - Load a GIF image file...
+// 'Fl_Help_View::load_gif()' - Load a GIF image file...
//
int // O - 0 = success, -1 = fail
-Fl_HelpView::load_gif(Fl_HelpImage *img,// I - Image pointer
+Fl_Help_View::load_gif(Fl_Help_Image *img,// I - Image pointer
FILE *fp) // I - File to load from
{
unsigned char buf[1024]; // Input buffer
@@ -2980,11 +2980,11 @@ Fl_HelpView::load_gif(Fl_HelpImage *img,// I - Image pointer
#ifdef HAVE_LIBJPEG
//
-// 'Fl_HelpView::load_jpeg()' - Load a JPEG image file.
+// 'Fl_Help_View::load_jpeg()' - Load a JPEG image file.
//
int // O - 0 = success, -1 = fail
-Fl_HelpView::load_jpeg(Fl_HelpImage *img, // I - Image pointer
+Fl_Help_View::load_jpeg(Fl_Help_Image *img, // I - Image pointer
FILE *fp) // I - File to load from
{
struct jpeg_decompress_struct cinfo; // Decompressor info
@@ -3035,11 +3035,11 @@ Fl_HelpView::load_jpeg(Fl_HelpImage *img, // I - Image pointer
#ifdef HAVE_LIBPNG
//
-// 'Fl_HelpView::load_png()' - Load a PNG image file.
+// 'Fl_Help_View::load_png()' - Load a PNG image file.
//
int // O - 0 = success, -1 = fail
-Fl_HelpView::load_png(Fl_HelpImage *img,// I - Image pointer
+Fl_Help_View::load_png(Fl_Help_Image *img,// I - Image pointer
FILE *fp) // I - File to read from
{
int i; // Looping var
@@ -3122,11 +3122,11 @@ Fl_HelpView::load_png(Fl_HelpImage *img,// I - Image pointer
//
-// 'Fl_HelpView::resize()' - Resize the help widget.
+// 'Fl_Help_View::resize()' - Resize the help widget.
//
void
-Fl_HelpView::resize(int xx, // I - New left position
+Fl_Help_View::resize(int xx, // I - New left position
int yy, // I - New top position
int ww, // I - New width
int hh) // I - New height
@@ -3139,13 +3139,13 @@ Fl_HelpView::resize(int xx, // I - New left position
//
-// 'Fl_HelpView::topline()' - Set the top line to the named target.
+// 'Fl_Help_View::topline()' - Set the top line to the named target.
//
void
-Fl_HelpView::topline(const char *n) // I - Target name
+Fl_Help_View::topline(const char *n) // I - Target name
{
- Fl_HelpTarget key, // Target name key
+ Fl_Help_Target key, // Target name key
*target; // Pointer to matching target
@@ -3155,7 +3155,7 @@ Fl_HelpView::topline(const char *n) // I - Target name
strncpy(key.name, n, sizeof(key.name) - 1);
key.name[sizeof(key.name) - 1] = '\0';
- target = (Fl_HelpTarget *)bsearch(&key, targets_, ntargets_, sizeof(Fl_HelpTarget),
+ target = (Fl_Help_Target *)bsearch(&key, targets_, ntargets_, sizeof(Fl_Help_Target),
(compare_func_t)compare_targets);
if (target != NULL)
@@ -3164,11 +3164,11 @@ Fl_HelpView::topline(const char *n) // I - Target name
//
-// 'Fl_HelpView::topline()' - Set the top line by number.
+// 'Fl_Help_View::topline()' - Set the top line by number.
//
void
-Fl_HelpView::topline(int t) // I - Top line number
+Fl_Help_View::topline(int t) // I - Top line number
{
if (!value_)
return;
@@ -3190,11 +3190,11 @@ Fl_HelpView::topline(int t) // I - Top line number
//
-// 'Fl_HelpView::value()' - Set the help text directly.
+// 'Fl_Help_View::value()' - Set the help text directly.
//
void
-Fl_HelpView::value(const char *v) // I - Text to view
+Fl_Help_View::value(const char *v) // I - Text to view
{
if (!v)
return;
@@ -3212,14 +3212,14 @@ Fl_HelpView::value(const char *v) // I - Text to view
//
-// 'Fl_HelpView::compare_blocks()' - Compare two blocks.
+// 'Fl_Help_View::compare_blocks()' - Compare two blocks.
//
int // O - Result of comparison
-Fl_HelpView::compare_blocks(const void *a, // I - First block
+Fl_Help_View::compare_blocks(const void *a, // I - First block
const void *b) // I - Second block
{
- return (((Fl_HelpBlock *)a)->y - ((Fl_HelpBlock *)b)->y);
+ return (((Fl_Help_Block *)a)->y - ((Fl_Help_Block *)b)->y);
}
@@ -3503,7 +3503,7 @@ gif_read_lzw(FILE *fp, // I - File to read from
static int // I - 0 = success, -1 = failure
gif_read_image(FILE *fp, // I - Input file
- Fl_HelpImage *img, // I - Image pointer
+ Fl_Help_Image *img, // I - Image pointer
gif_cmap_t cmap, // I - Colormap
int interlace) // I - Non-zero = interlaced image
{
@@ -3575,10 +3575,10 @@ gif_read_image(FILE *fp, // I - Input file
static void
scrollbar_callback(Fl_Widget *s, void *)
{
- ((Fl_HelpView *)(s->parent()))->topline(int(((Fl_Scrollbar*)s)->value()));
+ ((Fl_Help_View *)(s->parent()))->topline(int(((Fl_Scrollbar*)s)->value()));
}
//
-// End of "$Id: Fl_HelpView.cxx,v 1.1.2.5 2001/09/10 03:09:43 easysw Exp $".
+// End of "$Id: Fl_Help_View.cxx,v 1.1.2.1 2001/09/29 14:38:59 easysw Exp $".
//
diff --git a/src/Makefile b/src/Makefile
index 6f1097bc4..1f3982d48 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,5 @@
#
-# "$Id: Makefile,v 1.18.2.14.2.9 2001/08/11 14:49:51 easysw Exp $"
+# "$Id: Makefile,v 1.18.2.14.2.10 2001/09/29 14:38:59 easysw Exp $"
#
# Library makefile for the Fast Light Tool Kit (FLTK).
#
@@ -41,13 +41,13 @@ CPPFILES = \
Fl_Counter.cxx \
Fl_Dial.cxx \
Fl_Double_Window.cxx \
- Fl_FileBrowser.cxx \
- Fl_FileChooser.cxx \
- Fl_FileChooser2.cxx \
- Fl_FileIcon.cxx \
+ Fl_File_Browser.cxx \
+ Fl_File_Chooser.cxx \
+ Fl_File_Chooser2.cxx \
+ Fl_File_Icon.cxx \
Fl_Group.cxx \
- Fl_HelpDialog.cxx \
- Fl_HelpView.cxx \
+ Fl_Help_Dialog.cxx \
+ Fl_Help_View.cxx \
Fl_Image.cxx \
Fl_Input.cxx \
Fl_Input_.cxx \
@@ -258,5 +258,5 @@ install: $(LIBNAME) $(DSONAME) $(GLLIBNAME) $(GLDSONAME)
ln -s FL $(includedir)/Fl
#
-# End of "$Id: Makefile,v 1.18.2.14.2.9 2001/08/11 14:49:51 easysw Exp $".
+# End of "$Id: Makefile,v 1.18.2.14.2.10 2001/09/29 14:38:59 easysw Exp $".
#
diff --git a/src/fl_file_chooser.cxx b/src/fl_file_chooser.cxx
index 0b3c99b9f..a7e721824 100644
--- a/src/fl_file_chooser.cxx
+++ b/src/fl_file_chooser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_file_chooser.cxx,v 1.10.2.10.2.4 2001/08/04 12:21:33 easysw Exp $"
+// "$Id: fl_file_chooser.cxx,v 1.10.2.10.2.5 2001/09/29 14:38:59 easysw Exp $"
//
// File chooser widget for the Fast Light Tool Kit (FLTK).
//
@@ -25,13 +25,13 @@
#include <config.h>
#include <FL/fl_file_chooser.H>
-#include <FL/Fl_FileChooser.H>
+#include <FL/Fl_File_Chooser.H>
-static Fl_FileChooser *fc = (Fl_FileChooser *)0;
+static Fl_File_Chooser *fc = (Fl_File_Chooser *)0;
static void (*current_callback)(const char*) = 0;
-static void callback(Fl_FileChooser *, void*) {
+static void callback(Fl_File_Chooser *, void*) {
if (current_callback)
(*current_callback)(fc->value(0));
}
@@ -47,9 +47,10 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname)
if (!fname || !*fname) fname = ".";
if (!fc) {
- fc = new Fl_FileChooser(fname, pat, Fl_FileChooser::CREATE, message);
+ fc = new Fl_File_Chooser(fname, pat, Fl_File_Chooser::CREATE, message);
fc->callback(callback, 0);
} else {
+ fc->type(Fl_File_Chooser::CREATE);
fc->filter(pat);
fc->value(fname);
fc->label(message);
@@ -64,6 +65,30 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname)
}
+char* fl_dir_chooser(const char* message, const char* fname)
+{
+ if (!fname || !*fname) fname = ".";
+
+ if (!fc) {
+ fc = new Fl_File_Chooser(fname, "*", Fl_File_Chooser::CREATE |
+ Fl_File_Chooser::DIRECTORY, message);
+ fc->callback(callback, 0);
+ } else {
+ fc->type(Fl_File_Chooser::CREATE | Fl_File_Chooser::DIRECTORY);
+ fc->filter("*");
+ fc->value(fname);
+ fc->label(message);
+ }
+
+ fc->show();
+
+ while (fc->visible())
+ Fl::wait();
+
+ return ((char *)fc->value());
+}
+
+
//
-// End of "$Id: fl_file_chooser.cxx,v 1.10.2.10.2.4 2001/08/04 12:21:33 easysw Exp $".
+// End of "$Id: fl_file_chooser.cxx,v 1.10.2.10.2.5 2001/09/29 14:38:59 easysw Exp $".
//
diff --git a/src/makedepend b/src/makedepend
index da088b55a..1b2f1adf2 100644
--- a/src/makedepend
+++ b/src/makedepend
@@ -57,47 +57,50 @@ Fl_Dial.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/math.h
Fl_Double_Window.o: ../config.h ../FL/Fl.H ../FL/Enumerations.H
Fl_Double_Window.o: ../FL/Fl_Export.H ../FL/Fl_Double_Window.H
Fl_Double_Window.o: ../FL/Fl_Window.H ../FL/x.H ../FL/fl_draw.H
-Fl_FileBrowser.o: ../FL/Fl_FileBrowser.H ../FL/Fl_Browser.H
-Fl_FileBrowser.o: ../FL/Fl_Browser_.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_FileBrowser.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Scrollbar.H
-Fl_FileBrowser.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_FileIcon.H
-Fl_FileBrowser.o: ../FL/Fl.H ../FL/fl_draw.H ../FL/filename.H ../config.h
-Fl_FileChooser.o: ../FL/Fl_FileChooser.H ../FL/Fl.H ../FL/Enumerations.H
-Fl_FileChooser.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_FileChooser.o: ../FL/Fl_Widget.H ../FL/Fl_FileBrowser.H ../FL/Fl_Browser.H
-Fl_FileChooser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-Fl_FileChooser.o: ../FL/Fl_Valuator.H ../FL/Fl_FileIcon.H ../FL/Fl.H
-Fl_FileChooser.o: ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
-Fl_FileChooser.o: ../FL/Fl_Button.H ../FL/fl_ask.H ../FL/Fl_Input.H
-Fl_FileChooser.o: ../FL/Fl_Input_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-Fl_FileChooser.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-Fl_FileChooser2.o: ../FL/Fl_FileChooser.H ../FL/Fl.H ../FL/Enumerations.H
-Fl_FileChooser2.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_FileChooser2.o: ../FL/Fl_Widget.H ../FL/Fl_FileBrowser.H
-Fl_FileChooser2.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
-Fl_FileChooser2.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-Fl_FileChooser2.o: ../FL/Fl_FileIcon.H ../FL/Fl.H ../FL/Fl_Button.H
-Fl_FileChooser2.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/fl_ask.H
-Fl_FileChooser2.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Choice.H
-Fl_FileChooser2.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/filename.H
-Fl_FileChooser2.o: ../FL/x.H ../FL/Fl_Window.H
-Fl_FileIcon.o: ../config.h ../FL/Fl_FileIcon.H ../FL/Fl.H
-Fl_FileIcon.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Widget.H
-Fl_FileIcon.o: ../FL/fl_draw.H ../FL/filename.H
+Fl_File_Browser.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
+Fl_File_Browser.o: ../FL/Fl_Browser_.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_File_Browser.o: ../FL/Enumerations.H ../FL/Fl_Export.H
+Fl_File_Browser.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_File_Browser.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/fl_draw.H
+Fl_File_Browser.o: ../FL/filename.H ../config.h
+Fl_File_Chooser.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/Enumerations.H
+Fl_File_Chooser.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_File_Chooser.o: ../FL/Fl_Widget.H ../FL/Fl_File_Browser.H
+Fl_File_Chooser.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
+Fl_File_Chooser.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_File_Chooser.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/Fl_Button.H
+Fl_File_Chooser.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/fl_ask.H
+Fl_File_Chooser.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Choice.H
+Fl_File_Chooser.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Bitmap.H
+Fl_File_Chooser.o: ../FL/Fl_Image.H
+Fl_File_Chooser2.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/Enumerations.H
+Fl_File_Chooser2.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_File_Chooser2.o: ../FL/Fl_Widget.H ../FL/Fl_File_Browser.H
+Fl_File_Chooser2.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
+Fl_File_Chooser2.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+Fl_File_Chooser2.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
+Fl_File_Chooser2.o: ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
+Fl_File_Chooser2.o: ../FL/Fl_Button.H ../FL/fl_ask.H ../FL/Fl_Input.H
+Fl_File_Chooser2.o: ../FL/Fl_Input_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+Fl_File_Chooser2.o: ../FL/Fl_Menu_Item.H ../FL/filename.H ../FL/x.H
+Fl_File_Chooser2.o: ../FL/Fl_Window.H
+Fl_File_Icon.o: ../config.h ../FL/Fl_File_Icon.H ../FL/Fl.H
+Fl_File_Icon.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Widget.H
+Fl_File_Icon.o: ../FL/fl_draw.H ../FL/filename.H
Fl_Group.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
Fl_Group.o: ../FL/Fl_Group.H ../FL/Fl_Window.H ../FL/Fl_Group.H
Fl_Group.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/Fl_Tooltip.H
Fl_Group.o: ../FL/Fl_Widget.H
-Fl_HelpDialog.o: ../FL/Fl_HelpDialog.H ../FL/Fl.H ../FL/Enumerations.H
-Fl_HelpDialog.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_HelpDialog.o: ../FL/Fl_Widget.H ../FL/Fl_HelpView.H ../FL/Fl_Group.H
-Fl_HelpDialog.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-Fl_HelpDialog.o: ../FL/fl_draw.H ../FL/Fl_Button.H
-Fl_HelpView.o: ../FL/Fl_HelpView.H ../FL/Fl.H ../FL/Enumerations.H
-Fl_HelpView.o: ../FL/Fl_Export.H ../FL/Fl_Group.H ../FL/Fl_Scrollbar.H
-Fl_HelpView.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Widget.H
-Fl_HelpView.o: ../FL/fl_draw.H ../config.h ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-Fl_HelpView.o: ../FL/Fl_Image.H
+Fl_Help_Dialog.o: ../FL/Fl_Help_Dialog.H ../FL/Fl.H ../FL/Enumerations.H
+Fl_Help_Dialog.o: ../FL/Fl_Export.H ../FL/Fl_Double_Window.H
+Fl_Help_Dialog.o: ../FL/Fl_Window.H ../FL/Fl_Help_View.H ../FL/Fl_Group.H
+Fl_Help_Dialog.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Help_Dialog.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/Fl_Button.H
+Fl_Help_View.o: ../FL/Fl_Help_View.H ../FL/Fl.H ../FL/Enumerations.H
+Fl_Help_View.o: ../FL/Fl_Export.H ../FL/Fl_Group.H ../FL/Fl_Scrollbar.H
+Fl_Help_View.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Widget.H
+Fl_Help_View.o: ../FL/fl_draw.H ../config.h ../FL/Fl_Image.H
+Fl_Help_View.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H
Fl_Image.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/fl_draw.H
Fl_Image.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Widget.H
Fl_Image.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
@@ -275,11 +278,11 @@ fl_draw_pixmap.o: ../FL/Fl_Window.H
fl_engraved_label.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
fl_engraved_label.o: ../FL/Fl_Widget.H ../FL/fl_draw.H
fl_file_chooser.o: ../config.h ../FL/fl_file_chooser.H ../FL/Enumerations.H
-fl_file_chooser.o: ../FL/Fl_Export.H ../FL/Fl_FileChooser.H ../FL/Fl.H
+fl_file_chooser.o: ../FL/Fl_Export.H ../FL/Fl_File_Chooser.H ../FL/Fl.H
fl_file_chooser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-fl_file_chooser.o: ../FL/Fl_FileBrowser.H ../FL/Fl_Browser.H
+fl_file_chooser.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
fl_file_chooser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-fl_file_chooser.o: ../FL/Fl_Valuator.H ../FL/Fl_FileIcon.H ../FL/Fl.H
+fl_file_chooser.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
fl_file_chooser.o: ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
fl_file_chooser.o: ../FL/Fl_Button.H ../FL/fl_ask.H ../FL/Fl_Input.H
fl_file_chooser.o: ../FL/Fl_Input_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H