summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2008-08-15 21:11:21 +0000
committerMatthias Melcher <fltk@matthiasm.com>2008-08-15 21:11:21 +0000
commite63c50b2d163bf0d8e110b2f3711d1b74490c483 (patch)
treea0c95aa22b79173d5a9ac1f6622c5952d5c23ffd /FL
parent3d6201a610acd8f0a83b2e985370d455cff57735 (diff)
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
Diffstat (limited to 'FL')
-rw-r--r--FL/Enumerations.H10
-rw-r--r--FL/Fl_Browser_.H6
-rw-r--r--FL/Fl_Chart.H6
-rw-r--r--FL/Fl_Counter.H6
-rw-r--r--FL/Fl_File_Browser.H4
-rw-r--r--FL/Fl_File_Chooser.H4
-rw-r--r--FL/Fl_Help_Dialog.H4
-rw-r--r--FL/Fl_Help_View.H14
-rw-r--r--FL/Fl_Input_.H6
-rw-r--r--FL/Fl_Input_Choice.H4
-rw-r--r--FL/Fl_Menu_.H6
-rw-r--r--FL/Fl_Menu_Item.H6
-rw-r--r--FL/Fl_Spinner.H4
-rw-r--r--FL/Fl_Text_Display.H6
-rw-r--r--FL/Fl_Tooltip.H6
-rw-r--r--FL/Fl_Value_Input.H4
-rw-r--r--FL/Fl_Value_Output.H6
-rw-r--r--FL/Fl_Value_Slider.H6
-rw-r--r--FL/Fl_Widget.H6
-rw-r--r--FL/fl_ask.H4
-rw-r--r--FL/fl_draw.H6
21 files changed, 65 insertions, 59 deletions
diff --git a/FL/Enumerations.H b/FL/Enumerations.H
index 12bfd35a9..858a01628 100644
--- a/FL/Enumerations.H
+++ b/FL/Enumerations.H
@@ -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
diff --git a/FL/Fl_Browser_.H b/FL/Fl_Browser_.H
index 2a31ef3be..7db4be5c3 100644
--- a/FL/Fl_Browser_.H
+++ b/FL/Fl_Browser_.H
@@ -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;}
diff --git a/FL/Fl_Chart.H b/FL/Fl_Chart.H
index 5246bb6ae..70df559d8 100644
--- a/FL/Fl_Chart.H
+++ b/FL/Fl_Chart.H
@@ -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_;}
diff --git a/FL/Fl_Counter.H b/FL/Fl_Counter.H
index 2c0781094..6cf1e6fee 100644
--- a/FL/Fl_Counter.H
+++ b/FL/Fl_Counter.H
@@ -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;}
diff --git a/FL/Fl_File_Browser.H b/FL/Fl_File_Browser.H
index 68ff3c4dc..aed0647d5 100644
--- a/FL/Fl_File_Browser.H
+++ b/FL/Fl_File_Browser.H
@@ -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; };
diff --git a/FL/Fl_File_Chooser.H b/FL/Fl_File_Chooser.H
index 97c3aecbb..7abbaae54 100644
--- a/FL/Fl_File_Chooser.H
+++ b/FL/Fl_File_Chooser.H
@@ -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;
diff --git a/FL/Fl_Help_Dialog.H b/FL/Fl_Help_Dialog.H
index 05de23d7a..c66f357a2 100644
--- a/FL/Fl_Help_Dialog.H
+++ b/FL/Fl_Help_Dialog.H
@@ -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);
diff --git a/FL/Fl_Help_View.H b/FL/Fl_Help_View.H
index 9a07f0c72..22613874f 100644
--- a/FL/Fl_Help_View.H
+++ b/FL/Fl_Help_View.H
@@ -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);
diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H
index 79038b277..7d53bbc75 100644
--- a/FL/Fl_Input_.H
+++ b/FL/Fl_Input_.H
@@ -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_;}
diff --git a/FL/Fl_Input_Choice.H b/FL/Fl_Input_Choice.H
index ccb223fc1..be502a1d3 100644
--- a/FL/Fl_Input_Choice.H
+++ b/FL/Fl_Input_Choice.H
@@ -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 {
diff --git a/FL/Fl_Menu_.H b/FL/Fl_Menu_.H
index eeba5b1f2..04cd4519b 100644
--- a/FL/Fl_Menu_.H
+++ b/FL/Fl_Menu_.H
@@ -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;}
diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H
index f0d78096c..a302a5446 100644
--- a/FL/Fl_Menu_Item.H
+++ b/FL/Fl_Menu_Item.H
@@ -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;}
diff --git a/FL/Fl_Spinner.H b/FL/Fl_Spinner.H
index 0bdcb616a..3ff59affb 100644
--- a/FL/Fl_Spinner.H
+++ b/FL/Fl_Spinner.H
@@ -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()); }
diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H
index 380e994e0..0c99b1366 100644
--- a/FL/Fl_Text_Display.H
+++ b/FL/Fl_Text_Display.H
@@ -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,
diff --git a/FL/Fl_Tooltip.H b/FL/Fl_Tooltip.H
index cd8f20886..3e26656d5 100644
--- a/FL/Fl_Tooltip.H
+++ b/FL/Fl_Tooltip.H
@@ -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_;
};
diff --git a/FL/Fl_Value_Input.H b/FL/Fl_Value_Input.H
index 550e318d9..e3c476597 100644
--- a/FL/Fl_Value_Input.H
+++ b/FL/Fl_Value_Input.H
@@ -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();}
diff --git a/FL/Fl_Value_Output.H b/FL/Fl_Value_Output.H
index 63db55564..cc61cdd6c 100644
--- a/FL/Fl_Value_Output.H
+++ b/FL/Fl_Value_Output.H
@@ -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;}
};
diff --git a/FL/Fl_Value_Slider.H b/FL/Fl_Value_Slider.H
index 31bb749a7..c9ea2c9fe 100644
--- a/FL/Fl_Value_Slider.H
+++ b/FL/Fl_Value_Slider.H
@@ -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;}
};
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H
index 6f198971f..1e0db44af 100644
--- a/FL/Fl_Widget.H
+++ b/FL/Fl_Widget.H
@@ -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.
diff --git a/FL/fl_ask.H b/FL/fl_ask.H
index 7ce12409d..819f39e73 100644
--- a/FL/fl_ask.H
+++ b/FL/fl_ask.H
@@ -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:
diff --git a/FL/fl_draw.H b/FL/fl_draw.H
index 99a3e984a..ad18b700e 100644
--- a/FL/fl_draw.H
+++ b/FL/fl_draw.H
@@ -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