File: Window.xsp

package info (click to toggle)
libwx-perl 1%3A0.9909-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,912 kB
  • sloc: cpp: 9,728; perl: 8,182; ansic: 626; makefile: 41
file content (162 lines) | stat: -rw-r--r-- 4,382 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#############################################################################
## Name:        XS/Window.xsp
## Purpose:     XS++ for Wx::PlWindow
## Author:      Mattia Barbon
## Modified by:
## Created:     23/05/2004
## RCS-ID:      $Id: Window.xsp 2938 2010-07-04 12:56:48Z mbarbon $
## Copyright:   (c) 2000-2002, 2004-2007, 2009-2010 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

%module{Wx};

%loadplugin{build::Wx::XSP::Overload};

%typemap{wxWindowVariant}{simple};
%typemap{wxMenu&}{reference};

%name{Wx::Window} class wxWindow {
#if WXPERL_W_VERSION_GE( 2, 9, 0 )
    void AlwaysShowScrollbars( bool horz = true, bool vert = true );
#endif

    bool AcceptsFocus() const;
    bool AcceptsFocusFromKeyboard() const;

    bool DestroyChildren();
    bool IsBeingDeleted();

#if WXPERL_W_VERSION_GE( 2, 9, 0 )
    %name{GetPopupMenuSelectionFromUserPoint}
    int GetPopupMenuSelectionFromUser( wxMenu& menu, wxPoint point ) %Overload;

    %name{GetPopupMenuSelectionFromUserXY}
    int GetPopupMenuSelectionFromUser( wxMenu& menu, int x, int y ) %Overload;
#endif

#if WXPERL_W_VERSION_LT( 2, 7, 0 )
    wxSize GetAdjustedBestSize() const;
#endif
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
    wxSize GetEffectiveMinSize() const;
#endif
    const wxCursor& GetCursor() const;
#if WXPERL_W_VERSION_GE( 2, 9, 0 )
    wxWindow* GetPrevSibling() const;
    wxWindow* GetNextSibling() const;
#endif

    wxSize GetVirtualSize() const;
%{
void
wxWindow::GetVirtualSizeWH()
  PPCODE:
    int x, y;
    THIS->GetVirtualSize( &x, &y );
    wxPli_push_2ints( x, y );
%}

#if WXPERL_W_VERSION_GE( 2, 7, 2 )
    wxPoint* GetScreenPosition() const
        %code{% RETVAL = new wxPoint( THIS->GetScreenPosition() ); %};

%{
void
wxWindow::GetScreenPositionXY()
  PPCODE:
    int x, y;
    THIS->GetPosition( &x, &y );
    EXTEND( SP, 2 );
    PUSHs( sv_2mortal( newSViv( (IV) x ) ) );
    PUSHs( sv_2mortal( newSViv( (IV) y ) ) );
%}
    const wxRect& GetScreenRect() const;
#endif

    bool HasFlag( int flag ) const;
#if WXPERL_W_VERSION_GE( 2, 9, 0 )
    bool HasExtraStyle( int exFlag ) const;
#endif
    bool HasCapture() const;
#if WXPERL_W_VERSION_GE( 2, 6, 0 )
    bool HasTransparentBackground();
#endif
    bool HasScrollbar( int orient ) const;
#if WXPERL_W_VERSION_GE( 2, 9, 0 )
    bool IsScrollbarAlwaysShown( int orient );
#endif
    bool LineUp();
    bool LineDown();
    bool PageUp();
    bool PageDown();
    void SetBackgroundColour( const wxColour& colour );
    void SetOwnBackgroundColour( const wxColour& colour );
## protected void SetInitialBestSize( wxSize size = wxDefaultSize );
#if WXPERL_W_VERSION_GE( 2, 9, 0 )
    void SetCanFocus( bool canFocus );
#endif
    void SetForegroundColour( const wxColour& colour );
    void SetOwnForegroundColour( const wxColour& colour );
    void SetFont( const wxFont& font );
    void SetCursor( const wxCursor& cursor );
    void SetOwnFont( const wxFont& font );
    wxWindowVariant GetWindowVariant() const;
    void SetWindowVariant( wxWindowVariant variant );
#if WXPERL_W_VERSION_GE( 2, 8, 0 )
    bool ToggleWindowStyle( int flag );
#endif
};

#if WXPERL_W_VERSION_GE( 2, 9, 0 )

%typemap{wxEventBlocker*}{simple};

%name{Wx::EventBlocker} class wxEventBlocker
{
    wxEventBlocker( wxWindow* win, wxEventType type = wxEVT_ANY );

%{
static void
wxEventBlocker::CLONE()
  CODE:
    wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
%}

    ## // thread OK
    ~wxEventBlocker()
        %code%{  wxPli_thread_sv_unregister( aTHX_ "Wx::EventBlocker", THIS, ST(0) );
                 delete THIS;
               %};

    void Block( wxEventType eventType );
};

#endif

#if WXPERL_W_VERSION_GE( 2, 7, 2 )

#include <wx/wupdlock.h>

%typemap{wxWindowUpdateLocker*}{simple};

%name{Wx::WindowUpdateLocker} class wxWindowUpdateLocker
{
    wxWindowUpdateLocker( wxWindow* win );

%{
static void
wxWindowUpdateLocker::CLONE()
  CODE:
    wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
%}

    ## // thread OK
    ~wxWindowUpdateLocker()
        %code%{  wxPli_thread_sv_unregister( aTHX_ "Wx::WindowUpdateLocker", THIS, ST(0) );
                 delete THIS;
               %};
};

#endif