STR 2705: moved all inline constructors (that I could find) from header files into source files. Even though this breaks downward compatibility, it does make dynamic linking possible for all classes.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9637 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher
2012-07-24 04:37:22 +00:00
parent e607c90877
commit 398acd9c2a
56 changed files with 363 additions and 217 deletions

View File

@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.2
- Moved all inline constructors into source file to avoid bad DLLs
- Fixed Fl_Widget::copy_label() and Fl_Window::copy_label() when
called with the old label() (STR #2836)

View File

@@ -44,11 +44,10 @@ public:
type.
<P>The destructor removes the box.
*/
Fl_Box(int X, int Y, int W, int H, const char *l=0)
: Fl_Widget(X,Y,W,H,l) {}
Fl_Box(int X, int Y, int W, int H, const char *l=0);
/** See Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0) */
Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l)
: Fl_Widget(X,Y,W,H,l) {box(b);}
Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l);
virtual int handle(int);
};

View File

@@ -52,17 +52,18 @@ public:
void resize(int,int,int,int);
void hide();
~Fl_Double_Window();
/**
Creates a new Fl_Double_Window widget using the given
position, size, and label (title) string.
Creates a new Fl_Double_Window widget using the given
position, size, and label (title) string.
*/
Fl_Double_Window(int W, int H, const char *l = 0)
: Fl_Window(W,H,l), force_doublebuffering_(0) { type(FL_DOUBLE_WINDOW); }
/**
See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0)
Fl_Double_Window(int W, int H, const char *l = 0);
/**
See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0)
*/
Fl_Double_Window(int X, int Y, int W, int H, const char *l = 0)
: Fl_Window(X,Y,W,H,l), force_doublebuffering_(0) { type(FL_DOUBLE_WINDOW); }
Fl_Double_Window(int X, int Y, int W, int H, const char *l = 0);
};
#endif

View File

@@ -27,9 +27,8 @@
/** Draws a dial with a filled arc */
class FL_EXPORT Fl_Fill_Dial : public Fl_Dial {
public:
/** Creates a filled dial, also setting its type to FL_FILL_DIAL. */
Fl_Fill_Dial(int X,int Y,int W,int H, const char *L = 0)
: Fl_Dial(X,Y,W,H,L) {type(FL_FILL_DIAL);}
/** Creates a filled dial, also setting its type to FL_FILL_DIAL. */
Fl_Fill_Dial(int X,int Y,int W,int H, const char *L);
};
#endif

View File

@@ -26,9 +26,8 @@
/** Widget that draws a filled horizontal slider, useful as a progress or value meter*/
class FL_EXPORT Fl_Fill_Slider : public Fl_Slider {
public:
/** Creates the slider from its position,size and optional title. */
Fl_Fill_Slider(int X,int Y,int W,int H,const char *L=0)
: Fl_Slider(X,Y,W,H,L) {type(FL_VERT_FILL_SLIDER);}
/** Creates the slider from its position,size and optional title. */
Fl_Fill_Slider(int X,int Y,int W,int H,const char *L=0);
};
#endif

View File

@@ -37,12 +37,7 @@ public:
Inherited destructor destroys the widget and any value associated with it.
*/
#if defined(FL_DLL) // implementation in src/Fl_Input.cxx
Fl_Float_Input(int X,int Y,int W,int H,const char *l = 0);
#else
Fl_Float_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_FLOAT_INPUT);}
#endif
};
#endif

View File

@@ -41,12 +41,7 @@ public:
The constructor specializes Fl_Browser() by setting the type to FL_HOLD_BROWSER.
The destructor destroys the widget and frees all memory that has been allocated.
*/
#if defined(FL_DLL) // implementation in src/Fl_Browser.cxx
Fl_Hold_Browser(int X,int Y,int W,int H,const char *L=0);
#else
Fl_Hold_Browser(int X,int Y,int W,int H,const char *L=0)
: Fl_Browser(X,Y,W,H,L) {type(FL_HOLD_BROWSER);}
#endif
};
#endif

View File

