1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _html.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13class wxHtmlBookRecord 14{ 15 %Docstring 16 HtmlBookRecord(bookfile, basepath, title, start) 17 18 Helper class for wxHtmlHelpData. 19 %End 20 %TypeHeaderCode 21 #include <wx/html/helpdata.h> 22 %End 23 24public: 25 wxHtmlBookRecord( 26 const wxString & bookfile, 27 const wxString & basepath, 28 const wxString & title, 29 const wxString & start 30 ); 31 32 wxString GetBookFile() const; 33 %Docstring 34 GetBookFile() -> String 35 %End 36 37 wxString GetTitle() const; 38 %Docstring 39 GetTitle() -> String 40 %End 41 42 wxString GetStart() const; 43 %Docstring 44 GetStart() -> String 45 %End 46 47 wxString GetBasePath() const; 48 %Docstring 49 GetBasePath() -> String 50 %End 51 52 void SetContentsRange( 53 int start, 54 int end 55 ); 56 %Docstring 57 SetContentsRange(start, end) 58 %End 59 60 int GetContentsStart() const; 61 %Docstring 62 GetContentsStart() -> int 63 %End 64 65 int GetContentsEnd() const; 66 %Docstring 67 GetContentsEnd() -> int 68 %End 69 70 void SetTitle( 71 const wxString & title 72 ); 73 %Docstring 74 SetTitle(title) 75 %End 76 77 void SetBasePath( 78 const wxString & path 79 ); 80 %Docstring 81 SetBasePath(path) 82 %End 83 84 void SetStart( 85 const wxString & start 86 ); 87 %Docstring 88 SetStart(start) 89 %End 90 91 wxString GetFullPath( 92 const wxString & page 93 ) const; 94 %Docstring 95 GetFullPath(page) -> String 96 %End 97 98 public: 99 100 101 %Property(name=BasePath, get=GetBasePath, set=SetBasePath) 102 %Property(name=BookFile, get=GetBookFile) 103 %Property(name=ContentsEnd, get=GetContentsEnd) 104 %Property(name=ContentsStart, get=GetContentsStart) 105 %Property(name=Start, get=GetStart, set=SetStart) 106 %Property(name=Title, get=GetTitle, set=SetTitle) 107}; // end of class wxHtmlBookRecord 108 109 110class wxHtmlHelpDataItem 111{ 112 %Docstring 113 HtmlHelpDataItem() 114 115 Helper class for wxHtmlHelpData. 116 %End 117 %TypeHeaderCode 118 #include <wx/html/helpdata.h> 119 %End 120 121public: 122 wxHtmlHelpDataItem(); 123 124 int level; 125 126 wxHtmlHelpDataItem * parent; 127 128 int id; 129 130 wxString name; 131 132 wxString page; 133 134 wxHtmlBookRecord * book; 135 136 wxString GetFullPath() const; 137 %Docstring 138 GetFullPath() -> String 139 %End 140 141 wxString GetIndentedName() const; 142 %Docstring 143 GetIndentedName() -> String 144 %End 145 146 public: 147 148 149 %Property(name=FullPath, get=GetFullPath) 150 %Property(name=IndentedName, get=GetIndentedName) 151}; // end of class wxHtmlHelpDataItem 152 153 154class wxHtmlHelpData : wxObject 155{ 156 %Docstring 157 HtmlHelpData() 158 159 This class is used by wxHtmlHelpController and wxHtmlHelpFrame to 160 access HTML help items. 161 %End 162 %TypeHeaderCode 163 #include <wx/html/helpdata.h> 164 %End 165 166public: 167 wxHtmlHelpData(); 168 169 bool AddBook( 170 const wxString & book_url 171 ); 172 %Docstring 173 AddBook(book_url) -> bool 174 175 Adds new book. 176 %End 177 178 wxString FindPageById( 179 int id 180 ); 181 %Docstring 182 FindPageById(id) -> String 183 184 Returns page's URL based on integer ID stored in project. 185 %End 186 187 wxString FindPageByName( 188 const wxString & page 189 ); 190 %Docstring 191 FindPageByName(page) -> String 192 193 Returns page's URL based on its (file)name. 194 %End 195 196 const wxHtmlBookRecArray & GetBookRecArray() const; 197 %Docstring 198 GetBookRecArray() -> HtmlBookRecArray 199 200 Returns array with help books info. 201 %End 202 203 const wxHtmlHelpDataItems & GetContentsArray() const; 204 %Docstring 205 GetContentsArray() -> HtmlHelpDataItems 206 207 Returns reference to array with contents entries. 208 %End 209 210 const wxHtmlHelpDataItems & GetIndexArray() const; 211 %Docstring 212 GetIndexArray() -> HtmlHelpDataItems 213 214 Returns reference to array with index entries. 215 %End 216 217 void SetTempDir( 218 const wxString & path 219 ); 220 %Docstring 221 SetTempDir(path) 222 223 Sets the temporary directory where binary cached versions of MS HTML 224 Workshop files will be stored. 225 %End 226 227 private: 228 wxHtmlHelpData(const wxHtmlHelpData&); 229 230 231 public: 232 233 234 %Property(name=BookRecArray, get=GetBookRecArray) 235 %Property(name=ContentsArray, get=GetContentsArray) 236 %Property(name=IndexArray, get=GetIndexArray) 237}; // end of class wxHtmlHelpData 238 239 240class wxHtmlBookRecArray 241{ 242public: 243 SIP_SSIZE_T __len__(); 244 %MethodCode 245 sipRes = sipCpp->GetCount(); 246 %End 247 248 wxHtmlBookRecord& __getitem__(long index); 249 %MethodCode 250 if (0 > index) 251 index += sipCpp->GetCount(); 252 253 if ((index < sipCpp->GetCount()) && (0 <= index)) { 254 sipRes = &sipCpp->Item(index); 255 } 256 else { 257 wxPyErr_SetString(PyExc_IndexError, "sequence index out of range"); 258 sipError = sipErrorFail; 259 } 260 %End 261 262 263 int __contains__(wxHtmlBookRecord& obj); 264 %MethodCode 265 int idx = sipCpp->Index(*obj, false); 266 sipRes = idx != wxNOT_FOUND; 267 %End 268 269 void append(wxHtmlBookRecord& obj); 270 %MethodCode 271 sipCpp->Add(*obj); 272 %End 273 274 // TODO: add support for index(value, [start, [stop]]) 275 int index(wxHtmlBookRecord& obj); 276 %MethodCode 277 int idx = sipCpp->Index(*obj, false); 278 if (idx == wxNOT_FOUND) { 279 sipError = sipErrorFail; 280 wxPyErr_SetString(PyExc_ValueError, 281 "sequence.index(x): x not in sequence"); 282 } 283 sipRes = idx; 284 %End 285}; 286 287%Extract(id=pycode_html) 288def _HtmlBookRecArray___repr__(self): 289 return "HtmlBookRecArray: " + repr(list(self)) 290HtmlBookRecArray.__repr__ = _HtmlBookRecArray___repr__ 291del _HtmlBookRecArray___repr__ 292%End 293 294 295class wxHtmlHelpDataItems 296{ 297public: 298 SIP_SSIZE_T __len__(); 299 %MethodCode 300 sipRes = sipCpp->GetCount(); 301 %End 302 303 wxHtmlHelpDataItem& __getitem__(long index); 304 %MethodCode 305 if (0 > index) 306 index += sipCpp->GetCount(); 307 308 if ((index < sipCpp->GetCount()) && (0 <= index)) { 309 sipRes = &sipCpp->Item(index); 310 } 311 else { 312 wxPyErr_SetString(PyExc_IndexError, "sequence index out of range"); 313 sipError = sipErrorFail; 314 } 315 %End 316 317 318 int __contains__(wxHtmlHelpDataItem& obj); 319 %MethodCode 320 int idx = sipCpp->Index(*obj, false); 321 sipRes = idx != wxNOT_FOUND; 322 %End 323 324 void append(wxHtmlHelpDataItem& obj); 325 %MethodCode 326 sipCpp->Add(*obj); 327 %End 328 329 // TODO: add support for index(value, [start, [stop]]) 330 int index(wxHtmlHelpDataItem& obj); 331 %MethodCode 332 int idx = sipCpp->Index(*obj, false); 333 if (idx == wxNOT_FOUND) { 334 sipError = sipErrorFail; 335 wxPyErr_SetString(PyExc_ValueError, 336 "sequence.index(x): x not in sequence"); 337 } 338 sipRes = idx; 339 %End 340}; 341 342%Extract(id=pycode_html) 343def _HtmlHelpDataItems___repr__(self): 344 return "HtmlHelpDataItems: " + repr(list(self)) 345HtmlHelpDataItems.__repr__ = _HtmlHelpDataItems___repr__ 346del _HtmlHelpDataItems___repr__ 347%End 348 349 350 351//--------------------------------------------------------------------------- 352 353