summaryrefslogtreecommitdiffstats
path: root/Source/FLTKDialog/FLTKPropertyNameButtonWithHelp.h
blob: 09d6e604f7a9cf76a0a816b7fc424c3d0b26b79a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef  FLTKPropertyNameButtonWithHelp_h
#define  FLTKPropertyNameButtonWithHelp_h

#include <FL/Fl_Tile.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Window.H>
#include <string>

namespace fltk {
  

/**
  
  Helper class for managing  help blobs over the property name

  */
class PropertyNameButtonWithHelp : public Fl_Button
{
  public:
    PropertyNameButtonWithHelp(int x,int y,int w, int h,const char *l);
    virtual ~PropertyNameButtonWithHelp();
    int handle(int event);
    void SetHelpText( const char * helpText);
    void ShowHelp(void);
    void HideHelp(void);
    
    static void ShowHelpBlobCallback( void * );

    void PopupMenu( void );

  private:
    
    std::string           m_HelpText;

    // Class variables
    static Fl_Window   *  helpBlob;
    static Fl_Box      *  helpText;
    static unsigned int   counter;
    static int            lastMousePositionX;
    static int            lastMousePositionY;

};




} // end namespace fltk

#endif