Main Page | Class List | File List | Class Members | Related Pages

hyperlink.h

00001 
00002 // File:        hyperlink.h
00003 // Purpose:     wxHyperLink control
00004 // Maintainer:  Wyo
00005 // Created:     2003-04-07
00006 // RCS-ID:      $Id: hyperlink.h,v 1.1 2004/09/24 22:15:58 menne Exp $
00007 // Copyright:   (c) wxGuide
00008 // Licence:     wxWidgets licence
00010 
00011 #ifndef _MY_HYPERLINK_H_
00012 #define _MY_HYPERLINK_H_
00013 
00014 #ifdef __GNUG__
00015     #pragma implementation "hyperlink.h"
00016 #endif
00017 
00018 //----------------------------------------------------------------------------
00019 // information
00020 //----------------------------------------------------------------------------
00021 
00022 
00023 //----------------------------------------------------------------------------
00024 // headers
00025 //----------------------------------------------------------------------------
00027 
00028 
00029 //============================================================================
00030 // declarations
00031 //============================================================================
00032 
00033 //----------------------------------------------------------------------------
00035 
00036 
00037 //----------------------------------------------------------------------------
00039 class wxHyperLink: public wxStaticText {
00040 
00041 DECLARE_DYNAMIC_CLASS (wxHyperLink)
00042 
00043 public:
00044 
00046     wxHyperLink () {}
00047 
00049     wxHyperLink (wxWindow *parent,
00050                  wxWindowID id,
00051                  const wxString &label = wxEmptyString,
00052                  const wxPoint &pos = wxDefaultPosition,
00053                  const wxSize &size = wxDefaultSize,
00054                  long style = 0,
00055                  const wxString &name = _T("HyperLink")) {
00056         Create (parent, id, label, pos, size, style, name);
00057     }
00058 
00059     // function create
00060     bool Create (wxWindow *parent,
00061                  wxWindowID id,
00062                  const wxString &label,
00063                  const wxPoint &pos,
00064                  const wxSize &size,
00065                  long style,
00066                  const wxString &name);
00067 
00068     // event handlers
00069     void OnWindowEnter (wxMouseEvent& event);
00070     void OnWindowLeave (wxMouseEvent& event);
00071     void OnLinkActivate (wxMouseEvent& event);
00072 
00073     // get/set settings
00074     wxCursor GetHoverCursor ();
00075     void SetHoverCursor (wxCursor cursor);
00076     wxColour GetMarkedColour ();
00077     void SetMarkedColour (wxColour colour);
00078     wxColour GetNormalColour ();
00079     void SetNormalColour (wxColour colour);
00080     wxColour GetVisitedColour ();
00081     void SetVisitedColour (wxColour colour);
00082     wxString GetURL ();
00083     void SetURL (const wxString &url);
00084 
00085 private:
00086 
00088     wxString m_URL;
00089     bool m_Marked;
00090     bool m_Visited;
00091 
00093     wxCursor m_HoverCursor;
00094     wxColour m_MarkedColour;
00095     wxColour m_NormalColour;
00096     wxColour m_VisitedColour;
00097     wxColour m_BackgroundColour;
00098 
00100     void ExecuteLink (const wxString &link);
00101 
00102     DECLARE_EVENT_TABLE()
00103 };
00104 
00105 #endif // _MY_HYPERLINK_H_
00106 

Generated on Sun Jan 16 18:20:26 2005 for WDSMap by  doxygen 1.3.9.1