1 #############################################################################
2 ## Name: XS/ComboCtrl.xsp
3 ## Purpose: XS++ for Wx::ComboCtrl
4 ## Author: Mattia Barbon
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 #############################################################################
15 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
19 %typemap{wxComboPopup*}{simple};
20 %typemap{wxComboCtrl*}{simple};
22 %name{Wx::ComboCtrl} class wxComboCtrl
29 MATCH_VOIDM_REDISP( newDefault )
30 MATCH_ANY_REDISP( newFull )
31 END_OVERLOAD( "Wx::ComboCtrl::new" )
34 %name{newDefault} wxComboCtrl()
35 %code{% RETVAL = new wxComboCtrl();
36 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
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,
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 );
51 bool Create( wxWindow *parent,
53 const wxString& value = wxEmptyString,
54 const wxPoint& pos = wxDefaultPosition,
55 const wxSize& size = wxDefaultSize,
57 const wxValidator& validator = wxDefaultValidatorPtr,
58 const wxString& name = wxEmptyString );
63 ## virtual void OnButtonClick();
65 bool IsPopupShown() const;
67 void SetPopupControl( wxComboPopup* popup );
68 wxComboPopup* GetPopupControl();
70 wxWindow *GetPopupWindow() const;
71 wxTextCtrl *GetTextCtrl() const;
72 wxWindow *GetButton() const;
74 wxString GetValue() const;
75 void SetValue( const wxString& value );
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 );
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,
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 );
106 #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6
107 void SetTextIndent( int indent );
108 wxCoord GetTextIndent() const;
110 const wxRect& GetTextRect() const;
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;