diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2008-09-10 23:56:49 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2008-09-10 23:56:49 +0000 |
| commit | b6bde2e4569aa617c8a6af64947c688c624ed7f8 (patch) | |
| tree | 010d15843eb7d4faf7cd1b0cd44d5b9c00462a83 /FL | |
| parent | dfb50e85292687561927610e689eb5ab30d0ba26 (diff) | |
Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and additions by Ian. PLEASE BE AWARE that the patch in its current incarnation is a regression in many aspects and further work is required before we can announce Unicode support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl.H | 1 | ||||
| -rw-r--r-- | FL/Fl_Input.H | 1 | ||||
| -rw-r--r-- | FL/fl_draw.H | 13 | ||||
| -rw-r--r-- | FL/forms.H | 6 | ||||
| -rw-r--r-- | FL/glut.H | 2 | ||||
| -rw-r--r-- | FL/names.h | 4 | ||||
| -rw-r--r-- | FL/x.H | 5 |
7 files changed, 24 insertions, 8 deletions
@@ -28,6 +28,7 @@ #ifndef Fl_H # define Fl_H +# include "fl_utf8.H" # include "Enumerations.H" # ifndef Fl_Object # define Fl_Object Fl_Widget diff --git a/FL/Fl_Input.H b/FL/Fl_Input.H index 308aa37b9..8e3560a5d 100644 --- a/FL/Fl_Input.H +++ b/FL/Fl_Input.H @@ -34,6 +34,7 @@ class FL_EXPORT Fl_Input : public Fl_Input_ { int handle_key(); int shift_position(int p); int shift_up_down_position(int p); + void handle_mouse(int keepmark=0); public: void draw(); int handle(int); diff --git a/FL/fl_draw.H b/FL/fl_draw.H index ad18b700e..1ebaf2ce9 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -148,11 +148,12 @@ 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); -FL_EXPORT double fl_width(uchar); +FL_EXPORT double fl_width(Fl_Char); // draw using current font: FL_EXPORT void fl_draw(const char*, int x, int y); FL_EXPORT void fl_draw(const char*, int n, int x, int y); +FL_EXPORT void fl_rtl_draw(const char*, int n, int x, int y); FL_EXPORT void fl_measure(const char*, int& x, int& y, int draw_symbols = 1); FL_EXPORT void fl_draw(const char*, int,int,int,int, Fl_Align, Fl_Image* img=0, int draw_symbols = 1); @@ -195,6 +196,16 @@ FL_EXPORT const char* fl_shortcut_label(int); FL_EXPORT void fl_overlay_rect(int,int,int,int); FL_EXPORT void fl_overlay_clear(); FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); +FL_EXPORT const char* fl_expand_text(const char* from, char* buf, int maxbuf, + double maxw, int& n, double &width, + int wrap, int draw_symbols = 0); + +// XIM: +FL_EXPORT void fl_set_status(int X, int Y, int W, int H); +FL_EXPORT void fl_set_spot(int font, int size, int x, int y, int w, int h); +FL_EXPORT void fl_reset_spot(void); + + // XForms symbols: FL_EXPORT int fl_draw_symbol(const char* label,int x,int y,int w,int h, Fl_Color); diff --git a/FL/forms.H b/FL/forms.H index 5c77363e4..8f6cec10f 100644 --- a/FL/forms.H +++ b/FL/forms.H @@ -208,8 +208,10 @@ inline void fl_reset_focus_object(Fl_Widget* o) {Fl::focus(o);} inline void fl_set_object_boxtype(Fl_Widget* o, Fl_Boxtype a) {o->box(a);} inline void fl_set_object_lsize(Fl_Widget* o,int s) {o->labelsize(s);} + +/* forms lib font indexes must be byte sized - extract correct byte from style word */ inline void fl_set_object_lstyle(Fl_Widget* o,int a) { - o->labelfont((Fl_Font)a); o->labeltype((Fl_Labeltype)(a>>8));} + o->labelfont((Fl_Font)(a&0xff)); o->labeltype((Fl_Labeltype)(a>>8));} inline void fl_set_object_lcol(Fl_Widget* o, unsigned a) {o->labelcolor(a);} #define fl_set_object_lcolor fl_set_object_lcol inline void fl_set_object_lalign(Fl_Widget* o, Fl_Align a) {o->align(a);} @@ -662,7 +664,7 @@ FL_EXPORT int fl_show_choice( const char *b1, const char *b2); -inline void fl_set_goodies_font(uchar a, uchar b) {fl_message_font(a,b);} +inline void fl_set_goodies_font(Fl_Font a, Fl_Fontsize b) {fl_message_font(a,b);} #define fl_show_messages fl_message inline int fl_show_choices(const char* c,int n,const char* b1,const char* b2, const char* b3, int) { @@ -407,7 +407,7 @@ FL_EXPORT GLUTproc glutGetProcAddress(const char *procName); //inline void glutVideoPan(int x, int y, int width, int height); // Font argument must be a void* for compatability, so... -extern FL_EXPORT struct Fl_Glut_Bitmap_Font {uchar font; int size;} +extern FL_EXPORT struct Fl_Glut_Bitmap_Font {Fl_Font font; Fl_Fontsize size;} glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10, glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12, glutBitmapHelvetica18; diff --git a/FL/names.h b/FL/names.h index 39238dac2..7e2043dc1 100644 --- a/FL/names.h +++ b/FL/names.h @@ -1,5 +1,5 @@ // -// "$Id:$" +// "$Id$" // // Event names header file for the Fast Light Tool Kit (FLTK). // @@ -81,5 +81,5 @@ char *fl_fontnames[] = #endif /* FL_NAMES_H */ // -// End of "$Id:$". +// End of "$Id$". // @@ -50,7 +50,7 @@ # endif # include <X11/Xatom.h> # include "Fl_Window.H" - +# include "Xutf8.h" // Mirror X definition of Region to Fl_Region, for portability... typedef Region Fl_Region; @@ -68,7 +68,8 @@ extern FL_EXPORT Colormap fl_colormap; // drawing functions: extern FL_EXPORT GC fl_gc; extern FL_EXPORT Window fl_window; -extern FL_EXPORT XFontStruct* fl_xfont; +//extern FL_EXPORT XFontStruct* fl_xfont; +extern FL_EXPORT XUtf8FontStruct* fl_xfont; extern FL_EXPORT void *fl_xftfont; FL_EXPORT ulong fl_xpixel(Fl_Color i); FL_EXPORT ulong fl_xpixel(uchar r, uchar g, uchar b); |
