summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-08-02 16:17:04 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-08-02 16:17:04 +0000
commit75b6b221ce1c88905b1485f0e25ab3880982efc4 (patch)
tree6a34d2ba5621b8e8c920f2832707ae339a15a6c5 /FL
parent836d2fac260c861106e0d96203bea4a04c9dd2d2 (diff)
FileIcon, FileBrowser, FileChooser stuff.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1517 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Enumerations.H6
-rw-r--r--FL/Fl_FileBrowser.H33
-rw-r--r--FL/Fl_FileChooser.H56
-rw-r--r--FL/Fl_FileIcon.H26
4 files changed, 57 insertions, 64 deletions
diff --git a/FL/Enumerations.H b/FL/Enumerations.H
index fb0a2aab5..51574fd79 100644
--- a/FL/Enumerations.H
+++ b/FL/Enumerations.H
@@ -1,5 +1,5 @@
//
-// "$Id: Enumerations.H,v 1.18.2.14.2.1 2001/08/01 21:24:48 easysw Exp $"
+// "$Id: Enumerations.H,v 1.18.2.14.2.2 2001/08/02 16:17:04 easysw Exp $"
//
// Enumerations for the Fast Light Tool Kit (FLTK).
//
@@ -212,6 +212,8 @@ enum Fl_Labeltype { // labeltypes:
_FL_PIXMAP_LABEL,
_FL_IMAGE_LABEL,
_FL_MULTI_LABEL,
+ _FL_ICON_LABEL,
+
FL_FREE_LABELTYPE
};
extern Fl_Labeltype FL_EXPORT define_FL_SYMBOL_LABEL();
@@ -372,5 +374,5 @@ enum Fl_Damage {
#endif
//
-// End of "$Id: Enumerations.H,v 1.18.2.14.2.1 2001/08/01 21:24:48 easysw Exp $".
+// End of "$Id: Enumerations.H,v 1.18.2.14.2.2 2001/08/02 16:17:04 easysw Exp $".
//
diff --git a/FL/Fl_FileBrowser.H b/FL/Fl_FileBrowser.H
index 4b3f2bd11..b0cc38432 100644
--- a/FL/Fl_FileBrowser.H
+++ b/FL/Fl_FileBrowser.H
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_FileBrowser.H,v 1.4 2000/01/16 07:44:20 robertk Exp $"
+// "$Id: Fl_FileBrowser.H,v 1.4.2.1 2001/08/02 16:17:04 easysw Exp $"
//
-// Fl_FileBrowser definitions for the Fast Light Tool Kit (FLTK).
+// FileBrowser definitions.
//
-// Copyright 1997-1999 by Easy Software Products.
+// Copyright 1999-2001 by Michael Sweet.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
@@ -20,30 +20,31 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
-// Please report all bugs and problems to "fltk-bugs@easysw.com".
+// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
//
// Include necessary header files...
//
-#ifndef _FL_FILEBROWSER_H_
-# define _FL_FILEBROWSER_H_
+#ifndef _Fl_FileBrowser_H_
+# define _Fl_FileBrowser_H_
-# include <FL/Fl_Browser.H>
-# include <FL/Fl_FileIcon.H>
+# include "Fl_Browser.H"
+# include "Fl_FileIcon.H"
//
// Fl_FileBrowser class...
//
-class FL_API Fl_FileBrowser : public Fl_Browser
+class Fl_FileBrowser : public Fl_Browser
{
const char *directory_;
uchar iconsize_;
const char *pattern_;
+ int full_height() const;
int item_height(void *) const;
int item_width(void *) const;
void item_draw(void *, int, int, int, int) const;
@@ -55,26 +56,18 @@ public:
uchar iconsize() const { return (iconsize_); };
void iconsize(uchar s) { iconsize_ = s; redraw(); };
- void directory(const char *directory) { load(directory); }
- const char *directory(void) const { return (directory_); }
-
void filter(const char *pattern);
const char *filter() const { return (pattern_); };
int load(const char *directory);
-#ifdef FLTK_2
- unsigned textsize() const { return (Fl_Browser::text_size()); };
- void textsize(unsigned s) { Fl_Browser::text_size(s); };
-#else
uchar textsize() const { return (Fl_Browser::textsize()); };
- void textsize(uchar s) { Fl_Browser::textsize(s); };
-#endif
+ void textsize(uchar s) { Fl_Browser::textsize(s); iconsize_ = 3 * s / 2; };
};
-#endif // !_FL_FILEBROWSER_H_
+#endif // !_Fl_FileBrowser_H_
//
-// End of "$Id: Fl_FileBrowser.H,v 1.4 2000/01/16 07:44:20 robertk Exp $".
+// End of "$Id: Fl_FileBrowser.H,v 1.4.2.1 2001/08/02 16:17:04 easysw Exp $".
//
diff --git a/FL/Fl_FileChooser.H b/FL/Fl_FileChooser.H
index 81790510b..bef45d128 100644
--- a/FL/Fl_FileChooser.H
+++ b/FL/Fl_FileChooser.H
@@ -1,49 +1,49 @@
-// generated by Fast Light User Interface Designer (fluid) version 2.0000
+// generated by Fast Light User Interface Designer (fluid) version 1.0100
-#ifndef Fl_FileChooser_h
-#define Fl_FileChooser_h
+#ifndef Fl_FileChooser_H
+#define Fl_FileChooser_H
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <FL/Fl_Choice.H>
-#include <FL/Fl_Button.H>
-#include "filename.H"
#include <FL/Fl_FileBrowser.H>
-#include <FL/Fl_FileInput.H>
+#include <FL/Fl_Button.H>
#include <FL/Fl_Return_Button.H>
+#include <FL/Fl_Input.H>
+#include <FL/Fl_Choice.H>
+#include <FL/fl_ask.H>
-class FL_API Fl_FileChooser {
+class Fl_FileChooser {
public:
enum { SINGLE, MULTI, CREATE };
Fl_FileChooser(const char *d, const char *p, int t, const char *title);
- Fl_Window *window;
private:
+ Fl_Window *window;
inline void cb_window_i(Fl_Window*, void*);
static void cb_window(Fl_Window*, void*);
- Fl_Choice *dirMenu;
- inline void cb_dirMenu_i(Fl_Choice*, void*);
- static void cb_dirMenu(Fl_Choice*, void*);
- Fl_Button *upButton;
- inline void cb_upButton_i(Fl_Button*, void*);
- static void cb_upButton(Fl_Button*, void*);
- Fl_Button *newButton;
- inline void cb_newButton_i(Fl_Button*, void*);
- static void cb_newButton(Fl_Button*, void*);
- inline void cb__i(Fl_Button*, void*);
- static void cb_(Fl_Button*, void*);
Fl_FileBrowser *fileList;
inline void cb_fileList_i(Fl_FileBrowser*, void*);
static void cb_fileList(Fl_FileBrowser*, void*);
- Fl_FileInput *fileName;
- inline void cb_fileName_i(Fl_FileInput*, void*);
- static void cb_fileName(Fl_FileInput*, void*);
+ inline void cb_Cancel_i(Fl_Button*, void*);
+ static void cb_Cancel(Fl_Button*, void*);
Fl_Return_Button *okButton;
inline void cb_okButton_i(Fl_Return_Button*, void*);
static void cb_okButton(Fl_Return_Button*, void*);
- inline void cb_Cancel_i(Fl_Button*, void*);
- static void cb_Cancel(Fl_Button*, void*);
+ Fl_Input *fileName;
+ inline void cb_fileName_i(Fl_Input*, void*);
+ static void cb_fileName(Fl_Input*, void*);
+ Fl_Button *upButton;
+ inline void cb_upButton_i(Fl_Button*, void*);
+ static void cb_upButton(Fl_Button*, void*);
+ Fl_Button *newButton;
+ inline void cb_newButton_i(Fl_Button*, void*);
+ static void cb_newButton(Fl_Button*, void*);
+ Fl_Choice *dirMenu;
+ inline void cb_dirMenu_i(Fl_Choice*, void*);
+ static void cb_dirMenu(Fl_Choice*, void*);
+ inline void cb_allfiles_i(Fl_Button*, void*);
+ static void cb_allfiles(Fl_Button*, void*);
char directory_[1024];
int type_;
void fileListCB();
@@ -56,7 +56,6 @@ public:
int count();
void directory(const char *d);
char * directory();
- void exec();
void filter(const char *p);
const char * filter();
void hide();
@@ -65,10 +64,11 @@ public:
void label(const char *l);
const char * label();
void rescan();
+ void show();
void textcolor(Fl_Color c);
Fl_Color textcolor();
- void textfont(Fl_Font f);
- Fl_Font textfont();
+ void textfont(uchar f);
+ uchar textfont();
void textsize(uchar s);
uchar textsize();
void type(int t);
diff --git a/FL/Fl_FileIcon.H b/FL/Fl_FileIcon.H
index 6df0f7d54..ae777b969 100644
--- a/FL/Fl_FileIcon.H
+++ b/FL/Fl_FileIcon.H
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_FileIcon.H,v 1.1 2000/01/08 22:14:13 vincent Exp $"
+// "$Id: Fl_FileIcon.H,v 1.1.2.1 2001/08/02 16:17:04 easysw Exp $"
//
-// Fl_FileIcon definitions for the Fast Light Tool Kit (FLTK).
+// Fl_FileIcon definitions.
//
-// Copyright 1997-1999 by Easy Software Products.
+// Copyright 1999-2001 by Michael Sweet.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
@@ -20,24 +20,24 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
-// Please report all bugs and problems to "fltk-bugs@easysw.com".
+// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
//
// Include necessary header files...
//
-#ifndef _FL_FILEICON_H_
-# define _FL_FILEICON_H_
+#ifndef _Fl_Fl_FileIcon_H_
+# define _Fl_Fl_FileIcon_H_
-# include <FL/Fl.H>
+# include "Fl.H"
//
// Fl_FileIcon class...
//
-class FL_API Fl_FileIcon //// Icon data
+class Fl_FileIcon //// Icon data
{
static Fl_FileIcon *first_; // Pointer to first icon/filetype
Fl_FileIcon *next_; // Pointer to next icon/filetype
@@ -56,7 +56,7 @@ class FL_API Fl_FileIcon //// Icon data
FIFO, // Only named pipes
DEVICE, // Only character and block devices
LINK, // Only symbolic links
- DIR // Only directories
+ DIRECTORY // Only directories
};
enum // Data opcodes
@@ -84,7 +84,7 @@ class FL_API Fl_FileIcon //// Icon data
void clear() { num_data_ = 0; }
void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1);
void label(Fl_Widget *w);
-// static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a);
+ static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a);
void load(const char *f);
void load_fti(const char *fti);
void load_xpm(const char *xpm);
@@ -98,10 +98,8 @@ class FL_API Fl_FileIcon //// Icon data
static void load_system_icons(void);
};
-//#define _FL_ICON_LABEL FL_FREE_LABELTYPE
-
-#endif // !_FL_FILEICON_H_
+#endif // !_Fl_Fl_FileIcon_H_
//
-// End of "$Id: Fl_FileIcon.H,v 1.1 2000/01/08 22:14:13 vincent Exp $".
+// End of "$Id: Fl_FileIcon.H,v 1.1.2.1 2001/08/02 16:17:04 easysw Exp $".
//