@@ -26,8 +26,7 @@
class FL_EXPORT Fl_Hor_Fill_Slider : public Fl_Slider {
public:
Fl_Hor_Fill_Slider(int X,int Y,int W,int H,const char *L=0)
: Fl_Slider(X,Y,W,H,L) {type(FL_HOR_FILL_SLIDER);}
Fl_Hor_Fill_Slider(int X,int Y,int W,int H,const char *L=0);
};
#endif

View File

@@ -26,8 +26,7 @@
class FL_EXPORT Fl_Hor_Nice_Slider : public Fl_Slider {
public:
Fl_Hor_Nice_Slider(int X,int Y,int W,int H,const char *L=0)
: Fl_Slider(X,Y,W,H,L) {type(FL_HOR_NICE_SLIDER); box(FL_FLAT_BOX);}
Fl_Hor_Nice_Slider(int X,int Y,int W,int H,const char *L=0);
};
#endif

View File

@@ -35,13 +35,7 @@ public:
Creates a new Fl_Hor_Slider widget using the given position,
size, and label string.
*/
#if defined(FL_DLL) // implementation in src/Fl_Slider.cxx
Fl_Hor_Slider(int X,int Y,int W,int H,const char *l=0);
#else
Fl_Hor_Slider(int X,int Y,int W,int H,const char *l=0)
: Fl_Slider(X,Y,W,H,l) { type(FL_HOR_SLIDER); }
#endif
};
#endif

View File

@@ -26,8 +26,7 @@
class FL_EXPORT Fl_Hor_Value_Slider : public Fl_Value_Slider {
public:
Fl_Hor_Value_Slider(int X,int Y,int W,int H,const char *l=0)
: Fl_Value_Slider(X,Y,W,H,l) {type(FL_HOR_SLIDER);}
Fl_Hor_Value_Slider(int X,int Y,int W,int H,const char *l=0);
};
#endif

View File

@@ -131,20 +131,7 @@ public:
and label string.
Inherited destructor destroys the widget and any values associated with it.
*/
Fl_Input_Choice (int X,int Y,int W,int H,const char*L=0) : Fl_Group(X,Y,W,H,L) {
Fl_Group::box(FL_DOWN_BOX);
align(FL_ALIGN_LEFT); // default like Fl_Input
inp_ = new Fl_Input(inp_x(), inp_y(),
inp_w(), inp_h());
inp_->callback(inp_cb, (void*)this);
inp_->box(FL_FLAT_BOX); // cosmetic
inp_->when(FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED);
menu_ = new InputMenuButton(menu_x(), menu_y(),
menu_w(), menu_h());
menu_->callback(menu_cb, (void*)this);
menu_->box(FL_FLAT_BOX); // cosmetic
end();
}
Fl_Input_Choice(int X,int Y,int W,int H,const char*L=0);
/// Adds an item to the menu.
/// You can access the more complex Fl_Menu_Button::add() methods

View File

@@ -36,13 +36,7 @@ public:
Inherited destructor destroys the widget and any value associated with it.
*/
#if defined(FL_DLL) // implementation in src/Fl_Input.cxx
Fl_Int_Input(int X,int Y,int W,int H,const char *l = 0);
#else
Fl_Int_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_INT_INPUT);}
#endif
};
#endif

View File

@@ -26,8 +26,7 @@
class FL_EXPORT Fl_Line_Dial : public Fl_Dial {
public:
Fl_Line_Dial(int X,int Y,int W,int H, const char *L = 0)
: Fl_Dial(X,Y,W,H,L) {type(FL_LINE_DIAL);}
Fl_Line_Dial(int X,int Y,int W,int H, const char *L = 0);
};
#endif

View File

@@ -69,8 +69,7 @@ public:
<P>The destructor removes the Fl_Menu_Bar widget and all of its
menu items.
*/
Fl_Menu_Bar(int X, int Y, int W, int H,const char *l=0)
: Fl_Menu_(X,Y,W,H,l) {}
Fl_Menu_Bar(int X, int Y, int W, int H,const char *l=0);
};
#endif

View File

@@ -45,11 +45,9 @@ public:
void clear_overlay() {set_flag(NO_OVERLAY);}
~Fl_Menu_Window();
/** Creates a new Fl_Menu_Window widget using the given size, and label string. */
Fl_Menu_Window(int W, int H, const char *l = 0)
: Fl_Single_Window(W,H,l) { image(0); }
Fl_Menu_Window(int W, int H, const char *l = 0);
/** Creates a new Fl_Menu_Window widget using the given position, size, and label string. */
Fl_Menu_Window(int X, int Y, int W, int H, const char *l = 0)
: Fl_Single_Window(X,Y,W,H,l) { image(0); }
Fl_Menu_Window(int X, int Y, int W, int H, const char *l = 0);
};
#endif

