This file is indexed.

/usr/include/wx-3.0/wx/wxPython/i_files/_cshelp.i is in python-wxgtk3.0-dev 3.0.2.0+dfsg-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
/////////////////////////////////////////////////////////////////////////////
// Name:        _cshelp.i
// Purpose:     Context sensitive help classes, and etc.
//
// Author:      Robin Dunn
//
// Created:     28-July-2001
// RCS-ID:      $Id$
// Copyright:   (c) 2001 by Total Control Software
// Licence:     wxWindows license
/////////////////////////////////////////////////////////////////////////////

// not a %module

//---------------------------------------------------------------------------
%newgroup

%{
%}

//----------------------------------------------------------------------

%constant wxEventType wxEVT_HELP;
%constant wxEventType wxEVT_DETAILED_HELP;


%pythoncode { 
EVT_HELP = wx.PyEventBinder( wxEVT_HELP, 1)
EVT_HELP_RANGE = wx.PyEventBinder(  wxEVT_HELP, 2)
EVT_DETAILED_HELP = wx.PyEventBinder( wxEVT_DETAILED_HELP, 1)
EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2)
}

//----------------------------------------------------------------------

DocStr(wxHelpEvent,
"A help event is sent when the user has requested context-sensitive
help. This can either be caused by the application requesting
context-sensitive help mode via wx.ContextHelp, or (on MS Windows) by
the system generating a WM_HELP message when the user pressed F1 or
clicked on the query button in a dialog caption.

A help event is sent to the window that the user clicked on, and is
propagated up the window hierarchy until the event is processed or
there are no more event handlers. The application should call
event.GetId to check the identity of the clicked-on window, and then
either show some suitable help or call event.Skip if the identifier is
unrecognised. Calling Skip is important because it allows wxWindows to
generate further events for ancestors of the clicked-on
window. Otherwise it would be impossible to show help for container
windows, since processing would stop after the first window found.",
"

Events
-------
    ==============      =========================================
    EVT_HELP            Sent when the user has requested context-
                        sensitive help.
    EVT_HELP_RANGE      Allows to catch EVT_HELP for a range of IDs
    ==============      =========================================

:see: `wx.ContextHelp`, `wx.ContextHelpButton`
");


class wxHelpEvent : public wxCommandEvent
{
public:
    // how was this help event generated?
    enum Origin
    {
        Origin_Unknown,    // unrecognized event source
        Origin_Keyboard,   // event generated from F1 key press
        Origin_HelpButton  // event from [?] button on the title bar (Windows)
    };

    DocCtorStr(
        wxHelpEvent(wxEventType type = wxEVT_NULL,
                    wxWindowID winid = 0,
                    const wxPoint& pt = wxDefaultPosition,
                    Origin origin = Origin_Unknown ),
        "", "");
    

    DocDeclStr(
        const wxPoint , GetPosition() const,
        "Returns the left-click position of the mouse, in screen
coordinates. This allows the application to position the help
appropriately.", "");
    
    DocDeclStr(
        void , SetPosition(const wxPoint& pos),
        "Sets the left-click position of the mouse, in screen coordinates.", "");
    

    DocDeclStr(
        const wxString& , GetLink() const,
        "Get an optional link to further help", "");
    
    DocDeclStr(
        void , SetLink(const wxString& link),
        "Set an optional link to further help", "");
    

    DocDeclStr(
        const wxString& , GetTarget() const,
        "Get an optional target to display help in. E.g. a window specification", "");
    
    DocDeclStr(
        void , SetTarget(const wxString& target),
        "Set an optional target to display help in. E.g. a window specification", "");

    // optional indication of the event source
    DocDeclStr(
        Origin , GetOrigin() const,
        "Optiononal indication of the source of the event.", "");
    
    DocDeclStr(
        void , SetOrigin(Origin origin),
        "", "");
        
    %property(Link, GetLink, SetLink, doc="See `GetLink` and `SetLink`");
    %property(Origin, GetOrigin, SetOrigin, doc="See `GetOrigin` and `SetOrigin`");
    %property(Position, GetPosition, SetPosition, doc="See `GetPosition` and `SetPosition`");
    %property(Target, GetTarget, SetTarget, doc="See `GetTarget` and `SetTarget`");
};

//---------------------------------------------------------------------------


DocStr(wxContextHelp,
"This class changes the cursor to a query and puts the application into
a 'context-sensitive help mode'. When the user left-clicks on a window
within the specified window, a ``EVT_HELP`` event is sent to that
control, and the application may respond to it by popping up some
help.

There are a couple of ways to invoke this behaviour implicitly:

    * Use the wx.WS_EX_CONTEXTHELP extended style for a dialog or frame
      (Windows only). This will put a question mark in the titlebar,
      and Windows will put the application into context-sensitive help
      mode automatically, with further programming.

    * Create a `wx.ContextHelpButton`, whose predefined behaviour is
      to create a context help object. Normally you will write your
      application so that this button is only added to a dialog for
      non-Windows platforms (use ``wx.WS_EX_CONTEXTHELP`` on
      Windows).

:see: `wx.ContextHelpButton`
", "");       

MustHaveApp(wxContextHelp);

class wxContextHelp : public wxObject {
public:
    DocCtorStr(
        wxContextHelp(wxWindow* window = NULL, bool doNow = true),
        "Constructs a context help object, calling BeginContextHelp if doNow is
true (the default).

If window is None, the top window is used.", "");
    
    ~wxContextHelp();

    DocDeclStr(
        bool , BeginContextHelp(wxWindow* window = NULL),
        "Puts the application into context-sensitive help mode. window is the
window which will be used to catch events; if NULL, the top window
will be used.

Returns true if the application was successfully put into
context-sensitive help mode. This function only returns when the event
loop has finished.", "");
    
    DocDeclStr(
        bool , EndContextHelp(),
        "Ends context-sensitive help mode. Not normally called by the
application.", "");
    
};


//----------------------------------------------------------------------

DocStr(wxContextHelpButton,
"Instances of this class may be used to add a question mark button that
when pressed, puts the application into context-help mode. It does
this by creating a wx.ContextHelp object which itself generates a
``EVT_HELP`` event when the user clicks on a window.

On Windows, you may add a question-mark icon to a dialog by use of the
``wx.DIALOG_EX_CONTEXTHELP`` extra style, but on other platforms you
will have to add a button explicitly, usually next to OK, Cancel or
similar buttons.

:see: `wx.ContextHelp`, `wx.ContextHelpButton`
", "");

MustHaveApp(wxContextHelpButton);

class wxContextHelpButton : public wxBitmapButton {
public:
    %pythonAppend wxContextHelpButton "self._setOORInfo(self)"

    DocCtorStr(
        wxContextHelpButton(wxWindow* parent, wxWindowID id = wxID_CONTEXT_HELP,
                            const wxPoint& pos = wxDefaultPosition,
                            const wxSize& size = wxDefaultSize,
                            long style = wxBU_AUTODRAW),
        "Constructor, creating and showing a context help button.", "");
};


//----------------------------------------------------------------------

DocStr(wxHelpProvider,
"wx.HelpProvider is an abstract class used by a program
implementing context-sensitive help to show the help text for the
given window.

The current help provider must be explicitly set by the
application using wx.HelpProvider.Set().", "");

class wxHelpProvider 
{
public:
    
    ~wxHelpProvider();
    
    
    %disownarg( wxHelpProvider *helpProvider );
    %newobject Set;
    DocDeclStr(
        static wxHelpProvider *, Set(wxHelpProvider *helpProvider),
        "Sset the current, application-wide help provider. Returns the previous
one.  Unlike some other classes, the help provider is not created on
demand. This must be explicitly done by the application.", "");
    %cleardisown( wxHelpProvider *helpProvider );
    
    DocDeclStr(
        static wxHelpProvider *, Get(),
        "Return the current application-wide help provider.", "");
    

    DocDeclStr(
        wxString , GetHelp(const wxWindow *window),
        "Gets the help string for this window. Its interpretation is dependent
on the help provider except that empty string always means that no
help is associated with the window.", "");
    
    DocDeclStr(
        bool , ShowHelp(wxWindow *window),
        "Shows help for the given window. Uses GetHelp internally if
applicable. Returns True if it was done, or False if no help was
available for this window.", "");

    DocDeclStr(
        virtual bool , ShowHelpAtPoint(wxWindowBase *window,
                                       const wxPoint& pt,
                                       wxHelpEvent::Origin origin),
        "Show help for the given window (uses window.GetHelpAtPoint()
internally if applicable), return true if it was done or false if no
help available for this window.", "");
    

    
    DocDeclStr(
        void , AddHelp(wxWindow *window, const wxString& text),
        "Associates the text with the given window.", "");

    DocDeclStrName(
        void , AddHelp(wxWindowID id, const wxString& text),
        "This version associates the given text with all windows with this
id. May be used to set the same help string for all Cancel buttons in
the application, for example.", "",
        AddHelpById);

    DocDeclStr(
        void , RemoveHelp(wxWindow* window),
        "Removes the association between the window pointer and the help
text. This is called by the wx.Window destructor. Without this, the
table of help strings will fill up and when window pointers are
reused, the wrong help string will be found.", "");
    
    
    %pythonPrepend Destroy "args[0].this.own(False)"
    %extend { void Destroy() { delete self; } }
};

 
//----------------------------------------------------------------------

DocStr(wxSimpleHelpProvider,
"wx.SimpleHelpProvider is an implementation of `wx.HelpProvider` which
supports only plain text help strings, and shows the string associated
with the control (if any) in a tooltip.", "");

class wxSimpleHelpProvider : public wxHelpProvider
{
public:
    wxSimpleHelpProvider();
};


//----------------------------------------------------------------------

// TODO: Add this once the wxHelpController is in wxPython...

//  class WXDLLEXPORT wxHelpControllerHelpProvider : public wxSimpleHelpProvider
//  {
//  public:
//      wxHelpControllerHelpProvider(wxHelpController* hc = NULL);
//      void SetHelpController(wxHelpController* hc);
//      wxHelpController* GetHelpController();
//  };




//----------------------------------------------------------------------
//---------------------------------------------------------------------------