]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/help.i
fix text scrolling in GTK2 (patch 703988)
[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%{
6e2129f9 16#include "wxPython.h"
4f3449b4
RD
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,
4f3449b4
RD
40};
41
42
43%pragma(python) code = "
44# Help events
45def EVT_HELP(win, id, func):
46 win.Connect(id, -1, wxEVT_HELP, func)
47
48def EVT_HELP_RANGE(win, id, id2, func):
49 win.Connect(id, id2, wxEVT_HELP, func)
50
51def EVT_DETAILED_HELP(win, id, func):
52 win.Connect(id, -1, wxEVT_DETAILED_HELP, func)
53
54def EVT_DETAILED_HELP_RANGE(win, id, id2, func):
55 win.Connect(id, id2, wxEVT_DETAILED_HELP, func)
4f3449b4
RD
56"
57
58//----------------------------------------------------------------------
59
60class wxHelpEvent : public wxCommandEvent
61{
62public:
63 wxHelpEvent(wxEventType type = wxEVT_NULL,
64 wxWindowID id = 0,
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);
72};
73
74//---------------------------------------------------------------------------
75
4f3449b4
RD
76class wxContextHelp : public wxObject {
77public:
78 wxContextHelp(wxWindow* window = NULL, bool doNow = TRUE);
79 ~wxContextHelp();
80
81 bool BeginContextHelp(wxWindow* window = NULL);
82 bool EndContextHelp();
83};
84
85
86//----------------------------------------------------------------------
87
88class wxContextHelpButton : public wxBitmapButton {
89public:
90 wxContextHelpButton(wxWindow* parent, wxWindowID id = wxID_CONTEXT_HELP,
91 const wxPoint& pos = wxDefaultPosition,
92 const wxSize& size = wxDefaultSize,
93 long style = wxBU_AUTODRAW);
0122b7e3 94 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
4f3449b4
RD
95};
96
97
98//----------------------------------------------------------------------
99
100class wxHelpProvider
101{
102public:
103 static wxHelpProvider *Set(wxHelpProvider *helpProvider);
104 static wxHelpProvider *Get();
105
106 // Virtuals...
107 wxString GetHelp(const wxWindow *window);
1fded56b
RD
108 bool ShowHelp(wxWindow *window);
109 void AddHelp(wxWindow *window, const wxString& text);
4f3449b4
RD
110 %name(AddHelpById)void AddHelp(wxWindowID id, const wxString& text);
111
112 %addmethods { void Destroy() { delete self; } }
113
114};
115
116
117//----------------------------------------------------------------------
118
119class wxSimpleHelpProvider : public wxHelpProvider
120{
121public:
122 wxSimpleHelpProvider();
123};
124
125
126//----------------------------------------------------------------------
127
128// TODO: Add this once the wxHelpController is in wxPython...
129
130// class WXDLLEXPORT wxHelpControllerHelpProvider : public wxSimpleHelpProvider
131// {
132// public:
133// wxHelpControllerHelpProvider(wxHelpController* hc = NULL);
134// void SetHelpController(wxHelpController* hc);
135// wxHelpController* GetHelpController();
136// };
137
138
139
140
141//----------------------------------------------------------------------
142//----------------------------------------------------------------------
143// This file gets appended to the shadow class file.
144//----------------------------------------------------------------------
145
146%pragma(python) include="_helpextras.py";
147
148//---------------------------------------------------------------------------