GUIGLObjectToolTip.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GUIGLObjectToolTip_h
00020 #define GUIGLObjectToolTip_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include <fx.h>
00033 #include <utils/geom/Boundary.h>
00034 #include <string>
00035
00036
00037
00038
00039
00040 class GUIGlObject;
00041 class GUISUMOAbstractView;
00042
00043
00044
00045
00046
00051 class GUIGLObjectToolTip : public FXToolTip {
00052 FXDECLARE(GUIGLObjectToolTip)
00053
00054 public:
00056 GUIGLObjectToolTip(FXWindow *a);
00057
00059 ~GUIGLObjectToolTip();
00060
00062 friend class GUISUMOAbstractView;
00063 friend class GUIRouterSUMOAbstractView;
00064
00065 long onPaint(FXObject*,FXSelector,void* ptr);
00066 long onTipShow(FXObject*,FXSelector,void*);
00067 long onTipHide(FXObject*,FXSelector,void*);
00068
00069 FXint getDefaultWidth();
00070
00071 FXint getDefaultHeight();
00072
00073 private:
00075 void setObjectTip(GUIGlObject *object,
00076 FXint x, FXint y);
00077
00079 void eraseTip();
00080
00081 private:
00083 GUISUMOAbstractView *myParent;
00084
00086 int myTextHeight;
00087
00089 FXFont *myFont;
00090
00092 std::string myObjectName;
00093
00095 FXint myWidth, myHeight;
00096
00098 FXint myLastXPos, myLastYPos;
00099
00101 GUIGlObject *myObject;
00102
00103 protected:
00105 GUIGLObjectToolTip() { }
00106
00107
00108 };
00109
00110
00111 #endif
00112
00113
00114