summaryrefslogtreecommitdiff
path: root/FL/Fl_Text_Display.H
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-08-04 12:21:34 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-08-04 12:21:34 +0000
commite4727142d4c48198e708ba2bd4068daf8062abaf (patch)
treeb2394dd6b76d749af4deea2ebaf88e840adfad11 /FL/Fl_Text_Display.H
parent00f126367d73a2e860ca22a093a66fd1703f412a (diff)
Fl_Text* widgets backported to 1.1 (Carl, please confirm that I haven't
goofed with the layout->resize conversion. Also check fix for mMaxSize being 0 so I set it to textsize()) contrast,inactive -> fl_contrast, fl_inactive, with defines for old names. fl_rect() and fl_rectf() with color args. fl_height, etc. with font,size args. Send FL_RELEASE and FL_DRAG events to the pushed() widget by default. Fix file chooser so it doesn't automatically change dirs if the only matching name is a dir. Updated Fl_Browser_ and Fl_Scrollbar for better mouse wheel support. Moved DLL definitions to new Fl_Export.H. Restore callback functionality in file chooser. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1550 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Text_Display.H')
-rw-r--r--FL/Fl_Text_Display.H40
1 files changed, 26 insertions, 14 deletions
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 $".
//