View File

@@ -42,12 +42,7 @@ public:
The constructor specializes Fl_Browser() by setting the type to FL_MULTI_BROWSER.
The destructor destroys the widget and frees all memory that has been allocated.
*/
#if defined(FL_DLL) // implementation in src/Fl_Browser.cxx
Fl_Multi_Browser(int X,int Y,int W,int H,const char *L=0);
#else
Fl_Multi_Browser(int X,int Y,int W,int H,const char *L=0)
: Fl_Browser(X,Y,W,H,L) {type(FL_MULTI_BROWSER);}
#endif
};
#endif

View File

@@ -50,12 +50,7 @@ public:
Inherited destructor destroys the widget and any value associated with it.
*/
#if defined(FL_DLL) // implementation in src/Fl_Input.cxx
Fl_Multiline_Input(int X,int Y,int W,int H,const char *l = 0);
#else
Fl_Multiline_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_MULTILINE_INPUT);}
#endif
};
#endif

View File

@@ -46,12 +46,7 @@ public:
Inherited destructor destroys the widget and any value associated with it.
*/
#if defined(FL_DLL) // implementation in src/Fl_Input.cxx
Fl_Multiline_Output(int X,int Y,int W,int H,const char *l = 0);
#else
Fl_Multiline_Output(int X,int Y,int W,int H,const char *l = 0)
: Fl_Output(X,Y,W,H,l) {type(FL_MULTILINE_OUTPUT);}
#endif
};
#endif

View File

@@ -26,8 +26,7 @@
class FL_EXPORT Fl_Nice_Slider : public Fl_Slider {
public:
Fl_Nice_Slider(int X,int Y,int W,int H,const char *L=0)
: Fl_Slider(X,Y,W,H,L) {type(FL_VERT_NICE_SLIDER); box(FL_FLAT_BOX);}
Fl_Nice_Slider(int X,int Y,int W,int H,const char *L=0);
};
#endif

View File

@@ -53,12 +53,7 @@ public:
Inherited destructor destroys the widget and any value associated with it.
*/
#if defined(FL_DLL) // implementation in src/Fl_Input.cxx
Fl_Output(int X,int Y,int W,int H, const char *l = 0);
#else
Fl_Output(int X,int Y,int W,int H, const char *l = 0)
: Fl_Input(X, Y, W, H, l) {type(FL_NORMAL_OUTPUT);}
#endif
};
#endif

View File

@@ -62,16 +62,14 @@ protected:
/**
See Fl_Overlay_Window::Fl_Overlay_Window(int X, int Y, int W, int H, const char *l=0)
*/
Fl_Overlay_Window(int W, int H, const char *l=0)
: Fl_Double_Window(W,H,l) {overlay_ = 0; force_doublebuffering_=1; image(0); }
Fl_Overlay_Window(int W, int H, const char *l=0);
/**
Creates a new Fl_Overlay_Window widget using the given
position, size, and label (title) string. If the
positions (x,y) are not given, then the window manager
will choose them.
*/
Fl_Overlay_Window(int X, int Y, int W, int H, const char *l=0)
: Fl_Double_Window(X,Y,W,H,l) {overlay_ = 0; force_doublebuffering_=1; image(0); }
Fl_Overlay_Window(int X, int Y, int W, int H, const char *l=0);
public:
void show(int a, char **b) {Fl_Double_Window::show(a,b);}
};

View File

@@ -26,8 +26,7 @@
class FL_EXPORT Fl_Radio_Button : public Fl_Button {
public:
Fl_Radio_Button(int X,int Y,int W,int H,const char *L=0)
: Fl_Button(X, Y, W, H, L) {type(FL_RADIO_BUTTON);}
Fl_Radio_Button(int X,int Y,int W,int H,const char *L=0);
};
#endif

View File

