This is the way to go (well, close enough).
Unicodified lots of asserts. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9cc7a35d9c
commit
62bd5cf059
@ -104,8 +104,8 @@ wxBitmap::wxBitmap()
|
||||
|
||||
wxBitmap::wxBitmap( int width, int height, int depth )
|
||||
{
|
||||
wxCHECK_RET( (width > 0) && (height > 0), "invalid bitmap size" )
|
||||
wxCHECK_RET( (depth > 0) || (depth == -1), "invalid bitmap depth" )
|
||||
wxCHECK_RET( (width > 0) && (height > 0), _T("invalid bitmap size") )
|
||||
wxCHECK_RET( (depth > 0) || (depth == -1), _T("invalid bitmap depth") )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
@ -122,7 +122,7 @@ wxBitmap::wxBitmap( int width, int height, int depth )
|
||||
|
||||
wxBitmap::wxBitmap( const char **bits )
|
||||
{
|
||||
wxCHECK_RET( bits != NULL, "invalid bitmap data" )
|
||||
wxCHECK_RET( bits != NULL, _T("invalid bitmap data") )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
@ -145,7 +145,7 @@ wxBitmap::wxBitmap( const char **bits )
|
||||
|
||||
wxBitmap::wxBitmap( char **bits )
|
||||
{
|
||||
wxCHECK_RET( bits != NULL, "invalid bitmap data" )
|
||||
wxCHECK_RET( bits != NULL, _T("invalid bitmap data") )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
@ -154,7 +154,7 @@ wxBitmap::wxBitmap( char **bits )
|
||||
|
||||
M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm_d( parent, &mask, NULL, (gchar **) bits );
|
||||
|
||||
wxCHECK_RET( M_BMPDATA->m_pixmap, "couldn't create pixmap" );
|
||||
wxCHECK_RET( M_BMPDATA->m_pixmap, _T("couldn't create pixmap") );
|
||||
|
||||
if (mask)
|
||||
{
|
||||
@ -193,7 +193,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
|
||||
M_BMPDATA->m_height = height;
|
||||
M_BMPDATA->m_bpp = 1;
|
||||
|
||||
wxCHECK_RET( M_BMPDATA->m_bitmap, "couldn't create bitmap" );
|
||||
wxCHECK_RET( M_BMPDATA->m_bitmap, _T("couldn't create bitmap") );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
@ -227,35 +227,35 @@ bool wxBitmap::Ok(void) const
|
||||
|
||||
int wxBitmap::GetHeight(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_height;
|
||||
}
|
||||
|
||||
int wxBitmap::GetWidth(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_width;
|
||||
}
|
||||
|
||||
int wxBitmap::GetDepth(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_bpp;
|
||||
}
|
||||
|
||||
wxMask *wxBitmap::GetMask(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), (wxMask *) NULL, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), (wxMask *) NULL, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_mask;
|
||||
}
|
||||
|
||||
void wxBitmap::SetMask( wxMask *mask )
|
||||
{
|
||||
wxCHECK_RET( Ok(), "invalid bitmap" );
|
||||
wxCHECK_RET( Ok(), _T("invalid bitmap") );
|
||||
|
||||
if (M_BMPDATA->m_mask) delete M_BMPDATA->m_mask;
|
||||
|
||||
@ -264,7 +264,7 @@ void wxBitmap::SetMask( wxMask *mask )
|
||||
|
||||
bool wxBitmap::SaveFile( const wxString &name, int type, wxPalette *WXUNUSED(palette) )
|
||||
{
|
||||
wxCHECK_MSG( Ok(), FALSE, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), FALSE, _T("invalid bitmap") );
|
||||
|
||||
if (type == wxBITMAP_TYPE_PNG)
|
||||
{
|
||||
@ -288,7 +288,7 @@ bool wxBitmap::LoadFile( const wxString &name, int type )
|
||||
GdkBitmap *mask = (GdkBitmap*) NULL;
|
||||
GdkWindow *parent = (GdkWindow*) &gdk_root_parent;
|
||||
|
||||
M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm( parent, &mask, NULL, name );
|
||||
M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm( parent, &mask, NULL, name.fn_str() );
|
||||
|
||||
if (mask)
|
||||
{
|
||||
@ -354,16 +354,14 @@ void wxBitmap::SetPixmap( GdkPixmap *pixmap )
|
||||
|
||||
GdkPixmap *wxBitmap::GetPixmap(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), (GdkPixmap *) NULL, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), (GdkPixmap *) NULL, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_pixmap;
|
||||
}
|
||||
|
||||
GdkBitmap *wxBitmap::GetBitmap(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), (GdkBitmap *) NULL, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), (GdkBitmap *) NULL, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_bitmap;
|
||||
}
|
||||
|
||||
|
||||
|
@ -171,14 +171,14 @@ void wxBitmapButton::SetDefault()
|
||||
|
||||
void wxBitmapButton::SetLabel( const wxString &label )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
wxControl::SetLabel( label );
|
||||
}
|
||||
|
||||
wxString wxBitmapButton::GetLabel() const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, "", "invalid button" );
|
||||
wxCHECK_MSG( m_widget != NULL, _T(""), _T("invalid button") );
|
||||
|
||||
return wxControl::GetLabel();
|
||||
}
|
||||
@ -189,7 +189,7 @@ void wxBitmapButton::ApplyWidgetStyle()
|
||||
|
||||
void wxBitmapButton::SetBitmap()
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
wxBitmap the_one;
|
||||
|
||||
@ -224,7 +224,7 @@ void wxBitmapButton::SetBitmap()
|
||||
|
||||
void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
if ( ! m_disabled.Ok() ) return;
|
||||
m_disabled = bitmap;
|
||||
@ -234,7 +234,7 @@ void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap )
|
||||
|
||||
void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
if ( ! m_focus.Ok() ) return;
|
||||
m_focus = bitmap;
|
||||
@ -244,7 +244,7 @@ void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap )
|
||||
|
||||
void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
if (!m_bitmap.Ok()) return;
|
||||
m_bitmap = bitmap;
|
||||
@ -254,7 +254,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
|
||||
|
||||
void wxBitmapButton::SetBitmapSelected( const wxBitmap& bitmap )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
if ( ! m_selected.Ok() ) return;
|
||||
m_selected = bitmap;
|
||||
|
@ -111,7 +111,7 @@ int wxBrush::GetStyle() const
|
||||
{
|
||||
if (m_refData == NULL)
|
||||
{
|
||||
wxFAIL_MSG( "invalid brush" );
|
||||
wxFAIL_MSG( _T("invalid brush") );
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ wxColour &wxBrush::GetColour() const
|
||||
{
|
||||
if (m_refData == NULL)
|
||||
{
|
||||
wxFAIL_MSG( "invalid brush" );
|
||||
wxFAIL_MSG( _T("invalid brush") );
|
||||
return wxNullColour;
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ wxBitmap *wxBrush::GetStipple() const
|
||||
{
|
||||
if (m_refData == NULL)
|
||||
{
|
||||
wxFAIL_MSG( "invalid brush" );
|
||||
wxFAIL_MSG( _T("invalid brush") );
|
||||
return &wxNullBitmap;
|
||||
}
|
||||
|
||||
|
@ -104,8 +104,8 @@ wxBitmap::wxBitmap()
|
||||
|
||||
wxBitmap::wxBitmap( int width, int height, int depth )
|
||||
{
|
||||
wxCHECK_RET( (width > 0) && (height > 0), "invalid bitmap size" )
|
||||
wxCHECK_RET( (depth > 0) || (depth == -1), "invalid bitmap depth" )
|
||||
wxCHECK_RET( (width > 0) && (height > 0), _T("invalid bitmap size") )
|
||||
wxCHECK_RET( (depth > 0) || (depth == -1), _T("invalid bitmap depth") )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
@ -122,7 +122,7 @@ wxBitmap::wxBitmap( int width, int height, int depth )
|
||||
|
||||
wxBitmap::wxBitmap( const char **bits )
|
||||
{
|
||||
wxCHECK_RET( bits != NULL, "invalid bitmap data" )
|
||||
wxCHECK_RET( bits != NULL, _T("invalid bitmap data") )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
@ -145,7 +145,7 @@ wxBitmap::wxBitmap( const char **bits )
|
||||
|
||||
wxBitmap::wxBitmap( char **bits )
|
||||
{
|
||||
wxCHECK_RET( bits != NULL, "invalid bitmap data" )
|
||||
wxCHECK_RET( bits != NULL, _T("invalid bitmap data") )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
@ -154,7 +154,7 @@ wxBitmap::wxBitmap( char **bits )
|
||||
|
||||
M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm_d( parent, &mask, NULL, (gchar **) bits );
|
||||
|
||||
wxCHECK_RET( M_BMPDATA->m_pixmap, "couldn't create pixmap" );
|
||||
wxCHECK_RET( M_BMPDATA->m_pixmap, _T("couldn't create pixmap") );
|
||||
|
||||
if (mask)
|
||||
{
|
||||
@ -193,7 +193,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
|
||||
M_BMPDATA->m_height = height;
|
||||
M_BMPDATA->m_bpp = 1;
|
||||
|
||||
wxCHECK_RET( M_BMPDATA->m_bitmap, "couldn't create bitmap" );
|
||||
wxCHECK_RET( M_BMPDATA->m_bitmap, _T("couldn't create bitmap") );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
@ -227,35 +227,35 @@ bool wxBitmap::Ok(void) const
|
||||
|
||||
int wxBitmap::GetHeight(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_height;
|
||||
}
|
||||
|
||||
int wxBitmap::GetWidth(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_width;
|
||||
}
|
||||
|
||||
int wxBitmap::GetDepth(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_bpp;
|
||||
}
|
||||
|
||||
wxMask *wxBitmap::GetMask(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), (wxMask *) NULL, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), (wxMask *) NULL, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_mask;
|
||||
}
|
||||
|
||||
void wxBitmap::SetMask( wxMask *mask )
|
||||
{
|
||||
wxCHECK_RET( Ok(), "invalid bitmap" );
|
||||
wxCHECK_RET( Ok(), _T("invalid bitmap") );
|
||||
|
||||
if (M_BMPDATA->m_mask) delete M_BMPDATA->m_mask;
|
||||
|
||||
@ -264,7 +264,7 @@ void wxBitmap::SetMask( wxMask *mask )
|
||||
|
||||
bool wxBitmap::SaveFile( const wxString &name, int type, wxPalette *WXUNUSED(palette) )
|
||||
{
|
||||
wxCHECK_MSG( Ok(), FALSE, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), FALSE, _T("invalid bitmap") );
|
||||
|
||||
if (type == wxBITMAP_TYPE_PNG)
|
||||
{
|
||||
@ -288,7 +288,7 @@ bool wxBitmap::LoadFile( const wxString &name, int type )
|
||||
GdkBitmap *mask = (GdkBitmap*) NULL;
|
||||
GdkWindow *parent = (GdkWindow*) &gdk_root_parent;
|
||||
|
||||
M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm( parent, &mask, NULL, name );
|
||||
M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm( parent, &mask, NULL, name.fn_str() );
|
||||
|
||||
if (mask)
|
||||
{
|
||||
@ -354,16 +354,14 @@ void wxBitmap::SetPixmap( GdkPixmap *pixmap )
|
||||
|
||||
GdkPixmap *wxBitmap::GetPixmap(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), (GdkPixmap *) NULL, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), (GdkPixmap *) NULL, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_pixmap;
|
||||
}
|
||||
|
||||
GdkBitmap *wxBitmap::GetBitmap(void) const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), (GdkBitmap *) NULL, "invalid bitmap" );
|
||||
wxCHECK_MSG( Ok(), (GdkBitmap *) NULL, _T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_bitmap;
|
||||
}
|
||||
|
||||
|
||||
|
@ -171,14 +171,14 @@ void wxBitmapButton::SetDefault()
|
||||
|
||||
void wxBitmapButton::SetLabel( const wxString &label )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
wxControl::SetLabel( label );
|
||||
}
|
||||
|
||||
wxString wxBitmapButton::GetLabel() const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, "", "invalid button" );
|
||||
wxCHECK_MSG( m_widget != NULL, _T(""), _T("invalid button") );
|
||||
|
||||
return wxControl::GetLabel();
|
||||
}
|
||||
@ -189,7 +189,7 @@ void wxBitmapButton::ApplyWidgetStyle()
|
||||
|
||||
void wxBitmapButton::SetBitmap()
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
wxBitmap the_one;
|
||||
|
||||
@ -224,7 +224,7 @@ void wxBitmapButton::SetBitmap()
|
||||
|
||||
void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
if ( ! m_disabled.Ok() ) return;
|
||||
m_disabled = bitmap;
|
||||
@ -234,7 +234,7 @@ void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap )
|
||||
|
||||
void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
if ( ! m_focus.Ok() ) return;
|
||||
m_focus = bitmap;
|
||||
@ -244,7 +244,7 @@ void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap )
|
||||
|
||||
void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
if (!m_bitmap.Ok()) return;
|
||||
m_bitmap = bitmap;
|
||||
@ -254,7 +254,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
|
||||
|
||||
void wxBitmapButton::SetBitmapSelected( const wxBitmap& bitmap )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, "invalid button" );
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid button") );
|
||||
|
||||
if ( ! m_selected.Ok() ) return;
|
||||
m_selected = bitmap;
|
||||
|
@ -111,7 +111,7 @@ int wxBrush::GetStyle() const
|
||||
{
|
||||
if (m_refData == NULL)
|
||||
{
|
||||
wxFAIL_MSG( "invalid brush" );
|
||||
wxFAIL_MSG( _T("invalid brush") );
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ wxColour &wxBrush::GetColour() const
|
||||
{
|
||||
if (m_refData == NULL)
|
||||
{
|
||||
wxFAIL_MSG( "invalid brush" );
|
||||
wxFAIL_MSG( _T("invalid brush") );
|
||||
return wxNullColour;
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ wxBitmap *wxBrush::GetStipple() const
|
||||
{
|
||||
if (m_refData == NULL)
|
||||
{
|
||||
wxFAIL_MSG( "invalid brush" );
|
||||
wxFAIL_MSG( _T("invalid brush") );
|
||||
return &wxNullBitmap;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user