]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/help.i
Demo cleanup
[wxWidgets.git] / wxPython / src / help.i
CommitLineData
4f3449b4
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: help.i
3// Purpose: Context sensitive help classes, and etc.
4//
5// Author: Robin Dunn
6//
7// Created: 28-July-2001
8// RCS-ID: $Id$
9// Copyright: (c) 2001 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13%module help
14
15%{
16#include "export.h"
17#include <wx/cshelp.h>
18%}
19
20//----------------------------------------------------------------------
21
22%include typemaps.i
23%include my_typemaps.i
24
25// Import some definitions of other classes, etc.
26%import _defs.i
27%import windows.i
28%import misc.i
29%import controls.i
30
31
32//----------------------------------------------------------------------
33
34enum {
35 wxFRAME_EX_CONTEXTHELP,
36 wxDIALOG_EX_CONTEXTHELP,
37 wxID_CONTEXT_HELP,
38 wxEVT_HELP,
39 wxEVT_DETAILED_HELP,
40 wxEVT_CONTEXT_MENU,
41};
42
43
44%pragma(python) code = "
45# Help events
46def EVT_HELP(win, id, func):
47 win.Connect(id, -1, wxEVT_HELP, func)
48
49def EVT_HELP_RANGE(win, id, id2, func):
50 win.Connect(id, id2, wxEVT_HELP, func)
51
52def EVT_DETAILED_HELP(win, id, func):
53 win.Connect(id, -1, wxEVT_DETAILED_HELP, func)
54
55def EVT_DETAILED_HELP_RANGE(win, id, id2, func):
56 win.Connect(id, id2, wxEVT_DETAILED_HELP, func)
57
58def EVT_CONTEXT_MENU(win, func):
59 win.Connect(-1, -1, wxEVT_CONTEXT_MENU, func)
60"
61
62//----------------------------------------------------------------------
63
64class wxHelpEvent : public wxCommandEvent
65{
66public:
67 wxHelpEvent(wxEventType type = wxEVT_NULL,
68 wxWindowID id = 0,
69 const wxPoint& pt = wxDefaultPosition);
70 const wxPoint& GetPosition();
71 void SetPosition(const wxPoint& pos);
72 const wxString& GetLink();
73 void SetLink(const wxString& link);
74 const wxString& GetTarget();
75 void SetTarget(const wxString& target);
76};
77
78//---------------------------------------------------------------------------
79
80
81class wxContextMenuEvent : public wxCommandEvent
82{
83public:
84 wxContextMenuEvent(wxEventType type = wxEVT_NULL,
85 wxWindowID id = 0,
86 const wxPoint& pt = wxDefaultPosition);
87 const wxPoint& GetPosition();
88 void SetPosition(const wxPoint& pos);
89};
90
91
92
93//----------------------------------------------------------------------
94
95class wxContextHelp : public wxObject {
96public:
97 wxContextHelp(wxWindow* window = NULL, bool doNow = TRUE);
98 ~wxContextHelp();
99
100 bool BeginContextHelp(wxWindow* window = NULL);
101 bool EndContextHelp();
102};
103
104
105//----------------------------------------------------------------------
106
107class wxContextHelpButton : public wxBitmapButton {
108public:
109 wxContextHelpButton(wxWindow* parent, wxWindowID id = wxID_CONTEXT_HELP,
110 const wxPoint& pos = wxDefaultPosition,
111 const wxSize& size = wxDefaultSize,
112 long style = wxBU_AUTODRAW);
0122b7e3 113 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
4f3449b4
RD
114};
115
116
117//----------------------------------------------------------------------
118
119class wxHelpProvider
120{
121public:
122 static wxHelpProvider *Set(wxHelpProvider *helpProvider);
123 static wxHelpProvider *Get();
124
125 // Virtuals...
126 wxString GetHelp(const wxWindow *window);
127 bool ShowHelp(wxWindowBase *window);
128 void AddHelp(wxWindowBase *window, const wxString& text);
129 %name(AddHelpById)void AddHelp(wxWindowID id, const wxString& text);
130
131 %addmethods { void Destroy() { delete self; } }
132
133};
134
135
136//----------------------------------------------------------------------
137
138class wxSimpleHelpProvider : public wxHelpProvider
139{
140public:
141 wxSimpleHelpProvider();
142};
143
144
145//----------------------------------------------------------------------
146
147// TODO: Add this once the wxHelpController is in wxPython...
148
149// class WXDLLEXPORT wxHelpControllerHelpProvider : public wxSimpleHelpProvider
150// {
151// public:
152// wxHelpControllerHelpProvider(wxHelpController* hc = NULL);
153// void SetHelpController(wxHelpController* hc);
154// wxHelpController* GetHelpController();
155// };
156
157
158
159
160//----------------------------------------------------------------------
161//----------------------------------------------------------------------
162// This file gets appended to the shadow class file.
163//----------------------------------------------------------------------
164
165%pragma(python) include="_helpextras.py";
166
167//---------------------------------------------------------------------------