@@ -26,8 +26,7 @@
class FL_EXPORT Fl_Radio_Light_Button : public Fl_Light_Button {
public:
Fl_Radio_Light_Button(int X,int Y,int W,int H,const char *l=0)
: Fl_Light_Button(X,Y,W,H,l) {type(FL_RADIO_BUTTON);}
Fl_Radio_Light_Button(int X,int Y,int W,int H,const char *l=0);
};
#endif

View File

@@ -26,8 +26,7 @@
class FL_EXPORT Fl_Radio_Round_Button : public Fl_Round_Button {
public:
Fl_Radio_Round_Button(int X,int Y,int W,int H,const char *L=0)
: Fl_Round_Button(X,Y,W,H,L) {type(FL_RADIO_BUTTON);}
Fl_Radio_Round_Button(int X,int Y,int W,int H,const char *L=0);
};
#endif

View File

@@ -39,8 +39,8 @@ public:
position, size, and label string. The default boxtype is FL_UP_BOX.
Deletes the button.
*/
Fl_Repeat_Button(int X,int Y,int W,int H,const char *l=0)
: Fl_Button(X,Y,W,H,l) {}
Fl_Repeat_Button(int X,int Y,int W,int H,const char *l=0);
void deactivate() {
Fl::remove_timeout(repeat_callback,this);
Fl_Button::deactivate();

View File

@@ -40,8 +40,7 @@ public:
position, size, and label string. The default boxtype is FL_UP_BOX.
<P> The inherited destructor deletes the button.
*/
Fl_Return_Button(int X, int Y, int W, int H,const char *l=0)
: Fl_Button(X,Y,W,H,l) {}
Fl_Return_Button(int X, int Y, int W, int H,const char *l=0);
};
#endif

View File

@@ -27,9 +27,8 @@
/** A clock widget of type FL_ROUND_CLOCK. Has no box. */
class FL_EXPORT Fl_Round_Clock : public Fl_Clock {
public:
/** Creates the clock widget, setting his type and box. */
Fl_Round_Clock(int X,int Y,int W,int H, const char *L = 0)
: Fl_Clock(X, Y, W, H, L) {type(FL_ROUND_CLOCK); box(FL_NO_BOX);}
/** Creates the clock widget, setting his type and box. */
Fl_Round_Clock(int X,int Y,int W,int H, const char *L = 0);
};
#endif

View File

@@ -40,12 +40,7 @@ public:
Inherited destructor destroys the widget and any value associated with it.
*/
#if defined(FL_DLL) // implementation in src/Fl_Input.cxx
Fl_Secret_Input(int X,int Y,int W,int H,const char *l = 0);
#else
Fl_Secret_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_SECRET_INPUT);}
#endif
};
#endif

View File

@@ -40,12 +40,7 @@ public:
The constructor specializes Fl_Browser() by setting the type to FL_SELECT_BROWSER.
The destructor destroys the widget and frees all memory that has been allocated.
*/
#if defined(FL_DLL) // implementation in src/Fl_Browser.cxx
Fl_Select_Browser(int X,int Y,int W,int H,const char *L=0);
#else
Fl_Select_Browser(int X,int Y,int W,int H,const char *L=0)
: Fl_Browser(X,Y,W,H,L) {type(FL_SELECT_BROWSER);}
#endif
};
#endif

View File

@@ -30,8 +30,7 @@
*/
class FL_EXPORT Fl_Simple_Counter : public Fl_Counter {
public:
Fl_Simple_Counter(int X,int Y,int W,int H, const char *L = 0)
: Fl_Counter(X,Y,W,H,L) {type(FL_SIMPLE_COUNTER);}
Fl_Simple_Counter(int X,int Y,int W,int H, const char *L = 0);
};
#endif

View File

@@ -40,14 +40,14 @@ public:
Creates a new Fl_Single_Window widget using the given
size, and label (title) string.
*/
Fl_Single_Window(int W, int H, const char *l=0)
: Fl_Window(W,H,l) {}
Fl_Single_Window(int W, int H, const char *l=0);
/**
Creates a new Fl_Single_Window widget using the given
position, size, and label (title) string.
*/
Fl_Single_Window(int X, int Y, int W, int H, const char *l=0)
: Fl_Window(X,Y,W,H,l) {}
Fl_Single_Window(int X, int Y, int W, int H, const char *l=0);
int make_current();
};

