1. wxMotif toolbar works; the toggle buttons have the same width as the other
ones and not twice as big 2. wxMotif::wxBitmap(from XPM) ctor now takes either "char **" or "const char **", as in wxGTK 3. added an X error handler to wxMotif (debug only) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -245,9 +245,9 @@ wxBitmap::wxBitmap( int width, int height, int depth )
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap( const char **bits )
|
||||
bool wxBitmap::CreateFromXpm( const char **bits )
|
||||
{
|
||||
wxCHECK_RET( bits != NULL, wxT("invalid bitmap data") )
|
||||
wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
@@ -256,6 +256,8 @@ wxBitmap::wxBitmap( const char **bits )
|
||||
|
||||
M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm_d( parent, &mask, NULL, (gchar **) bits );
|
||||
|
||||
wxCHECK_MSG( M_BMPDATA->m_pixmap, FALSE, wxT("couldn't create pixmap") );
|
||||
|
||||
if (mask)
|
||||
{
|
||||
M_BMPDATA->m_mask = new wxMask();
|
||||
@@ -266,31 +268,8 @@ wxBitmap::wxBitmap( const char **bits )
|
||||
|
||||
M_BMPDATA->m_bpp = gdk_window_get_visual( parent )->depth; // ?
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap( char **bits )
|
||||
{
|
||||
wxCHECK_RET( bits != NULL, wxT("invalid bitmap data") )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
GdkBitmap *mask = (GdkBitmap*) NULL;
|
||||
GdkWindow *parent = (GdkWindow*) &gdk_root_parent;
|
||||
|
||||
M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm_d( parent, &mask, NULL, (gchar **) bits );
|
||||
|
||||
wxCHECK_RET( M_BMPDATA->m_pixmap, wxT("couldn't create pixmap") );
|
||||
|
||||
if (mask)
|
||||
{
|
||||
M_BMPDATA->m_mask = new wxMask();
|
||||
M_BMPDATA->m_mask->m_bitmap = mask;
|
||||
}
|
||||
|
||||
gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
|
||||
|
||||
M_BMPDATA->m_bpp = gdk_window_get_visual( parent )->depth; // ?
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap( const wxBitmap& bmp )
|
||||
|
Reference in New Issue
Block a user