Rename type Fl_Font_Size into Fl_Fontsize to comply with other naming in FLTK.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6161 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2008-08-15 21:11:21 +00:00
parent 3d6201a610
commit e63c50b2d1
34 changed files with 98 additions and 92 deletions

View File

@ -517,8 +517,14 @@ const Fl_Align FL_ALIGN_RIGHT_BOTTOM = FL_ALIGN_BOTTOM_RIGHT;
const Fl_Align FL_ALIGN_NOWRAP = (Fl_Align)0; // for back compatability
/**@}*/
/** Index into the font table.
*/
typedef int Fl_Font;
typedef int Fl_Font_Size;
/** Size of a font in pixels.
* This is the approximate height of a font in pixels.
*/
typedef int Fl_Fontsize;
// standard fonts
const Fl_Font FL_HELVETICA = 0;
@ -542,7 +548,7 @@ const Fl_Font FL_FREE_FONT = 16; // first one to allocate
const Fl_Font FL_BOLD = 1; // add this to helvetica, courier, or times
const Fl_Font FL_ITALIC = 2; // add this to helvetica, courier, or times
extern FL_EXPORT Fl_Font_Size FL_NORMAL_SIZE;
extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE;
enum Fl_Color { // standard colors

View File

@ -54,7 +54,7 @@ class FL_EXPORT Fl_Browser_ : public Fl_Group {
int max_width; // widest object seen so far
uchar has_scrollbar_; // which scrollbars are enabled
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
unsigned textcolor_;
void* top_; // which item scrolling position is in
void* selection_; // which is selected (except for FL_MULTI_BROWSER)
@ -134,8 +134,8 @@ public:
Fl_Font textfont() const {return textfont_;}
void textfont(Fl_Font s) {textfont_ = s;}
Fl_Font_Size textsize() const {return textsize_;}
void textsize(Fl_Font_Size s) {textsize_ = s;}
Fl_Fontsize textsize() const {return textsize_;}
void textsize(Fl_Fontsize s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned n) {textcolor_ = n;}

View File

@ -60,7 +60,7 @@ class FL_EXPORT Fl_Chart : public Fl_Widget {
double min,max;
uchar autosize_;
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
unsigned textcolor_;
protected:
void draw();
@ -79,8 +79,8 @@ public:
void maxsize(int);
Fl_Font textfont() const {return textfont_;}
void textfont(Fl_Font s) {textfont_ = s;}
Fl_Font_Size textsize() const {return textsize_;}
void textsize(Fl_Font_Size s) {textsize_ = s;}
Fl_Fontsize textsize() const {return textsize_;}
void textsize(Fl_Fontsize s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned n) {textcolor_ = n;}
uchar autosize() const {return autosize_;}

View File

@ -41,7 +41,7 @@
class FL_EXPORT Fl_Counter : public Fl_Valuator {
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
unsigned textcolor_;
double lstep_;
uchar mouseobj;
@ -63,8 +63,8 @@ public:
void step(double a) {Fl_Valuator::step(a);}
Fl_Font textfont() const {return textfont_;}
void textfont(Fl_Font s) {textfont_ = s;}
Fl_Font_Size textsize() const {return textsize_;}
void textsize(Fl_Font_Size s) {textsize_ = s;}
Fl_Fontsize textsize() const {return textsize_;}
void textsize(Fl_Fontsize s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned s) {textcolor_ = s;}

View File

@ -67,8 +67,8 @@ public:
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
Fl_Font_Size textsize() const { return Fl_Browser::textsize(); };
void textsize(Fl_Font_Size s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
Fl_Fontsize textsize() const { return Fl_Browser::textsize(); };
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
int filetype() const { return (filetype_); };
void filetype(int t) { filetype_ = t; };

View File

@ -152,8 +152,8 @@ public:
Fl_Color textcolor();
void textfont(Fl_Font f);
Fl_Font textfont();
void textsize(Fl_Font_Size s);
Fl_Font_Size textsize();
void textsize(Fl_Fontsize s);
Fl_Fontsize textsize();
void type(int t);
int type();
void * user_data() const;

View File

@ -74,8 +74,8 @@ public:
void resize(int xx, int yy, int ww, int hh);
void show();
void show(int argc, char **argv);
void textsize(Fl_Font_Size s);
Fl_Font_Size textsize();
void textsize(Fl_Fontsize s);
Fl_Fontsize textsize();
void topline(const char *n);
void topline(int n);
void value(const char *f);

View File

@ -104,7 +104,7 @@ class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget
textcolor_, // Text color
linkcolor_; // Link color
Fl_Font textfont_; // Default font for text
Fl_Font_Size textsize_; // Default font size
Fl_Fontsize textsize_; // Default font size
const char *value_; // HTML text value
int nblocks_, // Number of blocks/paragraphs
@ -113,7 +113,7 @@ class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget
int nfonts_; // Number of fonts in stack
Fl_Font fonts_[100]; // Font stack
Fl_Font_Size font_sizes_[100]; // Font Size stack
Fl_Fontsize font_sizes_[100]; // Font Size stack
Fl_Help_Func *link_; // Link transform function
@ -165,13 +165,13 @@ class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget
int get_length(const char *l);
int handle(int);
void initfont(Fl_Font &f, Fl_Font_Size &s) { nfonts_ = 0;
void initfont(Fl_Font &f, Fl_Fontsize &s) { nfonts_ = 0;
fl_font(f = fonts_[0] = textfont_,
s = font_sizes_[0] = textsize_); }
void pushfont(Fl_Font f, Fl_Font_Size s) { if (nfonts_ < 99) nfonts_ ++;
void pushfont(Fl_Font f, Fl_Fontsize s) { if (nfonts_ < 99) nfonts_ ++;
fl_font(fonts_[nfonts_] = f,
font_sizes_[nfonts_] = s); }
void popfont(Fl_Font &f, Fl_Font_Size &s) { if (nfonts_ > 0) nfonts_ --;
void popfont(Fl_Font &f, Fl_Fontsize &s) { if (nfonts_ > 0) nfonts_ --;
fl_font(f = fonts_[nfonts_],
s = font_sizes_[nfonts_]); }
@ -201,8 +201,8 @@ public:
Fl_Color textcolor() const { return (defcolor_); }
void textfont(Fl_Font f) { textfont_ = f; format(); }
Fl_Font textfont() const { return (textfont_); }
void textsize(Fl_Font_Size s) { textsize_ = s; format(); }
Fl_Font_Size textsize() const { return (textsize_); }
void textsize(Fl_Fontsize s) { textsize_ = s; format(); }
Fl_Fontsize textsize() const { return (textsize_); }
const char *title() { return (title_); }
void topline(const char *n);
void topline(int);

View File

@ -62,7 +62,7 @@ class FL_EXPORT Fl_Input_ : public Fl_Widget {
uchar erase_cursor_only;
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
unsigned textcolor_;
unsigned cursor_color_;
@ -125,8 +125,8 @@ public:
Fl_Font textfont() const {return textfont_;}
void textfont(Fl_Font s) {textfont_ = s;}
Fl_Font_Size textsize() const {return textsize_;}
void textsize(Fl_Font_Size s) {textsize_ = s;}
Fl_Fontsize textsize() const {return textsize_;}
void textsize(Fl_Fontsize s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned n) {textcolor_ = n;}
Fl_Color cursor_color() const {return (Fl_Color)cursor_color_;}

View File

@ -172,10 +172,10 @@ public:
void textfont(Fl_Font f) {
inp_->textfont(f);
}
Fl_Font_Size textsize() const {
Fl_Fontsize textsize() const {
return (inp_->textsize());
}
void textsize(Fl_Font_Size s) {
void textsize(Fl_Fontsize s) {
inp_->textsize(s);
}
const char* value() const {

View File

@ -43,7 +43,7 @@ protected:
uchar alloc;
uchar down_box_;
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
unsigned textcolor_;
public:
@ -82,8 +82,8 @@ public:
Fl_Font textfont() const {return textfont_;}
void textfont(Fl_Font c) {textfont_=c;}
Fl_Font_Size textsize() const {return textsize_;}
void textsize(Fl_Font_Size c) {textsize_=c;}
Fl_Fontsize textsize() const {return textsize_;}
void textsize(Fl_Fontsize c) {textsize_=c;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned c) {textcolor_=c;}

View File

@ -59,7 +59,7 @@ struct FL_EXPORT Fl_Menu_Item {
int flags;
uchar labeltype_;
Fl_Font labelfont_;
Fl_Font_Size labelsize_;
Fl_Fontsize labelsize_;
unsigned labelcolor_;
// advance N items, skipping submenus:
@ -79,8 +79,8 @@ struct FL_EXPORT Fl_Menu_Item {
void labelcolor(unsigned a) {labelcolor_ = a;}
Fl_Font labelfont() const {return labelfont_;}
void labelfont(Fl_Font a) {labelfont_ = a;}
Fl_Font_Size labelsize() const {return labelsize_;}
void labelsize(Fl_Font_Size a) {labelsize_ = a;}
Fl_Fontsize labelsize() const {return labelsize_;}
void labelsize(Fl_Fontsize a) {labelsize_ = a;}
Fl_Callback_p callback() const {return callback_;}
void callback(Fl_Callback* c, void* p) {callback_=c; user_data_=p;}
void callback(Fl_Callback* c) {callback_=c;}

View File

@ -198,10 +198,10 @@ class Fl_Spinner : public Fl_Group
void textfont(Fl_Font f) {
input_.textfont(f);
}
Fl_Font_Size textsize() const {
Fl_Fontsize textsize() const {
return (input_.textsize());
}
void textsize(Fl_Font_Size s) {
void textsize(Fl_Fontsize s) {
input_.textsize(s);
}
uchar type() const { return (input_.type()); }

View File

@ -124,8 +124,8 @@ class FL_EXPORT Fl_Text_Display: public Fl_Group {
Fl_Font textfont() const {return textfont_;}
void textfont(Fl_Font s) {textfont_ = s;}
Fl_Font_Size textsize() const {return textsize_;}
void textsize(Fl_Font_Size s) {textsize_ = s;}
Fl_Fontsize textsize() const {return textsize_;}
void textsize(Fl_Fontsize s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned n) {textcolor_ = n;}
@ -286,7 +286,7 @@ class FL_EXPORT Fl_Text_Display: public Fl_Group {
int shortcut_;
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
unsigned textcolor_;
// The following are not presently used from the original NEdit code,

View File

@ -47,9 +47,9 @@ public:
static void current(Fl_Widget*);
static Fl_Font font() { return font_; }
static Fl_Font_Size size() { return size_; }
static Fl_Fontsize size() { return size_; }
static void font(Fl_Font i) { font_ = i; }
static void size(Fl_Font_Size s) { size_ = s; }
static void size(Fl_Fontsize s) { size_ = s; }
static void color(unsigned c) { color_ = c; }
static Fl_Color color() { return (Fl_Color)color_; }
static void textcolor(unsigned c) { textcolor_ = c; }
@ -66,7 +66,7 @@ private:
static unsigned color_;
static unsigned textcolor_;
static Fl_Font font_;
static Fl_Font_Size size_;
static Fl_Fontsize size_;
static Fl_Widget* widget_;
};

View File

@ -52,8 +52,8 @@ public:
Fl_Font textfont() const {return input.textfont();}
void textfont(Fl_Font s) {input.textfont(s);}
Fl_Font_Size textsize() const {return input.textsize();}
void textsize(Fl_Font_Size s) {input.textsize(s);}
Fl_Fontsize textsize() const {return input.textsize();}
void textsize(Fl_Fontsize s) {input.textsize(s);}
Fl_Color textcolor() const {return input.textcolor();}
void textcolor(unsigned n) {input.textcolor(n);}
Fl_Color cursor_color() const {return input.cursor_color();}

View File

@ -34,7 +34,7 @@
class FL_EXPORT Fl_Value_Output : public Fl_Valuator {
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
uchar soft_;
unsigned textcolor_;
public:
@ -47,8 +47,8 @@ public:
Fl_Font textfont() const {return textfont_;}
void textfont(Fl_Font s) {textfont_ = s;}
Fl_Font_Size textsize() const {return textsize_;}
void textsize(Fl_Font_Size s) {textsize_ = s;}
Fl_Fontsize textsize() const {return textsize_;}
void textsize(Fl_Fontsize s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned s) {textcolor_ = s;}
};

View File

@ -32,7 +32,7 @@
class FL_EXPORT Fl_Value_Slider : public Fl_Slider {
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
unsigned textcolor_;
public:
void draw();
@ -40,8 +40,8 @@ public:
Fl_Value_Slider(int x,int y,int w,int h, const char *l = 0);
Fl_Font textfont() const {return textfont_;}
void textfont(Fl_Font s) {textfont_ = s;}
Fl_Font_Size textsize() const {return textsize_;}
void textsize(Fl_Font_Size s) {textsize_ = s;}
Fl_Fontsize textsize() const {return textsize_;}
void textsize(Fl_Fontsize s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned s) {textcolor_ = s;}
};

View File

@ -64,7 +64,7 @@ struct FL_EXPORT Fl_Label {
/** label font used in text */
Fl_Font font;
/** size of label font */
Fl_Font_Size size;
Fl_Fontsize size;
/** text color */
unsigned color;
/** draw the label aligned to the given box */
@ -414,13 +414,13 @@ public:
* The default size is 14 pixels.
* \return the current font size
*/
Fl_Font_Size labelsize() const {return label_.size;}
Fl_Fontsize labelsize() const {return label_.size;}
/** Gets or sets the font size in pixels.
* The default size is 14 pixels.
* \param[in] pix the new font size
*/
void labelsize(Fl_Font_Size pix) {label_.size=pix;}
void labelsize(Fl_Fontsize pix) {label_.size=pix;}
/** Gets or sets the image to use as part of the widget label.
* This image is used when drawing the widget in the active state.

View File

@ -63,8 +63,8 @@ FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...)
FL_EXPORT Fl_Widget *fl_message_icon();
extern FL_EXPORT Fl_Font fl_message_font_;
extern FL_EXPORT Fl_Font_Size fl_message_size_;
inline void fl_message_font(Fl_Font f, Fl_Font_Size s) {
extern FL_EXPORT Fl_Fontsize fl_message_size_;
inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
fl_message_font_ = f; fl_message_size_ = s;}
// pointers you can use to change FLTK to a foreign language:

View File

@ -136,11 +136,11 @@ FL_EXPORT double fl_transform_dy(double x, double y);
FL_EXPORT void fl_transformed_vertex(double x, double y);
// current font:
FL_EXPORT void fl_font(Fl_Font face, Fl_Font_Size size);
FL_EXPORT void fl_font(Fl_Font face, Fl_Fontsize size);
extern FL_EXPORT Fl_Font fl_font_;
inline Fl_Font fl_font() {return fl_font_;}
extern FL_EXPORT Fl_Font_Size fl_size_;
inline Fl_Font_Size fl_size() {return fl_size_;}
extern FL_EXPORT Fl_Fontsize fl_size_;
inline Fl_Fontsize fl_size() {return fl_size_;}
// information you can get about the current font:
FL_EXPORT int fl_height(); // using "size" should work ok

View File

@ -401,11 +401,11 @@ Fl_Font Fl_File_Chooser::textfont() {
return (fileList->textfont());
}
void Fl_File_Chooser::textsize(Fl_Font_Size s) {
void Fl_File_Chooser::textsize(Fl_Fontsize s) {
fileList->textsize(s);
}
Fl_Font_Size Fl_File_Chooser::textsize() {
Fl_Fontsize Fl_File_Chooser::textsize() {
return (fileList->textsize());
}

View File

@ -335,11 +335,11 @@ fileName->take_focus();} {}
} {
code {return (fileList->textfont());} {}
}
Function {textsize(Fl_Font_Size s)} {return_type void
Function {textsize(Fl_Fontsize s)} {return_type void
} {
code {fileList->textsize(s);} {}
}
Function {textsize()} {return_type Fl_Font_Size
Function {textsize()} {return_type Fl_Fontsize
} {
code {return (fileList->textsize());} {}
}

View File

@ -51,15 +51,15 @@ public:
HFONT fid;
int width[256];
TEXTMETRIC metr;
FL_EXPORT Fl_FontSize(const char* fontname, Fl_Font_Size size);
FL_EXPORT Fl_FontSize(const char* fontname, Fl_Fontsize size);
# elif defined(__APPLE_QD__)
FL_EXPORT Fl_FontSize(const char* fontname, Fl_Font_Size size);
FL_EXPORT Fl_FontSize(const char* fontname, Fl_Fontsize size);
short font, face, size;
short ascent, descent;
short width[256];
bool knowMetrics;
# elif defined(__APPLE_QUARTZ__)
FL_EXPORT Fl_FontSize(const char* fontname, Fl_Font_Size size);
FL_EXPORT Fl_FontSize(const char* fontname, Fl_Fontsize size);
ATSUTextLayout layout;
ATSUStyle style;
short ascent, descent, q_width;
@ -70,14 +70,14 @@ public:
# elif USE_XFT
XftFont* font;
const char* encoding;
Fl_Font_Size size;
Fl_Fontsize size;
FL_EXPORT Fl_FontSize(const char* xfontname);
# else
XFontStruct* font; // X font information
FL_EXPORT Fl_FontSize(const char* xfontname);
# endif
Fl_Font_Size minsize; // smallest point size that should use this
Fl_Font_Size maxsize; // largest point size that should use this
Fl_Fontsize minsize; // smallest point size that should use this
Fl_Fontsize maxsize; // largest point size that should use this
# if HAVE_GL
unsigned int listbase;// base of display list, 0 = none
# endif

View File

@ -244,7 +244,7 @@ void Fl_Help_Dialog::show(int argc, char **argv) {
window_->show(argc, argv);
}
void Fl_Help_Dialog::textsize(Fl_Font_Size s) {
void Fl_Help_Dialog::textsize(Fl_Fontsize s) {
view_->textsize(s);
if (s <= 8)
@ -258,7 +258,7 @@ else
larger_->activate();
}
Fl_Font_Size Fl_Help_Dialog::textsize() {
Fl_Fontsize Fl_Help_Dialog::textsize() {
return (view_->textsize());
}

View File

@ -204,7 +204,7 @@ window_->label(view_->title());} {}
} {
code {window_->show(argc, argv);} {}
}
Function {textsize(Fl_Font_Size s)} {return_type void
Function {textsize(Fl_Fontsize s)} {return_type void
} {
code {view_->textsize(s);
@ -218,7 +218,7 @@ if (s >= 18)
else
larger_->activate();} {}
}
Function {textsize()} {return_type Fl_Font_Size
Function {textsize()} {return_type Fl_Fontsize
} {
code {return (view_->textsize());} {}
}

View File

@ -466,7 +466,7 @@ Fl_Help_View::draw()
int xx, yy, ww, hh; // Current positions and sizes
int line; // Current line
Fl_Font font;
Fl_Font_Size fsize; // Current font and size
Fl_Fontsize fsize; // Current font and size
int head, pre, // Flags for text
needspace; // Do we need whitespace?
Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;
@ -1084,7 +1084,7 @@ Fl_Help_View::format()
int line; // Current line in block
int links; // Links for current line
Fl_Font font;
Fl_Font_Size fsize; // Current font and size
Fl_Fontsize fsize; // Current font and size
unsigned char border; // Draw border?
int talign, // Current alignment
newalign, // New alignment
@ -1897,7 +1897,7 @@ Fl_Help_View::format_table(int *table_width, // O - Total table width
*start; // Start of element
int minwidths[MAX_COLUMNS]; // Minimum widths for each column
Fl_Font font;
Fl_Font_Size fsize; // Current font and size
Fl_Fontsize fsize; // Current font and size
// Clear widths...

View File

@ -39,7 +39,7 @@ unsigned Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1,
FL_NUM_BLUE - 2);
unsigned Fl_Tooltip::textcolor_ = FL_BLACK;
Fl_Font Fl_Tooltip::font_ = FL_HELVETICA;
Fl_Font_Size Fl_Tooltip::size_ = FL_NORMAL_SIZE;
Fl_Fontsize Fl_Tooltip::size_ = FL_NORMAL_SIZE;
#define MAX_WIDTH 400

View File

@ -76,7 +76,7 @@ int Fl_Widget::handle(int) {
return 0;
}
Fl_Font_Size FL_NORMAL_SIZE = 14;
Fl_Fontsize FL_NORMAL_SIZE = 14;
Fl_Widget::Fl_Widget(int X, int Y, int W, int H, Fl_CString L) {

View File

@ -54,7 +54,7 @@ static Fl_Button *button[3];
static Fl_Input *input;
static const char *iconlabel = "?";
Fl_Font fl_message_font_ = FL_HELVETICA;
Fl_Font_Size fl_message_size_ = 14;
Fl_Fontsize fl_message_size_ = 14;
static Fl_Window *makeform() {
if (message_form) {

View File

@ -27,7 +27,7 @@
#include <config.h>
Fl_FontSize::Fl_FontSize(const char* name, Fl_Font_Size Size) {
Fl_FontSize::Fl_FontSize(const char* name, Fl_Fontsize Size) {
next = 0;
# if HAVE_GL
listbase = 0;
@ -245,7 +245,7 @@ void fl_font(Fl_FontSize* s) {
#endif
}
static Fl_FontSize* find(Fl_Font fnum, Fl_Font_Size size) {
static Fl_FontSize* find(Fl_Font fnum, Fl_Fontsize size) {
Fl_Fontdesc* s = fl_fonts+fnum;
if (!s->name) s = fl_fonts; // use 0 if fnum undefined
Fl_FontSize* f;
@ -261,9 +261,9 @@ static Fl_FontSize* find(Fl_Font fnum, Fl_Font_Size size) {
// Public interface:
Fl_Font fl_font_ = 0;
Fl_Font_Size fl_size_ = 0;
Fl_Fontsize fl_size_ = 0;
void fl_font(Fl_Font fnum, Fl_Font_Size size) {
void fl_font(Fl_Font fnum, Fl_Fontsize size) {
if (fnum==-1) {
fl_font_ = 0;
fl_size_ = 0;

View File

@ -25,7 +25,7 @@
// http://www.fltk.org/str.php
//
Fl_FontSize::Fl_FontSize(const char* name, Fl_Font_Size size) {
Fl_FontSize::Fl_FontSize(const char* name, Fl_Fontsize size) {
int weight = FW_NORMAL;
int italic = 0;
switch (*name++) {
@ -106,7 +106,7 @@ static Fl_Fontdesc built_in_table[] = {
Fl_Fontdesc* fl_fonts = built_in_table;
static Fl_FontSize* find(Fl_Font fnum, Fl_Font_Size size) {
static Fl_FontSize* find(Fl_Font fnum, Fl_Fontsize size) {
Fl_Fontdesc* s = fl_fonts+fnum;
if (!s->name) s = fl_fonts; // use 0 if fnum undefined
Fl_FontSize* f;
@ -122,10 +122,10 @@ static Fl_FontSize* find(Fl_Font fnum, Fl_Font_Size size) {
// Public interface:
Fl_Font fl_font_ = 0;
Fl_Font_Size fl_size_ = 0;
Fl_Fontsize fl_size_ = 0;
//static HDC font_gc;
void fl_font(Fl_Font fnum, Fl_Font_Size size) {
void fl_font(Fl_Font fnum, Fl_Fontsize size) {
if (fnum==-1) { // just make sure that we will load a new font next time
fl_font_ = 0; fl_size_ = 0;
return;

View File

@ -113,7 +113,7 @@ int fl_correct_encoding(const char* name) {
}
// locate or create an Fl_FontSize for a given Fl_Fontdesc and size:
static Fl_FontSize* find(Fl_Font fnum, Fl_Font_Size size) {
static Fl_FontSize* find(Fl_Font fnum, Fl_Fontsize size) {
Fl_Fontdesc* s = fl_fonts+fnum;
if (!s->name) s = fl_fonts; // use font 0 if still undefined
Fl_FontSize* f;
@ -194,12 +194,12 @@ static Fl_FontSize* find(Fl_Font fnum, Fl_Font_Size size) {
// Public interface:
Fl_Font fl_font_ = 0;
Fl_Font_Size fl_size_ = 0;
Fl_Fontsize fl_size_ = 0;
XFontStruct* fl_xfont = 0;
void *fl_xftfont = 0;
static GC font_gc;
void fl_font(Fl_Font fnum, Fl_Font_Size size) {
void fl_font(Fl_Font fnum, Fl_Fontsize size) {
if (fnum==-1) {
fl_font_ = 0; fl_size_ = 0;
return;

View File

@ -89,13 +89,13 @@ Fl_Fontdesc* fl_fonts = built_in_table;
#define current_font (fl_fontsize->font)
Fl_Font fl_font_ = 0;
Fl_Font_Size fl_size_ = 0;
Fl_Fontsize fl_size_ = 0;
XFontStruct* fl_xfont = 0;
void *fl_xftfont = 0;
const char* fl_encoding_ = "iso8859-1";
Fl_FontSize* fl_fontsize = 0;
void fl_font(Fl_Font fnum, Fl_Font_Size size) {
void fl_font(Fl_Font fnum, Fl_Fontsize size) {
if (fnum==-1) { // special case to stop font caching
fl_font_ = 0; fl_size_ = 0;
return;