mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 23:06:54 +08:00
STR #1321: Calling Fl_Window::show() will exit from the current Fl_Tooltip. Changing window order or creating a new window is a pretty major action, so temporarily disabeling Tooltips seems beneficial. This avoids Tooltips interfering with popup menus.
Of course, poping up a tooltip window does *not* disable further tooltips... . git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5200 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
CHANGES IN FLTK 1.1.8
|
CHANGES IN FLTK 1.1.8
|
||||||
|
|
||||||
|
- Showing any window will disable the current tooltip
|
||||||
|
so it won't pop over menus (STR #1321)
|
||||||
- Updated documentation to reflect limitation of
|
- Updated documentation to reflect limitation of
|
||||||
Fl::delete_widget() (STR #1306)
|
Fl::delete_widget() (STR #1306)
|
||||||
- Fixed line wrapping in Fl_Text_Display (STR #1227)
|
- Fixed line wrapping in Fl_Text_Display (STR #1227)
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ extern "C" {
|
|||||||
#include <FL/x.H>
|
#include <FL/x.H>
|
||||||
#include <FL/Fl_Tooltip.H>
|
#include <FL/Fl_Tooltip.H>
|
||||||
#include <FL/Fl_Window.H>
|
#include <FL/Fl_Window.H>
|
||||||
|
#include <FL/Fl_Tooltip.H>
|
||||||
#include <FL/Fl_Sys_Menu_Bar.H>
|
#include <FL/Fl_Sys_Menu_Bar.H>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -1972,6 +1973,7 @@ void Fl_Window::show() {
|
|||||||
} else {
|
} else {
|
||||||
labeltype(FL_NO_LABEL);
|
labeltype(FL_NO_LABEL);
|
||||||
}
|
}
|
||||||
|
Fl_Tooltip::exit_(this);
|
||||||
if (!shown() || !i) {
|
if (!shown() || !i) {
|
||||||
Fl_X::make(this);
|
Fl_X::make(this);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include <FL/x.H>
|
#include <FL/x.H>
|
||||||
#include <FL/Fl_Window.H>
|
#include <FL/Fl_Window.H>
|
||||||
#include <FL/Enumerations.H>
|
#include <FL/Enumerations.H>
|
||||||
|
#include <FL/Fl_Tooltip.H>
|
||||||
#include "flstring.h"
|
#include "flstring.h"
|
||||||
#include "Fl_Font.H"
|
#include "Fl_Font.H"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -1512,6 +1513,7 @@ void Fl_Window::show() {
|
|||||||
} else {
|
} else {
|
||||||
labeltype(FL_NO_LABEL);
|
labeltype(FL_NO_LABEL);
|
||||||
}
|
}
|
||||||
|
Fl_Tooltip::exit_(this);
|
||||||
if (!shown()) {
|
if (!shown()) {
|
||||||
// if (can_boxcheat(box())) fl_background_pixel = fl_xpixel(color());
|
// if (can_boxcheat(box())) fl_background_pixel = fl_xpixel(color());
|
||||||
Fl_X::make(this);
|
Fl_X::make(this);
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
# include <FL/Fl.H>
|
# include <FL/Fl.H>
|
||||||
# include <FL/x.H>
|
# include <FL/x.H>
|
||||||
# include <FL/Fl_Window.H>
|
# include <FL/Fl_Window.H>
|
||||||
|
# include <FL/Fl_Tooltip.H>
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include "flstring.h"
|
# include "flstring.h"
|
||||||
@@ -1329,6 +1330,7 @@ void Fl_Window::show() {
|
|||||||
} else {
|
} else {
|
||||||
labeltype(FL_NO_LABEL);
|
labeltype(FL_NO_LABEL);
|
||||||
}
|
}
|
||||||
|
Fl_Tooltip::exit_(this);
|
||||||
if (!shown()) {
|
if (!shown()) {
|
||||||
fl_open_display();
|
fl_open_display();
|
||||||
if (can_boxcheat(box())) fl_background_pixel = int(fl_xpixel(color()));
|
if (can_boxcheat(box())) fl_background_pixel = int(fl_xpixel(color()));
|
||||||
|
|||||||
@@ -184,9 +184,11 @@ int main(int argc, char **argv) {
|
|||||||
menubar.callback(test_cb);
|
menubar.callback(test_cb);
|
||||||
menus[0] = &menubar;
|
menus[0] = &menubar;
|
||||||
Fl_Menu_Button mb1(100,100,120,25,"&menubutton"); mb1.menu(pulldown);
|
Fl_Menu_Button mb1(100,100,120,25,"&menubutton"); mb1.menu(pulldown);
|
||||||
|
mb1.tooltip("this is a menu button");
|
||||||
mb1.callback(test_cb);
|
mb1.callback(test_cb);
|
||||||
menus[1] = &mb1;
|
menus[1] = &mb1;
|
||||||
Fl_Choice ch(300,100,80,25,"&choice:"); ch.menu(pulldown);
|
Fl_Choice ch(300,100,80,25,"&choice:"); ch.menu(pulldown);
|
||||||
|
ch.tooltip("this is a choice menu");
|
||||||
ch.callback(test_cb);
|
ch.callback(test_cb);
|
||||||
menus[2] = &ch;
|
menus[2] = &ch;
|
||||||
Fl_Menu_Button mb(0,0,WIDTH,400,"&popup");
|
Fl_Menu_Button mb(0,0,WIDTH,400,"&popup");
|
||||||
|
|||||||
Reference in New Issue
Block a user