View File

@@ -121,31 +121,7 @@ private:
and label string.
<P>Inherited destructor Destroys the widget and any value associated with it.
*/
Fl_Spinner(int X, int Y, int W, int H, const char *L = 0)
: Fl_Group(X, Y, W, H, L),
input_(X, Y, W - H / 2 - 2, H),
up_button_(X + W - H / 2 - 2, Y, H / 2 + 2, H / 2, "@-42<"),
down_button_(X + W - H / 2 - 2, Y + H - H / 2,
H / 2 + 2, H / 2, "@-42>") {
end();
value_ = 1.0;
minimum_ = 1.0;
maximum_ = 100.0;
step_ = 1.0;
format_ = "%g";
align(FL_ALIGN_LEFT);
input_.value("1");
input_.type(FL_INT_INPUT);
input_.when(FL_WHEN_ENTER_KEY | FL_WHEN_RELEASE);
input_.callback((Fl_Callback *)sb_cb, this);
up_button_.callback((Fl_Callback *)sb_cb, this);
down_button_.callback((Fl_Callback *)sb_cb, this);
}
Fl_Spinner(int X, int Y, int W, int H, const char *L = 0);
/** Sets or returns the format string for the value. */
const char *format() { return (format_); }

View File

@@ -41,11 +41,7 @@ public:
*
* On Mac OS X, all arguments are unused. On other platforms they are used as by Fl_Menu_Bar::Fl_Menu_Bar().
*/
Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l=0)
: Fl_Menu_Bar(x,y,w,h,l) {
deactivate(); // don't let the old area take events
fl_sys_menu_bar = this;
}
Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l=0);
const Fl_Menu_Item *menu() const {return Fl_Menu_::menu();}
void menu(const Fl_Menu_Item *m);
int add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0);

View File

@@ -81,7 +81,7 @@ public:
variables, but you must declare the Fl_Tile <I>first</I>, so
that it is destroyed last.
*/
Fl_Tile(int X,int Y,int W,int H,const char*l=0) : Fl_Group(X,Y,W,H,l) {}
Fl_Tile(int X,int Y,int W,int H,const char*l=0);
void resize(int, int, int, int);
void position(int, int, int, int);
};

View File

@@ -40,8 +40,7 @@ public:
position, size, and label string.
<P>The inherited destructor deletes the toggle button.
*/
Fl_Toggle_Button(int X,int Y,int W,int H,const char *l=0)
: Fl_Button(X,Y,W,H,l) {type(FL_TOGGLE_BUTTON);}
Fl_Toggle_Button(int X,int Y,int W,int H,const char *l=0);
};
#endif

View File

