1 #############################################################################
2 ## Name: ext/html/XS/HtmlCell.xsp
3 ## Purpose: XS++ for Wx::HtmlCell and derived classes
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: HtmlCell.xsp 2079 2007-07-08 21:18:04Z mbarbon $
8 ## Copyright: (c) 2003-2004, 2006 Mattia Barbon
9 ## Licence: This program is free software; you can redistribute it and/or
10 ## modify it under the same terms as Perl itself
11 #############################################################################
16 #include <wx/html/htmlcell.h>
19 %name{Wx::HtmlCell} class wxHtmlCell
22 void Destroy() %code{% delete THIS; %};
24 void SetParent(wxHtmlContainerCell *p);
25 wxHtmlContainerCell *GetParent() const;
30 int GetHeight() const;
31 int GetDescent() const;
33 #if WXPERL_W_VERSION_GE( 2, 5, 1 )
34 bool IsFormattingCell() const;
37 const wxString& GetId() const;
38 void SetId(const wxString& id);
40 wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const;
41 #if WXPERL_W_VERSION_GE( 2, 5, 1 ) && WXPERL_W_VERSION_LT( 2, 7, 0 )
42 wxCursor GetCursor() const;
44 wxHtmlCell *GetNext() const;
45 #if WXPERL_W_VERSION_GE( 2, 5, 1 )
46 wxHtmlCell* GetFirstChild() const;
48 void SetPos(int x, int y);
49 void SetLink(const wxHtmlLinkInfo& link);
50 void SetNext(wxHtmlCell *cell);
53 ## void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
54 ## wxHtmlRenderingInfo& info);
55 ## void DrawInvisible(wxDC& dc, int x, int y, wxHtmlRenderingInfo& info);
57 ## const wxHtmlCell* Find(int condition, const void* param) const;
58 ## void OnMouseClick(wxWindow *parent, int x, int y,
59 ## const wxMouseEvent& event);
60 ## bool AdjustPagebreak(int *pagebreak, int *known_pagebreaks = NULL,
61 ## int number_of_pages = 0) const;
62 void SetCanLiveOnPagebreak(bool can);
64 #if WXPERL_W_VERSION_GE( 2, 5, 1 )
65 bool IsLinebreakAllowed() const;
67 bool IsTerminalCell() const;
69 #if WXPERL_W_VERSION_GE( 2, 5, 1 )
70 wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y,
71 unsigned flags = wxHTML_FIND_EXACT) const;
72 wxPoint GetAbsPos() const;
74 wxHtmlCell *GetFirstTerminal() const;
75 wxHtmlCell *GetLastTerminal() const;
77 unsigned GetDepth() const;
78 bool IsBefore(wxHtmlCell *cell) const;
80 wxString ConvertToText(wxHtmlSelection *sel) const;
82 wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y) const;
86 %name{Wx::HtmlWordCell} class wxHtmlWordCell
88 ## wxHtmlWordCell(const wxString& word, wxDC& dc);
90 #if WXPERL_W_VERSION_GE( 2, 5, 1 )
91 void SetPreviousWord(wxHtmlWordCell *cell);
95 %name{Wx::HtmlContainerCell} class wxHtmlContainerCell
97 wxHtmlContainerCell(wxHtmlContainerCell *parent);
99 void InsertCell(wxHtmlCell *cell);
101 void SetAlignHor(int al);
102 int GetAlignHor() const;
103 void SetAlignVer(int al);
104 int GetAlignVer() const;
106 void SetIndent(int i, int what, int units = wxHTML_UNITS_PIXELS);
107 int GetIndent(int ind) const;
108 int GetIndentUnits(int ind) const;
110 void SetAlign(const wxHtmlTag& tag);
111 void SetWidthFloat(int w, int units);
112 %name{SetWidthFloatTag} void SetWidthFloat(const wxHtmlTag& tag,
113 double pixel_scale = 1.0);
114 void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP);
116 void SetBackgroundColour(const wxColour& clr);
117 wxColour GetBackgroundColour();
118 void SetBorder(const wxColour& clr1, const wxColour& clr2);
120 #if WXPERL_W_VERSION_GE( 2, 5, 1 )
121 void RemoveExtraSpacing(bool top, bool bottom);
125 %name{Wx::HtmlColourCell} class wxHtmlColourCell
127 wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND);
130 %name{Wx::HtmlFontCell} class wxHtmlFontCell
132 wxHtmlFontCell(wxFont *font);
135 %name{Wx::HtmlWidgetCell} class wxHtmlWidgetCell
137 wxHtmlWidgetCell(wxWindow* window, int w = 0);