From: Robin Dunn Date: Wed, 24 Sep 2003 20:09:53 +0000 (+0000) Subject: Changes needed to get upto date with the latest wx CVS X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1a10a058d5d700b0d12b5a42f92a69633e182a0e Changes needed to get upto date with the latest wx CVS git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 54122585c6..5e58282c49 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -368,6 +368,7 @@ enum { wxID_HELP_PROCEDURES, wxID_HELP_CONTEXT, wxID_CLOSE_ALL, + wxID_PREFERENCES, wxID_CUT, wxID_COPY, @@ -446,6 +447,7 @@ enum { wxMENU_TEAROFF, wxMB_DOCKABLE, wxNO_FULL_REPAINT_ON_RESIZE, + wxFULL_REPAINT_ON_RESIZE, wxLEFT, wxRIGHT, diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index 7fdae3e4d2..0c6ab0c90f 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -954,8 +954,11 @@ of your Mac.""" # KeyboardInterrupt???) but will later segfault on exit. By # setting the default handler then the app will exit, as # expected (depending on platform.) - import signal - signal.signal(signal.SIGINT, signal.SIG_DFL) + try: + import signal + signal.signal(signal.SIGINT, signal.SIG_DFL) + except: + pass # this initializes wxWindows and then calls our OnInit _wxStart(self.OnInit) diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index 461262b48e..e2d6e99dbe 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -557,6 +557,7 @@ public: int GetRange(); int GetShadowWidth(); int GetValue(); + bool IsVertical() const; void SetBezelFace(int width); void SetRange(int range); void SetShadowWidth(int width); @@ -881,6 +882,9 @@ public: bool LoadFile(const wxString& file); bool SaveFile(const wxString& file = wxPyEmptyString); + // sets the dirty flag + virtual void MarkDirty() = 0; + // clears the dirty flag void DiscardEdits(); diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index f88d140f45..9096bc7f57 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -476,6 +476,9 @@ public: // or small icon view) int GetCountPerPage() const; + // return the total area occupied by all the items (icon/small icon only) + wxRect GetViewRect() const; + #ifdef __WXMSW__ // Gets the edit control for editing labels. wxTextCtrl* GetEditControl() const; @@ -556,10 +559,8 @@ public: // Gets the number of columns in the list control int GetColumnCount() const; - // Retrieves the spacing between icons in pixels. - // If small is TRUE, gets the spacing for the small icon - // view, otherwise the large icon view. - int GetItemSpacing(bool isSmall) const; + // get the horizontal and vertical components of the item spacing + wxSize GetItemSpacing() const; #ifndef __WXMSW__ void SetItemSpacing( int spacing, bool isSmall = FALSE ); diff --git a/wxPython/src/fonts.i b/wxPython/src/fonts.i index 289562f068..fc3cf551f3 100644 --- a/wxPython/src/fonts.i +++ b/wxPython/src/fonts.i @@ -131,6 +131,12 @@ enum wxFontEncoding wxFONTENCODING_UTF7, // UTF-7 Unicode encoding wxFONTENCODING_UTF8, // UTF-8 Unicode encoding + wxFONTENCODING_UTF16, // UTF-16 Unicode encoding + wxFONTENCODING_UTF16BE, // UTF-16 Big Endian Unicode encoding + wxFONTENCODING_UTF16LE, // UTF-16 Little Endian Unicode encoding + wxFONTENCODING_UTF32, // UTF-32 Unicode encoding + wxFONTENCODING_UTF32BE, // UTF-32 Big Endian Unicode encoding + wxFONTENCODING_UTF32LE, // UTF-32 Little Endian Unicode encoding // Far Eastern encodings // Chinese @@ -161,6 +167,9 @@ struct wxNativeFontInfo // reset to the default state void Init(); + // init with the parameters of the given font + void InitFromFont(const wxFont& font); + // accessors and modifiers for the font elements int GetPointSize() const; wxFontStyle GetStyle() const; @@ -199,30 +208,30 @@ struct wxNativeFontInfo %{ // Fix some link errors... Remove this when these methods get real implementations... -#if defined(__WXGTK__) || defined(__WXX11__) -#if wxUSE_PANGO -void wxNativeFontInfo::SetPointSize(int pointsize) - { wxFAIL_MSG( _T("not implemented") ); } +// #if defined(__WXGTK__) || defined(__WXX11__) +// #if wxUSE_PANGO +// void wxNativeFontInfo::SetPointSize(int pointsize) +// { wxFAIL_MSG( _T("not implemented") ); } -void wxNativeFontInfo::SetStyle(wxFontStyle style) - { wxFAIL_MSG( _T("not implemented") ); } +// void wxNativeFontInfo::SetStyle(wxFontStyle style) +// { wxFAIL_MSG( _T("not implemented") ); } -void wxNativeFontInfo::SetWeight(wxFontWeight weight) - { wxFAIL_MSG( _T("not implemented") ); } +// void wxNativeFontInfo::SetWeight(wxFontWeight weight) +// { wxFAIL_MSG( _T("not implemented") ); } -void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined)) - { wxFAIL_MSG( _T("not implemented") ); } +// void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined)) +// { wxFAIL_MSG( _T("not implemented") ); } -void wxNativeFontInfo::SetFaceName(wxString facename) - { wxFAIL_MSG( _T("not implemented") ); } +// void wxNativeFontInfo::SetFaceName(wxString facename) +// { wxFAIL_MSG( _T("not implemented") ); } -void wxNativeFontInfo::SetFamily(wxFontFamily family) - { wxFAIL_MSG( _T("not implemented") ); } +// void wxNativeFontInfo::SetFamily(wxFontFamily family) +// { wxFAIL_MSG( _T("not implemented") ); } -void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding) - { wxFAIL_MSG( _T("not implemented") ); } -#endif -#endif +// void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding) +// { wxFAIL_MSG( _T("not implemented") ); } +// #endif +// #endif %} //--------------------------------------------------------------------------- @@ -348,7 +357,7 @@ public: bool IsFixedWidth(); - wxNativeFontInfo* GetNativeFontInfo() const; + const wxNativeFontInfo* GetNativeFontInfo() const; wxString GetNativeFontInfoDesc() const; wxString GetNativeFontInfoUserDesc() const; diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index d3fe92e1ae..751642779f 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -465,7 +465,7 @@ public: %pragma(python) addtoclass = "asTuple = Get def __str__(self): return str(self.asTuple()) - def __repr__(self): return 'wxColour:' + str(self.asTuple()) + def __repr__(self): return 'wxColour' + str(self.asTuple()) def __nonzero__(self): return self.Ok() def __getinitargs__(self): return () def __getstate__(self): return self.asTuple() @@ -1210,6 +1210,10 @@ public: void Next() { (*self) ++; } + + bool __nonzero__() { + return self->operator bool(); + } }; }; diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index 41c469a038..aaecd697c8 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -879,10 +879,16 @@ public: const wxBitmap& bmpUnchecked = wxNullBitmap); //void SetBitmap(const wxBitmap& bmpChecked); //wxBitmap GetBitmap(bool bChecked = TRUE); + + void SetDisabledBitmap( const wxBitmap& bmpDisabled ); + const wxBitmap& GetDisabledBitmap() const; + void SetMarginWidth(int nWidth); int GetMarginWidth(); static int GetDefaultMarginWidth(); bool IsOwnerDrawn(); + // switch on/off owner-drawing the item + void SetOwnerDrawn(bool ownerDrawn = TRUE); void ResetOwnerDrawn(); #endif diff --git a/wxPython/src/windows2.i b/wxPython/src/windows2.i index 7ca8d1843b..20d6329a90 100644 --- a/wxPython/src/windows2.i +++ b/wxPython/src/windows2.i @@ -129,14 +129,14 @@ public: // adds a new page to the control virtual bool AddPage(wxWindow *page, const wxString& text, - bool bSelect = false, + bool select = false, int imageId = -1); // the same as AddPage(), but adds the page at the specified position virtual bool InsertPage(size_t n, wxWindow *page, const wxString& text, - bool bSelect = false, + bool select = false, int imageId = -1) = 0; // set the currently selected page, return the index of the previously