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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
@@ -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
|
||||
*/
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user