textstuff() methods no longer inline to work around a bug in a compiler.

Don not merge into 2.0 tree!  Already done!

-Carl


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@505 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Carl E. Thompson 1999-04-03 15:51:39 +00:00
parent d19b50423c
commit 4435aed5ca

View File

@ -1,5 +1,5 @@
//
// "$Id: factory.cxx,v 1.4.2.1 1999/03/30 23:11:26 carl Exp $"
// "$Id: factory.cxx,v 1.4.2.2 1999/04/03 15:51:39 carl Exp $"
//
// Widget factory code for the Fast Light Tool Kit (FLTK).
//
@ -145,17 +145,7 @@ static Fl_Menu_Item browser_type_menu[] = {
{0}};
class Fl_Browser_Type : public Fl_Widget_Type {
Fl_Menu_Item *subtypes() {return browser_type_menu;}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Browser *o = (Fl_Browser*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
public:
virtual const char *type_name() {return "Fl_Browser";}
Fl_Widget *widget(int x,int y,int w,int h) {
@ -171,6 +161,18 @@ public:
};
static Fl_Browser_Type Fl_Browser_type;
int Fl_Browser_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Browser *o = (Fl_Browser*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
////////////////////////////////////////////////////////////////
#include <FL/Fl_Counter.H>
@ -180,17 +182,7 @@ static Fl_Menu_Item counter_type_menu[] = {
{0}};
class Fl_Counter_Type : public Fl_Widget_Type {
Fl_Menu_Item *subtypes() {return counter_type_menu;}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Counter *o = (Fl_Counter*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
int is_valuator() const {return 1;}
public:
virtual const char *type_name() {return "Fl_Counter";}
@ -200,6 +192,18 @@ public:
};
static Fl_Counter_Type Fl_Counter_type;
int Fl_Counter_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Counter *o = (Fl_Counter*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
////////////////////////////////////////////////////////////////
#include <FL/Fl_Input.H>
@ -212,17 +216,7 @@ static Fl_Menu_Item input_type_menu[] = {
{0}};
class Fl_Input_Type : public Fl_Widget_Type {
Fl_Menu_Item *subtypes() {return input_type_menu;}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Input_ *o = (Fl_Input_*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
public:
virtual const char *type_name() {return "Fl_Input";}
Fl_Widget *widget(int x,int y,int w,int h) {
@ -234,6 +228,18 @@ public:
};
static Fl_Input_Type Fl_Input_type;
int Fl_Input_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Input_ *o = (Fl_Input_*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
////////////////////////////////////////////////////////////////
#include <FL/Fl_Clock.H>
@ -358,17 +364,7 @@ static Fl_Output_Type Fl_Output_type;
class Fl_Value_Input_Type : public Fl_Widget_Type {
public:
virtual const char *type_name() {return "Fl_Value_Input";}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Value_Input *o = (Fl_Value_Input*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
int is_valuator() const {return 1;}
Fl_Widget *widget(int x,int y,int w,int h) {
Fl_Value_Input *o = new Fl_Value_Input(x,y,w,h,"value:");
@ -378,23 +374,25 @@ public:
};
static Fl_Value_Input_Type Fl_Value_Input_type;
int Fl_Value_Input_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Value_Input *o = (Fl_Value_Input*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
////////////////////////////////////////////////////////////////
#include <FL/Fl_Value_Output.H>
class Fl_Value_Output_Type : public Fl_Widget_Type {
public:
virtual const char *type_name() {return "Fl_Value_Output";}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Value_Output *o = (Fl_Value_Output*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
int is_valuator() const {return 1;}
Fl_Widget *widget(int x,int y,int w,int h) {
Fl_Value_Output *o = new Fl_Value_Output(x,y,w,h,"value:");
@ -404,21 +402,23 @@ public:
};
static Fl_Value_Output_Type Fl_Value_Output_type;
////////////////////////////////////////////////////////////////
#include <FL/Fl_Value_Slider.H>
class Fl_Value_Slider_Type : public Fl_Slider_Type {
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Value_Slider *o = (Fl_Value_Slider*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
int Fl_Value_Output_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Value_Output *o = (Fl_Value_Output*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
return 1;
}
////////////////////////////////////////////////////////////////
#include <FL/Fl_Value_Slider.H>
class Fl_Value_Slider_Type : public Fl_Slider_Type {
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
public:
virtual const char *type_name() {return "Fl_Value_Slider";}
Fl_Widget *widget(int x,int y,int w,int h) {
@ -427,6 +427,18 @@ public:
};
static Fl_Value_Slider_Type Fl_Value_Slider_type;
int Fl_Value_Slider_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
Fl_Value_Slider *o = (Fl_Value_Slider*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
switch (w) {
case 4:
case 0: f = o->textfont(); s = o->textsize(); c = o->textcolor(); break;
case 1: o->textfont(f); break;
case 2: o->textsize(s); break;
case 3: o->textcolor(c); break;
}
return 1;
}
////////////////////////////////////////////////////////////////
extern class Fl_Function_Type Fl_Function_type;
@ -673,5 +685,5 @@ int lookup_symbol(const char *name, int &v, int numberok) {
}
//
// End of "$Id: factory.cxx,v 1.4.2.1 1999/03/30 23:11:26 carl Exp $".
// End of "$Id: factory.cxx,v 1.4.2.2 1999/04/03 15:51:39 carl Exp $".
//