Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / Frame.xs
1 #############################################################################
2 ## Name:        XS/Frame.xs
3 ## Purpose:     XS for Wx::Frame
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     29/10/2000
7 ## RCS-ID:      $Id: Frame.xs 2291 2007-11-25 00:09:04Z mbarbon $
8 ## Copyright:   (c) 2000-2004, 2006-2007 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/frame.h>
14 #include <wx/menu.h>
15 #include <wx/icon.h>
16 #if wxPERL_USE_MINIFRAME
17 #include <wx/minifram.h>
18 #endif
19 #include "cpp/frame.h"
20
21 MODULE=Wx PACKAGE=Wx::Frame
22
23 void
24 new( ... )
25   PPCODE:
26     BEGIN_OVERLOAD()
27         MATCH_VOIDM_REDISP( newDefault )
28         MATCH_ANY_REDISP( newFull )
29     END_OVERLOAD( "Wx::Frame::new" )
30
31 wxFrame*
32 newDefault( CLASS )
33     char* CLASS
34   CODE:
35     RETVAL = new wxPliFrame( CLASS );
36   OUTPUT: RETVAL
37
38 wxFrame*
39 newFull( CLASS, parent, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr )
40     char* CLASS
41     wxWindow* parent
42     wxWindowID id
43     wxString title
44     wxPoint pos
45     wxSize size
46     long style
47     wxString name
48   CODE:
49     RETVAL = new wxPliFrame( CLASS , parent, id, title, pos,
50          size, style, name );
51   OUTPUT: RETVAL
52
53 bool
54 wxFrame::Create( parent, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr )
55     wxWindow* parent
56     wxWindowID id
57     wxString title
58     wxPoint pos
59     wxSize size
60     long style
61     wxString name
62
63 #if 0
64
65 void
66 wxFrame::Command( id )
67     int id
68
69 #endif
70
71 wxStatusBar*
72 wxFrame::CreateStatusBar( number = 1, style = 0, id = wxID_ANY, name = wxEmptyString )
73     int number
74     long style
75     wxWindowID id
76     wxString name
77
78 wxToolBar*
79 wxFrame::CreateToolBar( style = wxNO_BORDER | wxTB_HORIZONTAL, id = wxID_ANY, name = wxToolBarNameStr )
80     long style
81     wxWindowID id
82     wxString name
83
84 wxPoint*
85 wxFrame::GetClientAreaOrigin()
86   CODE:
87     RETVAL = new wxPoint( THIS->GetClientAreaOrigin() );
88   OUTPUT:
89     RETVAL
90
91 wxMenuBar*
92 wxFrame::GetMenuBar()
93
94 wxStatusBar*
95 wxFrame::GetStatusBar()
96
97 int
98 wxFrame::GetStatusBarPane()
99
100 wxString
101 wxFrame::GetTitle()
102
103 wxToolBar*
104 wxFrame::GetToolBar()
105
106 #if defined( __WXMAC__ ) && WXPERL_W_VERSION_GE( 2, 5, 2 ) \
107     && WXPERL_W_VERSION_LT( 2, 7, 0 )
108
109 void
110 wxFrame::MacSetMetalAppearance( ismetal )
111     bool ismetal
112
113 #endif
114
115 wxStatusBar*
116 wxFrame::OnCreateStatusBar( number, style, id, name )
117     int number
118     long style
119     wxWindowID id
120     wxString name
121   CODE:
122     RETVAL = THIS->wxFrame::OnCreateStatusBar( number, style, id, name );
123   OUTPUT: RETVAL
124
125 void
126 wxFrame::SetIcon( icon )
127     wxIcon* icon
128   CODE:
129     THIS->SetIcon( *icon );
130
131 void
132 wxFrame::SetIcons( icons )
133     wxIconBundle* icons
134   C_ARGS: *icons
135
136 void
137 wxFrame::SetMenuBar( menubar )
138     wxMenuBar* menubar
139
140 void
141 wxFrame::SetStatusBar( statusBar )
142     wxStatusBar* statusBar
143
144 void
145 wxFrame::SetTitle( title )
146     wxString title
147
148 void
149 wxFrame::SetToolBar( toolbar )
150     wxToolBar* toolbar
151
152 void
153 wxFrame::SetStatusText( text, number = 0 )
154     wxString text
155     int number
156
157 void
158 wxFrame::SetStatusBarPane( n )
159     int n
160
161 void
162 wxFrame::SetStatusWidths( ... )
163   PREINIT:
164     int* w;
165     int i;
166   CODE:
167     w = new int[items - 1];
168     for( i = 0; i < items - 1; ++i )
169     {
170       w[i] = SvIV( ST( i + 1 ) );
171     }
172     THIS->SetStatusWidths( items - 1, w );
173     delete [] w;
174
175 MODULE=Wx PACKAGE=Wx::MiniFrame
176
177 #if wxPERL_USE_MINIFRAME
178
179 wxMiniFrame*
180 wxMiniFrame::new( parent, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr )
181     wxWindow* parent
182     wxWindowID id
183     wxString title
184     wxPoint pos
185     wxSize size
186     long style
187     wxString name
188   CODE:
189     RETVAL = new wxMiniFrame( parent, id, title, pos, size, 
190         style, name );
191     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
192   OUTPUT:
193     RETVAL
194
195 #endif