1 #############################################################################
3 ## Purpose: XS++ for Wx::PlWindow
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: Window.xsp 2556 2009-05-11 10:18:47Z mbarbon $
8 ## Copyright: (c) 2000-2002, 2004-2007, 2009 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 #############################################################################
15 %typemap{wxWindowVariant}{simple};
16 %typemap{wxMenu&}{reference};
18 %name{Wx::Window} class wxWindow {
19 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
20 void AlwaysShowScrollbars( bool horz = true, bool vert = true );
23 bool AcceptsFocus() const;
24 bool AcceptsFocusFromKeyboard() const;
26 bool DestroyChildren();
27 bool IsBeingDeleted();
29 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
32 wxWindow::GetPopupMenuSelectionFromUser( ... )
35 MATCH_REDISP( wxPliOvl_wmen_wpoi, GetPopupMenuSelectionFromUserPoint )
36 MATCH_REDISP( wxPliOvl_wmen_n_n, GetPopupMenuSelectionFromUserXY )
37 END_OVERLOAD( Wx::Window::GetPopupMenuSelectionFromUser )
40 %name{GetPopupMenuSelectionFromUserPoint}
41 int GetPopupMenuSelectionFromUser( wxMenu& menu, wxPoint point );
43 %name{GetPopupMenuSelectionFromUserXY}
44 int GetPopupMenuSelectionFromUser( wxMenu& menu, int x, int y );
47 #if WXPERL_W_VERSION_LT( 2, 7, 0 )
48 wxSize GetAdjustedBestSize() const;
50 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
51 wxSize GetEffectiveMinSize() const;
53 const wxCursor& GetCursor() const;
54 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
55 wxWindow* GetPrevSibling() const;
56 wxWindow* GetNextSibling() const;
59 wxSize GetVirtualSize() const;
62 wxWindow::GetVirtualSizeWH()
65 THIS->GetVirtualSize( &x, &y );
66 wxPli_push_2ints( x, y );
69 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
70 wxPoint* GetScreenPosition() const
71 %code{% RETVAL = new wxPoint( THIS->GetScreenPosition() ); %};
75 wxWindow::GetScreenPositionXY()
78 THIS->GetPosition( &x, &y );
80 PUSHs( sv_2mortal( newSViv( (IV) x ) ) );
81 PUSHs( sv_2mortal( newSViv( (IV) y ) ) );
83 const wxRect& GetScreenRect() const;
86 bool HasFlag( int flag ) const;
87 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
88 bool HasExtraStyle( int exFlag ) const;
90 bool HasCapture() const;
91 #if WXPERL_W_VERSION_GE( 2, 6, 0 )
92 bool HasTransparentBackground();
94 bool HasScrollbar( int orient ) const;
95 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
96 bool IsScrollbarAlwaysShown( int orient );
102 void SetBackgroundColour( const wxColour& colour );
103 void SetOwnBackgroundColour( const wxColour& colour );
104 ## protected void SetInitialBestSize( wxSize size = wxDefaultSize );
105 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
106 void SetCanFocus( bool canFocus );
108 void SetForegroundColour( const wxColour& colour );
109 void SetOwnForegroundColour( const wxColour& colour );
110 void SetFont( const wxFont& font );
111 void SetCursor( const wxCursor& cursor );
112 void SetOwnFont( const wxFont& font );
113 wxWindowVariant GetWindowVariant() const;
114 void SetWindowVariant( wxWindowVariant variant );
115 #if WXPERL_W_VERSION_GE( 2, 8, 0 )
116 bool ToggleWindowStyle( int flag );
120 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
122 %typemap{wxEventBlocker*}{simple};
124 %name{Wx::EventBlocker} class wxEventBlocker
126 wxEventBlocker( wxWindow* win, wxEventType type = wxEVT_ANY );
130 wxEventBlocker::CLONE()
132 wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
137 %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::EventBlocker", THIS, ST(0) );
141 void Block( wxEventType eventType );
146 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
148 #include <wx/wupdlock.h>
150 %typemap{wxWindowUpdateLocker*}{simple};
152 %name{Wx::WindowUpdateLocker} class wxWindowUpdateLocker
154 wxWindowUpdateLocker( wxWindow* win );
158 wxWindowUpdateLocker::CLONE()
160 wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
164 ~wxWindowUpdateLocker()
165 %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::WindowUpdateLocker", THIS, ST(0) );