summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f8c0354)
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
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
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);
virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XPM);
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
/* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER
/* 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 */
+/* Define this if your version of GTK+ is greater than 1.3 */
+#undef __WXGTK13__
+
/*
* Define to 1 for Unix[-like] system
*/
/*
* Define to 1 for Unix[-like] system
*/
Tm tm = GetTm(tz);
wxDateTime dtMonthStart = wxDateTime(1, tm.mon, tm.year);
size_t nWeek = GetWeekOfYear(flags) - dtMonthStart.GetWeekOfYear(flags) + 1;
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
{
// this may happen for January when Jan, 1 is the last week of the
// previous year
{
// this may happen for January when Jan, 1 is the last week of the
// previous year
docview.obj,\
dynarray.obj,\
dynlib.obj,\
docview.obj,\
dynarray.obj,\
dynlib.obj,\
event.obj,\
extended.obj,\
ffile.obj,\
event.obj,\
extended.obj,\
ffile.obj,\
docview.cpp,\
dynarray.cpp,\
dynlib.cpp,\
docview.cpp,\
dynarray.cpp,\
dynlib.cpp,\
event.cpp,\
extended.c,\
ffile.cpp,\
event.cpp,\
extended.c,\
ffile.cpp,\
docview.obj : docview.cpp
dynarray.obj : dynarray.cpp
dynlib.obj : dynlib.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
event.obj : event.cpp
extended.obj : extended.c
ffile.obj : ffile.cpp
OBJECTS = \
busyinfo.obj,\
OBJECTS = \
busyinfo.obj,\
caret.obj,\
choicdgg.obj,\
colrdlgg.obj,\
caret.obj,\
choicdgg.obj,\
colrdlgg.obj,\
SOURCES = \
busyinfo.cpp,\
SOURCES = \
busyinfo.cpp,\
caret.cpp,\
choicdgg.cpp,\
colrdlgg.cpp,\
caret.cpp,\
choicdgg.cpp,\
colrdlgg.cpp,\
.endif
busyinfo.obj : busyinfo.cpp
.endif
busyinfo.obj : busyinfo.cpp
+calctrl.obj : calctrl.cpp
caret.obj : caret.cpp
choicdgg.obj : choicdgg.cpp
colrdlgg.obj : colrdlgg.cpp
caret.obj : caret.cpp
choicdgg.obj : choicdgg.cpp
colrdlgg.obj : colrdlgg.cpp
wxList wxBitmap::sm_handlers;
wxList wxBitmap::sm_handlers;
+#define M_BMPDATA ((wxBitmapRefData *)m_refData)
+
wxBitmap::wxBitmap()
{
m_refData = NULL;
wxBitmap::wxBitmap()
{
m_refData = NULL;
M_BITMAPDATA->m_bitmapMask = 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);
void wxBitmap::AddHandler(wxBitmapHandler *handler)
{
sm_handlers.Append(handler);