Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / ComboCtrl.xsp
1 #############################################################################
2 ## Name:        XS/ComboCtrl.xsp
3 ## Purpose:     XS++ for Wx::ComboCtrl
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     12/08/2007
7 ## RCS-ID:      $Id: ComboCtrl.xsp 2626 2009-10-18 22:48:17Z mbarbon $
8 ## Copyright:   (c) 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 #############################################################################
12
13 %module{Wx};
14
15 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
16
17 #include <wx/combo.h>
18
19 %typemap{wxComboPopup*}{simple};
20 %typemap{wxComboCtrl*}{simple};
21
22 %name{Wx::ComboCtrl} class wxComboCtrl
23 {
24 %{
25 void
26 new( ... )
27   PPCODE:
28     BEGIN_OVERLOAD()
29         MATCH_VOIDM_REDISP( newDefault )
30         MATCH_ANY_REDISP( newFull )
31     END_OVERLOAD( "Wx::ComboCtrl::new" )
32 %}
33
34     %name{newDefault} wxComboCtrl()
35         %code{% RETVAL = new wxComboCtrl();
36                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
37                 %};
38     %name{newFull} wxComboCtrl( wxWindow *parent,
39                                 wxWindowID id = wxID_ANY,
40                                 const wxString& value = wxEmptyString,
41                                 const wxPoint& pos = wxDefaultPosition,
42                                 const wxSize& size = wxDefaultSize,
43                                 long style = 0,
44                                 const wxValidator& validator = wxDefaultValidatorPtr,
45                                 const wxString& name = wxEmptyString)
46         %code{% RETVAL = new wxComboCtrl( parent, id, value, pos, size,
47                                           style, *validator, name );
48                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
49                 %};
50
51     bool Create( wxWindow *parent,
52                  wxWindowID id,
53                  const wxString& value = wxEmptyString,
54                  const wxPoint& pos = wxDefaultPosition,
55                  const wxSize& size = wxDefaultSize,
56                  long style = 0,
57                  const wxValidator& validator = wxDefaultValidatorPtr,
58                  const wxString& name = wxEmptyString );
59
60     void ShowPopup();
61     void HidePopup();
62
63 ##    virtual void OnButtonClick();
64
65     bool IsPopupShown() const;
66
67     void SetPopupControl( wxComboPopup* popup );
68     wxComboPopup* GetPopupControl();
69
70     wxWindow *GetPopupWindow() const;
71     wxTextCtrl *GetTextCtrl() const;
72     wxWindow *GetButton() const;
73
74     wxString GetValue() const;
75     void SetValue( const wxString& value );
76     void Copy();
77     void Cut();
78     void Paste();
79     void SetInsertionPoint( long pos );
80     void SetInsertionPointEnd();
81     long GetInsertionPoint() const;
82     long GetLastPosition() const;
83     void Replace( long from, long to, const wxString& value );
84     void Remove( long from, long to );
85     void SetSelection( long from, long to );
86     void Undo();
87
88     void SetText( const wxString& value );
89     void SetPopupMinWidth( int width );
90     void SetPopupMaxHeight( int height );
91     void SetPopupExtents( int extLeft, int extRight );
92     void SetCustomPaintWidth( int width );
93     int GetCustomPaintWidth() const;
94     void SetPopupAnchor( int anchorSide );
95     void SetButtonPosition( int width = -1,
96                             int height = -1,
97                             int side = wxRIGHT,
98                             int spacingX = 0 );
99     wxSize GetButtonSize();
100     void SetButtonBitmaps( const wxBitmap& bmpNormal,
101                            bool pushButtonBg = false,
102                            const wxBitmap& bmpPressed = wxNullBitmapPtr,
103                            const wxBitmap& bmpHover = wxNullBitmapPtr,
104                            const wxBitmap& bmpDisabled = wxNullBitmapPtr );
105
106 #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6
107     void SetTextIndent( int indent );
108     wxCoord GetTextIndent() const;
109 #endif
110     const wxRect& GetTextRect() const;
111
112     void UseAltPopupWindow( bool enable = true );
113     void EnablePopupAnimation( bool enable = true );
114     const wxBitmap& GetBitmapNormal() const;
115     const wxBitmap& GetBitmapPressed() const;
116     const wxBitmap& GetBitmapHover() const;
117     const wxBitmap& GetBitmapDisabled() const;
118 };
119
120 #endif