wxImage& image)
{
wxIDirectFBSurface::Locked locked(surface, DSLF_READ);
- wxCHECK_RET( locked.ptr, _T("failed to lock surface") );
+ wxCHECK_RET( locked.ptr, "failed to lock surface" );
const unsigned width = image.GetWidth();
const unsigned height = image.GetHeight();
// Creates a surface that will use wxImage's pixel data (RGB only)
static wxIDirectFBSurfacePtr CreateSurfaceForImage(const wxImage& image)
{
- wxCHECK_MSG( image.Ok(), NULL, _T("invalid image") );
+ wxCHECK_MSG( image.Ok(), NULL, "invalid image" );
// FIXME_DFB: implement alpha handling by merging alpha buffer with RGB
// into a temporary RGBA surface
- wxCHECK_MSG( !image.HasAlpha(), NULL, _T("alpha channel not supported") );
+ wxCHECK_MSG( !image.HasAlpha(), NULL, "alpha channel not supported" );
// NB: wxImage uses RGB order of bytes while DirectFB uses BGR, so we
// cannot use preallocated surface that shares data with wxImage, we
{
UnRef();
- wxCHECK_MSG( surface, false, _T("invalid surface") );
+ wxCHECK_MSG( surface, false, "invalid surface" );
m_refData = new wxBitmapRefData();
M_BITMAP->m_surface = surface;
}
// FIXME: implement mask creation from image's mask (or alpha channel?)
- wxASSERT_MSG( !image.HasMask(), _T("image masks are ignored for now") );
+ wxASSERT_MSG( !image.HasMask(), "image masks are ignored for now" );
}
wxImage wxBitmap::ConvertToImage() const
}
// FIXME: implement mask setting in the image
- wxASSERT_MSG( GetMask() == NULL, _T("bitmap masks are ignored for now") );
+ wxASSERT_MSG( GetMask() == NULL, "bitmap masks are ignored for now" );
return img;
}
{
wxCHECK_RET( depth == 1, wxT("can only create mono bitmap from XBM data") );
- wxFAIL_MSG( _T("not implemented") );
+ wxFAIL_MSG( "not implemented" );
}
bool wxBitmap::IsOk() const
{
AllocExclusive();
- wxFAIL_MSG( _T("SetHeight not implemented") );
+ wxFAIL_MSG( "SetHeight not implemented" );
}
void wxBitmap::SetWidth(int width)
{
AllocExclusive();
- wxFAIL_MSG( _T("SetWidth not implemented") );
+ wxFAIL_MSG( "SetWidth not implemented" );
}
void wxBitmap::SetDepth(int depth)
void wxDC::DFBInit(const wxIDirectFBSurfacePtr& surface)
{
m_ok = (surface != NULL);
- wxCHECK_RET( surface != NULL, _T("invalid surface") );
+ wxCHECK_RET( surface != NULL, "invalid surface" );
m_surface = surface;
wxSize size(GetSize());
wxASSERT_MSG( !m_clipping,
- _T("narrowing clipping region not implemented yet") );
+ "narrowing clipping region not implemented yet" );
// NB: We intersect the clipping rectangle with surface's area here because
// DirectFB will return an error if you try to set clipping rectangle
bool wxDC::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
{
- wxCHECK_MSG( col, false, _T("NULL colour parameter in wxDC::GetPixel"));
+ wxCHECK_MSG( col, false, "NULL colour parameter in wxDC::GetPixel");
- wxFAIL_MSG( _T("GetPixel not implemented") );
+ wxFAIL_MSG( "GetPixel not implemented" );
return false;
}
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxFAIL_MSG( _T("CrossHair not implemented") );
+ wxFAIL_MSG( "CrossHair not implemented" );
}
void wxDC::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxFAIL_MSG( _T("DrawArc not implemented") );
+ wxFAIL_MSG( "DrawArc not implemented" );
}
void wxDC::DoDrawPoint(wxCoord x, wxCoord y)
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxFAIL_MSG( _T("DrawPolygon not implemented") );
+ wxFAIL_MSG( "DrawPolygon not implemented" );
}
void wxDC::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
wxCHECK_RET( Ok(), wxT("invalid dc") );
// TODO: impl. using DirectDB's DrawLines
- wxFAIL_MSG( _T("DrawLines not implemented") );
+ wxFAIL_MSG( "DrawLines not implemented" );
}
void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxFAIL_MSG( _T("DrawRoundedRectangle not implemented") );
+ wxFAIL_MSG( "DrawRoundedRectangle not implemented" );
}
void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxFAIL_MSG( _T("DrawElipse not implemented") );
+ wxFAIL_MSG( "DrawElipse not implemented" );
}
void wxDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea)
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxFAIL_MSG( _T("DrawElipticArc not implemented") );
+ wxFAIL_MSG( "DrawElipticArc not implemented" );
}
void wxDC::DoDrawText(const wxString& text, wxCoord x, wxCoord y)
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxFAIL_MSG( _T("DrawRotatedText not implemented") );
+ wxFAIL_MSG( "DrawRotatedText not implemented" );
}
// ---------------------------------------------------------------------------
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxFAIL_MSG( _T("SetPalette not implemented") );
+ wxFAIL_MSG( "SetPalette not implemented" );
}
#endif // wxUSE_PALETTE
// NB: we could also support XOR, but for blitting only (via DSBLIT_XOR);
// and possibly others via SetSrc/DstBlendFunction()
wxASSERT_MSG( function == wxCOPY,
- _T("only wxCOPY logical function supported") );
+ "only wxCOPY logical function supported" );
m_logicalFunction = function;
}
int rop, bool useMask,
wxCoord xsrcMask, wxCoord ysrcMask)
{
- wxCHECK_MSG( Ok(), false, _T("invalid dc") );
- wxCHECK_MSG( source, false, _T("invalid source dc") );
+ wxCHECK_MSG( Ok(), false, "invalid dc" );
+ wxCHECK_MSG( source, false, "invalid source dc" );
// NB: we could also support XOR here (via DSBLIT_XOR)
// and possibly others via SetSrc/DstBlendFunction()
- wxCHECK_MSG( rop == wxCOPY, false, _T("only wxCOPY function supported") );
+ wxCHECK_MSG( rop == wxCOPY, false, "only wxCOPY function supported" );
// transform the source DC coords to the device ones
xsrc = source->LogicalToDeviceX(xsrc);
// FIXME_DFB: use the mask origin when drawing transparently
wxASSERT_MSG( xsrcMask == -1 && ysrcMask == -1,
- _T("non-default source mask offset not implemented") );
+ "non-default source mask offset not implemented" );
#if 0
if (xsrcMask == -1 && ysrcMask == -1)
{
// NB: we could also support XOR here (via DSBLIT_XOR)
// and possibly others via SetSrc/DstBlendFunction()
- wxCHECK_RET( rop == wxCOPY, _T("only wxCOPY function supported") );
+ wxCHECK_RET( rop == wxCOPY, "only wxCOPY function supported" );
if ( bmp.GetDepth() == 1 )
{
// Mono bitmaps are handled in special way -- all 1s are drawn in
// foreground colours, all 0s in background colour.
- wxFAIL_MSG( _T("drawing mono bitmaps not implemented") );
+ wxFAIL_MSG( "drawing mono bitmaps not implemented" );
return;
}
// applicable because DirectFB doesn't implement ROPs; OTOH,
// it has blitting modes that can be useful; finally, see
// DFB's SetSrcBlendFunction() and SetSrcColorKey()
- wxFAIL_MSG( _T("drawing bitmaps with masks not implemented") );
+ wxFAIL_MSG( "drawing bitmaps with masks not implemented" );
return;
}
src->GetSize(&srcsize.x, &srcsize.y);
if ( !wxRect(srcx, srcy, w, h).Intersects(wxRect(srcsize)) )
{
- wxLogDebug(_T("Blitting from area outside of the source surface, caller code needs fixing."));
+ wxLogDebug("Blitting from area outside of the source surface, caller code needs fixing.");
return false;
}
#include "wx/dfb/private.h"
-#define TRACE_PAINT _T("paint")
+#define TRACE_PAINT "paint"
// ===========================================================================
// implementation
static
wxIDirectFBSurfacePtr CreateDummySurface(wxWindow *win, const wxRect *rect)
{
- wxLogTrace(TRACE_PAINT, _T("%p ('%s'): creating dummy DC surface"),
+ wxLogTrace(TRACE_PAINT, "%p ('%s'): creating dummy DC surface",
win, win->GetName().c_str());
wxSize size(rect ? rect->GetSize() : win->GetSize());
void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect)
{
- wxCHECK_RET( win, _T("invalid window") );
+ wxCHECK_RET( win, "invalid window" );
m_win = win;
if ( win->GetTLW()->IsPainting() && !updateRegion.IsEmpty() )
{
r.Intersect(updateRegion.AsRect());
- wxCHECK_RET( !r.IsEmpty(), _T("invalid painting rectangle") );
+ wxCHECK_RET( !r.IsEmpty(), "invalid painting rectangle" );
// parent TLW will flip the entire surface when painting is done
m_shouldFlip = false;
return;
wxLogTrace(TRACE_PAINT,
- _T("%p ('%s'): creating DC for area [%i,%i,%i,%i], clipped to [%i,%i,%i,%i], origin [%i,%i]"),
+ "%p ('%s'): creating DC for area [%i,%i,%i,%i], clipped to [%i,%i,%i,%i], origin [%i,%i]",
win, win->GetName().c_str(),
rectOrig.x, rectOrig.y, rectOrig.GetRight(), rectOrig.GetBottom(),
r.x, r.y, r.GetRight(), r.GetBottom(),
wxClientDC::wxClientDC(wxWindow *win)
{
- wxCHECK_RET( win, _T("invalid window") );
+ wxCHECK_RET( win, "invalid window" );
wxRect rect = win->GetClientRect();
InitForWin(win, &rect);
#include "wx/dfb/private.h"
#include "wx/nonownedwnd.h"
-#define TRACE_EVENTS _T("events")
+#define TRACE_EVENTS "events"
// ===========================================================================
// implementation
bool wxGUIEventLoop::Pending() const
{
- wxCHECK_MSG( ms_buffer, false, _T("invalid event buffer") );
+ wxCHECK_MSG( ms_buffer, false, "invalid event buffer" );
return ms_buffer->HasEvent();
}
bool wxGUIEventLoop::Dispatch()
{
- wxCHECK_MSG( ms_buffer, false, _T("invalid event buffer") );
+ wxCHECK_MSG( ms_buffer, false, "invalid event buffer" );
// NB: we don't block indefinitely waiting for an event, but instead
// time out after a brief period in order to make sure that
void wxGUIEventLoop::WakeUp()
{
- wxCHECK_RET( ms_buffer, _T("invalid event buffer") );
+ wxCHECK_RET( ms_buffer, "invalid event buffer" );
ms_buffer->WakeUp();
}
#endif
{
wxLogTrace(TRACE_EVENTS,
- _T("ignoring event of unsupported class %i"),
+ "ignoring event of unsupported class %i",
(int)event.GetClass());
}
}
else
m_font = wxIDirectFB::Get()->CreateFont(filename.fn_str(), &desc);
- wxASSERT_MSG( m_font, _T("cannot create font instance") );
+ wxASSERT_MSG( m_font, "cannot create font instance" );
}
// ----------------------------------------------------------------------------
void wxFontsManager::AddAllFonts()
{
wxString path;
- if ( !wxGetEnv(_T("WXDFB_FONTPATH"), &path) )
+ if ( !wxGetEnv("WXDFB_FONTPATH", &path) )
path = _T(wxINSTALL_PREFIX "/share/wx/fonts");
wxStringTokenizer tkn(path, wxPATH_SEP);
if ( !wxDir::Exists(dir) )
{
- wxLogDebug(_T("font directory %s doesn't exist"), dir);
+ wxLogDebug("font directory %s doesn't exist", dir);
continue;
}
wxArrayString indexFiles;
- if ( !wxDir::GetAllFiles(dir, &indexFiles, _T("FontsIndex")) )
+ if ( !wxDir::GetAllFiles(dir, &indexFiles, "FontsIndex") )
continue;
for ( wxArrayString::const_iterator i = indexFiles.begin();
{
// We can fall back to the builtin default font if no other fonts are
// defined:
- wxLogTrace(_T("font"),
+ wxLogTrace("font",
_("no fonts found in %s, using builtin font"), path);
AddBundle
return;
}
- wxLogTrace(_T("font"), _T("adding fonts from %s"), dir.c_str());
+ wxLogTrace("font", "adding fonts from %s", dir.c_str());
wxFileConfig cfg(wxEmptyString, wxEmptyString,
indexFile, wxEmptyString,
if ( p.empty() || wxFileName(p).IsAbsolute() )
return p;
- return dir + _T("/") + p;
+ return dir + "/" + p;
}
void wxFontsManager::AddFont(const wxString& dir,
const wxString& name,
wxFileConfig& cfg)
{
- wxLogTrace(_T("font"), _T("adding font '%s'"), name.c_str());
+ wxLogTrace("font", "adding font '%s'", name.c_str());
- wxConfigPathChanger ch(&cfg, wxString::Format(_T("/%s/"), name.c_str()));
+ wxConfigPathChanger ch(&cfg, wxString::Format("/%s/", name.c_str()));
AddBundle
(
new wxFontBundle
(
name,
- ReadFilePath(_T("Regular"), dir, cfg),
- ReadFilePath(_T("Italic"), dir, cfg),
- ReadFilePath(_T("Bold"), dir, cfg),
- ReadFilePath(_T("BoldItalic"), dir, cfg),
- cfg.Read(_T("IsFixed"), (long)false)
+ ReadFilePath("Regular", dir, cfg),
+ ReadFilePath("Italic", dir, cfg),
+ ReadFilePath("Bold", dir, cfg),
+ ReadFilePath("BoldItalic", dir, cfg),
+ cfg.Read("IsFixed", (long)false)
)
);
}
{
wxString name;
- if ( cfg.Read(_T("Default"), &name) )
+ if ( cfg.Read("Default", &name) )
{
m_defaultFacenames[wxFONTFAMILY_DECORATIVE] =
m_defaultFacenames[wxFONTFAMILY_ROMAN] =
m_defaultFacenames[wxFONTFAMILY_TELETYPE] = name;
}
- if ( cfg.Read(_T("DefaultDecorative"), &name) )
+ if ( cfg.Read("DefaultDecorative", &name) )
m_defaultFacenames[wxFONTFAMILY_DECORATIVE] = name;
- if ( cfg.Read(_T("DefaultRoman"), &name) )
+ if ( cfg.Read("DefaultRoman", &name) )
m_defaultFacenames[wxFONTFAMILY_ROMAN] = name;
- if ( cfg.Read(_T("DefaultScript"), &name) )
+ if ( cfg.Read("DefaultScript", &name) )
m_defaultFacenames[wxFONTFAMILY_SCRIPT] = name;
- if ( cfg.Read(_T("DefaultSwiss"), &name) )
+ if ( cfg.Read("DefaultSwiss", &name) )
m_defaultFacenames[wxFONTFAMILY_SWISS] = name;
- if ( cfg.Read(_T("DefaultModern"), &name) )
+ if ( cfg.Read("DefaultModern", &name) )
m_defaultFacenames[wxFONTFAMILY_MODERN] = name;
- if ( cfg.Read(_T("DefaultTeletype"), &name) )
+ if ( cfg.Read("DefaultTeletype", &name) )
m_defaultFacenames[wxFONTFAMILY_TELETYPE] = name;
}
#include "wx/evtloop.h"
#include "wx/dfb/private.h"
-#define TRACE_EVENTS _T("events")
-#define TRACE_PAINT _T("paint")
+#define TRACE_EVENTS "events"
+#define TRACE_PAINT "paint"
// ============================================================================
// globals
long style,
const wxString &name)
{
- wxCHECK_MSG( pos.x >= 0 && pos.y >= 0, false, _T("invalid position") );
- wxCHECK_MSG( size.x > 0 && size.y > 0, false, _T("invalid size") );
+ wxCHECK_MSG( pos.x >= 0 && pos.y >= 0, false, "invalid position" );
+ wxCHECK_MSG( size.x > 0 && size.y > 0, false, "invalid size" );
m_tlw = this;
// create DirectFB window:
wxIDirectFBDisplayLayerPtr layer(wxIDirectFB::Get()->GetDisplayLayer());
- wxCHECK_MSG( layer, false, _T("no display layer") );
+ wxCHECK_MSG( layer, false, "no display layer" );
DFBWindowDescription desc;
desc.flags = (DFBWindowDescriptionFlags)
continue; // nothing to refresh
wxLogTrace(TRACE_PAINT,
- _T("%p ('%s'): processing paint request [%i,%i,%i,%i]"),
+ "%p ('%s'): processing paint request [%i,%i,%i,%i]",
this, GetName().c_str(),
clipped.x, clipped.y, clipped.GetRight(), clipped.GetBottom());
GetDfbSurface()->FlipToFront(rptr);
wxLogTrace(TRACE_PAINT,
- _T("%p ('%s'): processed %i paint requests, flipped surface: [%i,%i,%i,%i]"),
+ "%p ('%s'): processed %i paint requests, flipped surface: [%i,%i,%i,%i]",
this, GetName().c_str(),
requestsCount,
paintedRect.x, paintedRect.y,
return;
wxLogTrace(TRACE_PAINT,
- _T("%p ('%s'): [TLW] refresh rect [%i,%i,%i,%i]"),
+ "%p ('%s'): [TLW] refresh rect [%i,%i,%i,%i]",
this, GetName().c_str(),
rect.x, rect.y, rect.GetRight(), rect.GetBottom());
void wxNonOwnedWindow::SetDfbFocus()
{
- wxCHECK_RET( IsShown(), _T("cannot set focus to hidden window") );
+ wxCHECK_RET( IsShown(), "cannot set focus to hidden window" );
wxASSERT_MSG( FindFocus() && FindFocus()->GetTLW() == this,
- _T("setting DirectFB focus to unexpected window") );
+ "setting DirectFB focus to unexpected window" );
// Don't set DirectFB focus if we're called from HandleFocusEvent() on
// this window, because we already have the focus in that case. Not only
if ( gs_dfbWindowsMap.find(event.window_id) == gs_dfbWindowsMap.end() )
{
wxLogTrace(TRACE_EVENTS,
- _T("received event for unknown DirectFB window, ignoring"));
+ "received event for unknown DirectFB window, ignoring");
return;
}
if ( !recipient )
{
wxLogTrace(TRACE_EVENTS,
- _T("ignoring event: no recipient window"));
+ "ignoring event: no recipient window");
return;
}
wxCHECK_RET( recipient && recipient->GetTLW() == tlw,
- _T("event recipient not in TLW which received the event") );
+ "event recipient not in TLW which received the event" );
recipient->HandleKeyEvent(event_);
break;
case DWET_NONE:
case DWET_ALL:
- wxFAIL_MSG( _T("invalid event type") );
+ wxFAIL_MSG( "invalid event type" );
break;
default:
void wxOverlayImpl::Clear(wxWindowDC *dc)
{
wxASSERT_MSG( IsOk(),
- _T("You cannot Clear an overlay that is not initialized") );
+ "You cannot Clear an overlay that is not initialized" );
m_isEmpty = true;
}
{
if ( style != wxSOLID && style != wxTRANSPARENT )
{
- wxFAIL_MSG( _T("only wxSOLID and wxTRANSPARENT styles are supported") );
+ wxFAIL_MSG( "only wxSOLID and wxTRANSPARENT styles are supported" );
style = wxSOLID;
}
wxPen::wxPen(const wxColour &colour, int width, int style)
{
- wxASSERT_MSG( width <= 1, _T("only width=0,1 are supported") );
+ wxASSERT_MSG( width <= 1, "only width=0,1 are supported" );
m_refData = new wxPenRefData(colour, style);
}
wxPen::wxPen(const wxBitmap& WXUNUSED(stipple), int WXUNUSED(width))
{
- wxFAIL_MSG( _T("stipple pens not supported") );
+ wxFAIL_MSG( "stipple pens not supported" );
m_refData = new wxPenRefData();
}
void wxPen::SetDashes(int WXUNUSED(number_of_dashes), const wxDash *WXUNUSED(dash))
{
- wxFAIL_MSG( _T("SetDashes not implemented") );
+ wxFAIL_MSG( "SetDashes not implemented" );
}
void wxPen::SetColour(unsigned char red, unsigned char green, unsigned char blue)
void wxPen::SetCap(int WXUNUSED(capStyle))
{
- wxFAIL_MSG( _T("SetCap not implemented") );
+ wxFAIL_MSG( "SetCap not implemented" );
}
void wxPen::SetJoin(int WXUNUSED(joinStyle))
{
- wxFAIL_MSG( _T("SetJoin not implemented") );
+ wxFAIL_MSG( "SetJoin not implemented" );
}
void wxPen::SetStyle(int style)
void wxPen::SetStipple(const wxBitmap& WXUNUSED(stipple))
{
- wxFAIL_MSG( _T("SetStipple not implemented") );
+ wxFAIL_MSG( "SetStipple not implemented" );
}
void wxPen::SetWidth(int width)
{
- wxASSERT_MSG( width <= 1, _T("only width=0,1 are implemented") );
+ wxASSERT_MSG( width <= 1, "only width=0,1 are implemented" );
}
int wxPen::GetDashes(wxDash **ptr) const
{
- wxFAIL_MSG( _T("GetDashes not implemented") );
+ wxFAIL_MSG( "GetDashes not implemented" );
*ptr = NULL;
return 0;
int wxPen::GetDashCount() const
{
- wxFAIL_MSG( _T("GetDashCount not implemented") );
+ wxFAIL_MSG( "GetDashCount not implemented" );
return 0;
}
wxDash* wxPen::GetDash() const
{
- wxFAIL_MSG( _T("GetDash not implemented") );
+ wxFAIL_MSG( "GetDash not implemented" );
return NULL;
}
{
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
- wxFAIL_MSG( _T("GetCap not implemented") );
+ wxFAIL_MSG( "GetCap not implemented" );
return -1;
}
{
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
- wxFAIL_MSG( _T("GetJoin not implemented") );
+ wxFAIL_MSG( "GetJoin not implemented" );
return -1;
}
{
wxCHECK_MSG( Ok(), NULL, wxT("invalid pen") );
- wxFAIL_MSG( _T("GetStipple not implemented") );
+ wxFAIL_MSG( "GetStipple not implemented" );
return NULL;
}
}
else
{
- wxFAIL_MSG( _T("only rectangular regions are supported") );
+ wxFAIL_MSG( "only rectangular regions are supported" );
return false;
}
}
bool wxRegion::DoUnionWithRegion(const wxRegion& region)
{
- wxCHECK_MSG( region.Ok(), false, _T("invalid region") );
+ wxCHECK_MSG( region.Ok(), false, "invalid region" );
return DoUnionWithRect(M_REGION_OF(region)->m_rect);
}
bool wxRegion::DoIntersect(const wxRegion& region)
{
- wxCHECK_MSG( region.Ok(), false, _T("invalid region") );
+ wxCHECK_MSG( region.Ok(), false, "invalid region" );
AllocExclusive();
M_REGION->m_rect.Intersect(M_REGION_OF(region)->m_rect);
bool wxRegion::DoSubtract(const wxRegion& region)
{
- wxCHECK_MSG( region.Ok(), false, _T("invalid region") );
- wxCHECK_MSG( Ok(), false, _T("invalid region") );
+ wxCHECK_MSG( region.Ok(), false, "invalid region" );
+ wxCHECK_MSG( Ok(), false, "invalid region" );
const wxRect& rect = M_REGION_OF(region)->m_rect;
}
else
{
- wxFAIL_MSG( _T("only rectangular regions implemented") );
+ wxFAIL_MSG( "only rectangular regions implemented" );
return false;
}
}
bool wxRegion::DoXor(const wxRegion& region)
{
- wxCHECK_MSG( region.Ok(), false, _T("invalid region") );
- wxFAIL_MSG( _T("Xor not implemented") );
+ wxCHECK_MSG( region.Ok(), false, "invalid region" );
+ wxFAIL_MSG( "Xor not implemented" );
return false;
}
wxRegionContain wxRegion::DoContainsPoint(wxCoord x, wxCoord y) const
{
- wxCHECK_MSG( Ok(), wxOutRegion, _T("invalid region") );
+ wxCHECK_MSG( Ok(), wxOutRegion, "invalid region" );
if (M_REGION->m_rect.Contains(x, y))
return wxInRegion;
wxRegionContain wxRegion::DoContainsRect(const wxRect& rect) const
{
- wxCHECK_MSG( Ok(), wxOutRegion, _T("invalid region") );
+ wxCHECK_MSG( Ok(), wxOutRegion, "invalid region" );
// 1) is the rectangle entirely covered by the region?
if (M_REGION->m_rect.Contains(rect))
}
default:
- wxFAIL_MSG( _T("unknown font type") );
+ wxFAIL_MSG( "unknown font type" );
return wxNullFont;
}
}
#endif
default:
- wxFAIL_MSG( _T("unsupported metric") );
+ wxFAIL_MSG( "unsupported metric" );
return -1;
}
}
return false;
default:
- wxFAIL_MSG( _T("unknown feature") );
+ wxFAIL_MSG( "unknown feature" );
return false;
}
}
#include "wx/dfb/private.h"
-#define TRACE_EVENTS _T("events")
+#define TRACE_EVENTS "events"
// ============================================================================
// wxTopLevelWindowDFB
const bool activate = (dfbevent.type == DWET_GOTFOCUS);
wxLogTrace(TRACE_EVENTS,
- _T("toplevel window %p ('%s') %s focus"),
+ "toplevel window %p ('%s') %s focus",
this, GetName(),
- activate ? _T("got") : _T("lost"));
+ activate ? "got" : "lost");
wxActivateEvent event(wxEVT_ACTIVATE, activate, GetId());
event.SetEventObject(this);
if ( !focused || focused->GetTLW() != this )
{
wxLogTrace(TRACE_EVENTS,
- _T("setting wx focus to toplevel window %p ('%s')"),
+ "setting wx focus to toplevel window %p ('%s')",
this, GetName());
if ( CanAcceptFocus() )
bool wxGetKeyState(wxKeyCode key)
{
wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key != WXK_MBUTTON,
- _T("can't use wxGetKeyState() for mouse buttons"));
+ "can't use wxGetKeyState() for mouse buttons");
return false; // FIXME
}
int wxAddProcessCallback(wxEndProcessData *proc_data, int fd)
{
- wxFAIL_MSG( _T("wxAddProcessCallback not implemented") );
+ wxFAIL_MSG( "wxAddProcessCallback not implemented" );
return 0;
}
#include "wx/dfb/private.h"
#include "wx/private/overlay.h"
-#define TRACE_EVENTS _T("events")
-#define TRACE_PAINT _T("paint")
+#define TRACE_EVENTS "events"
+#define TRACE_PAINT "paint"
// ===========================================================================
// implementation
wxIDirectFBSurfacePtr wxWindowDFB::ObtainDfbSurface() const
{
- wxCHECK_MSG( m_parent, NULL, _T("parentless window?") );
+ wxCHECK_MSG( m_parent, NULL, "parentless window?" );
wxIDirectFBSurfacePtr parentSurface(m_parent->GetDfbSurface());
- wxCHECK_MSG( parentSurface, NULL, _T("invalid parent surface") );
+ wxCHECK_MSG( parentSurface, NULL, "invalid parent surface" );
wxRect r(GetRect());
AdjustForParentClientOrigin(r.x, r.y, 0);
if ( !m_surface )
{
m_surface = ObtainDfbSurface();
- wxASSERT_MSG( m_surface, _T("invalid DirectFB surface") );
+ wxASSERT_MSG( m_surface, "invalid DirectFB surface" );
}
return m_surface;
void wxWindowDFB::DFBKillFocus()
{
wxCHECK_RET( gs_focusedWindow == this,
- _T("killing focus on window that doesn't have it") );
+ "killing focus on window that doesn't have it" );
gs_focusedWindow = NULL;
// Raise the window to the top of the Z order
void wxWindowDFB::Raise()
{
- wxFAIL_MSG( _T("Raise() not implemented") );
+ wxFAIL_MSG( "Raise() not implemented" );
}
// Lower the window to the bottom of the Z order
void wxWindowDFB::Lower()
{
- wxFAIL_MSG( _T("Lower() not implemented") );
+ wxFAIL_MSG( "Lower() not implemented" );
}
void wxWindowDFB::DoCaptureMouse()
if ( y >= h ) y = h-1;
wxIDirectFBDisplayLayerPtr layer(wxIDirectFB::Get()->GetDisplayLayer());
- wxCHECK_RET( layer, _T("no display layer") );
+ wxCHECK_RET( layer, "no display layer" );
layer->WarpCursor(x, y);
}
return false;
#warning "implement this"
- wxFAIL_MSG( _T("reparenting not yet implemented") );
+ wxFAIL_MSG( "reparenting not yet implemented" );
return true;
}
static wxPoint GetScreenPosOfClientOrigin(const wxWindowDFB *win)
{
- wxCHECK_MSG( win, wxPoint(0, 0), _T("no window provided") );
+ wxCHECK_MSG( win, wxPoint(0, 0), "no window provided" );
wxPoint pt(win->GetPosition() + win->GetClientAreaOrigin());
void wxWindowDFB::DoRefreshRect(const wxRect& rect)
{
wxWindow *parent = GetParent();
- wxCHECK_RET( parent, _T("no parent") );
+ wxCHECK_RET( parent, "no parent" );
// don't overlap outside of the window (NB: 'rect' is in window coords):
wxRect r(rect);
return;
wxLogTrace(TRACE_PAINT,
- _T("%p ('%s'): refresh rect [%i,%i,%i,%i]"),
+ "%p ('%s'): refresh rect [%i,%i,%i,%i]",
this, GetName().c_str(),
rect.x, rect.y, rect.GetRight(), rect.GetBottom());
void wxWindowDFB::Thaw()
{
- wxASSERT_MSG( IsFrozen(), _T("Thaw() without matching Freeze()") );
+ wxASSERT_MSG( IsFrozen(), "Thaw() without matching Freeze()" );
if ( --m_frozenness == 0 )
{
void wxWindowDFB::PaintWindow(const wxRect& rect)
{
- wxCHECK_RET( !IsFrozen() && IsShown(), _T("shouldn't be called") );
+ wxCHECK_RET( !IsFrozen() && IsShown(), "shouldn't be called" );
wxLogTrace(TRACE_PAINT,
- _T("%p ('%s'): painting region [%i,%i,%i,%i]"),
+ "%p ('%s'): painting region [%i,%i,%i,%i]",
this, GetName().c_str(),
rect.x, rect.y, rect.GetRight(), rect.GetBottom());
}
else
{
- wxLogTrace(TRACE_PAINT, _T("%p ('%s'): not sending wxNcPaintEvent"),
+ wxLogTrace(TRACE_PAINT, "%p ('%s'): not sending wxNcPaintEvent",
this, GetName().c_str());
}
}
else
{
- wxLogTrace(TRACE_PAINT, _T("%p ('%s'): not sending wxPaintEvent"),
+ wxLogTrace(TRACE_PAINT, "%p ('%s'): not sending wxPaintEvent",
this, GetName().c_str());
}
void wxWindowDFB::RemoveOverlay(wxOverlayImpl *overlay)
{
- wxCHECK_RET( m_overlays, _T("no overlays to remove") );
+ wxCHECK_RET( m_overlays, "no overlays to remove" );
m_overlays->Remove(overlay);
case DIKI_KEYDEF_END:
case DIKI_NUMBER_OF_KEYS:
- wxFAIL_MSG( _T("invalid key_id value") );
+ wxFAIL_MSG( "invalid key_id value" );
return 0;
}
const DFBWindowEvent& e = event_;
wxLogTrace(TRACE_EVENTS,
- _T("handling key %s event for window %p ('%s')"),
- e.type == DWET_KEYUP ? _T("up") : _T("down"),
+ "handling key %s event for window %p ('%s')",
+ e.type == DWET_KEYUP ? "up" : "down",
this, GetName().c_str());
// fill in wxKeyEvent fields:
wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
{
- wxFAIL_MSG( _T("wxFindWindowAtPoint not implemented") );
+ wxFAIL_MSG( "wxFindWindowAtPoint not implemented" );
return NULL;
}
// these are programming errors, assert:
#define DFB_ASSERT(code) \
case code: \
- wxFAIL_MSG( _T("DirectFB error: ") _T(#code) ); \
+ wxFAIL_MSG( "DirectFB error: " _T(#code) ); \
return false \
DFB_ASSERT(DFB_DEAD);
return NULL;
}
- wxCHECK_MSG( size.x > 0 && size.y > 0, NULL, _T("invalid size") );
+ wxCHECK_MSG( size.x > 0 && size.y > 0, NULL, "invalid size" );
DFBSurfaceDescription desc;
desc.flags = (DFBSurfaceDescriptionFlags)(