1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/hyperlink.h
3 // Purpose: Hyperlink control
4 // Author: Francesco Montorsi
8 // Copyright: (c) 2007 Francesco Montorsi
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKHYPERLINKCTRLH__
13 #define __GTKHYPERLINKCTRLH__
15 #include "wx/generic/hyperlink.h"
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 class WXDLLIMPEXP_ADV wxHyperlinkCtrl
: public wxGenericHyperlinkCtrl
24 // Default constructor (for two-step construction).
28 wxHyperlinkCtrl(wxWindow
*parent
,
30 const wxString
& label
, const wxString
& url
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
33 long style
= wxHL_DEFAULT_STYLE
,
34 const wxString
& name
= wxHyperlinkCtrlNameStr
)
36 (void)Create(parent
, id
, label
, url
, pos
, size
, style
, name
);
39 // Creation function (for two-step construction).
40 bool Create(wxWindow
*parent
,
42 const wxString
& label
, const wxString
& url
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
,
45 long style
= wxHL_DEFAULT_STYLE
,
46 const wxString
& name
= wxHyperlinkCtrlNameStr
);
50 virtual wxColour
GetHoverColour() const;
51 virtual void SetHoverColour(const wxColour
&colour
);
53 virtual wxColour
GetNormalColour() const;
54 virtual void SetNormalColour(const wxColour
&colour
);
56 virtual wxColour
GetVisitedColour() const;
57 virtual void SetVisitedColour(const wxColour
&colour
);
59 virtual wxString
GetURL() const;
60 virtual void SetURL(const wxString
&url
);
62 virtual void SetLabel(const wxString
&label
);
65 // overridden base class virtuals
67 // Returns the best size for the window, which is the size needed
68 // to display the text label.
69 virtual wxSize
DoGetBestSize() const;
71 virtual GdkWindow
*GTKGetWindow(wxArrayGdkWindows
& windows
) const;
74 DECLARE_DYNAMIC_CLASS(wxHyperlinkCtrl
)
77 #endif // __GTKHYPERLINKCTRLH__