Skip to content
Snippets Groups Projects
Commit b47f4370 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

experiment with tooltips instead of status bar for entity info

parent aa37d5b6
Branches
Tags
No related merge requests found
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "FlGui.h" #include "FlGui.h"
#include "drawContext.h" #include "drawContext.h"
#include "Context.h" #include "Context.h"
#include <FL/Fl_Tooltip.H>
static void lassoZoom(drawContext *ctx, mousePosition &click1, mousePosition &click2) static void lassoZoom(drawContext *ctx, mousePosition &click1, mousePosition &click2)
{ {
...@@ -580,9 +581,22 @@ int openglWindow::handle(int event) ...@@ -580,9 +581,22 @@ int openglWindow::handle(int event)
else if(faces.size()) ge = faces[0]; else if(faces.size()) ge = faces[0];
else if(regions.size()) ge = regions[0]; else if(regions.size()) ge = regions[0];
MElement *me = elements.size() ? elements[0] : 0; MElement *me = elements.size() ? elements[0] : 0;
Msg::StatusBar(2, false, "%s %s", static char text[1024] = "";
ge ? ge->getInfoString().c_str() : "", sprintf(text, "%s %s", ge ? ge->getInfoString().c_str() : "",
me ? me->getInfoString().c_str() : ""); me ? me->getInfoString().c_str() : "");
#if 0
Fl_Tooltip::exit(0);
double d1 = Fl_Tooltip::delay();
double d2 = Fl_Tooltip::hoverdelay();
Fl_Tooltip::delay(0);
Fl_Tooltip::hoverdelay(0);
if(strlen(text) > 3)
Fl_Tooltip::enter_area(this, _curr.win[0], _curr.win[1], 100, 50, text);
Fl_Tooltip::delay(d1);
Fl_Tooltip::hoverdelay(d2);
#else
Msg::StatusBar(2, false, text);
#endif
} }
} }
_prev.set(_ctx, Fl::event_x(), Fl::event_y()); _prev.set(_ctx, Fl::event_x(), Fl::event_y());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment