summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
Diffstat (limited to 'FL')
-rw-r--r--FL/Enumerations.H23
-rw-r--r--FL/Fl_Export.H76
-rw-r--r--FL/Fl_FileChooser.H3
-rw-r--r--FL/Fl_Text_Buffer.H10
-rw-r--r--FL/Fl_Text_Display.H40
-rw-r--r--FL/Fl_Text_Editor.H10
-rw-r--r--FL/filename.H18
-rw-r--r--FL/fl_draw.H7
-rw-r--r--FL/fl_file_chooser.H5
9 files changed, 100 insertions, 92 deletions
diff --git a/FL/Enumerations.H b/FL/Enumerations.H
index 51574fd79..ae39d371e 100644
--- a/FL/Enumerations.H
+++ b/FL/Enumerations.H
@@ -1,5 +1,5 @@
//
-// "$Id: Enumerations.H,v 1.18.2.14.2.2 2001/08/02 16:17:04 easysw Exp $"
+// "$Id: Enumerations.H,v 1.18.2.14.2.3 2001/08/04 12:21:33 easysw Exp $"
//
// Enumerations for the Fast Light Tool Kit (FLTK).
//
@@ -26,19 +26,8 @@
#ifndef Fl_Enumerations_H
#define Fl_Enumerations_H
-//
-// The following is only used when building DLLs under WIN32 with Visual C++...
-//
+# include "Fl_Export.H"
-#if defined(FL_DLL) && defined(_MSC_VER)
-# ifdef FL_LIBRARY
-# define FL_EXPORT __declspec(dllexport)
-# else
-# define FL_EXPORT __declspec(dllimport)
-# endif /* FL_LIBRARY */
-#else
-# define FL_EXPORT
-#endif /* FL_DLL && _MSC_VER */
//
// The FLTK version number; this is changed slightly from the beta versions
@@ -300,8 +289,10 @@ enum Fl_Color { // standard colors
FL_COLOR_CUBE = 56
};
-FL_EXPORT Fl_Color inactive(Fl_Color c);
-FL_EXPORT Fl_Color contrast(Fl_Color fg, Fl_Color bg);
+#define inactive fl_inactive
+FL_EXPORT Fl_Color fl_inactive(Fl_Color c);
+#define contrast fl_contrast
+FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg);
FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
@@ -374,5 +365,5 @@ enum Fl_Damage {
#endif
//
-// End of "$Id: Enumerations.H,v 1.18.2.14.2.2 2001/08/02 16:17:04 easysw Exp $".
+// End of "$Id: Enumerations.H,v 1.18.2.14.2.3 2001/08/04 12:21:33 easysw Exp $".
//
diff --git a/FL/Fl_Export.H b/FL/Fl_Export.H
index c4f6b2e95..969d9d406 100644
--- a/FL/Fl_Export.H
+++ b/FL/Fl_Export.H
@@ -1,37 +1,47 @@
-/*
- The following is only used when building DLLs under WIN32
-*/
+//
+// "$Id: Fl_Export.H,v 1.3.2.1 2001/08/04 12:21:33 easysw Exp $"
+//
+// WIN32 DLL export definitions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2001 by Bill Spitzak and others.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems to "fltk-bugs@fltk.org".
+//
-#if defined(WIN32) && defined(FL_SHARED)
+#ifndef Fl_Export_H
+#define Fl_Export_H
+
+//
+// The following is only used when building DLLs under WIN32 with Visual C++...
+//
+
+#if defined(FL_DLL) && defined(_MSC_VER)
# ifdef FL_LIBRARY
-# define FL_API __declspec(dllexport)
-# else
-# define FL_API __declspec(dllimport)
-# endif
-# ifdef FL_IMAGES_LIBRARY
-# define FL_IMAGES_API __declspec(dllexport)
-# else
-# define FL_IMAGES_API __declspec(dllimport)
-# endif
-# ifdef FL_GLUT_LIBRARY
-# define FL_GLUT_API __declspec(dllexport)
+# define FL_EXPORT __declspec(dllexport)
# else
-# define FL_GLUT_API __declspec(dllimport)
-# endif
-# ifdef FL_FORMS_LIBRARY
-# define FL_FORMS_API __declspec(dllexport)
-# else
-# define FL_FORMS_API __declspec(dllimport)
-# endif
-# ifdef FL_GL_LIBRARY
-# define FL_GL_API __declspec(dllexport)
-# else
-# define FL_GL_API __declspec(dllimport)
-# endif
+# define FL_EXPORT __declspec(dllimport)
+# endif /* FL_LIBRARY */
#else
-# define FL_API
-# define FL_IMAGES_API
-# define FL_GLUT_API
-# define FL_FORMS_API
-# define FL_GL_API
-#endif
+# define FL_EXPORT
+#endif /* FL_DLL && _MSC_VER */
+
+#endif // !Fl_Export_H
+
+//
+// End of "$Id: Fl_Export.H,v 1.3.2.1 2001/08/04 12:21:33 easysw Exp $".
+//
diff --git a/FL/Fl_FileChooser.H b/FL/Fl_FileChooser.H
index 5e594111c..48db81877 100644
--- a/FL/Fl_FileChooser.H
+++ b/FL/Fl_FileChooser.H
@@ -44,6 +44,8 @@ private:
static void cb_dirMenu(Fl_Choice*, void*);
inline void cb_allfiles_i(Fl_Button*, void*);
static void cb_allfiles(Fl_Button*, void*);
+ void (*callback_)(Fl_FileChooser*, void *);
+ void *data_;
char directory_[1024];
int type_;
void fileListCB();
@@ -51,6 +53,7 @@ private:
void newdir();
void up();
public:
+ void callback(void (*cb)(Fl_FileChooser *, void *), void *d);
void color(Fl_Color c);
Fl_Color color();
int count();
diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H
index 2528c2fa8..3c3eccde2 100644
--- a/FL/Fl_Text_Buffer.H
+++ b/FL/Fl_Text_Buffer.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Buffer.H,v 1.3 2001/02/21 06:15:44 clip Exp $"
+// "$Id: Fl_Text_Buffer.H,v 1.3.2.1 2001/08/04 12:21:33 easysw Exp $"
//
// Header file for Fl_Text_Buffer class.
//
@@ -31,9 +31,9 @@
of a single buffer character */
#define FL_TEXT_MAX_EXP_CHAR_LEN 20
-#include <FL/Fl_Export.H>
+#include "Fl_Export.H"
-class FL_API Fl_Text_Selection {
+class FL_EXPORT Fl_Text_Selection {
friend class Fl_Text_Buffer;
public:
@@ -65,7 +65,7 @@ typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted,
int nRestyled, const char* deletedText,
void* cbArg);
-class FL_API Fl_Text_Buffer {
+class FL_EXPORT Fl_Text_Buffer {
public:
Fl_Text_Buffer(int requestedSize = 0);
~Fl_Text_Buffer();
@@ -237,5 +237,5 @@ class FL_API Fl_Text_Buffer {
#endif
//
-// End of "$Id: Fl_Text_Buffer.H,v 1.3 2001/02/21 06:15:44 clip Exp $".
+// End of "$Id: Fl_Text_Buffer.H,v 1.3.2.1 2001/08/04 12:21:33 easysw Exp $".
//
diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H
index af9d3df0b..41d180ba9 100644
--- a/FL/Fl_Text_Display.H
+++ b/FL/Fl_Text_Display.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Display.H,v 1.4 2000/08/20 04:31:36 spitzak Exp $"
+// "$Id: Fl_Text_Display.H,v 1.4.2.1 2001/08/04 12:21:33 easysw Exp $"
//
// Header file for Fl_Text_Display class.
//
@@ -27,13 +27,13 @@
#ifndef FL_TEXT_DISPLAY_H
#define FL_TEXT_DISPLAY_H
-#include <FL/fl_draw.H>
-#include <FL/Fl_Group.H>
-#include <FL/Fl_Widget.H>
-#include <FL/Fl_Scrollbar.H>
-#include <FL/Fl_Text_Buffer.H>
+#include "fl_draw.H"
+#include "Fl_Group.H"
+#include "Fl_Widget.H"
+#include "Fl_Scrollbar.H"
+#include "Fl_Text_Buffer.H"
-class FL_API Fl_Text_Display: public Fl_Group {
+class FL_EXPORT Fl_Text_Display: public Fl_Group {
public:
enum {
NORMAL_CURSOR, CARET_CURSOR, DIM_CURSOR,
@@ -54,7 +54,7 @@ class FL_API Fl_Text_Display: public Fl_Group {
typedef void (*Unfinished_Style_Cb)();
- struct FL_API Style_Table_Entry {
+ struct FL_EXPORT Style_Table_Entry {
Fl_Color color;
Fl_Font font;
int size;
@@ -85,12 +85,13 @@ class FL_API Fl_Text_Display: public Fl_Group {
void hide_cursor() { show_cursor(0); }
void cursor_style(int style);
int scrollbar_width() { return scrollbar_width_; }
- Fl_Flags scrollbar_align() { return scrollbar_align_; }
+ Fl_Align scrollbar_align() { return scrollbar_align_; }
void scrollbar_width(int w) { scrollbar_width_ = w; }
- void scrollbar_align(Fl_Flags a) { scrollbar_align_ = a; }
+ void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; }
int word_start(int pos) { return buffer()->word_start(pos); }
int word_end(int pos) { return buffer()->word_end(pos); }
+
void highlight_data(Fl_Text_Buffer *styleBuffer,
Style_Table_Entry *styleTable,
int nStyles, char unfinishedStyle,
@@ -99,13 +100,20 @@ class FL_API Fl_Text_Display: public Fl_Group {
int position_style(int lineStartPos, int lineLen, int lineIndex,
int dispIndex);
+
+ Fl_Font textfont() const {return (Fl_Font)textfont_;}
+ void textfont(uchar s) {textfont_ = s;}
+ uchar textsize() const {return textsize_;}
+ void textsize(uchar s) {textsize_ = s;}
+ Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
+ void textcolor(uchar n) {textcolor_ = n;}
protected:
- // Most (all?) of this stuff should only be called from layout() or
+ // Most (all?) of this stuff should only be called from resize() or
// draw().
// Anything with "vline" indicates thats it deals with currently
// visible lines.
- virtual void layout();
+ virtual void resize(int X, int Y, int W, int H);
virtual void draw();
void draw_text(int X, int Y, int W, int H);
@@ -204,14 +212,18 @@ class FL_API Fl_Text_Display: public Fl_Group {
Fl_Scrollbar* mHScrollBar;
Fl_Scrollbar* mVScrollBar;
int scrollbar_width_;
- Fl_Flags scrollbar_align_;
+ Fl_Align scrollbar_align_;
int dragPos, dragType, dragging;
int display_insert_position_hint;
struct { int x, y, w, h; } text_area;
+
+ uchar textfont_;
+ uchar textsize_;
+ uchar textcolor_;
};
#endif
//
-// End of "$Id: Fl_Text_Display.H,v 1.4 2000/08/20 04:31:36 spitzak Exp $".
+// End of "$Id: Fl_Text_Display.H,v 1.4.2.1 2001/08/04 12:21:33 easysw Exp $".
//
diff --git a/FL/Fl_Text_Editor.H b/FL/Fl_Text_Editor.H
index 980a7fb84..9a6533949 100644
--- a/FL/Fl_Text_Editor.H
+++ b/FL/Fl_Text_Editor.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Editor.H,v 1.1 2000/08/04 10:21:59 clip Exp $"
+// "$Id: Fl_Text_Editor.H,v 1.1.2.1 2001/08/04 12:21:33 easysw Exp $"
//
// Header file for Fl_Text_Editor class.
//
@@ -28,16 +28,16 @@
#ifndef FL_TEXT_EDITOR_H
#define FL_TEXT_EDITOR_H
-#include <FL/Fl_Text_Display.H>
+#include "Fl_Text_Display.H"
// key will match in any state
#define FL_TEXT_EDITOR_ANY_STATE (-1L)
-class FL_API Fl_Text_Editor : public Fl_Text_Display {
+class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display {
public:
typedef int (*Key_Func)(int key, Fl_Text_Editor* editor);
- struct FL_API Key_Binding {
+ struct FL_EXPORT Key_Binding {
int key;
int state;
Key_Func function;
@@ -100,6 +100,6 @@ class FL_API Fl_Text_Editor : public Fl_Text_Display {
#endif
//
-// End of "$Id: Fl_Text_Editor.H,v 1.1 2000/08/04 10:21:59 clip Exp $".
+// End of "$Id: Fl_Text_Editor.H,v 1.1.2.1 2001/08/04 12:21:33 easysw Exp $".
//
diff --git a/FL/filename.H b/FL/filename.H
index cad5b75d9..342d8f411 100644
--- a/FL/filename.H
+++ b/FL/filename.H
@@ -1,5 +1,5 @@
//
-// "$Id: filename.H,v 1.11.2.4 2001/01/22 15:13:38 easysw Exp $"
+// "$Id: filename.H,v 1.11.2.4.2.1 2001/08/04 12:21:33 easysw Exp $"
//
// Filename header file for the Fast Light Tool Kit (FLTK).
//
@@ -26,19 +26,7 @@
#ifndef FL_FILENAME_H
#define FL_FILENAME_H
-//
-// The following is only used when building DLLs under WIN32 with Visual C++...
-//
-
-#if defined(FL_DLL) && defined(_MSC_VER)
-# ifdef FL_LIBRARY
-# define FL_EXPORT __declspec(dllexport)
-# else
-# define FL_EXPORT __declspec(dllimport)
-# endif /* FL_LIBRARY */
-#else
-# define FL_EXPORT
-#endif /* FL_DLL && _MSC_VER */
+# include "Fl_Export.H"
#define FL_PATH_MAX 256 // all buffers are this length
@@ -76,5 +64,5 @@ FL_EXPORT int filename_list(const char *d, struct dirent ***list);
#endif
//
-// End of "$Id: filename.H,v 1.11.2.4 2001/01/22 15:13:38 easysw Exp $".
+// End of "$Id: filename.H,v 1.11.2.4.2.1 2001/08/04 12:21:33 easysw Exp $".
//
diff --git a/FL/fl_draw.H b/FL/fl_draw.H
index 7ebdec5c1..50ab7a1f9 100644
--- a/FL/fl_draw.H
+++ b/FL/fl_draw.H
@@ -1,5 +1,5 @@
//
-// "$Id: fl_draw.H,v 1.9.2.6 2001/04/13 19:07:40 easysw Exp $"
+// "$Id: fl_draw.H,v 1.9.2.6.2.1 2001/08/04 12:21:33 easysw Exp $"
//
// Portable drawing function header file for the Fast Light Tool Kit (FLTK).
//
@@ -66,7 +66,9 @@ enum {
// rectangles tweaked to exactly fill the pixel rectangle:
FL_EXPORT void fl_rect(int x, int y, int w, int h);
+inline void fl_rect(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rect(x,y,w,h);}
FL_EXPORT void fl_rectf(int x, int y, int w, int h);
+inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rectf(x,y,w,h);}
// line segments:
FL_EXPORT void fl_line(int,int, int,int);
@@ -134,6 +136,7 @@ inline int fl_size() {return fl_size_;}
// information you can get about the current font:
FL_EXPORT int fl_height(); // using "size" should work ok
+inline int fl_height(int, int size) {return size;}
FL_EXPORT int fl_descent();
FL_EXPORT double fl_width(const char*);
FL_EXPORT double fl_width(const char*, int n);
@@ -181,5 +184,5 @@ FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scal
#endif
//
-// End of "$Id: fl_draw.H,v 1.9.2.6 2001/04/13 19:07:40 easysw Exp $".
+// End of "$Id: fl_draw.H,v 1.9.2.6.2.1 2001/08/04 12:21:33 easysw Exp $".
//
diff --git a/FL/fl_file_chooser.H b/FL/fl_file_chooser.H
index d7068d416..e0ff9e027 100644
--- a/FL/fl_file_chooser.H
+++ b/FL/fl_file_chooser.H
@@ -1,5 +1,5 @@
//
-// "$Id: fl_file_chooser.H,v 1.5.2.3.2.1 2001/08/03 18:46:57 easysw Exp $"
+// "$Id: fl_file_chooser.H,v 1.5.2.3.2.2 2001/08/04 12:21:33 easysw Exp $"
//
// File chooser header file for the Fast Light Tool Kit (FLTK).
//
@@ -29,9 +29,10 @@
#include "Enumerations.H"
FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname);
+FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));
#endif
//
-// End of "$Id: fl_file_chooser.H,v 1.5.2.3.2.1 2001/08/03 18:46:57 easysw Exp $".
+// End of "$Id: fl_file_chooser.H,v 1.5.2.3.2.2 2001/08/04 12:21:33 easysw Exp $".
//