@@ -19,6 +19,18 @@
#include <FL/Fl_Widget.H>
#include <FL/Fl_Box.H>
Fl_Box::Fl_Box(int X, int Y, int W, int H, const char *l)
: Fl_Widget(X,Y,W,H,l)
{
}
Fl_Box::Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l)
: Fl_Widget(X,Y,W,H,l)
{
box(b);
}
void Fl_Box::draw() {
draw_box();
draw_label();

View File

@@ -23,11 +23,10 @@
#include <stdlib.h>
#include <math.h>
#if defined(FL_DLL) // really needed for c'tors for MS VC++ only
#include <FL/Fl_Hold_Browser.H>
#include <FL/Fl_Multi_Browser.H>
#include <FL/Fl_Select_Browser.H>
#endif
// I modified this from the original Forms data to use a linked list
// so that the number of items in the browser and size of those items
@@ -908,29 +907,27 @@ void Fl_Browser::remove_icon(int line) {
icon(line,0);
}
/*
The following constructors must not be in the header file(s) if we
build a shared object (DLL). Instead they are defined here to force
the constructor (and default destructor as well) to be defined in
the DLL and exported (STR #2632, #2645).
Note: if you change any of them, do the same changes in the specific
header file as well. This redundant definition was chosen to enable
inline constructors in the header files (for static linking) as well
as those here for dynamic linking (Windows DLL).
*/
#if defined(FL_DLL)
Fl_Hold_Browser::Fl_Hold_Browser(int X,int Y,int W,int H,const char *L)
: Fl_Browser(X,Y,W,H,L) {type(FL_HOLD_BROWSER);}
Fl_Hold_Browser::Fl_Hold_Browser(int X,int Y,int W,int H,const char *L)
: Fl_Browser(X,Y,W,H,L)
{
type(FL_HOLD_BROWSER);
}
Fl_Multi_Browser::Fl_Multi_Browser(int X,int Y,int W,int H,const char *L)
: Fl_Browser(X,Y,W,H,L) {type(FL_MULTI_BROWSER);}
Fl_Select_Browser::Fl_Select_Browser(int X,int Y,int W,int H,const char *L)
: Fl_Browser(X,Y,W,H,L) {type(FL_SELECT_BROWSER);}
Fl_Multi_Browser::Fl_Multi_Browser(int X,int Y,int W,int H,const char *L)
: Fl_Browser(X,Y,W,H,L)
{
type(FL_MULTI_BROWSER);
}
Fl_Select_Browser::Fl_Select_Browser(int X,int Y,int W,int H,const char *L)
: Fl_Browser(X,Y,W,H,L)
{
type(FL_SELECT_BROWSER);
}
#endif // FL_DLL
//
// End of "$Id$".

View File

@@ -21,6 +21,9 @@
#include <FL/Fl_Group.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Radio_Button.H>
#include <FL/Fl_Toggle_Button.H>
Fl_Widget_Tracker *Fl_Button::key_release_tracker = 0;
@@ -206,6 +209,20 @@ Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *L)
set_flag(SHORTCUT_LABEL);
}
Fl_Radio_Button::Fl_Radio_Button(int X,int Y,int W,int H,const char *L)
: Fl_Button(X, Y, W, H, L) {
type(FL_RADIO_BUTTON);
}
Fl_Toggle_Button::Fl_Toggle_Button(int X,int Y,int W,int H,const char *l)
: Fl_Button(X,Y,W,H,l)
{
type(FL_TOGGLE_BUTTON);
}
//
// End of "$Id$".
//

View File

@@ -18,6 +18,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Clock.H>
#include <FL/Fl_Round_Clock.H>
#include <FL/fl_draw.H>
#include <math.h>
#include <time.h>
@@ -204,6 +205,15 @@ Fl_Clock::~Fl_Clock() {
Fl::remove_timeout(tick, this);
}
Fl_Round_Clock::Fl_Round_Clock(int X,int Y,int W,int H, const char *L)
: Fl_Clock(X, Y, W, H, L)
{
type(FL_ROUND_CLOCK);
box(FL_NO_BOX);
}
//
// End of "$Id$".
//

View File

@@ -18,6 +18,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Counter.H>
#include <FL/Fl_Simple_Counter.H>
#include <FL/fl_draw.H>
void Fl_Counter::draw() {
@@ -197,6 +198,13 @@ Fl_Counter::Fl_Counter(int X, int Y, int W, int H, const char* L)
textcolor_ = FL_FOREGROUND_COLOR;
}
Fl_Simple_Counter::Fl_Simple_Counter(int X,int Y,int W,int H, const char *L)
: Fl_Counter(X,Y,W,H,L) {
type(FL_SIMPLE_COUNTER);
}
//
// End of "$Id$".
//

View File

