Various updates to catch up to wxWidgets CVS

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-07-31 20:24:29 +00:00
parent 4a82116e2e
commit 9f8a9f5489
8 changed files with 68 additions and 31 deletions

View File

@@ -48,6 +48,9 @@
%rename(SPLASH_NO_TIMEOUT) wxSPLASH_NO_TIMEOUT; %rename(SPLASH_NO_TIMEOUT) wxSPLASH_NO_TIMEOUT;
%rename(SplashScreenWindow) wxSplashScreenWindow; %rename(SplashScreenWindow) wxSplashScreenWindow;
%rename(SplashScreen) wxSplashScreen; %rename(SplashScreen) wxSplashScreen;
%rename(SB_NORMAL) wxSB_NORMAL;
%rename(SB_FLAT) wxSB_FLAT;
%rename(SB_RAISED) wxSB_RAISED;
%rename(StatusBar) wxStatusBar; %rename(StatusBar) wxStatusBar;
%rename(SP_NOBORDER) wxSP_NOBORDER; %rename(SP_NOBORDER) wxSP_NOBORDER;
%rename(SP_NOSASH) wxSP_NOSASH; %rename(SP_NOSASH) wxSP_NOSASH;

View File

@@ -227,7 +227,22 @@ function is not supported at all on this platform.", "");
DocDeclStr( DocDeclStr(
virtual bool , ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode), virtual bool , ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode),
"Change current mode, return true if succeeded, false otherwise", ""); "Changes the video mode of this display to the mode specified in the
mode parameter.
If wx.DefaultVideoMode is passed in as the mode parameter, the defined
behaviour is that wx.Display will reset the video mode to the default
mode used by the display. On Windows, the behavior is normal.
However, there are differences on other platforms. On Unix variations
using X11 extensions it should behave as defined, but some
irregularities may occur.
On wxMac passing in wx.DefaultVideoMode as the mode parameter does
nothing. This happens because Carbon no longer has access to
DMUseScreenPrefs, an undocumented function that changed the video mode
to the system default by using the system's 'scrn' resource.
Returns True if succeeded, False otherwise", "");
DocDeclStr( DocDeclStr(

View File

@@ -50,18 +50,8 @@ public:
%name(RegionFromBitmapColour)wxRegion(const wxBitmap& bmp, %name(RegionFromBitmapColour)wxRegion(const wxBitmap& bmp,
const wxColour& transColour, const wxColour& transColour,
int tolerance = 0); int tolerance = 0);
#ifndef __WXMAC__
%name(RegionFromPoints)wxRegion(int points, wxPoint* points_array, %name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
int fillStyle = wxWINDING_RULE); int fillStyle = wxWINDING_RULE);
#else
%extend {
%name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
int fillStyle = wxWINDING_RULE) {
wxPyRaiseNotImplemented();
return NULL;
}
}
#endif
~wxRegion(); ~wxRegion();

View File

