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
13enum wxHtmlSelectionState
14{
15    wxHTML_SEL_OUT,
16    wxHTML_SEL_IN,
17    wxHTML_SEL_CHANGING
18};
19
20enum
21{
22    wxHTML_FIND_EXACT,
23    wxHTML_FIND_NEAREST_BEFORE,
24    wxHTML_FIND_NEAREST_AFTER
25};
26
27enum wxHtmlScriptMode
28{
29    wxHTML_SCRIPT_NORMAL,
30    wxHTML_SCRIPT_SUB,
31    wxHTML_SCRIPT_SUP
32};
33
34class wxHtmlSelection
35{
36    %Docstring
37        HtmlSelection()
38    %End
39    %TypeHeaderCode
40        #include <wx/html/htmlcell.h>
41    %End
42
43public:
44    wxHtmlSelection();
45
46    void Set(
47        const wxPoint & fromPos,
48        const wxHtmlCell * fromCell,
49        const wxPoint & toPos,
50        const wxHtmlCell * toCell
51    );
52    %Docstring
53        Set(fromPos, fromCell, toPos, toCell)
54        Set(fromCell, toCell)
55    %End
56
57    void Set(
58        const wxHtmlCell * fromCell,
59        const wxHtmlCell * toCell
60    );
61
62    const wxHtmlCell * GetFromCell() const;
63    %Docstring
64        GetFromCell() -> HtmlCell
65    %End
66
67    const wxHtmlCell * GetToCell() const;
68    %Docstring
69        GetToCell() -> HtmlCell
70    %End
71
72    const wxPoint & GetFromPos() const;
73    %Docstring
74        GetFromPos() -> wx.Point
75    %End
76
77    const wxPoint & GetToPos() const;
78    %Docstring
79        GetToPos() -> wx.Point
80    %End
81
82    void ClearFromToCharacterPos();
83    %Docstring
84        ClearFromToCharacterPos()
85    %End
86
87    bool AreFromToCharacterPosSet() const;
88    %Docstring
89        AreFromToCharacterPosSet() -> bool
90    %End
91
92    void SetFromCharacterPos(
93        wxCoord pos
94    );
95    %Docstring
96        SetFromCharacterPos(pos)
97    %End
98
99    void SetToCharacterPos(
100        wxCoord pos
101    );
102    %Docstring
103        SetToCharacterPos(pos)
104    %End
105
106    wxCoord GetFromCharacterPos() const;
107    %Docstring
108        GetFromCharacterPos() -> Coord
109    %End
110
111    wxCoord GetToCharacterPos() const;
112    %Docstring
113        GetToCharacterPos() -> Coord
114    %End
115
116    bool IsEmpty() const;
117    %Docstring
118        IsEmpty() -> bool
119    %End
120
121    public:
122
123
124    %Property(name=FromCell, get=GetFromCell)
125    %Property(name=FromCharacterPos, get=GetFromCharacterPos, set=SetFromCharacterPos)
126    %Property(name=FromPos, get=GetFromPos)
127    %Property(name=ToCell, get=GetToCell)
128    %Property(name=ToCharacterPos, get=GetToCharacterPos, set=SetToCharacterPos)
129    %Property(name=ToPos, get=GetToPos)
130};  // end of class wxHtmlSelection
131
132
133class wxHtmlRenderingState
134{
135    %Docstring
136        HtmlRenderingState()
137
138        Selection state is passed to wxHtmlCell::Draw so that it can render
139        itself differently e.g.
140    %End
141    %TypeHeaderCode
142        #include <wx/html/htmlcell.h>
143    %End
144
145public:
146    wxHtmlRenderingState();
147
148    void SetSelectionState(
149        wxHtmlSelectionState s
150    );
151    %Docstring
152        SetSelectionState(s)
153    %End
154
155    wxHtmlSelectionState GetSelectionState() const;
156    %Docstring
157        GetSelectionState() -> HtmlSelectionState
158    %End
159
160    void SetFgColour(
161        const wxColour & c
162    );
163    %Docstring
164        SetFgColour(c)
165    %End
166
167    const wxColour & GetFgColour() const;
168    %Docstring
169        GetFgColour() -> wx.Colour
170    %End
171
172    void SetBgColour(
173        const wxColour & c
174    );
175    %Docstring
176        SetBgColour(c)
177    %End
178
179    const wxColour & GetBgColour() const;
180    %Docstring
181        GetBgColour() -> wx.Colour
182    %End
183
184    void SetBgMode(
185        int m
186    );
187    %Docstring
188        SetBgMode(m)
189    %End
190
191    int GetBgMode() const;
192    %Docstring
193        GetBgMode() -> int
194    %End
195
196    public:
197
198
199    %Property(name=BgColour, get=GetBgColour, set=SetBgColour)
200    %Property(name=BgMode, get=GetBgMode, set=SetBgMode)
201    %Property(name=FgColour, get=GetFgColour, set=SetFgColour)
202    %Property(name=SelectionState, get=GetSelectionState, set=SetSelectionState)
203};  // end of class wxHtmlRenderingState
204
205
206class wxHtmlRenderingStyle
207{
208    %Docstring
209        wxHtmlSelection is data holder with information about text selection.
210    %End
211    %TypeHeaderCode
212        #include <wx/html/htmlcell.h>
213    %End
214
215public:
216    virtual
217    wxColour GetSelectedTextColour(
218        const wxColour & clr
219    ) = 0;
220    %Docstring
221        GetSelectedTextColour(clr) -> wx.Colour
222
223        Returns the colour to use for the selected text.
224    %End
225
226    virtual
227    wxColour GetSelectedTextBgColour(
228        const wxColour & clr
229    ) = 0;
230    %Docstring
231        GetSelectedTextBgColour(clr) -> wx.Colour
232
233        Returns the colour to use for the selected text's background.
234    %End
235
236};  // end of class wxHtmlRenderingStyle
237
238
239class wxHtmlRenderingInfo
240{
241    %Docstring
242        HtmlRenderingInfo()
243
244        This class contains information given to cells when drawing them.
245    %End
246    %TypeHeaderCode
247        #include <wx/html/htmlcell.h>
248    %End
249
250public:
251    wxHtmlRenderingInfo();
252
253    void SetSelection(
254        wxHtmlSelection * s
255    );
256    %Docstring
257        SetSelection(s)
258
259        Accessors.
260    %End
261
262    wxHtmlSelection * GetSelection() const;
263    %Docstring
264        GetSelection() -> HtmlSelection
265
266        Accessors.
267    %End
268
269    void SetStyle(
270        wxHtmlRenderingStyle * style
271    );
272    %Docstring
273        SetStyle(style)
274
275        Accessors.
276    %End
277
278    wxHtmlRenderingStyle & GetStyle();
279    %Docstring
280        GetStyle() -> HtmlRenderingStyle
281
282        Accessors.
283    %End
284
285    wxHtmlRenderingState & GetState();
286    %Docstring
287        GetState() -> HtmlRenderingState
288
289        Accessors.
290    %End
291
292    public:
293
294
295    %Property(name=Selection, get=GetSelection, set=SetSelection)
296    %Property(name=State, get=GetState)
297    %Property(name=Style, get=GetStyle, set=SetStyle)
298};  // end of class wxHtmlRenderingInfo
299
300
301class wxHtmlCell : wxObject
302{
303    %Docstring
304        HtmlCell()
305
306        Internal data structure.
307    %End
308    %TypeHeaderCode
309        #include <wx/html/htmlcell.h>
310    %End
311
312public:
313    wxHtmlCell();
314
315    virtual
316    bool AdjustPagebreak(
317        int * pagebreak   /In, Out/,
318        const wxArrayInt & known_pagebreaks,
319        int pageHeight
320    ) const;
321    %Docstring
322        AdjustPagebreak(pagebreak, known_pagebreaks, pageHeight) -> (bool, pagebreak)
323
324        This method is used to adjust pagebreak position.
325    %End
326
327    virtual
328    void Draw(
329        wxDC & dc,
330        int x,
331        int y,
332        int view_y1,
333        int view_y2,
334        wxHtmlRenderingInfo & info
335    );
336    %Docstring
337        Draw(dc, x, y, view_y1, view_y2, info)
338
339        Renders the cell.
340    %End
341
342    virtual
343    void DrawInvisible(
344        wxDC & dc,
345        int x,
346        int y,
347        wxHtmlRenderingInfo & info
348    );
349    %Docstring
350        DrawInvisible(dc, x, y, info)
351
352        This method is called instead of Draw() when the cell is certainly out
353        of the screen (and thus invisible).
354    %End
355
356    virtual
357    const wxHtmlCell * Find(
358        int condition,
359        const char* param
360    ) const [ const wxHtmlCell* (int condition, const void* param) ];
361    %Docstring
362        Find(condition, param) -> HtmlCell
363
364        Returns pointer to itself if this cell matches condition (or if any of
365        the cells following in the list matches), NULL otherwise.
366    %End
367
368    virtual
369    wxHtmlCell * FindCellByPos(
370        wxCoord x,
371        wxCoord y,
372        unsigned flags = wxHTML_FIND_EXACT
373    ) const;
374    %Docstring
375        FindCellByPos(x, y, flags=HTML_FIND_EXACT) -> HtmlCell
376
377        Find a cell inside this cell positioned at the given coordinates
378        (relative to this's positions).
379    %End
380
381    int GetDescent() const;
382    %Docstring
383        GetDescent() -> int
384
385        Returns descent value of the cell (m_Descent member).
386    %End
387
388    virtual
389    wxHtmlCell * GetFirstChild() const;
390    %Docstring
391        GetFirstChild() -> HtmlCell
392
393        Returns pointer to the first cell in the list.
394    %End
395
396    int GetHeight() const;
397    %Docstring
398        GetHeight() -> int
399
400        Returns height of the cell (m_Height member).
401    %End
402
403    const wxString & GetId() const;
404    %Docstring
405        GetId() -> String
406
407        Returns unique cell identifier if there is any, the empty string
408        otherwise.
409    %End
410
411    virtual
412    wxHtmlLinkInfo * GetLink(
413        int x = 0,
414        int y = 0
415    ) const;
416    %Docstring
417        GetLink(x=0, y=0) -> HtmlLinkInfo
418
419        Returns hypertext link if associated with this cell or NULL otherwise.
420    %End
421
422    virtual
423    wxCursor GetMouseCursor(
424        wxHtmlWindowInterface * window
425    ) const;
426    %Docstring
427        GetMouseCursor(window) -> wx.Cursor
428
429        Returns cursor to show when mouse pointer is over the cell.
430    %End
431
432    virtual
433    wxCursor GetMouseCursorAt(
434        wxHtmlWindowInterface * window,
435        const wxPoint & rePos
436    ) const;
437    %Docstring
438        GetMouseCursorAt(window, rePos) -> wx.Cursor
439
440        Returns cursor to show when mouse pointer is over the specified point.
441    %End
442
443    wxHtmlCell * GetNext() const;
444    %Docstring
445        GetNext() -> HtmlCell
446
447        Returns pointer to the next cell in list (see htmlcell.h if you're
448        interested in details).
449    %End
450
451    wxHtmlContainerCell * GetParent() const;
452    %Docstring
453        GetParent() -> HtmlContainerCell
454
455        Returns pointer to parent container.
456    %End
457
458    int GetPosX() const;
459    %Docstring
460        GetPosX() -> int
461
462        Returns X position within parent (the value is relative to parent's
463        upper left corner).
464    %End
465
466    int GetPosY() const;
467    %Docstring
468        GetPosY() -> int
469
470        Returns Y position within parent (the value is relative to parent's
471        upper left corner).
472    %End
473
474    int GetWidth() const;
475    %Docstring
476        GetWidth() -> int
477
478        Returns width of the cell (m_Width member).
479    %End
480
481    virtual
482    void Layout(
483        int w
484    );
485    %Docstring
486        Layout(w)
487
488        Layouts the cell.
489    %End
490
491    virtual
492    bool ProcessMouseClick(
493        wxHtmlWindowInterface * window,
494        const wxPoint & pos,
495        const wxMouseEvent & event
496    );
497    %Docstring
498        ProcessMouseClick(window, pos, event) -> bool
499
500        This function is simple event handler.
501    %End
502
503    void SetId(
504        const wxString & id
505    );
506    %Docstring
507        SetId(id)
508
509        Sets unique cell identifier.
510    %End
511
512    void SetLink(
513        const wxHtmlLinkInfo & link
514    );
515    %Docstring
516        SetLink(link)
517
518        Sets the hypertext link associated with this cell.
519    %End
520
521    void SetNext(
522        wxHtmlCell * cell   /Transfer/
523    );
524    %Docstring
525        SetNext(cell)
526
527        Sets the next cell in the list.
528    %End
529
530    void SetParent(
531        wxHtmlContainerCell * p
532    );
533    %Docstring
534        SetParent(p)
535
536        Sets parent container of this cell.
537    %End
538
539    virtual
540    void SetPos(
541        int x,
542        int y
543    );
544    %Docstring
545        SetPos(x, y)
546
547        Sets the cell's position within parent container.
548    %End
549
550    virtual
551    wxString ConvertToText(
552        wxHtmlSelection * sel
553    ) const;
554    %Docstring
555        ConvertToText(sel) -> String
556
557        Converts the cell into text representation.
558    %End
559
560    private:
561        wxHtmlCell(const wxHtmlCell&);
562
563
564    wxPoint GetAbsPos(
565        wxHtmlCell* rootCell = NULL
566    ) const;
567    %Docstring
568        GetAbsPos(rootCell=None) -> wx.Point
569    %End
570
571    wxHtmlCell* GetRootCell() const;
572    %Docstring
573        GetRootCell() -> HtmlCell
574    %End
575
576    public:
577
578
579    %Property(name=AbsPos, get=GetAbsPos)
580    %Property(name=Descent, get=GetDescent)
581    %Property(name=FirstChild, get=GetFirstChild)
582    %Property(name=Height, get=GetHeight)
583    %Property(name=Id, get=GetId, set=SetId)
584    %Property(name=Link, get=GetLink, set=SetLink)
585    %Property(name=Next, get=GetNext, set=SetNext)
586    %Property(name=Parent, get=GetParent, set=SetParent)
587    %Property(name=PosX, get=GetPosX)
588    %Property(name=PosY, get=GetPosY)
589    %Property(name=RootCell, get=GetRootCell)
590    %Property(name=Width, get=GetWidth)
591};  // end of class wxHtmlCell
592
593
594class wxHtmlContainerCell : wxHtmlCell
595{
596    %Docstring
597        HtmlContainerCell(parent)
598
599        The wxHtmlContainerCell class is an implementation of a cell that may
600        contain more cells in it.
601    %End
602    %TypeHeaderCode
603        #include <wx/html/htmlcell.h>
604    %End
605
606public:
607    wxHtmlContainerCell(
608        wxHtmlContainerCell * parent
609    );
610
611    int GetAlignHor() const;
612    %Docstring
613        GetAlignHor() -> int
614
615        Returns container's horizontal alignment.
616    %End
617
618    int GetAlignVer() const;
619    %Docstring
620        GetAlignVer() -> int
621
622        Returns container's vertical alignment.
623    %End
624
625    wxColour GetBackgroundColour();
626    %Docstring
627        GetBackgroundColour() -> wx.Colour
628
629        Returns the background colour of the container or wxNullColour if no
630        background colour is set.
631    %End
632
633    int GetIndent(
634        int ind
635    ) const;
636    %Docstring
637        GetIndent(ind) -> int
638
639        Returns the indentation.
640    %End
641
642    int GetIndentUnits(
643        int ind
644    ) const;
645    %Docstring
646        GetIndentUnits(ind) -> int
647
648        Returns the units of indentation for ind where ind is one of the
649        wxHTML_INDENT_* constants.
650    %End
651
652    void InsertCell(
653        wxHtmlCell * cell   /Transfer/
654    );
655    %Docstring
656        InsertCell(cell)
657
658        Inserts a new cell into the container.
659    %End
660
661    void SetAlign(
662        const wxHtmlTag & tag
663    );
664    %Docstring
665        SetAlign(tag)
666
667        Sets the container's alignment (both horizontal and vertical)
668        according to the values stored in tag.
669    %End
670
671    void SetAlignHor(
672        int al
673    );
674    %Docstring
675        SetAlignHor(al)
676
677        Sets the container's horizontal alignment.
678    %End
679
680    void SetAlignVer(
681        int al
682    );
683    %Docstring
684        SetAlignVer(al)
685
686        Sets the container's vertical alignment.
687    %End
688
689    void SetBackgroundColour(
690        const wxColour & clr
691    );
692    %Docstring
693        SetBackgroundColour(clr)
694
695        Sets the background colour for this container.
696    %End
697
698    void SetBorder(
699        const wxColour & clr1,
700        const wxColour & clr2,
701        int border = 1
702    );
703    %Docstring
704        SetBorder(clr1, clr2, border=1)
705
706        Sets the border (frame) colours.
707    %End
708
709    void SetIndent(
710        int i,
711        int what,
712        int units = wxHTML_UNITS_PIXELS
713    );
714    %Docstring
715        SetIndent(i, what, units=HTML_UNITS_PIXELS)
716
717        Sets the indentation (free space between borders of container and
718        subcells).
719    %End
720
721    void SetMinHeight(
722        int h,
723        int align = wxHTML_ALIGN_TOP
724    );
725    %Docstring
726        SetMinHeight(h, align=HTML_ALIGN_TOP)
727
728        Sets minimal height of the container.
729    %End
730
731    void SetWidthFloat(
732        int w,
733        int units
734    );
735    %Docstring
736        SetWidthFloat(w, units)
737        SetWidthFloat(tag, pixel_scale=1.0)
738
739        Sets floating width adjustment.
740    %End
741
742    void SetWidthFloat(
743        const wxHtmlTag & tag,
744        double pixel_scale = 1.0
745    );
746
747            virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info);
748            virtual void DrawInvisible(wxDC& dc, int x , int y, wxHtmlRenderingInfo& info);
749            virtual wxCursor GetMouseCursor(wxHtmlWindowInterface* window) const;
750            virtual void Layout(int w);
751
752
753    public:
754
755
756    %Property(name=AlignHor, get=GetAlignHor, set=SetAlignHor)
757    %Property(name=AlignVer, get=GetAlignVer, set=SetAlignVer)
758    %Property(name=BackgroundColour, get=GetBackgroundColour, set=SetBackgroundColour)
759};  // end of class wxHtmlContainerCell
760
761
762class wxHtmlLinkInfo : wxObject
763{
764    %Docstring
765        HtmlLinkInfo()
766        HtmlLinkInfo(href, target=wx.EmptyString)
767
768        This class stores all necessary information about hypertext links (as
769        represented by <A> tag in HTML documents).
770    %End
771    %TypeHeaderCode
772        #include <wx/html/htmlcell.h>
773    %End
774
775public:
776    wxHtmlLinkInfo();
777
778    wxHtmlLinkInfo(
779        const wxString & href,
780        const wxString & target = wxEmptyString
781    );
782
783    const wxMouseEvent * GetEvent() const;
784    %Docstring
785        GetEvent() -> wx.MouseEvent
786
787        Return pointer to event that generated OnLinkClicked() event.
788    %End
789
790    wxString GetHref() const;
791    %Docstring
792        GetHref() -> String
793
794        Return HREF value of the <A> tag.
795    %End
796
797    const wxHtmlCell * GetHtmlCell() const;
798    %Docstring
799        GetHtmlCell() -> HtmlCell
800
801        Return pointer to the cell that was clicked.
802    %End
803
804    wxString GetTarget() const;
805    %Docstring
806        GetTarget() -> String
807
808        Return TARGET value of the <A> tag (this value is used to specify in
809        which frame should be the page pointed by GetHref() Href opened).
810    %End
811
812    public:
813
814
815    %Property(name=Event, get=GetEvent)
816    %Property(name=Href, get=GetHref)
817    %Property(name=HtmlCell, get=GetHtmlCell)
818    %Property(name=Target, get=GetTarget)
819};  // end of class wxHtmlLinkInfo
820
821
822class wxHtmlColourCell : wxHtmlCell
823{
824    %Docstring
825        HtmlColourCell(clr, flags=HTML_CLR_FOREGROUND)
826
827        This cell changes the colour of either the background or the
828        foreground.
829    %End
830    %TypeHeaderCode
831        #include <wx/html/htmlcell.h>
832    %End
833
834public:
835    wxHtmlColourCell(
836        const wxColour & clr,
837        int flags = wxHTML_CLR_FOREGROUND
838    );
839
840            virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info);
841            virtual void DrawInvisible(wxDC& dc, int x , int y, wxHtmlRenderingInfo& info);
842            virtual wxCursor GetMouseCursor(wxHtmlWindowInterface* window) const;
843            virtual void Layout(int w);
844
845
846};  // end of class wxHtmlColourCell
847
848
849class wxHtmlWidgetCell : wxHtmlCell
850{
851    %Docstring
852        HtmlWidgetCell(wnd, w=0)
853
854        wxHtmlWidgetCell is a class that provides a connection between HTML
855        cells and widgets (an object derived from wxWindow).
856    %End
857    %TypeHeaderCode
858        #include <wx/html/htmlcell.h>
859    %End
860
861public:
862    wxHtmlWidgetCell(
863        wxWindow * wnd,
864        int w = 0
865    );
866
867            virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info);
868            virtual void DrawInvisible(wxDC& dc, int x , int y, wxHtmlRenderingInfo& info);
869            virtual wxCursor GetMouseCursor(wxHtmlWindowInterface* window) const;
870            virtual void Layout(int w);
871
872
873};  // end of class wxHtmlWidgetCell
874
875
876class wxHtmlWordCell : wxHtmlCell
877{
878    %Docstring
879        HtmlWordCell(word, dc)
880
881        This html cell represents a single word or text fragment in the
882        document stream.
883    %End
884    %TypeHeaderCode
885        #include <wx/html/htmlcell.h>
886    %End
887
888public:
889    wxHtmlWordCell(
890        const wxString & word,
891        const wxDC & dc
892    );
893
894            virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info);
895            virtual void DrawInvisible(wxDC& dc, int x , int y, wxHtmlRenderingInfo& info);
896            virtual wxCursor GetMouseCursor(wxHtmlWindowInterface* window) const;
897            virtual void Layout(int w);
898
899
900};  // end of class wxHtmlWordCell
901
902
903class wxHtmlWordWithTabsCell : wxHtmlWordCell
904{
905    %Docstring
906        HtmlWordWithTabsCell(word, wordOrig, linepos, dc)
907
908        wxHtmlWordCell is a specialization for storing text fragments with
909        embedded tab characters.
910    %End
911    %TypeHeaderCode
912        #include <wx/html/htmlcell.h>
913    %End
914
915public:
916    wxHtmlWordWithTabsCell(
917        const wxString & word,
918        const wxString & wordOrig,
919        size_t linepos,
920        const wxDC & dc
921    );
922
923            virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info);
924            virtual void DrawInvisible(wxDC& dc, int x , int y, wxHtmlRenderingInfo& info);
925            virtual wxCursor GetMouseCursor(wxHtmlWindowInterface* window) const;
926            virtual void Layout(int w);
927
928
929};  // end of class wxHtmlWordWithTabsCell
930
931
932class wxHtmlFontCell : wxHtmlCell
933{
934    %Docstring
935        HtmlFontCell(font)
936
937        This cell represents a font change in the document stream.
938    %End
939    %TypeHeaderCode
940        #include <wx/html/htmlcell.h>
941    %End
942
943public:
944    wxHtmlFontCell(
945        wxFont * font
946    );
947
948            virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info);
949            virtual void DrawInvisible(wxDC& dc, int x , int y, wxHtmlRenderingInfo& info);
950            virtual wxCursor GetMouseCursor(wxHtmlWindowInterface* window) const;
951            virtual void Layout(int w);
952
953
954};  // end of class wxHtmlFontCell
955
956
957
958//---------------------------------------------------------------------------
959
960