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:
@@ -64,8 +64,8 @@ public:
|
||||
wxBitmap();
|
||||
wxBitmap( int width, int height, int depth = -1 );
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( const char **bits );
|
||||
wxBitmap( char **bits );
|
||||
wxBitmap( const char **bits ) { (void)CreateFromXpm(bits); }
|
||||
wxBitmap( char **bits ) { (void)CreateFromXpm((const char **)bits); }
|
||||
wxBitmap( const wxBitmap& bmp );
|
||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||
~wxBitmap();
|
||||
@@ -99,6 +99,9 @@ public:
|
||||
GdkPixmap *GetPixmap() const;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
|
||||
protected:
|
||||
bool CreateFromXpm(const char **bits);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
};
|
||||
|
@@ -64,8 +64,8 @@ public:
|
||||
wxBitmap();
|
||||
wxBitmap( int width, int height, int depth = -1 );
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( const char **bits );
|
||||
wxBitmap( char **bits );
|
||||
wxBitmap( const char **bits ) { (void)CreateFromXpm(bits); }
|
||||
wxBitmap( char **bits ) { (void)CreateFromXpm((const char **)bits); }
|
||||
wxBitmap( const wxBitmap& bmp );
|
||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||
~wxBitmap();
|
||||
@@ -99,6 +99,9 @@ public:
|
||||
GdkPixmap *GetPixmap() const;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
|
||||
protected:
|
||||
bool CreateFromXpm(const char **bits);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
};
|
||||
|
@@ -140,8 +140,12 @@ public:
|
||||
// Initialize with raw XBM data
|
||||
wxBitmap(const char bits[], int width, int height, int depth = 1);
|
||||
|
||||
// Initialize with XPM data
|
||||
wxBitmap(char **data, wxControl* control = NULL);
|
||||
// from XPM
|
||||
wxBitmap(const char **data) { (void)CreateFromXpm(data); }
|
||||
wxBitmap(char **data) { (void)CreateFromXpm((const char **)data); }
|
||||
|
||||
// Initialize with XPM data -- deprecated
|
||||
wxBitmap(char **data, wxControl* control);
|
||||
|
||||
// Load a file or resource
|
||||
wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_XPM);
|
||||
@@ -201,6 +205,9 @@ public:
|
||||
|
||||
protected:
|
||||
static wxList sm_handlers;
|
||||
|
||||
protected:
|
||||
bool CreateFromXpm(const char **bits);
|
||||
};
|
||||
|
||||
// Creates a bitmap with transparent areas drawn in
|
||||
|
@@ -217,13 +217,6 @@ void MyFrame::RecreateToolbar()
|
||||
wxBitmap toolBarBitmaps[8];
|
||||
|
||||
toolBarBitmaps[0] = wxBITMAP(new);
|
||||
#if 0
|
||||
toolBar->AddTool(wxID_NEW, toolBarBitmaps[0], wxNullBitmap, FALSE, -1, -1,
|
||||
(wxObject *) NULL, "New file");
|
||||
toolBar->Realize();
|
||||
return;
|
||||
#endif
|
||||
|
||||
toolBarBitmaps[1] = wxBITMAP(open);
|
||||
if ( !m_smallToolbar )
|
||||
{
|
||||
|
@@ -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 )
|
||||
|
@@ -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 )
|
||||
|
@@ -68,6 +68,18 @@ BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
|
||||
EVT_IDLE(wxApp::OnIdle)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
typedef int (*XErrorHandlerFunc)(Display *, XErrorEvent *);
|
||||
|
||||
XErrorHandlerFunc gs_pfnXErrorHandler = 0;
|
||||
|
||||
static int wxXErrorHandler(Display *dpy, XErrorEvent *xevent)
|
||||
{
|
||||
// just forward to the default handler for now
|
||||
return gs_pfnXErrorHandler(dpy, xevent);
|
||||
}
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
long wxApp::sm_lastMessageTime = 0;
|
||||
|
||||
bool wxApp::Initialize()
|
||||
@@ -575,6 +587,11 @@ bool wxApp::OnInitGui()
|
||||
}
|
||||
m_initialDisplay = (WXDisplay*) dpy;
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
// install the X error handler
|
||||
gs_pfnXErrorHandler = XSetErrorHandler(wxXErrorHandler);
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
wxTheApp->m_topLevelWidget = (WXWidget) XtAppCreateShell((String)NULL, (const char*) wxTheApp->GetClassName(),
|
||||
applicationShellWidgetClass,dpy,
|
||||
NULL,0) ;
|
||||
|
@@ -37,8 +37,8 @@
|
||||
#include <X11/xpm.h>
|
||||
#endif
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject)
|
||||
|
||||
wxBitmapRefData::wxBitmapRefData()
|
||||
{
|
||||
@@ -168,6 +168,13 @@ wxBitmap::wxBitmap(char **data, wxControl* control)
|
||||
sg_Control = (wxControl*) NULL;
|
||||
}
|
||||
|
||||
bool wxBitmap::CreateFromXpm(const char **bits)
|
||||
{
|
||||
wxCHECK_MSG( bits, FALSE, _T("NULL pointer in wxBitmap::CreateFromXpm") );
|
||||
|
||||
return Create(bits, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
|
||||
}
|
||||
|
||||
bool wxBitmap::Create(int w, int h, int d)
|
||||
{
|
||||
UnRef();
|
||||
@@ -828,10 +835,10 @@ WXPixmap wxBitmap::GetLabelPixmap (WXWidget w)
|
||||
|
||||
this is a catch22!!
|
||||
|
||||
So, before doing thing really clean, I just do nothing; if the pixmap is
|
||||
referenced by many widgets, Motif performs caching functions.
|
||||
And if pixmap is referenced with multiples colors, we just have some
|
||||
memory leaks... I hope we can deal with them...
|
||||
So, before doing thing really clean, I just do nothing; if the pixmap is
|
||||
referenced by many widgets, Motif performs caching functions.
|
||||
And if pixmap is referenced with multiples colors, we just have some
|
||||
memory leaks... I hope we can deal with them...
|
||||
*/
|
||||
// Must be destroyed, because colours can have been changed!
|
||||
if (M_BITMAPDATA->m_labelPixmap)
|
||||
@@ -860,26 +867,27 @@ WXPixmap wxBitmap::GetArmPixmap (WXWidget w)
|
||||
|
||||
Display *dpy = (Display*) M_BITMAPDATA->m_display;
|
||||
#ifdef FOO
|
||||
See GetLabelPixmap () comment
|
||||
// Must be destroyed, because colours can have been changed!
|
||||
if (M_BITMAPDATA->m_armPixmap)
|
||||
XmDestroyPixmap (DefaultScreenOfDisplay (dpy), M_BITMAPDATA->m_armPixmap);
|
||||
// See GetLabelPixmap () comment
|
||||
|
||||
// Must be destroyed, because colours can have been changed!
|
||||
if (M_BITMAPDATA->m_armPixmap)
|
||||
XmDestroyPixmap (DefaultScreenOfDisplay (dpy), M_BITMAPDATA->m_armPixmap);
|
||||
#endif
|
||||
|
||||
char tmp[128];
|
||||
sprintf (tmp, "Im%x", (unsigned int) M_BITMAPDATA->m_image);
|
||||
char tmp[128];
|
||||
sprintf (tmp, "Im%x", (unsigned int) M_BITMAPDATA->m_image);
|
||||
|
||||
Pixel fg, bg;
|
||||
Widget widget = (Widget) w;
|
||||
Pixel fg, bg;
|
||||
Widget widget = (Widget) w;
|
||||
|
||||
XtVaGetValues (widget, XmNarmColor, &bg, NULL);
|
||||
while (XmIsGadget (widget))
|
||||
widget = XtParent (widget);
|
||||
XtVaGetValues (widget, XmNforeground, &fg, NULL);
|
||||
XtVaGetValues (widget, XmNarmColor, &bg, NULL);
|
||||
while (XmIsGadget (widget))
|
||||
widget = XtParent (widget);
|
||||
XtVaGetValues (widget, XmNforeground, &fg, NULL);
|
||||
|
||||
M_BITMAPDATA->m_armPixmap = (WXPixmap) XmGetPixmap (DefaultScreenOfDisplay (dpy), tmp, fg, bg);
|
||||
M_BITMAPDATA->m_armPixmap = (WXPixmap) XmGetPixmap (DefaultScreenOfDisplay (dpy), tmp, fg, bg);
|
||||
|
||||
return M_BITMAPDATA->m_armPixmap;
|
||||
return M_BITMAPDATA->m_armPixmap;
|
||||
}
|
||||
|
||||
WXPixmap wxBitmap::GetInsensPixmap (WXWidget w)
|
||||
@@ -908,19 +916,19 @@ WXPixmap wxBitmap::GetInsensPixmap (WXWidget w)
|
||||
XmDestroyPixmap (DefaultScreenOfDisplay (dpy), (Pixmap) M_BITMAPDATA->m_insensPixmap);
|
||||
#endif
|
||||
|
||||
char tmp[128];
|
||||
sprintf (tmp, "Not%x", (unsigned int) M_BITMAPDATA->m_insensImage);
|
||||
char tmp[128];
|
||||
sprintf (tmp, "Not%x", (unsigned int) M_BITMAPDATA->m_insensImage);
|
||||
|
||||
Pixel fg, bg;
|
||||
Widget widget = (Widget) w;
|
||||
Pixel fg, bg;
|
||||
Widget widget = (Widget) w;
|
||||
|
||||
while (XmIsGadget (widget))
|
||||
widget = XtParent (widget);
|
||||
XtVaGetValues (widget, XmNbackground, &bg, XmNforeground, &fg, NULL);
|
||||
while (XmIsGadget (widget))
|
||||
widget = XtParent (widget);
|
||||
XtVaGetValues (widget, XmNbackground, &bg, XmNforeground, &fg, NULL);
|
||||
|
||||
M_BITMAPDATA->m_insensPixmap = (WXPixmap) XmGetPixmap (DefaultScreenOfDisplay (dpy), tmp, fg, bg);
|
||||
M_BITMAPDATA->m_insensPixmap = (WXPixmap) XmGetPixmap (DefaultScreenOfDisplay (dpy), tmp, fg, bg);
|
||||
|
||||
return M_BITMAPDATA->m_insensPixmap;
|
||||
return M_BITMAPDATA->m_insensPixmap;
|
||||
}
|
||||
|
||||
// We may need this sometime...
|
||||
@@ -930,30 +938,30 @@ WXPixmap wxBitmap::GetInsensPixmap (WXWidget w)
|
||||
NAME
|
||||
XCreateInsensitivePixmap - create a grayed-out copy of a pixmap
|
||||
|
||||
SYNOPSIS
|
||||
Pixmap XCreateInsensitivePixmap( Display *display, Pixmap pixmap )
|
||||
SYNOPSIS
|
||||
Pixmap XCreateInsensitivePixmap( Display *display, Pixmap pixmap )
|
||||
|
||||
DESCRIPTION
|
||||
This function creates a grayed-out copy of the argument pixmap, suitable
|
||||
for use as a XmLabel's XmNlabelInsensitivePixmap resource.
|
||||
DESCRIPTION
|
||||
This function creates a grayed-out copy of the argument pixmap, suitable
|
||||
for use as a XmLabel's XmNlabelInsensitivePixmap resource.
|
||||
|
||||
RETURN VALUES
|
||||
The return value is the new Pixmap id or zero on error. Errors include
|
||||
a NULL display argument or an invalid Pixmap argument.
|
||||
RETURN VALUES
|
||||
The return value is the new Pixmap id or zero on error. Errors include
|
||||
a NULL display argument or an invalid Pixmap argument.
|
||||
|
||||
ERRORS
|
||||
If one of the XLib functions fail, it will produce a X error. The
|
||||
default X error handler prints a diagnostic and calls exit().
|
||||
ERRORS
|
||||
If one of the XLib functions fail, it will produce a X error. The
|
||||
default X error handler prints a diagnostic and calls exit().
|
||||
|
||||
SEE ALSO
|
||||
XCopyArea(3), XCreateBitmapFromData(3), XCreateGC(3), XCreatePixmap(3),
|
||||
XFillRectangle(3), exit(2)
|
||||
SEE ALSO
|
||||
XCopyArea(3), XCreateBitmapFromData(3), XCreateGC(3), XCreatePixmap(3),
|
||||
XFillRectangle(3), exit(2)
|
||||
|
||||
AUTHOR
|
||||
John R Veregge - john@puente.jpl.nasa.gov
|
||||
Advanced Engineering and Prototyping Group (AEG)
|
||||
Information Systems Technology Section (395)
|
||||
Jet Propulsion Lab - Calif Institute of Technology
|
||||
AUTHOR
|
||||
John R Veregge - john@puente.jpl.nasa.gov
|
||||
Advanced Engineering and Prototyping Group (AEG)
|
||||
Information Systems Technology Section (395)
|
||||
Jet Propulsion Lab - Calif Institute of Technology
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -961,14 +969,13 @@ Pixmap
|
||||
XCreateInsensitivePixmap( Display *display, Pixmap pixmap )
|
||||
|
||||
{
|
||||
static
|
||||
char stipple_data[] =
|
||||
{
|
||||
0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA,
|
||||
static char stipple_data[] =
|
||||
{
|
||||
0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA,
|
||||
0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA,
|
||||
0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA,
|
||||
0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA
|
||||
};
|
||||
};
|
||||
GC gc;
|
||||
Pixmap ipixmap, stipple;
|
||||
unsigned width, height, depth;
|
||||
@@ -983,30 +990,30 @@ XCreateInsensitivePixmap( Display *display, Pixmap pixmap )
|
||||
return ipixmap;
|
||||
|
||||
if ( 0 == XGetGeometry( display, pixmap, &window, &x, &y,
|
||||
&width, &height, &border, &depth )
|
||||
)
|
||||
&width, &height, &border, &depth )
|
||||
)
|
||||
return ipixmap; /* BadDrawable: probably an invalid pixmap */
|
||||
|
||||
/* Get the stipple pixmap to be used to 'gray-out' the argument pixmap.
|
||||
*/
|
||||
/* Get the stipple pixmap to be used to 'gray-out' the argument pixmap.
|
||||
*/
|
||||
stipple = XCreateBitmapFromData( display, pixmap, stipple_data, 16, 16 );
|
||||
if ( 0 != stipple )
|
||||
{
|
||||
gc = XCreateGC( display, pixmap, (XtGCMask)0, (XGCValues*)NULL );
|
||||
if ( NULL != gc )
|
||||
{
|
||||
/* Create an identical copy of the argument pixmap.
|
||||
*/
|
||||
/* Create an identical copy of the argument pixmap.
|
||||
*/
|
||||
ipixmap = XCreatePixmap( display, pixmap, width, height, depth );
|
||||
if ( 0 != ipixmap )
|
||||
{
|
||||
/* Copy the argument pixmap into the new pixmap.
|
||||
*/
|
||||
/* Copy the argument pixmap into the new pixmap.
|
||||
*/
|
||||
XCopyArea( display, pixmap, ipixmap,
|
||||
gc, 0, 0, width, height, 0, 0 );
|
||||
gc, 0, 0, width, height, 0, 0 );
|
||||
|
||||
/* Refill the new pixmap using the stipple algorithm/pixmap.
|
||||
*/
|
||||
/* Refill the new pixmap using the stipple algorithm/pixmap.
|
||||
*/
|
||||
XSetStipple( display, gc, stipple );
|
||||
XSetFillStyle( display, gc, FillStippled );
|
||||
XFillRectangle( display, ipixmap, gc, 0, 0, width, height );
|
||||
|
@@ -282,7 +282,12 @@ bool wxToolBar::Realize()
|
||||
button = XtVaCreateWidget("toggleButton",
|
||||
xmToggleButtonWidgetClass, (Widget) m_mainWidget,
|
||||
XmNx, currentX, XmNy, currentY,
|
||||
// XmNpushButtonEnabled, True,
|
||||
XmNindicatorOn, False,
|
||||
XmNshadowThickness, 2,
|
||||
XmNborderWidth, 0,
|
||||
XmNspacing, 0,
|
||||
XmNmarginWidth, 0,
|
||||
XmNmarginHeight, 0,
|
||||
XmNmultiClick, XmMULTICLICK_KEEP,
|
||||
XmNlabelType, XmPIXMAP,
|
||||
NULL);
|
||||
@@ -325,9 +330,9 @@ bool wxToolBar::Realize()
|
||||
wxColour col;
|
||||
col.SetPixel(backgroundPixel);
|
||||
|
||||
wxBitmap newBitmap = wxCreateMaskedBitmap(bmp, col);
|
||||
bmp = wxCreateMaskedBitmap(bmp, col);
|
||||
|
||||
tool->SetBitmap1(newBitmap);
|
||||
tool->SetBitmap1(bmp);
|
||||
}
|
||||
|
||||
// Create a selected/toggled bitmap. If there isn't a 2nd
|
||||
@@ -388,12 +393,6 @@ bool wxToolBar::Realize()
|
||||
tool->SetPixmap(pixmap2);
|
||||
|
||||
XtVaSetValues (button,
|
||||
XmNindicatorOn, False,
|
||||
XmNshadowThickness, 2,
|
||||
// XmNborderWidth, 0,
|
||||
// XmNspacing, 0,
|
||||
XmNmarginWidth, 0,
|
||||
XmNmarginHeight, 0,
|
||||
XmNfillOnSelect, True,
|
||||
XmNlabelPixmap, pixmap,
|
||||
XmNselectPixmap, pixmap2,
|
||||
|
@@ -1718,7 +1718,7 @@ bool wxAddWindowToTable(Widget w, wxWindow *win)
|
||||
|
||||
wxWidgetHashTable->Put((long) w, win);
|
||||
|
||||
wxLogDebug("Widget 0x%08x <-> window %p (%s)",
|
||||
wxLogTrace("widget", "Widget 0x%08x <-> window %p (%s)",
|
||||
w, win, win->GetClassInfo()->GetClassName());
|
||||
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user