@@ -497,6 +497,8 @@ public:
proportion, flag, border, data); proportion, flag, border, data);
} }
// virtual void AddSpacer(int size);
// virtual void AddStretchSpacer(int prop = 1);
DocAStr(Insert, DocAStr(Insert,
"Insert(self, int before, item, int proportion=0, int flag=0, int border=0, "Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
@@ -525,6 +527,8 @@ the item at index *before*. See `Add` for a description of the parameters.", ""
} }
// virtual void InsertSpacer(size_t index, int size);
// virtual void InsertStretchSpacer(size_t index, int prop = 1);
DocAStr(Prepend, DocAStr(Prepend,
"Prepend(self, item, int proportion=0, int flag=0, int border=0, "Prepend(self, item, int proportion=0, int flag=0, int border=0,
@@ -552,6 +556,8 @@ this sizer. See `Add` for a description of the parameters.", "");
proportion, flag, border, data); proportion, flag, border, data);
} }
// virtual void PrependSpacer(int size);
// virtual void PrependStretchSpacer(int prop = 1);
DocAStr(Remove, DocAStr(Remove,
"Remove(self, item) -> bool", "Remove(self, item) -> bool",

View File

@@ -22,6 +22,14 @@
%newgroup; %newgroup;
enum {
wxSB_NORMAL,
wxSB_FLAT,
wxSB_RAISED
};
// wxStatusBar: a window near the bottom of the frame used for status info // wxStatusBar: a window near the bottom of the frame used for status info
MustHaveApp(wxStatusBar); MustHaveApp(wxStatusBar);
@@ -62,7 +70,15 @@ public:
// minus the sum of fixed width fields) is divided between the fields with // minus the sum of fixed width fields) is divided between the fields with
// negative width according to the abs value of the width (field with width // negative width according to the abs value of the width (field with width
// -2 grows twice as much as one with width -1 &c) // -2 grows twice as much as one with width -1 &c)
virtual void SetStatusWidths(int widths, const int* widths_field); // uses typemap in _toplvl.i virtual void SetStatusWidths(int widths, const int* widths_field);
// Set the field style. Use either wxSB_NORMAL (default) for a standard 3D
// border around a field, wxSB_FLAT for no border around a field, so that it
// appears flat or wxSB_POPOUT to make the field appear raised.
// Setting field styles only works on wxMSW
virtual void SetStatusStyles(int styles, const int* styles_field);
// Get the position and size of the field's internal bounding rectangle // Get the position and size of the field's internal bounding rectangle
%extend { %extend {

View File

@@ -70,18 +70,6 @@ enum
}; };
%typemap(in) (int widths, int* widths_field) {
$1 = PyList_Size($input);
$2 = int_LIST_helper($input);
if ($2 == NULL) SWIG_fail;
}
%typemap(freearg) (int widths, int* widths_field) {
if ($2) delete [] $2;
}
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class wxTopLevelWindow : public wxWindow class wxTopLevelWindow : public wxWindow

View File

@@ -588,7 +588,6 @@ anything if there are no subwindows.", "");
%nokwargs SetSizeHints;
DocStr(SetSizeHints, DocStr(SetSizeHints,
"Allows specification of minimum and maximum window sizes, and window "Allows specification of minimum and maximum window sizes, and window
size increments. If a pair of values is not set (or set to -1), the size increments. If a pair of values is not set (or set to -1), the
@@ -601,24 +600,25 @@ The resizing increments are only significant under Motif or Xt.", "
:see: `GetMinSize`, `GetMaxSize`, `SetMinSize`, `SetMaxSize` :see: `GetMinSize`, `GetMaxSize`, `SetMinSize`, `SetMaxSize`
"); ");
void SetSizeHints( const wxSize& minSize,
const wxSize& maxSize=wxDefaultSize,
const wxSize& incSize=wxDefaultSize);
virtual void SetSizeHints( int minW, int minH, virtual void SetSizeHints( int minW, int minH,
int maxW = -1, int maxH = -1, int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1 ); int incW = -1, int incH = -1 );
%name(SetSizeHintsSz) void SetSizeHints( const wxSize& minSize,
const wxSize& maxSize=wxDefaultSize,
const wxSize& incSize=wxDefaultSize);
%nokwargs SetVirtualSizeHints;
DocStr(SetVirtualSizeHints, DocStr(SetVirtualSizeHints,
"Allows specification of minimum and maximum virtual window sizes. If a "Allows specification of minimum and maximum virtual window sizes. If a
pair of values is not set (or set to -1), the default values will be pair of values is not set (or set to -1), the default values will be
used. If this function is called, the user will not be able to size used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.", ""); the virtual area of the window outside the given bounds.", "");
void SetVirtualSizeHints( const wxSize& minSize,
const wxSize& maxSize=wxDefaultSize);
virtual void SetVirtualSizeHints( int minW, int minH, virtual void SetVirtualSizeHints( int minW, int minH,
int maxW = -1, int maxH = -1 ); int maxW = -1, int maxH = -1 );
%name(SetVirtualSizeHintsSz)void SetVirtualSizeHints(
const wxSize& minSize, const wxSize& maxSize=wxDefaultSize);
DocDeclStr( DocDeclStr(
virtual wxSize , GetMaxSize() const, virtual wxSize , GetMaxSize() const,

View File

@@ -14,6 +14,24 @@
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Typemaps to convert a list of items to an int (size) and an array // Typemaps to convert a list of items to an int (size) and an array
%define MAKE_INT_ARRAY_TYPEMAPS(NAME, ARR_NAME)
%typemap(in) (int NAME, int* ARR_NAME) {
$1 = PyList_Size($input);
$2 = int_LIST_helper($input);
if ($2 == NULL) SWIG_fail;
}
%typemap(freearg) (int NAME, int* ARR_NAME) {
if ($2) delete [] $2;
}
%enddef
MAKE_INT_ARRAY_TYPEMAPS(widths, widths_field)
MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field)
// Same things for a wxString
%typemap(in) (int choices, wxString* choices_array ) { %typemap(in) (int choices, wxString* choices_array ) {
$1 = PyList_Size($input); $1 = PyList_Size($input);
$2 = wxString_LIST_helper($input); $2 = wxString_LIST_helper($input);
@@ -24,6 +42,7 @@
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// wxString typemaps // wxString typemaps