From: Jouk Jansen Date: Tue, 4 Jan 2000 15:02:12 +0000 (+0000) Subject: Committing in . X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1696c17801e10ea87246508ff7da37aa2f6d79ff Committing in . Patches for VMS Temporarily patch to get the IMAGE sample compiled in MOTIF-mode N.B. GetSubImage still gives rubish Modified Files: wxWindows/setup.h_vms wxWindows/include/wx/motif/bitmap.h wxWindows/src/common/datetime.cpp wxWindows/src/common/descrip.mms wxWindows/src/generic/descrip.mms wxWindows/src/motif/bitmap.cpp ---------------------------------------------------------------------- git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/motif/bitmap.h b/include/wx/motif/bitmap.h index 49495e6563..17b7142ce7 100644 --- a/include/wx/motif/bitmap.h +++ b/include/wx/motif/bitmap.h @@ -159,6 +159,9 @@ public: virtual bool Create(int width, int height, int depth = -1); virtual bool Create(void *data, long type, int width, int height, int depth = 1); + + wxBitmap GetSubBitmap( const wxRect& rect ) const; + virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XPM); virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL); diff --git a/setup.h_vms b/setup.h_vms index d6a6936447..2ff5e9bba9 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -67,8 +67,12 @@ /* Define if lex declares yytext as a char * by default, not a char[]. */ #undef YYTEXT_POINTER +/* Define this if your version of GTK+ is greater than 1.2 */ #undef __WXGTK12__ +/* Define this if your version of GTK+ is greater than 1.3 */ +#undef __WXGTK13__ + /* * Define to 1 for Unix[-like] system */ diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 7598153308..b50431a134 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -1637,7 +1637,12 @@ wxDateTime::wxDateTime_t wxDateTime::GetWeekOfMonth(wxDateTime::WeekFlags flags, Tm tm = GetTm(tz); wxDateTime dtMonthStart = wxDateTime(1, tm.mon, tm.year); size_t nWeek = GetWeekOfYear(flags) - dtMonthStart.GetWeekOfYear(flags) + 1; +#ifdef __VMS__ // nWeek is unsigned so avoid the warning + int nweek2 = (int) nWeek; + if ( nweek2 < 0 ) +#else if ( nWeek < 0 ) +#endif { // this may happen for January when Jan, 1 is the last week of the // previous year diff --git a/src/common/descrip.mms b/src/common/descrip.mms index 2fdaf6e019..bc51d1812d 100644 --- a/src/common/descrip.mms +++ b/src/common/descrip.mms @@ -48,6 +48,7 @@ OBJECTS = \ docview.obj,\ dynarray.obj,\ dynlib.obj,\ + encconv.obj,\ event.obj,\ extended.obj,\ ffile.obj,\ @@ -145,6 +146,7 @@ SOURCES = \ docview.cpp,\ dynarray.cpp,\ dynlib.cpp,\ + encconv.cpp,\ event.cpp,\ extended.c,\ ffile.cpp,\ @@ -266,6 +268,7 @@ docmdi.obj : docmdi.cpp docview.obj : docview.cpp dynarray.obj : dynarray.cpp dynlib.obj : dynlib.cpp +encconv.obj : encconv.cpp event.obj : event.cpp extended.obj : extended.c ffile.obj : ffile.cpp diff --git a/src/generic/descrip.mms b/src/generic/descrip.mms index 986f8398b8..778cb95a45 100644 --- a/src/generic/descrip.mms +++ b/src/generic/descrip.mms @@ -21,6 +21,7 @@ CXX_DEFINE = OBJECTS = \ busyinfo.obj,\ + calctrl.obj,\ caret.obj,\ choicdgg.obj,\ colrdlgg.obj,\ @@ -60,6 +61,7 @@ OBJECTS = \ SOURCES = \ busyinfo.cpp,\ + calctrl.cpp,\ caret.cpp,\ choicdgg.cpp,\ colrdlgg.cpp,\ @@ -105,6 +107,7 @@ all : $(SOURCES) .endif busyinfo.obj : busyinfo.cpp +calctrl.obj : calctrl.cpp caret.obj : caret.cpp choicdgg.obj : choicdgg.cpp colrdlgg.obj : colrdlgg.cpp diff --git a/src/motif/bitmap.cpp b/src/motif/bitmap.cpp index 077f20cd3b..76aa578d77 100644 --- a/src/motif/bitmap.cpp +++ b/src/motif/bitmap.cpp @@ -108,6 +108,8 @@ wxBitmapRefData::~wxBitmapRefData() wxList wxBitmap::sm_handlers; +#define M_BMPDATA ((wxBitmapRefData *)m_refData) + wxBitmap::wxBitmap() { m_refData = NULL; @@ -308,6 +310,20 @@ void wxBitmap::SetMask(wxMask *mask) M_BITMAPDATA->m_bitmapMask = mask ; } +wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const +{ + wxCHECK_MSG( Ok() && + (rect.x >= 0) && (rect.y >= 0) && + (rect.x+rect.width <= M_BMPDATA->m_width) && (rect.y+rect.height <= M_BMPDATA->m_height), + wxNullBitmap, wxT("invalid bitmap or bitmap region") ); + + wxBitmap ret( rect.width, rect.height, 0 ); + wxASSERT_MSG( ret.Ok(), wxT("GetSubBitmap error") ); + + // The remaining still TODO + return ret; +} + void wxBitmap::AddHandler(wxBitmapHandler *handler) { sm_handlers.Append(handler);