Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / StatusBar.xs
1 #############################################################################
2 ## Name:        XS/StatusBar.xs
3 ## Purpose:     XS for Wx::StatusBar
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     29/10/2000
7 ## RCS-ID:      $Id: StatusBar.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 #include <wx/statusbr.h>
14
15 MODULE=Wx PACKAGE=Wx::StatusBar
16
17 wxStatusBar*
18 wxStatusBar::new( parent, id = wxID_ANY, style = 0, name = wxEmptyString )
19     wxWindow* parent
20     wxWindowID id
21     long style
22     wxString name
23   CODE:
24     RETVAL = new wxStatusBar( parent, id, style, name );
25     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
26   OUTPUT:
27     RETVAL
28
29 wxRect*
30 wxStatusBar::GetFieldRect( index )
31     int index
32   PREINIT:
33     wxRect rect;
34     bool found;
35   CODE:
36     found = THIS->GetFieldRect( index, rect );
37     if( !found )
38         RETVAL = 0;
39     else
40         RETVAL = new wxRect( rect );
41   OUTPUT:
42     RETVAL
43
44 int
45 wxStatusBar::GetFieldsCount()
46
47 wxString
48 wxStatusBar::GetStatusText( ir = 0 )
49     int ir
50
51 void
52 wxStatusBar::PushStatusText( string, n = 0 )
53     wxString string
54     int n
55
56 void
57 wxStatusBar::PopStatusText( n = 0 )
58     int n
59
60 void
61 wxStatusBar::SetFieldsCount( number = 1 )
62     int number
63
64 void
65 wxStatusBar::SetMinHeight( height )
66     int height
67
68 void
69 wxStatusBar::SetStatusText( text, i = 0 )
70     wxString text
71     int i
72
73 void
74 wxStatusBar::SetStatusWidths( ... )
75   PREINIT:
76     int* widths;
77     int i;
78   CODE:
79     widths = new int[items-1];
80     for( i = 1; i < items; ++i )
81     {
82       widths[i-1] = SvIV( ST(i) );
83     }
84     THIS->SetStatusWidths( items-1, widths );
85
86     delete[] widths;
87
88 #if WXPERL_W_VERSION_GE( 2, 5, 3 )
89
90 void
91 wxStatusBar::SetStatusStyles( ... )
92   PREINIT:
93     int* styles;
94     int i;
95   CODE:
96     styles = new int[items-1];
97     for( i = 1; i < items; ++i )
98     {
99       styles[i-1] = SvIV( ST(i) );
100     }
101     THIS->SetStatusStyles( items-1, styles );
102
103     delete[] styles;
104
105 #endif