Skip to content

Commit

Permalink
Rename type Fl_Font_Size into Fl_Fontsize to comply with other naming…
Browse files Browse the repository at this point in the history
… in FLTK.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6161 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Aug 15, 2008
1 parent 3d6201a commit e63c50b
Show file tree
Hide file tree
Showing 34 changed files with 98 additions and 92 deletions.
10 changes: 8 additions & 2 deletions FL/Enumerations.H
Expand Up @@ -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;
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Browser_.H
Expand Up @@ -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)
Expand Down Expand Up @@ -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;}

Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Chart.H
Expand Up @@ -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();
Expand All @@ -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_;}
Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Counter.H
Expand Up @@ -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;
Expand All @@ -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;}

Expand Down
4 changes: 2 additions & 2 deletions FL/Fl_File_Browser.H
Expand Up @@ -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; };
Expand Down
4 changes: 2 additions & 2 deletions FL/Fl_File_Chooser.H
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions FL/Fl_Help_Dialog.H
Expand Up @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions FL/Fl_Help_View.H
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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_]); }

Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Input_.H
Expand Up @@ -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_;

Expand Down Expand Up @@ -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_;}
Expand Down
4 changes: 2 additions & 2 deletions FL/Fl_Input_Choice.H
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Menu_.H
Expand Up @@ -43,7 +43,7 @@ protected:
uchar alloc;
uchar down_box_;
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
unsigned textcolor_;

public:
Expand Down Expand Up @@ -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;}

Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Menu_Item.H
Expand Up @@ -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:
Expand All @@ -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;}
Expand Down
4 changes: 2 additions & 2 deletions FL/Fl_Spinner.H
Expand Up @@ -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()); }
Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Text_Display.H
Expand Up @@ -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;}

Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Tooltip.H
Expand Up @@ -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; }
Expand All @@ -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_;
};

Expand Down
4 changes: 2 additions & 2 deletions FL/Fl_Value_Input.H
Expand Up @@ -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();}
Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Value_Output.H
Expand Up @@ -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:
Expand All @@ -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;}
};
Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Value_Slider.H
Expand Up @@ -32,16 +32,16 @@

class FL_EXPORT Fl_Value_Slider : public Fl_Slider {
Fl_Font textfont_;
Fl_Font_Size textsize_;
Fl_Fontsize textsize_;
unsigned textcolor_;
public:
void draw();
int handle(int);
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;}
};
Expand Down
6 changes: 3 additions & 3 deletions FL/Fl_Widget.H
Expand Up @@ -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 */
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions FL/fl_ask.H
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions FL/fl_draw.H
Expand Up @@ -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
Expand Down

0 comments on commit e63c50b

Please sign in to comment.