summaryrefslogtreecommitdiffstats
path: root/Source/FLTKDialog/FLTKPropertyNameButtonWithHelp.h
blob: 12c02984d069db699b0afa981bd573b3213a4138 (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