@@ -18,10 +18,13 @@
#include <FL/Fl.H>
#include <FL/Fl_Dial.H>
#include <FL/Fl_Fill_Dial.H>
#include <FL/Fl_Line_Dial.H>
#include <FL/fl_draw.H>
#include <stdlib.h>
#include <FL/math.h>
// All angles are measured with 0 to the right and counter-clockwise
/**
Draws dial at given position and size.
@@ -152,6 +155,20 @@ Fl_Dial::Fl_Dial(int X, int Y, int W, int H, const char* l)
a2 = 315;
}
Fl_Fill_Dial::Fl_Fill_Dial(int X,int Y,int W,int H, const char *L)
: Fl_Dial(X,Y,W,H,L) {
type(FL_FILL_DIAL);
}
Fl_Line_Dial::Fl_Line_Dial(int X,int Y,int W,int H, const char *L)
: Fl_Dial(X,Y,W,H,L)
{
type(FL_LINE_DIAL);
}
//
// End of "$Id$".
//

View File

@@ -19,6 +19,7 @@
#include <config.h>
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Overlay_Window.H>
#include <FL/Fl_Printer.H>
#include <FL/x.H>
#include <FL/fl_draw.H>
@@ -55,6 +56,23 @@ static int can_xdbe() {
}
#endif
Fl_Double_Window::Fl_Double_Window(int W, int H, const char *l)
: Fl_Window(W,H,l),
force_doublebuffering_(0)
{
type(FL_DOUBLE_WINDOW);
}
Fl_Double_Window::Fl_Double_Window(int X, int Y, int W, int H, const char *l)
: Fl_Window(X,Y,W,H,l),
force_doublebuffering_(0)
{
type(FL_DOUBLE_WINDOW);
}
void Fl_Double_Window::show() {
Fl_Window::show();
}
@@ -473,6 +491,25 @@ Fl_Double_Window::~Fl_Double_Window() {
hide();
}
Fl_Overlay_Window::Fl_Overlay_Window(int W, int H, const char *l)
: Fl_Double_Window(W,H,l)
{
overlay_ = 0;
force_doublebuffering_=1;
image(0);
}
Fl_Overlay_Window::Fl_Overlay_Window(int X, int Y, int W, int H, const char *l)
: Fl_Double_Window(X,Y,W,H,l)
{
overlay_ = 0;
force_doublebuffering_=1;
image(0);
}
//
// End of "$Id$".
//

View File

@@ -28,6 +28,10 @@
#include <FL/fl_draw.H>
#include <stdlib.h>
#include <FL/Fl_Input_Choice.H>
#include <FL/Fl_Spinner.H>
Fl_Group* Fl_Group::current_;
// Hack: A single child is stored in the pointer to the array, while
@@ -823,6 +827,53 @@ void Fl_Group::draw_outside_label(const Fl_Widget& widget) const {
widget.draw_label(X,Y,W,H,(Fl_Align)a);
}
Fl_Input_Choice::Fl_Input_Choice (int X,int Y,int W,int H,const char*L)
: Fl_Group(X,Y,W,H,L)
{
Fl_Group::box(FL_DOWN_BOX);
align(FL_ALIGN_LEFT); // default like Fl_Input
inp_ = new Fl_Input(inp_x(), inp_y(),
inp_w(), inp_h());
inp_->callback(inp_cb, (void*)this);
inp_->box(FL_FLAT_BOX); // cosmetic
inp_->when(FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED);
menu_ = new InputMenuButton(menu_x(), menu_y(),
menu_w(), menu_h());
menu_->callback(menu_cb, (void*)this);
menu_->box(FL_FLAT_BOX); // cosmetic
end();
}
Fl_Spinner::Fl_Spinner(int X, int Y, int W, int H, const char *L)
: Fl_Group(X, Y, W, H, L),
input_(X, Y, W - H / 2 - 2, H),
up_button_(X + W - H / 2 - 2, Y, H / 2 + 2, H / 2, "@-42<"),
down_button_(X + W - H / 2 - 2, Y + H - H / 2,
H / 2 + 2, H / 2, "@-42>")
{
end();
value_ = 1.0;
minimum_ = 1.0;
maximum_ = 100.0;
step_ = 1.0;
format_ = "%g";
align(FL_ALIGN_LEFT);
input_.value("1");
input_.type(FL_INT_INPUT);
input_.when(FL_WHEN_ENTER_KEY | FL_WHEN_RELEASE);
input_.callback((Fl_Callback *)sb_cb, this);
up_button_.callback((Fl_Callback *)sb_cb, this);
down_button_.callback((Fl_Callback *)sb_cb, this);
}
//
// End of "$Id$".
//

View File

@@ -31,14 +31,12 @@
#include <FL/fl_ask.H>
#include "flstring.h"
#if defined(FL_DLL) // really needed for c'tors for MS VC++ only
#include <FL/Fl_Float_Input.H>
#include <FL/Fl_Int_Input.H>
#include <FL/Fl_Multiline_Input.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Multiline_Output.H>
#include <FL/Fl_Secret_Input.H>
#endif
#ifdef HAVE_LOCALE_H
# include <locale.h>
@@ -763,50 +761,43 @@ Fl_Input::Fl_Input(int X, int Y, int W, int H, const char *l)
: Fl_Input_(X, Y, W, H, l) {
}
/*
The following constructors must not be in the header file(s) if we
build a shared object (DLL). Instead they are defined here to force
the constructor (and default destructor as well) to be defined in
the DLL and exported (STR #2632).
Note: if you change any of them, do the same changes in the specific
header file as well. This redundant definition was chosen to enable
inline constructors in the header files (for static linking) as well
as those here for dynamic linking (Windows DLL).
*/
#if defined(FL_DLL)
Fl_Float_Input::Fl_Float_Input(int X,int Y,int W,int H,const char *l)
: Fl_Input(X,Y,W,H,l) {
: Fl_Input(X,Y,W,H,l)
{
type(FL_FLOAT_INPUT);
}
Fl_Int_Input::Fl_Int_Input(int X,int Y,int W,int H,const char *l)
: Fl_Input(X,Y,W,H,l) {
: Fl_Input(X,Y,W,H,l) {
type(FL_INT_INPUT);
}
Fl_Multiline_Input::Fl_Multiline_Input(int X,int Y,int W,int H,const char *l)
: Fl_Input(X,Y,W,H,l) {
: Fl_Input(X,Y,W,H,l) {
type(FL_MULTILINE_INPUT);
}
Fl_Output::Fl_Output(int X,int Y,int W,int H, const char *l)
: Fl_Input(X, Y, W, H, l) {
: Fl_Input(X, Y, W, H, l) {
type(FL_NORMAL_OUTPUT);
}
Fl_Multiline_Output::Fl_Multiline_Output(int X,int Y,int W,int H,const char *l)
: Fl_Output(X,Y,W,H,l) {
: Fl_Output(X,Y,W,H,l) {
type(FL_MULTILINE_OUTPUT);
}
Fl_Secret_Input::Fl_Secret_Input(int X,int Y,int W,int H,const char *l)
: Fl_Input(X,Y,W,H,l) {
: Fl_Input(X,Y,W,H,l) {
type(FL_SECRET_INPUT);
}
#endif // FL_DLL
//
// End of "$Id$".

View File

@@ -25,6 +25,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Light_Button.H>
#include <FL/Fl_Radio_Light_Button.H>
#include <FL/fl_draw.H>
#include "flstring.h"
@@ -160,6 +161,14 @@ Fl_Light_Button::Fl_Light_Button(int X, int Y, int W, int H, const char* l)
align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
Fl_Radio_Light_Button::Fl_Radio_Light_Button(int X,int Y,int W,int H,const char *l)
: Fl_Light_Button(X,Y,W,H,l)
{
type(FL_RADIO_BUTTON);
}
//
// End of "$Id$".
//

View File

@@ -64,6 +64,12 @@ int Fl_Menu_Bar::handle(int event) {
return 0;
}
Fl_Menu_Bar::Fl_Menu_Bar(int X, int Y, int W, int H,const char *l)
: Fl_Menu_(X,Y,W,H,l)
{
}
//
// End of "$Id$".
//

View File

@@ -96,6 +96,20 @@ Fl_Menu_Window::~Fl_Menu_Window() {
hide();
}
Fl_Menu_Window::Fl_Menu_Window(int W, int H, const char *l)
: Fl_Single_Window(W,H,l)
{
image(0);
}
Fl_Menu_Window::Fl_Menu_Window(int X, int Y, int W, int H, const char *l)
: Fl_Single_Window(X,Y,W,H,l) {
image(0);
}
//
// End of "$Id$".
//

View File

@@ -56,6 +56,13 @@ int Fl_Repeat_Button::handle(int event) {
}
}
Fl_Repeat_Button::Fl_Repeat_Button(int X,int Y,int W,int H,const char *l)
: Fl_Button(X,Y,W,H,l)
{
}
//
// End of "$Id$".
//

View File

@@ -59,6 +59,13 @@ int Fl_Return_Button::handle(int event) {
return Fl_Button::handle(event);
}
Fl_Return_Button::Fl_Return_Button(int X, int Y, int W, int H,const char *l)
: Fl_Button(X,Y,W,H,l)
{
}
//
// End of "$Id$".
//

Some files were not shown because too many files have changed in this diff Show More