File: HtmlCell.xsp

package info (click to toggle)
libwx-perl 1%3A0.9909-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,912 kB
  • sloc: cpp: 9,728; perl: 8,182; ansic: 626; makefile: 41
file content (138 lines) | stat: -rw-r--r-- 4,139 bytes parent folder | download | duplicates (7)
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
#############################################################################
## Name:        ext/html/XS/HtmlCell.xsp
## Purpose:     XS++ for Wx::HtmlCell and derived classes
## Author:      Mattia Barbon
## Modified by:
## Created:     13/12/2003
## RCS-ID:      $Id: HtmlCell.xsp 2079 2007-07-08 21:18:04Z mbarbon $
## Copyright:   (c) 2003-2004, 2006 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

%module{Wx};

%{
#include <wx/html/htmlcell.h>
%}

%name{Wx::HtmlCell} class wxHtmlCell
{
    wxHtmlCell();
    void Destroy() %code{%  delete THIS; %};

    void SetParent(wxHtmlContainerCell *p);
    wxHtmlContainerCell *GetParent() const;

    int GetPosX() const;
    int GetPosY() const;
    int GetWidth() const;
    int GetHeight() const;
    int GetDescent() const;

#if WXPERL_W_VERSION_GE( 2, 5, 1 )
    bool IsFormattingCell() const;
#endif

    const wxString& GetId() const;
    void SetId(const wxString& id);

    wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const;
#if WXPERL_W_VERSION_GE( 2, 5, 1 ) && WXPERL_W_VERSION_LT( 2, 7, 0 )
    wxCursor GetCursor() const;
#endif
    wxHtmlCell *GetNext() const;
#if WXPERL_W_VERSION_GE( 2, 5, 1 )
    wxHtmlCell* GetFirstChild() const;
#endif
    void SetPos(int x, int y);
    void SetLink(const wxHtmlLinkInfo& link);
    void SetNext(wxHtmlCell *cell);

    void Layout(int w);
##    void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
##              wxHtmlRenderingInfo& info);
##    void DrawInvisible(wxDC& dc, int x, int y, wxHtmlRenderingInfo& info);

##    const wxHtmlCell* Find(int condition, const void* param) const;
##    void OnMouseClick(wxWindow *parent, int x, int y,
##                      const wxMouseEvent& event);
##    bool AdjustPagebreak(int *pagebreak, int *known_pagebreaks = NULL,
##                         int number_of_pages = 0) const;
    void SetCanLiveOnPagebreak(bool can);

#if WXPERL_W_VERSION_GE( 2, 5, 1 )
    bool IsLinebreakAllowed() const;
#endif
    bool IsTerminalCell() const;

#if WXPERL_W_VERSION_GE( 2, 5, 1 )
    wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y,
                              unsigned flags = wxHTML_FIND_EXACT) const;
    wxPoint GetAbsPos() const;

    wxHtmlCell *GetFirstTerminal() const;
    wxHtmlCell *GetLastTerminal() const;

    unsigned GetDepth() const;
    bool IsBefore(wxHtmlCell *cell) const;

    wxString ConvertToText(wxHtmlSelection *sel) const;
#else
    wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y) const;
#endif
};

%name{Wx::HtmlWordCell} class wxHtmlWordCell
{
##    wxHtmlWordCell(const wxString& word, wxDC& dc);

#if WXPERL_W_VERSION_GE( 2, 5, 1 )
    void SetPreviousWord(wxHtmlWordCell *cell);
#endif
};

%name{Wx::HtmlContainerCell} class wxHtmlContainerCell
{
    wxHtmlContainerCell(wxHtmlContainerCell *parent);

    void InsertCell(wxHtmlCell *cell);

    void SetAlignHor(int al);
    int GetAlignHor() const;
    void SetAlignVer(int al);
    int GetAlignVer() const;

    void SetIndent(int i, int what, int units = wxHTML_UNITS_PIXELS);
    int GetIndent(int ind) const;
    int GetIndentUnits(int ind) const;

    void SetAlign(const wxHtmlTag& tag);
    void SetWidthFloat(int w, int units);
    %name{SetWidthFloatTag} void SetWidthFloat(const wxHtmlTag& tag,
                                               double pixel_scale = 1.0);
    void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP);

    void SetBackgroundColour(const wxColour& clr);
    wxColour GetBackgroundColour();
    void SetBorder(const wxColour& clr1, const wxColour& clr2);

#if WXPERL_W_VERSION_GE( 2, 5, 1 )
    void RemoveExtraSpacing(bool top, bool bottom);
#endif
};

%name{Wx::HtmlColourCell} class wxHtmlColourCell
{
    wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND);
};

%name{Wx::HtmlFontCell} class wxHtmlFontCell
{
    wxHtmlFontCell(wxFont *font);
};

%name{Wx::HtmlWidgetCell} class wxHtmlWidgetCell
{
    wxHtmlWidgetCell(wxWindow* window, int w = 0);
};