1 #############################################################################
2 ## Name: ext/richtext/XS/RichTextStyleCtrl.xsp
3 ## Purpose: XS++ for Wx::RichText*Style* selection controls
4 ## Author: Mattia Barbon
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 #############################################################################
13 #include <wx/checkbox.h>
14 #include <wx/richtext/richtextstyles.h>
18 %name{Wx::RichTextStyleListBox} class wxRichTextStyleListBox
20 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
21 %name{newDefault} wxRichTextStyleListBox();
23 %name{newFull} wxRichTextStyleListBox
24 ( wxWindow* parent, wxWindowID id = wxID_ANY,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize, long style = 0 );
29 wxRichTextStyleListBox::new( ... )
32 MATCH_VOIDM_REDISP( newDefault )
33 MATCH_ANY_REDISP( newFull )
34 END_OVERLOAD( "Wx::RichTextStyleListBox::new" )
37 bool Create( wxWindow* parent, wxWindowID id = wxID_ANY,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize, long style = 0 );
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 );
51 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
52 void ApplyStyle( int i );
53 void SetApplyOnSelection( bool applyOnSel );
54 bool GetApplyOnSelection() const;
56 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
57 void SetStyleType( wxPliRichTextStyleType styleType );
58 wxPliRichTextStyleType GetStyleType() const;
60 int ConvertTenthsMMToPixels( wxDC& dc, int units ) const;
61 wxString CreateHTML( wxRichTextStyleDefinition* def ) const;
64 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
66 %name{Wx::RichTextStyleListCtrl} class wxRichTextStyleListCtrl
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 );
75 wxRichTextStyleListCtrl::new( ... )
78 MATCH_VOIDM_REDISP( newDefault )
79 MATCH_ANY_REDISP( newFull )
80 END_OVERLOAD( "Wx::RichTextStyleListCtrl::new" )
83 bool Create( wxWindow* parent, wxWindowID id = wxID_ANY,
84 const wxPoint& pos = wxDefaultPosition,
85 const wxSize& size = wxDefaultSize, long style = 0 );
87 void SetStyleSheet( wxRichTextStyleSheet* styleSheet );
88 wxRichTextStyleSheetDisown* GetStyleSheet() const;
89 void SetRichTextCtrl( wxRichTextCtrl* ctrl );
90 wxRichTextCtrl* GetRichTextCtrl() const;
93 void SetStyleType( wxPliRichTextStyleType styleType );
94 wxPliRichTextStyleType GetStyleType() const;
95 int StyleTypeToIndex( wxPliRichTextStyleType styleType );
96 wxPliRichTextStyleType StyleIndexToType( int i );
98 wxRichTextStyleListBox* GetStyleListBox() const;
99 wxChoice* GetStyleChoice() const;
104 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
106 %name{Wx::RichTextStyleComboCtrl} class wxRichTextStyleComboCtrl
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 );
115 wxRichTextStyleComboCtrl::new( ... )
118 MATCH_VOIDM_REDISP( newDefault )
119 MATCH_ANY_REDISP( newFull )
120 END_OVERLOAD( "Wx::RichTextStyleComboCtrl::new" )
123 bool Create( wxWindow* parent, wxWindowID id = wxID_ANY,
124 const wxPoint& pos = wxDefaultPosition,
125 const wxSize& size = wxDefaultSize, long style = 0 );
129 void SetStyleSheet( wxRichTextStyleSheet* styleSheet );
130 wxRichTextStyleSheetDisown* GetStyleSheet() const;
131 void SetRichTextCtrl( wxRichTextCtrl* ctrl );
132 wxRichTextCtrl* GetRichTextCtrl() const;