Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / richtext / XS / RichTextFormattingDialog.xsp
1 #############################################################################
2 ## Name:        ext/richtext/XS/RichTextFormattingDialog.xsp
3 ## Purpose:     XS++ for Wx::RichTextFormattingDialog
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     25/11/2006
7 ## RCS-ID:      $Id: RichTextFormattingDialog.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/richtext/richtextformatdlg.h>
14 #include <wx/imaglist.h>
15
16 %module{Wx};
17
18 #define wxRICHTEXT_FM_DEFAULT_APPLY_STYLE wxRICHTEXT_SETSTYLE_WITH_UNDO|wxRICHTEXT_SETSTYLE_OPTIMIZE
19
20 %name{Wx::RichTextFormattingDialog} class wxRichTextFormattingDialog
21 {
22     %name{newDefault} wxRichTextFormatingDialog();
23     %name{newFull} wxRichTextFormattingDialog
24         ( long flags, wxWindow* parent,
25           const wxString& title = wxT("Formatting"), wxWindowID id = wxID_ANY,
26           const wxPoint& pos = wxDefaultPosition,
27           const wxSize& sz = wxDefaultSize,
28           long style = wxDEFAULT_DIALOG_STYLE );
29 %{
30 void
31 wxRichTextFormattingDialog::new( ... )
32   PPCODE:
33     BEGIN_OVERLOAD()
34         MATCH_VOIDM_REDISP( newDefault )
35         MATCH_ANY_REDISP( newFull )
36     END_OVERLOAD( "Wx::RichTextFormattingDialog::new" )
37 %}
38
39     bool Create( long flags, wxWindow* parent,
40                  const wxString& title = wxT("Formatting"),
41                  wxWindowID id = wxID_ANY,
42                  const wxPoint& pos = wxDefaultPosition,            
43                  const wxSize& sz = wxDefaultSize,
44                  long style = wxDEFAULT_DIALOG_STYLE );
45
46     bool GetStyle( wxRichTextCtrl* ctrl, const wxRichTextRange& range );
47     bool SetStyle( const wxTextAttrEx& style, bool update = true );
48
49     bool SetStyleDefinition( const wxRichTextStyleDefinition& styleDef,
50                              wxRichTextStyleSheet* sheet,
51                              bool update = true );
52     wxRichTextStyleDefinitionDisown* GetStyleDefinition() const;
53     wxRichTextStyleDefinitionDisown* GetDialogStyleDefinition( wxWindow* win );
54     wxRichTextStyleSheetDisown* GetStyleSheet() const;
55
56     bool UpdateDisplay();
57     bool ApplyStyle( wxRichTextCtrl* ctrl, const wxRichTextRange& range,
58                      int flags = wxRICHTEXT_FM_DEFAULT_APPLY_STYLE );
59
60     const wxTextAttrEx& GetAttributes() const;
61     void SetAttributes( const wxTextAttrEx& attr );
62
63     void SetImageList( wxImageList* imageList );
64     wxImageList* GetImageList() const;
65
66 ##    static void SetFormattingDialogFactory(wxRichTextFormattingDialogFactory* factory);
67 ##    static wxRichTextFormattingDialogFactory* GetFormattingDialogFactory();
68
69 ##    static wxRichTextFormattingDialog* GetDialog( wxWindow* win );
70 ##    static wxTextAttrEx* GetDialogAttributes( wxWindow* win );
71 ##    static wxRichTextStyleDefinition* GetDialogStyleDefinition( wxWindow* win );
72 %{
73 bool
74 ShowToolTips()
75   CODE:
76     RETVAL = wxRichTextFormattingDialog::ShowToolTips();
77   OUTPUT: RETVAL
78
79 void
80 SetShowToolTips( show )
81     bool show
82   CODE:
83     wxRichTextFormattingDialog::SetShowToolTips( show );
84 %}
85     void AddPageId( int id );
86 };