Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / SplitterWindow.xs
1 #############################################################################
2 ## Name:        XS/SplitterWindow.xs
3 ## Purpose:     XS for Wx::SplitterWindow
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     02/12/2000
7 ## RCS-ID:      $Id: SplitterWindow.xs 2057 2007-06-18 23:03:00Z mbarbon $
8 ## Copyright:   (c) 2000-2003, 2005-2006 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 %{
14 #include <wx/splitter.h>
15 %}
16
17 %module{Wx};
18
19 %name{Wx::SplitterEvent} class wxSplitterEvent
20 {
21     wxSplitterEvent( wxEventType type = wxEVT_NULL,
22                      wxSplitterWindow* window = NULL );
23
24     int GetSashPosition();
25     int GetX();
26     int GetY();
27     wxWindow* GetWindowBeingRemoved();
28     void SetSashPosition( int pos );
29 };
30
31 %{
32 #define wxSplitterWindowNameStr wxT("splitter")
33 %}
34
35 %name{Wx::SplitterWindow} class wxSplitterWindow
36 {
37     %name{newDefault}
38     wxSplitterWindow()
39         %code{%    RETVAL = new wxSplitterWindow();
40                    wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %};
41
42     %name{newFull}
43     wxSplitterWindow( wxWindow* parent, wxWindowID id = wxID_ANY,
44                       const wxPoint& pos = wxDefaultPosition,
45                       const wxSize& size = wxDefaultSize,
46                       long style = wxSP_3D,
47                       wxString name = wxSplitterWindowNameStr )
48         %code{%    RETVAL = new wxSplitterWindow( parent, id, pos, size,
49                        style, name );
50                    wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %};
51
52     bool Create( wxWindow* parent, wxWindowID id = wxID_ANY,
53                  const wxPoint& pos = wxDefaultPosition,
54                  const wxSize& size = wxDefaultSize,
55                  long style = wxSP_3D,
56                  wxString name = wxSplitterWindowNameStr );
57
58     int GetMinimumPaneSize();
59     int GetSashPosition();
60     int GetSplitMode();
61     wxWindow* GetWindow1();
62     wxWindow* GetWindow2();
63
64     void Initialize( wxWindow* window );
65
66     bool IsSplit();
67
68     bool ReplaceWindow( wxWindow* winOld, wxWindow* winNew );
69
70 #if WXPERL_W_VERSION_GE( 2, 5, 4 )
71     void SetFocusIgnoringChildren();
72 #endif
73     void SetSashPosition( int position, bool redraw = true );
74     void SetMinimumPaneSize( int paneSize );
75     void SetSplitMode( int mode );
76
77     bool SplitHorizontally( wxWindow* window1, wxWindow* window2,
78                             int sashPosition = 0 );
79     bool SplitVertically( wxWindow* window1, wxWindow* window2,
80                           int sashPosition = 0 );
81     bool Unsplit( wxWindow* toRemove = NULL );
82 #if WXPERL_W_VERSION_GE( 2, 6, 0 )
83     void SetSashGravity( double gravity );
84     double GetSashGravity();
85 #endif
86 #if WXPERL_W_VERSION_GE( 2, 5, 3 )
87     int GetSashSize();
88     void SetSashSize( int width );
89 #endif
90 };
91
92 %{
93
94 void
95 new( ... )
96   PPCODE:
97     BEGIN_OVERLOAD()
98         MATCH_VOIDM_REDISP( newDefault )
99         MATCH_ANY_REDISP( newFull )
100     END_OVERLOAD( "Wx::SplitterWindow::new" )
101
102 %}