Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / richtext / XS / RichTextStyleCtrl.xsp
1 #############################################################################
2 ## Name:        ext/richtext/XS/RichTextStyleCtrl.xsp
3 ## Purpose:     XS++ for Wx::RichText*Style* selection controls
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     12/11/2006
7 ## RCS-ID:      $Id: RichTextStyleCtrl.xsp 2315 2008-01-18 21:47:17Z mbarbon $
8 ## Copyright:   (c) 2006-2008 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 #############################################################################
12
13 #include <wx/checkbox.h>
14 #include <wx/richtext/richtextstyles.h>
15
16 %module{Wx};
17
18 %name{Wx::RichTextStyleListBox} class wxRichTextStyleListBox
19 {
20 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
21     %name{newDefault} wxRichTextStyleListBox();
22 #endif
23     %name{newFull} wxRichTextStyleListBox
24         ( wxWindow* parent, wxWindowID id = wxID_ANY,
25           const wxPoint& pos = wxDefaultPosition,
26           const wxSize& size = wxDefaultSize, long style = 0 );
27 %{
28 void
29 wxRichTextStyleListBox::new( ... )
30   PPCODE:
31     BEGIN_OVERLOAD()
32         MATCH_VOIDM_REDISP( newDefault )
33         MATCH_ANY_REDISP( newFull )
34     END_OVERLOAD( "Wx::RichTextStyleListBox::new" )
35 %}
36
37     bool Create( wxWindow* parent, wxWindowID id = wxID_ANY,
38                  const wxPoint& pos = wxDefaultPosition,
39                  const wxSize& size = wxDefaultSize, long style = 0 );
40
41     void SetStyleSheet( wxRichTextStyleSheet* styleSheet );
42     wxRichTextStyleSheetDisown* GetStyleSheet() const;
43     void SetRichTextCtrl( wxRichTextCtrl* ctrl );
44     wxRichTextCtrl* GetRichTextCtrl() const;
45     wxRichTextStyleDefinitionDisown* GetStyle( size_t i ) const;
46 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
47     int GetIndexForStyle( const wxString& name ) const;
48     int SetStyleSelection( const wxString& name );
49 #endif
50     void UpdateStyles();
51 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
52     void ApplyStyle( int i );
53     void SetApplyOnSelection( bool applyOnSel );
54     bool GetApplyOnSelection() const;
55 #endif
56 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
57     void SetStyleType( wxPliRichTextStyleType styleType );
58     wxPliRichTextStyleType GetStyleType() const;
59 #endif
60     int ConvertTenthsMMToPixels( wxDC& dc, int units ) const;
61     wxString CreateHTML( wxRichTextStyleDefinition* def ) const;
62 };
63
64 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
65
66 %name{Wx::RichTextStyleListCtrl} class wxRichTextStyleListCtrl
67 {
68     %name{newDefault} wxRichTextStyleListCtrl();
69     %name{newFull} wxRichTextStyleListCtrl
70         ( wxWindow* parent, wxWindowID id = wxID_ANY,
71           const wxPoint& pos = wxDefaultPosition,
72           const wxSize& size = wxDefaultSize, long style = 0 );
73 %{
74 void
75 wxRichTextStyleListCtrl::new( ... )
76   PPCODE:
77     BEGIN_OVERLOAD()
78         MATCH_VOIDM_REDISP( newDefault )
79         MATCH_ANY_REDISP( newFull )
80     END_OVERLOAD( "Wx::RichTextStyleListCtrl::new" )
81 %}
82
83     bool Create( wxWindow* parent, wxWindowID id = wxID_ANY,
84                  const wxPoint& pos = wxDefaultPosition,
85                  const wxSize& size = wxDefaultSize, long style = 0 );
86
87     void SetStyleSheet( wxRichTextStyleSheet* styleSheet );
88     wxRichTextStyleSheetDisown* GetStyleSheet() const;
89     void SetRichTextCtrl( wxRichTextCtrl* ctrl );
90     wxRichTextCtrl* GetRichTextCtrl() const;
91     void UpdateStyles();
92
93     void SetStyleType( wxPliRichTextStyleType styleType );
94     wxPliRichTextStyleType GetStyleType() const;
95     int StyleTypeToIndex( wxPliRichTextStyleType styleType );
96     wxPliRichTextStyleType StyleIndexToType( int i );
97
98     wxRichTextStyleListBox* GetStyleListBox() const;
99     wxChoice* GetStyleChoice() const;
100 };
101
102 #endif
103
104 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
105
106 %name{Wx::RichTextStyleComboCtrl} class wxRichTextStyleComboCtrl
107 {
108     %name{newDefault} wxRichTextStyleComboCtrl();
109     %name{newFull} wxRichTextStyleComboCtrl
110         ( wxWindow* parent, wxWindowID id = wxID_ANY,
111           const wxPoint& pos = wxDefaultPosition,
112           const wxSize& size = wxDefaultSize, long style = 0 );
113 %{
114 void
115 wxRichTextStyleComboCtrl::new( ... )
116   PPCODE:
117     BEGIN_OVERLOAD()
118         MATCH_VOIDM_REDISP( newDefault )
119         MATCH_ANY_REDISP( newFull )
120     END_OVERLOAD( "Wx::RichTextStyleComboCtrl::new" )
121 %}
122
123     bool Create( wxWindow* parent, wxWindowID id = wxID_ANY,
124                  const wxPoint& pos = wxDefaultPosition,
125                  const wxSize& size = wxDefaultSize, long style = 0 );
126
127     void UpdateStyles();
128
129     void SetStyleSheet( wxRichTextStyleSheet* styleSheet );
130     wxRichTextStyleSheetDisown* GetStyleSheet() const;
131     void SetRichTextCtrl( wxRichTextCtrl* ctrl );
132     wxRichTextCtrl* GetRichTextCtrl() const;
133 };
134
135 #endif