1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Context sensitive help classes, and etc.
7 // Created: 28-July-2001
9 // Copyright: (c) 2001 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
17 #include <wx/cshelp.h>
20 //----------------------------------------------------------------------
23 %include my_typemaps.i
25 // Import some definitions of other classes, etc.
32 //----------------------------------------------------------------------
35 wxFRAME_EX_CONTEXTHELP,
36 wxDIALOG_EX_CONTEXTHELP,
43 %pragma(python) code = "
45 def EVT_HELP(win, id, func):
46 win.Connect(id, -1, wxEVT_HELP, func)
48 def EVT_HELP_RANGE(win, id, id2, func):
49 win.Connect(id, id2, wxEVT_HELP, func)
51 def EVT_DETAILED_HELP(win, id, func):
52 win.Connect(id, -1, wxEVT_DETAILED_HELP, func)
54 def EVT_DETAILED_HELP_RANGE(win, id, id2, func):
55 win.Connect(id, id2, wxEVT_DETAILED_HELP, func)
58 //----------------------------------------------------------------------
60 class wxHelpEvent : public wxCommandEvent
63 wxHelpEvent(wxEventType type = wxEVT_NULL,
65 const wxPoint& pt = wxDefaultPosition);
66 const wxPoint& GetPosition();
67 void SetPosition(const wxPoint& pos);
68 const wxString& GetLink();
69 void SetLink(const wxString& link);
70 const wxString& GetTarget();
71 void SetTarget(const wxString& target);
74 //---------------------------------------------------------------------------
76 class wxContextHelp : public wxObject {
78 wxContextHelp(wxWindow* window = NULL, bool doNow = TRUE);
81 bool BeginContextHelp(wxWindow* window = NULL);
82 bool EndContextHelp();
86 //----------------------------------------------------------------------
88 class wxContextHelpButton : public wxBitmapButton {
90 wxContextHelpButton(wxWindow* parent, wxWindowID id = wxID_CONTEXT_HELP,
91 const wxPoint& pos = wxDefaultPosition,
92 const wxSize& size = wxDefaultSize,
93 long style = wxBU_AUTODRAW);
94 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
98 //----------------------------------------------------------------------
103 static wxHelpProvider *Set(wxHelpProvider *helpProvider);
104 static wxHelpProvider *Get();
107 wxString GetHelp(const wxWindow *window);
108 bool ShowHelp(wxWindow *window);
109 void AddHelp(wxWindow *window, const wxString& text);
110 %name(AddHelpById)void AddHelp(wxWindowID id, const wxString& text);
112 %addmethods { void Destroy() { delete self; } }
117 //----------------------------------------------------------------------
119 class wxSimpleHelpProvider : public wxHelpProvider
122 wxSimpleHelpProvider();
126 //----------------------------------------------------------------------
128 // TODO: Add this once the wxHelpController is in wxPython...
130 // class WXDLLEXPORT wxHelpControllerHelpProvider : public wxSimpleHelpProvider
133 // wxHelpControllerHelpProvider(wxHelpController* hc = NULL);
134 // void SetHelpController(wxHelpController* hc);
135 // wxHelpController* GetHelpController();
141 //----------------------------------------------------------------------
142 //----------------------------------------------------------------------
143 // This file gets appended to the shadow class file.
144 //----------------------------------------------------------------------
146 %pragma(python) include="_helpextras.py";
148 //---------------------------------------------------------------------------