~wxGLContext();
void SetCurrent();
- void SetColour(const char *colour);
+ void SetColour(const wxChar *colour);
void SwapBuffers();
void SetupPixelFormat();
~wxGLCanvas();
void SetCurrent();
- void SetColour(const char *colour);
+ void SetColour(const wxChar *colour);
void SwapBuffers();
// void OnSize(wxSizeEvent& event);
Window wxGetWindowParent(Window window)
{
- wxASSERT_MSG( window, "invalid window" );
+ wxASSERT_MSG( window, _T("invalid window") );
return (Window) 0;
wxBitmapHandler *handler = FindHandler(type);
if ( handler == NULL ) {
- wxLogWarning("no data bitmap handler for type %ld defined.",
+ wxLogWarning(wxT("no data bitmap handler for type %ld defined."),
(long)type);
return FALSE;
bool wxBitmap::CreateFromXpm( const char **bits )
{
- wxCHECK_MSG( bits, FALSE, _T("NULL pointer in wxBitmap::CreateFromXpm") );
+ wxCHECK_MSG( bits, FALSE, wxT("NULL pointer in wxBitmap::CreateFromXpm") );
return Create(bits, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
#if wxUSE_NANOX
if (!image.Ok())
{
- wxASSERT_MSG(image.Ok(), "Invalid wxImage passed to wxBitmap::CreateFromImage.");
+ wxASSERT_MSG(image.Ok(), wxT("Invalid wxImage passed to wxBitmap::CreateFromImage."));
return FALSE;
}
if (depth == 1)
{
- wxFAIL_MSG( "mono images later" );
+ wxFAIL_MSG( wxT("mono images later") );
}
else
{
int b_mask = image.GetMaskBlue();
unsigned char* data = image.GetData();
- wxASSERT_MSG( data, "No image data" );
+ wxASSERT_MSG( data, wxT("No image data") );
unsigned char *colorCube =
wxTheApp->GetVisualInfo(M_BMPDATA->m_display)->m_colorCube;
public:
wxXPMFileHandler()
{
- m_name = "XPM file";
- m_extension = "xpm";
+ m_name = wxT("XPM file");
+ m_extension = wxT("xpm");
m_type = wxBITMAP_TYPE_XPM;
};
public:
wxXPMDataHandler()
{
- m_name = "XPM data";
- m_extension = "xpm";
+ m_name = wxT("XPM data");
+ m_extension = wxT("xpm");
m_type = wxBITMAP_TYPE_XPM_DATA;
};
public:
inline wxXBMDataHandler()
{
- m_name = "XBM data";
- m_extension = "xbm";
+ m_name = wxT("XBM data");
+ m_extension = wxT("xbm");
m_type = wxBITMAP_TYPE_XBM_DATA;
};
int hotSpotX, int hotSpotY,
const char maskBits[], wxColour *fg, wxColour *bg)
{
- wxFAIL_MSG( "wxCursor creation from bits not yet implemented" );
+ wxFAIL_MSG( wxT("wxCursor creation from bits not yet implemented") );
}
#if wxUSE_IMAGE
wxCursor::wxCursor( const wxImage & image )
{
- wxFAIL_MSG( "wxCursor creation from wxImage not yet implemented" );
+ wxFAIL_MSG( wxT("wxCursor creation from wxImage not yet implemented") );
}
#endif
wxCoord *descent, wxCoord *externalLeading,
wxFont *font ) const
{
- wxCHECK_RET( Ok(), "invalid dc" );
+ wxCHECK_RET( Ok(), wxT("invalid dc") );
if (string.IsEmpty())
{
wxFont fontToUse = m_font;
if (font) fontToUse = *font;
- wxCHECK_RET( fontToUse.Ok(), "invalid font" );
+ wxCHECK_RET( fontToUse.Ok(), wxT("invalid font") );
XFontStruct *xfont = (XFontStruct*) fontToUse.GetFontStruct( m_scaleY, m_display );
wxCoord wxWindowDC::GetCharWidth() const
{
- wxCHECK_MSG( Ok(), 0, "invalid dc" );
+ wxCHECK_MSG( Ok(), 0, wxT("invalid dc") );
#if wxUSE_UNICODE
PangoLayout *layout = pango_layout_new( m_context );
return w;
#else
- wxCHECK_MSG( m_font.Ok(), 0, "invalid font" );
+ wxCHECK_MSG( m_font.Ok(), 0, wxT("invalid font") );
XFontStruct *xfont = (XFontStruct*) m_font.GetFontStruct( m_scaleY, m_display );
wxCoord wxWindowDC::GetCharHeight() const
{
- wxCHECK_MSG( Ok(), 0, "invalid dc" );
+ wxCHECK_MSG( Ok(), 0, wxT("invalid dc") );
#if wxUSE_UNICODE
PangoLayout *layout = pango_layout_new( m_context );
return h;
#else
- wxCHECK_MSG( m_font.Ok(), 0, "invalid font" );
+ wxCHECK_MSG( m_font.Ok(), 0, wxT("invalid font") );
XFontStruct *xfont = (XFontStruct*) m_font.GetFontStruct( m_scaleY, m_display );
void wxWindowDC::SetFont( const wxFont &font )
{
- wxCHECK_RET( Ok(), "invalid dc" );
+ wxCHECK_RET( Ok(), wxT("invalid dc") );
m_font = font;
}
void wxWindowDC::SetLogicalFunction( int function )
{
- wxCHECK_RET( Ok(), "invalid dc" );
+ wxCHECK_RET( Ok(), wxT("invalid dc") );
int x_function;
wxGLCanvas *gc = (wxGLCanvas*) win;
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
- wxCHECK_RET( vi, "invalid visual for OpenGl" );
+ wxCHECK_RET( vi, wxT("invalid visual for OpenGL") );
m_glContext = glXCreateContext( (Display *)wxGetDisplay(), vi,
None, GL_TRUE);
- wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
+ wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGL context") );
}
wxGLContext::wxGLContext(
wxGLCanvas *gc = (wxGLCanvas*) win;
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
- wxCHECK_RET( vi, "invalid visual for OpenGl" );
+ wxCHECK_RET( vi, wxT("invalid visual for OpenGL") );
if( other != 0 )
m_glContext = glXCreateContext( (Display *)wxGetDisplay(), vi,
m_glContext = glXCreateContext( (Display *)wxGetDisplay(), vi,
None, GL_TRUE );
- wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
+ wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGL context") );
}
wxGLContext::~wxGLContext()
}
}
-void wxGLContext::SetColour(const char *colour)
+void wxGLContext::SetColour(const wxChar *colour)
{
wxColour *the_colour = wxTheColourDatabase->FindColour(colour);
if(the_colour) {
GLint pix = (GLint)the_colour->GetPixel();
if(pix == -1)
{
- wxLogError("wxGLCanvas: cannot allocate color\n");
+ wxLogError(wxT("wxGLCanvas: cannot allocate color\n"));
return;
}
glIndexi(pix);
// Check for the presence of the GLX extension
if(!glXQueryExtension(display, NULL, NULL)) {
- wxLogDebug("wxGLCanvas: GLX extension is missing\n");
+ wxLogDebug(wxT("wxGLCanvas: GLX extension is missing\n"));
return FALSE;
}
m_vi = vi; // safe for later use
- wxCHECK_MSG( m_vi, FALSE, "required visual couldn't be found" );
+ wxCHECK_MSG( m_vi, FALSE, wxT("required visual couldn't be found") );
// Create the GLX context and make it current
// if(glx_cx) glXMakeCurrent(display, (Window) GetClientAreaWindow(), glx_cx);
}
-void wxGLCanvas::SetColour(const char *col)
+void wxGLCanvas::SetColour(const wxChar *col)
{
if( m_glContext ) m_glContext->SetColour(col);
}
bool wxCheckForInterrupt(wxWindow *wnd)
{
- wxASSERT_MSG(FALSE, "wxCheckForInterrupt not yet implemented.");
+ wxASSERT_MSG(FALSE, wxT("wxCheckForInterrupt not yet implemented."));
return FALSE;
}
"ClientMessage", "MappingNotify", // 33-34
"unknown(+)"}; // 35
type = wxMin(35, type); type = wxMax(1, type);
- wxString str(event_name[type]);
- return str;
+ return wxString::FromAscii(event_name[type]);
#endif
}
#endif
long style,
const wxString& name)
{
- wxCHECK_MSG( parent, FALSE, "can't create wxWindow without parent" );
+ wxCHECK_MSG( parent, FALSE, wxT("can't create wxWindow without parent") );
CreateBase(parent, id, pos, size, style, wxDefaultValidator, name);
{
if ((g_captureWindow != NULL) && (g_captureWindow != this))
{
- wxASSERT_MSG(FALSE, "Trying to capture before mouse released.");
+ wxASSERT_MSG(FALSE, wxT("Trying to capture before mouse released."));
// Core dump now
int *tmp = NULL;
int wxWindowX11::GetCharHeight() const
{
- wxCHECK_MSG( m_font.Ok(), 0, "valid window font needed" );
+ wxCHECK_MSG( m_font.Ok(), 0, wxT("valid window font needed") );
#if wxUSE_UNICODE
// There should be an easier way.
int wxWindowX11::GetCharWidth() const
{
- wxCHECK_MSG( m_font.Ok(), 0, "valid window font needed" );
+ wxCHECK_MSG( m_font.Ok(), 0, wxT("valid window font needed") );
#if wxUSE_UNICODE
// There should be an easier way.
wxWindow *wxGetActiveWindow()
{
// TODO
- wxFAIL_MSG("Not implemented");
+ wxFAIL_MSG(wxT("Not implemented"));
return NULL;
}