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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
#############################################################################
## Name: ext/richtext/XS/RichTextStyle.xsp
## Purpose: XS++ for Wx::RichText*Style*
## Author: Mattia Barbon
## Modified by:
## Created: 12/11/2006
## RCS-ID: $Id: RichTextStyle.xsp 2568 2009-05-17 15:52:56Z mbarbon $
## Copyright: (c) 2006, 2008-2009 Mattia Barbon
## Licence: This program is free software; you can redistribute it and/or
## modify it under the same terms as Perl itself
#############################################################################
#include <wx/richtext/richtextstyles.h>
%module{Wx};
%name{Wx::RichTextStyleDefinition} class wxRichTextStyleDefinition
{
%{
static void
wxRichTextStyleDefinition::CLONE()
CODE:
wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
%}
## // thread OK
~wxRichTextStyleDefinition()
%code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) );
if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
delete THIS;
%};
#if WXPERL_W_VERSION_GE( 2, 7, 1 )
void Copy( const wxRichTextStyleDefinition& def );
bool Eq( const wxRichTextStyleDefinition& def ) const;
#endif
void SetName( const wxString& name );
const wxString& GetName() const;
#if WXPERL_W_VERSION_GE( 2, 8, 0 )
void SetDescription( const wxString& descr );
const wxString& GetDescription() const;
#endif
void SetBaseStyle( const wxString& name );
const wxString& GetBaseStyle() const;
void SetStyle( const wxRichTextAttr& style );
const wxRichTextAttr& GetStyle() const;
#if WXPERL_W_VERSION_GE( 2, 8, 0 )
const wxTextAttr& GetStyleMergedWithBase( wxRichTextStyleSheet* sheet ) const;
#endif
};
%name{Wx::RichTextCharacterStyleDefinition} class wxRichTextCharacterStyleDefinition
{
wxRichTextCharacterStyleDefinition( const wxString& name = wxEmptyString );
};
%name{Wx::RichTextParagraphStyleDefinition} class wxRichTextParagraphStyleDefinition
{
wxRichTextParagraphStyleDefinition( const wxString& name = wxEmptyString );
#if WXPERL_W_VERSION_GE( 2, 7, 1 )
void Copy( const wxRichTextParagraphStyleDefinition& def );
#endif
void SetNextStyle( const wxString& name );
const wxString& GetNextStyle() const;
};
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
%name{Wx::RichTextListStyleDefinition} class wxRichTextListStyleDefinition
{
wxRichTextListStyleDefinition( const wxString& name = wxEmptyString );
void Copy( const wxRichTextListStyleDefinition& def );
void SetLevelAttributes( int i, const wxRichTextAttr& attr );
wxRichTextAttrDisown* GetLevelAttributes( int i ) const;
void SetAttributes( int i, int leftIndent, int leftSubIndent,
int bulletStyle,
const wxString& bulletSymbol = wxEmptyString );
int FindLevelForIndent( int indent ) const;
wxRichTextAttr& CombineWithParagraphStyle
( int indent, const wxRichTextAttr& paraStyle );
wxRichTextAttr& GetCombinedStyle( int indent );
wxRichTextAttr& GetCombinedStyleForLevel( int level );
int GetLevelCount() const;
bool IsNumbered( int i ) const;
};
#endif
%name{Wx::RichTextStyleSheet} class wxRichTextStyleSheet
{
wxRichTextStyleSheet();
%{
static void
wxRichTextStyleSheet::CLONE()
CODE:
wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
%}
## // thread OK
~wxRichTextStyleSheet()
%code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::RichTextStyleSheet", THIS, ST(0) );
if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
delete THIS;
%};
#if WXPERL_W_VERSION_GE( 2, 8, 0 )
bool AddStyle( wxRichTextStyleDefinitionDisown* def );
wxRichTextStyleDefinitionDisown* FindStyle( const wxString& name ) const;
bool RemoveStyle( wxRichTextStyleDefinition* def,
bool deleteStyle = false );
#endif
#if WXPERL_W_VERSION_GE( 2, 7, 1 )
void Copy( const wxRichTextStyleSheet& sheet );
#endif
bool AddCharacterStyle( wxRichTextCharacterStyleDefinitionDisown* def );
bool AddParagraphStyle( wxRichTextParagraphStyleDefinitionDisown* def );
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
bool AddListStyle( wxRichTextListStyleDefinitionDisown* def );
#endif
bool RemoveCharacterStyle( wxRichTextStyleDefinition* def,
bool deleteStyle = false );
bool RemoveParagraphStyle( wxRichTextStyleDefinition* def,
bool deleteStyle = false );
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
bool RemoveListStyle( wxRichTextStyleDefinition* def,
bool deleteStyle = false );
#endif
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
wxRichTextCharacterStyleDefinitionDisown* FindCharacterStyle
( const wxString& name, bool recurse = true ) const;
wxRichTextParagraphStyleDefinitionDisown* FindParagraphStyle
( const wxString& name, bool recurse = true ) const;
wxRichTextListStyleDefinitionDisown* FindListStyle( const wxString& name,
bool recurse = true) const;
#endif
size_t GetCharacterStyleCount() const;
size_t GetParagraphStyleCount() const;
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
size_t GetListStyleCount() const;
#endif
wxRichTextCharacterStyleDefinitionDisown* GetCharacterStyle( size_t n ) const;
wxRichTextParagraphStyleDefinitionDisown* GetParagraphStyle( size_t n ) const;
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
wxRichTextListStyleDefinitionDisown* GetListStyle( size_t n ) const;
#endif
void DeleteStyles();
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
bool InsertSheet( wxRichTextStyleSheet* before );
bool AppendSheet( wxRichTextStyleSheet* after );
void Unlink();
wxRichTextStyleSheetDisown* GetNextSheet() const;
void SetNextSheet( wxRichTextStyleSheet* sheet );
wxRichTextStyleSheetDisown* GetPreviousSheet() const;
void SetPreviousSheet( wxRichTextStyleSheet* sheet );
#endif
#if WXPERL_W_VERSION_GE( 2, 8, 0 )
void SetName( const wxString& name );
const wxString& GetName() const;
void SetDescription( const wxString& descr );
const wxString& GetDescription() const;
#endif
};
|