FLTKPropertyNameButtonWithHelp.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef FLTKPropertyNameButtonWithHelp_h
  2. #define FLTKPropertyNameButtonWithHelp_h
  3. #include <FL/Fl_Tile.H>
  4. #include <FL/Fl_Input.H>
  5. #include <FL/Fl_Box.H>
  6. #include <FL/Fl_Button.H>
  7. #include <FL/Fl_Window.H>
  8. #include <string>
  9. namespace fltk {
  10. /**
  11. Helper class for managing help blobs over the property name
  12. */
  13. class PropertyNameButtonWithHelp : public Fl_Button
  14. {
  15. public:
  16. PropertyNameButtonWithHelp(int x,int y,int w, int h,const char *l);
  17. virtual ~PropertyNameButtonWithHelp();
  18. int handle(int event);
  19. void SetHelpText( const char * helpText);
  20. void ShowHelp(void);
  21. void HideHelp(void);
  22. static void ShowHelpBlobCallback( void * );
  23. void PopupMenu( void );
  24. private:
  25. std::string m_HelpText;
  26. // Class variables
  27. static Fl_Window * helpBlob;
  28. static Fl_Box * helpText;
  29. static unsigned int counter;
  30. static int lastMousePositionX;
  31. static int lastMousePositionY;
  32. };
  33. } // end namespace fltk
  34. #endif