Pragma added around xlib.h to shut up the IRIX compiler warnings
Fluid writes "class foo;" to the header and c file without prepending "extern" or "static". This patch also does this to "class foo bar;" which is wrong... Tabs draw very short labels. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@629 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
ae621ef778
commit
0bb590c832
10
FL/x.H
10
FL/x.H
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: x.H,v 1.10 1999/02/16 21:59:49 mike Exp $"
|
// "$Id: x.H,v 1.10.2.1 1999/07/22 07:27:07 bill Exp $"
|
||||||
//
|
//
|
||||||
// X11 header file for the Fast Light Tool Kit (FLTK).
|
// X11 header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@ -39,9 +39,15 @@
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#ifdef __sgi
|
||||||
|
#pragma set woff 3322
|
||||||
|
#endif
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
#ifdef __sgi
|
||||||
|
#pragma reset woff 3322
|
||||||
|
#endif
|
||||||
#include "Fl_Window.H"
|
#include "Fl_Window.H"
|
||||||
|
|
||||||
FL_EXPORT void fl_open_display();
|
FL_EXPORT void fl_open_display();
|
||||||
@ -118,5 +124,5 @@ extern FL_EXPORT int fl_background_pixel; // hack into Fl_X::make_xid()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: x.H,v 1.10 1999/02/16 21:59:49 mike Exp $".
|
// End of "$Id: x.H,v 1.10.2.1 1999/07/22 07:27:07 bill Exp $".
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Function_Type.cxx,v 1.15.2.5 1999/07/09 15:04:47 mike Exp $"
|
// "$Id: Fl_Function_Type.cxx,v 1.15.2.6 1999/07/22 07:27:09 bill Exp $"
|
||||||
//
|
//
|
||||||
// C function type code for the Fast Light Tool Kit (FLTK).
|
// C function type code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@ -450,7 +450,11 @@ void Fl_Decl_Type::write_code1() {
|
|||||||
const char* c = name();
|
const char* c = name();
|
||||||
if (!c) return;
|
if (!c) return;
|
||||||
// handle putting #include or extern into decl:
|
// handle putting #include or extern into decl:
|
||||||
if ((!isalpha(*c) || !strncmp(c,"extern",6)) && *c != '~') {
|
if (!isalpha(*c) && *c != '~'
|
||||||
|
|| !strncmp(c,"extern",6) && isspace(c[6])
|
||||||
|
|| !strncmp(c,"class",5) && isspace(c[5])
|
||||||
|
// || !strncmp(c,"struct",6) && isspace(c[6])
|
||||||
|
) {
|
||||||
if (public_)
|
if (public_)
|
||||||
write_h("%s\n", c);
|
write_h("%s\n", c);
|
||||||
else
|
else
|
||||||
@ -660,5 +664,5 @@ void Fl_Class_Type::write_code2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.5 1999/07/09 15:04:47 mike Exp $".
|
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.6 1999/07/22 07:27:09 bill Exp $".
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Group.cxx,v 1.8 1999/01/26 21:37:14 mike Exp $"
|
// "$Id: Fl_Group.cxx,v 1.8.2.1 1999/07/22 07:27:11 bill Exp $"
|
||||||
//
|
//
|
||||||
// Group widget for the Fast Light Tool Kit (FLTK).
|
// Group widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@ -255,18 +255,22 @@ Fl_Group::Fl_Group(int X,int Y,int W,int H,const char *l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Fl_Group::clear() {
|
void Fl_Group::clear() {
|
||||||
Fl_Widget*const* a = array();
|
Fl_Widget*const* old_array = array();
|
||||||
for (int i=children(); i--;) {
|
int old_children = children();
|
||||||
Fl_Widget* o = *a++;
|
// clear everything now, in case fl_fix_focus recursively calls us:
|
||||||
// test the parent to see if child already destructed:
|
|
||||||
if (o->parent() == this) delete o;
|
|
||||||
}
|
|
||||||
if (children() > 1) free((void*)array_);
|
|
||||||
children_ = 0;
|
children_ = 0;
|
||||||
array_ = 0;
|
array_ = 0;
|
||||||
savedfocus_ = 0;
|
savedfocus_ = 0;
|
||||||
resizable_ = this;
|
resizable_ = this;
|
||||||
init_sizes();
|
init_sizes();
|
||||||
|
// okay, now it is safe to destroy the children:
|
||||||
|
Fl_Widget*const* a = old_array;
|
||||||
|
for (int i=old_children; i--;) {
|
||||||
|
Fl_Widget* o = *a++;
|
||||||
|
// test the parent to see if child already destructed:
|
||||||
|
if (o->parent() == this) delete o;
|
||||||
|
}
|
||||||
|
if (old_children > 1) free((void*)old_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
Fl_Group::~Fl_Group() {clear();}
|
Fl_Group::~Fl_Group() {clear();}
|
||||||
@ -485,5 +489,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& w) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Group.cxx,v 1.8 1999/01/26 21:37:14 mike Exp $".
|
// End of "$Id: Fl_Group.cxx,v 1.8.2.1 1999/07/22 07:27:11 bill Exp $".
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Tabs.cxx,v 1.6.2.1 1999/07/06 16:16:38 mike Exp $"
|
// "$Id: Fl_Tabs.cxx,v 1.6.2.2 1999/07/22 07:27:11 bill Exp $"
|
||||||
//
|
//
|
||||||
// Tab widget for the Fast Light Tool Kit (FLTK).
|
// Tab widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@ -53,6 +53,7 @@ int Fl_Tabs::tab_positions(int* p, int* w) {
|
|||||||
if (o->label()) {
|
if (o->label()) {
|
||||||
int wt = 0; int ht = 0; o->measure_label(wt,ht);
|
int wt = 0; int ht = 0; o->measure_label(wt,ht);
|
||||||
w[i] = wt+TABSLOPE;
|
w[i] = wt+TABSLOPE;
|
||||||
|
if (2*TABSLOPE > w[i]) w[i] = 2*TABSLOPE;
|
||||||
} else
|
} else
|
||||||
w[i] = 2*TABSLOPE;
|
w[i] = 2*TABSLOPE;
|
||||||
p[i+1] = p[i]+w[i];
|
p[i+1] = p[i]+w[i];
|
||||||
@ -174,9 +175,10 @@ Fl_Widget* Fl_Tabs::value() {
|
|||||||
|
|
||||||
int Fl_Tabs::value(Fl_Widget *o) {
|
int Fl_Tabs::value(Fl_Widget *o) {
|
||||||
if (value_ == o) return 0;
|
if (value_ == o) return 0;
|
||||||
if (value_) value_->hide();
|
Fl_Widget* oldvalue = value_;
|
||||||
if (o) o->show();
|
|
||||||
value_ = o;
|
value_ = o;
|
||||||
|
if (o) o->show();
|
||||||
|
if (oldvalue) oldvalue->hide();
|
||||||
redraw();
|
redraw();
|
||||||
do_callback();
|
do_callback();
|
||||||
return 1;
|
return 1;
|
||||||
@ -246,7 +248,7 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
|
|||||||
fl_color(!sel && o==push_ ? FL_DARK3 : FL_LIGHT3);
|
fl_color(!sel && o==push_ ? FL_DARK3 : FL_LIGHT3);
|
||||||
fl_line(x1, y()+h()+H, x1+TABSLOPE, y()+h()-1);
|
fl_line(x1, y()+h()+H, x1+TABSLOPE, y()+h()-1);
|
||||||
}
|
}
|
||||||
if (x2-x1 > 2*TABSLOPE)
|
if (W > TABSLOPE)
|
||||||
o->draw_label(what==LEFT ? x1+TABSLOPE : x2-W+TABSLOPE,
|
o->draw_label(what==LEFT ? x1+TABSLOPE : x2-W+TABSLOPE,
|
||||||
y()+(H<0?h()+H-3:0), W-TABSLOPE,
|
y()+(H<0?h()+H-3:0), W-TABSLOPE,
|
||||||
(H<0?-H:H)+3, FL_ALIGN_CENTER);
|
(H<0?-H:H)+3, FL_ALIGN_CENTER);
|
||||||
@ -259,5 +261,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.1 1999/07/06 16:16:38 mike Exp $".
|
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.2 1999/07/22 07:27:11 bill Exp $".
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_win32.cxx,v 1.33.2.12 1999/06/07 07:03:32 bill Exp $"
|
// "$Id: Fl_win32.cxx,v 1.33.2.13 1999/07/22 07:27:11 bill Exp $"
|
||||||
//
|
//
|
||||||
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
|
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@ -47,6 +47,10 @@
|
|||||||
# define WM_SYNCPAINT 0x0088
|
# define WM_SYNCPAINT 0x0088
|
||||||
#endif /* !WM_SYNCPAINT */
|
#endif /* !WM_SYNCPAINT */
|
||||||
|
|
||||||
|
#ifndef WM_MOUSELEAVE
|
||||||
|
# define WM_MOUSE_LEAVE 0x02a3
|
||||||
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
// interface to poll/select call:
|
// interface to poll/select call:
|
||||||
|
|
||||||
@ -434,6 +438,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||||||
case WM_RBUTTONUP: mouse_event(window, 2, 3, wParam, lParam); return 0;
|
case WM_RBUTTONUP: mouse_event(window, 2, 3, wParam, lParam); return 0;
|
||||||
case WM_MOUSEMOVE: mouse_event(window, 3, 0, wParam, lParam); return 0;
|
case WM_MOUSEMOVE: mouse_event(window, 3, 0, wParam, lParam); return 0;
|
||||||
|
|
||||||
|
case WM_MOUSELEAVE:
|
||||||
|
Fl::handle(FL_LEAVE, window);
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_SETFOCUS:
|
case WM_SETFOCUS:
|
||||||
Fl::handle(FL_FOCUS, window);
|
Fl::handle(FL_FOCUS, window);
|
||||||
break;
|
break;
|
||||||
@ -941,5 +949,5 @@ void Fl_Window::make_current() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_win32.cxx,v 1.33.2.12 1999/06/07 07:03:32 bill Exp $".
|
// End of "$Id: Fl_win32.cxx,v 1.33.2.13 1999/07/22 07:27:11 bill Exp $".
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_font.cxx,v 1.9.2.1 1999/07/21 01:21:49 carl Exp $"
|
// "$Id: fl_font.cxx,v 1.9.2.2 1999/07/22 07:27:12 bill Exp $"
|
||||||
//
|
//
|
||||||
// Font selection code for the Fast Light Tool Kit (FLTK).
|
// Font selection code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@ -278,8 +278,8 @@ double fl_width(uchar c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void fl_draw(const char* str, int n, int x, int y) {
|
void fl_draw(const char* str, int n, int x, int y) {
|
||||||
if (!fl_xfont) fl_font(0, 14); // Perhaps this should be configured somewhere?
|
|
||||||
if (font_gc != fl_gc) {
|
if (font_gc != fl_gc) {
|
||||||
|
if (!fl_xfont) fl_font(FL_HELVETICA, 14);
|
||||||
font_gc = fl_gc;
|
font_gc = fl_gc;
|
||||||
XSetFont(fl_display, fl_gc, fl_xfont->fid);
|
XSetFont(fl_display, fl_gc, fl_xfont->fid);
|
||||||
}
|
}
|
||||||
@ -293,5 +293,5 @@ void fl_draw(const char* str, int x, int y) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_font.cxx,v 1.9.2.1 1999/07/21 01:21:49 carl Exp $".
|
// End of "$Id: fl_font.cxx,v 1.9.2.2 1999/07/22 07:27:12 bill Exp $".
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user