mirror of
https://github.com/fltk/fltk.git
synced 2026-05-29 04:26:27 +08:00
Fl::belowmouse() was resetting the tooltip, causing the flashing
in the FLUID window and havoc for the KDE 2.2 window manager... Changed the default tooltip position to be +10, +10 from the mouse pointer, and the default tooltip background color to a pale yellow to match other toolkit defaults. Update Fl_Widget::flags_ to be an integer, to support more flag bits. Update Fl_Window to support override() and set_override() methods. The configure script did not set the default library path to /usr/lib32 under IRIX 6.2 and higher when prefix is /usr. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1637 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,16 @@
|
|||||||
CHANGES IN FLTK 1.1.0b4
|
CHANGES IN FLTK 1.1.0b4
|
||||||
|
|
||||||
|
**** NOTE: DUE TO CHANGES IN THE FL_WIDGET CLASS, ****
|
||||||
|
**** YOU MUST RECOMPILE ALL SOURCE FILES ****
|
||||||
|
**** THAT USE FLTK!!! ****
|
||||||
|
|
||||||
|
- Updated the flags_ member of Fl_Widget to be an
|
||||||
|
integer instead of uchar, to support the new
|
||||||
|
FL_OVERRIDE flag for Fl_Window.
|
||||||
|
|
||||||
|
- Fl_Window now provides the FLTK 2.0 "override()" and
|
||||||
|
"set_override()" methods for windows.
|
||||||
|
|
||||||
- Updated the configure script to check for the
|
- Updated the configure script to check for the
|
||||||
png_set_tRNS_to_alpha() function.
|
png_set_tRNS_to_alpha() function.
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Widget.H,v 1.6.2.4.2.6 2001/08/06 23:51:39 easysw Exp $"
|
// "$Id: Fl_Widget.H,v 1.6.2.4.2.7 2001/10/18 18:53:20 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Widget header file for the Fast Light Tool Kit (FLTK).
|
// Widget header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -58,7 +58,7 @@ class Fl_Widget {
|
|||||||
short x_,y_,w_,h_;
|
short x_,y_,w_,h_;
|
||||||
Fl_Label label_;
|
Fl_Label label_;
|
||||||
uchar type_;
|
uchar type_;
|
||||||
uchar flags_;
|
int flags_;
|
||||||
uchar damage_;
|
uchar damage_;
|
||||||
uchar box_;
|
uchar box_;
|
||||||
uchar color_;
|
uchar color_;
|
||||||
@@ -81,7 +81,7 @@ protected:
|
|||||||
void w(int v) {w_ = v;}
|
void w(int v) {w_ = v;}
|
||||||
void h(int v) {h_ = v;}
|
void h(int v) {h_ = v;}
|
||||||
|
|
||||||
uchar flags() const {return flags_;}
|
int flags() const {return flags_;}
|
||||||
void set_flag(int c) {flags_ |= c;}
|
void set_flag(int c) {flags_ |= c;}
|
||||||
void clear_flag(int c) {flags_ &= ~c;}
|
void clear_flag(int c) {flags_ &= ~c;}
|
||||||
enum {INACTIVE=1, INVISIBLE=2, OUTPUT=4, SHORTCUT_LABEL=64, CHANGED=128};
|
enum {INACTIVE=1, INVISIBLE=2, OUTPUT=4, SHORTCUT_LABEL=64, CHANGED=128};
|
||||||
@@ -206,5 +206,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.6 2001/08/06 23:51:39 easysw Exp $".
|
// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.7 2001/10/18 18:53:20 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+8
-5
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Window.H,v 1.12.2.6 2001/05/11 18:37:08 easysw Exp $"
|
// "$Id: Fl_Window.H,v 1.12.2.6.2.1 2001/10/18 18:53:20 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Window header file for the Fast Light Tool Kit (FLTK).
|
// Window header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -49,7 +49,8 @@ class Fl_Window : public Fl_Group {
|
|||||||
FL_MODAL = 64,
|
FL_MODAL = 64,
|
||||||
FL_NOBORDER = 8,
|
FL_NOBORDER = 8,
|
||||||
FL_FORCE_POSITION = 16,
|
FL_FORCE_POSITION = 16,
|
||||||
FL_NON_MODAL = 32
|
FL_NON_MODAL = 32,
|
||||||
|
FL_OVERRIDE = 256
|
||||||
};
|
};
|
||||||
FL_EXPORT void _Fl_Window(); // constructor innards
|
FL_EXPORT void _Fl_Window(); // constructor innards
|
||||||
|
|
||||||
@@ -71,10 +72,12 @@ public:
|
|||||||
FL_EXPORT void border(int b);
|
FL_EXPORT void border(int b);
|
||||||
void clear_border() {set_flag(FL_NOBORDER);}
|
void clear_border() {set_flag(FL_NOBORDER);}
|
||||||
int border() const {return !(flags() & FL_NOBORDER);}
|
int border() const {return !(flags() & FL_NOBORDER);}
|
||||||
|
void set_override() {set_flag(FL_NOBORDER|FL_OVERRIDE);}
|
||||||
|
int override() const { return flags()&FL_OVERRIDE; }
|
||||||
void set_modal() {set_flag(FL_MODAL);}
|
void set_modal() {set_flag(FL_MODAL);}
|
||||||
uchar modal() const {return flags() & FL_MODAL;}
|
int modal() const {return flags() & FL_MODAL;}
|
||||||
void set_non_modal() {set_flag(FL_NON_MODAL);}
|
void set_non_modal() {set_flag(FL_NON_MODAL);}
|
||||||
uchar non_modal() const {return flags() & (FL_NON_MODAL|FL_MODAL);}
|
int non_modal() const {return flags() & (FL_NON_MODAL|FL_MODAL);}
|
||||||
|
|
||||||
FL_EXPORT void hotspot(int x, int y, int offscreen = 0);
|
FL_EXPORT void hotspot(int x, int y, int offscreen = 0);
|
||||||
FL_EXPORT void hotspot(const Fl_Widget*, int offscreen = 0);
|
FL_EXPORT void hotspot(const Fl_Widget*, int offscreen = 0);
|
||||||
@@ -116,5 +119,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Window.H,v 1.12.2.6 2001/05/11 18:37:08 easysw Exp $".
|
// End of "$Id: Fl_Window.H,v 1.12.2.6.2.1 2001/10/18 18:53:20 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+7
-2
@@ -1,7 +1,7 @@
|
|||||||
dnl -*- sh -*-
|
dnl -*- sh -*-
|
||||||
dnl the "configure" script is made from this by running GNU "autoconf"
|
dnl the "configure" script is made from this by running GNU "autoconf"
|
||||||
dnl
|
dnl
|
||||||
dnl "$Id: configure.in,v 1.33.2.31.2.9 2001/10/01 16:49:29 easysw Exp $"
|
dnl "$Id: configure.in,v 1.33.2.31.2.10 2001/10/18 18:53:20 easysw Exp $"
|
||||||
dnl
|
dnl
|
||||||
dnl Configuration script for the Fast Light Tool Kit (FLTK).
|
dnl Configuration script for the Fast Light Tool Kit (FLTK).
|
||||||
dnl
|
dnl
|
||||||
@@ -318,6 +318,11 @@ if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Fix "libdir" variable...
|
||||||
|
if test "$uname" = "IRIX" -a $uversion -ge 62 -a "$libdir" = "\${exec_prefix}/lib" -a "$exec_prefix" = "/usr"; then
|
||||||
|
libdir="/usr/lib32"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Add warnings to compiler switches:
|
dnl Add warnings to compiler switches:
|
||||||
dnl do this last so messing with switches does not break tests
|
dnl do this last so messing with switches does not break tests
|
||||||
MAKEDEPEND="\$(CXX) -M"
|
MAKEDEPEND="\$(CXX) -M"
|
||||||
@@ -461,5 +466,5 @@ AC_OUTPUT(makeinclude fltk-config)
|
|||||||
chmod +x fltk-config
|
chmod +x fltk-config
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl End of "$Id: configure.in,v 1.33.2.31.2.9 2001/10/01 16:49:29 easysw Exp $".
|
dnl End of "$Id: configure.in,v 1.33.2.31.2.10 2001/10/18 18:53:20 easysw Exp $".
|
||||||
dnl
|
dnl
|
||||||
|
|||||||
+9
-8
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Tooltip.cxx,v 1.38.2.2 2001/08/02 15:31:59 easysw Exp $"
|
// "$Id: Fl_Tooltip.cxx,v 1.38.2.3 2001/10/18 18:53:20 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Tooltip source file for the Fast Light Tool Kit (FLTK).
|
// Tooltip source file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -42,7 +42,9 @@ Fl_TooltipBox *Fl_Tooltip::box = 0;
|
|||||||
Fl_Menu_Window *Fl_Tooltip::window = 0;
|
Fl_Menu_Window *Fl_Tooltip::window = 0;
|
||||||
Fl_Widget *Fl_Tooltip::widget = 0;
|
Fl_Widget *Fl_Tooltip::widget = 0;
|
||||||
int Fl_Tooltip::shown = 0;
|
int Fl_Tooltip::shown = 0;
|
||||||
uchar Fl_Tooltip::color_ = FL_YELLOW;
|
uchar Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1,
|
||||||
|
FL_NUM_GREEN - 1,
|
||||||
|
FL_NUM_BLUE - 2);
|
||||||
int Fl_Tooltip::font_ = FL_HELVETICA;
|
int Fl_Tooltip::font_ = FL_HELVETICA;
|
||||||
int Fl_Tooltip::size_ = FL_NORMAL_SIZE;
|
int Fl_Tooltip::size_ = FL_NORMAL_SIZE;
|
||||||
|
|
||||||
@@ -88,11 +90,9 @@ public:
|
|||||||
fl_measure(Fl_Tooltip::widget->tooltip(), ww, hh);
|
fl_measure(Fl_Tooltip::widget->tooltip(), ww, hh);
|
||||||
label(Fl_Tooltip::widget->tooltip());
|
label(Fl_Tooltip::widget->tooltip());
|
||||||
|
|
||||||
int ox =
|
int ox = Fl::event_x_root() + 10;
|
||||||
widgetWindow->x_root() + Fl_Tooltip::widget->x() + Fl_Tooltip::widget->w()/2;
|
int oy = Fl::event_y_root() + 10;
|
||||||
int oy =
|
|
||||||
widgetWindow->y_root() + Fl_Tooltip::widget->y() + Fl_Tooltip::widget->h() + 10;
|
|
||||||
|
|
||||||
if (ox >= Fl::w())
|
if (ox >= Fl::w())
|
||||||
ox = Fl::w() - ww - 6;
|
ox = Fl::w() - ww - 6;
|
||||||
if (oy >= Fl::h())
|
if (oy >= Fl::h())
|
||||||
@@ -156,6 +156,7 @@ Fl_Tooltip::tooltip_timeout(void *v) {
|
|||||||
window = new Fl_Menu_Window(0, 0, 10, 10, 0);
|
window = new Fl_Menu_Window(0, 0, 10, 10, 0);
|
||||||
window->clear_border();
|
window->clear_border();
|
||||||
window->box(FL_NO_BOX);
|
window->box(FL_NO_BOX);
|
||||||
|
window->set_override();
|
||||||
|
|
||||||
window->begin();
|
window->begin();
|
||||||
box = new Fl_TooltipBox;
|
box = new Fl_TooltipBox;
|
||||||
@@ -188,5 +189,5 @@ Fl_Tooltip::tooltip_timeout(void *v) {
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.2 2001/08/02 15:31:59 easysw Exp $".
|
// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.3 2001/10/18 18:53:20 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+8
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_x.cxx,v 1.24.2.24.2.2 2001/08/02 21:11:43 easysw Exp $"
|
// "$Id: Fl_x.cxx,v 1.24.2.24.2.3 2001/10/18 18:53:20 easysw Exp $"
|
||||||
//
|
//
|
||||||
// X specific code for the Fast Light Tool Kit (FLTK).
|
// X specific code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -702,7 +702,11 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap)
|
|||||||
attr.colormap = colormap;
|
attr.colormap = colormap;
|
||||||
attr.border_pixel = 0;
|
attr.border_pixel = 0;
|
||||||
attr.bit_gravity = 0; // StaticGravity;
|
attr.bit_gravity = 0; // StaticGravity;
|
||||||
attr.override_redirect = 0;
|
if (w->override()) {
|
||||||
|
attr.override_redirect = 1;
|
||||||
|
attr.save_under = 1;
|
||||||
|
mask |= CWOverrideRedirect | CWSaveUnder;
|
||||||
|
} else attr.override_redirect = 0;
|
||||||
if (Fl::grab()) {
|
if (Fl::grab()) {
|
||||||
attr.save_under = 1; mask |= CWSaveUnder;
|
attr.save_under = 1; mask |= CWSaveUnder;
|
||||||
if (!w->border()) {attr.override_redirect = 1; mask |= CWOverrideRedirect;}
|
if (!w->border()) {attr.override_redirect = 1; mask |= CWOverrideRedirect;}
|
||||||
@@ -786,7 +790,7 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap)
|
|||||||
// Send X window stuff that can be changed over time:
|
// Send X window stuff that can be changed over time:
|
||||||
|
|
||||||
void Fl_X::sendxjunk() {
|
void Fl_X::sendxjunk() {
|
||||||
if (w->parent()) return; // it's not a window manager window!
|
if (w->parent() || w->override()) return; // it's not a window manager window!
|
||||||
|
|
||||||
if (!w->size_range_set) { // default size_range based on resizable():
|
if (!w->size_range_set) { // default size_range based on resizable():
|
||||||
if (w->resizable()) {
|
if (w->resizable()) {
|
||||||
@@ -927,5 +931,5 @@ void Fl_Window::make_current() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.2 2001/08/02 21:11:43 easysw Exp $".
|
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.3 2001/10/18 18:53:20 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user