GUIGLObjectToolTip.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // The tooltip class for displaying information about gl-objects
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright 2001-2010 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef GUIGLObjectToolTip_h
00020 #define GUIGLObjectToolTip_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
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 // class declarations
00039 // ===========================================================================
00040 class GUIGlObject;
00041 class GUISUMOAbstractView;
00042 
00043 
00044 // ===========================================================================
00045 // class definitions
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 

Generated on Wed May 5 00:06:30 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6