void wxBitmapCache::SetBitmap( const wxBitmap& bitmap ) { if ( !m_bitmap.IsSameAs(bitmap) ) { InvalidateCache(); m_bitmap = bitmap; if( m_image ) { XmUninstallImage( (XImage*)m_image ); XtFree( (char*)(XImage*)m_image ); m_image = NULL; } } }
wxBitmapCache::~wxBitmapCache() { if( m_display ) { Screen* screen = DefaultScreenOfDisplay( (Display*)m_display ); if( m_labelPixmap ) XmDestroyPixmap( screen, (Pixmap)m_labelPixmap ); if( m_armPixmap ) XmDestroyPixmap( screen, (Pixmap)m_armPixmap ); if( m_insensPixmap ) XmDestroyPixmap( screen, (Pixmap)m_insensPixmap ); } if( m_image ) { XmUninstallImage( (XImage*)m_image ); XtFree( (char*)(XImage*)m_image ); } }
/* * clean out the image cache */ void medmClearImageCache() { XmUninstallImage(&arc25); XmUninstallImage(&bar25); XmUninstallImage(&byte25); XmUninstallImage(&bezierCurve25); XmUninstallImage(&choiceButton25); XmUninstallImage(&cartesianPlot25); XmUninstallImage(&image25); XmUninstallImage(&indicator25); XmUninstallImage(&line25); XmUninstallImage(&menu25); XmUninstallImage(&messageButton25); XmUninstallImage(&meter25); XmUninstallImage(&oval25); XmUninstallImage(&polygon25); XmUninstallImage(&polyline25); XmUninstallImage(&rectangle25); XmUninstallImage(&relatedDisplay25); XmUninstallImage(&select25); XmUninstallImage(&shellCommand25); XmUninstallImage(&wheelSwitch25); XmUninstallImage(&stripChart25); XmUninstallImage(&surfacePlot25); XmUninstallImage(&text25); XmUninstallImage(&textEntry25); XmUninstallImage(&textUpdate25); XmUninstallImage(&valuator25); }