// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
-// Copyright: (c) Julian Smart and Markus Holzem
-// Licence: wxWindows license
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
delete[] wxResourceBuffer;
}
+#if 0
void wxLogWarning(char *msg)
{
wxMessageBox(msg, _("Warning"), wxOK);
}
+#endif
IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable)
wxItemResource::wxItemResource()
{
- m_itemType = "";
- m_title = "";
- m_name = "";
+ m_itemType = wxT("");
+ m_title = wxT("");
+ m_name = wxT("");
m_windowStyle = 0;
m_x = m_y = m_width = m_height = 0;
m_value1 = m_value2 = m_value3 = m_value5 = 0;
- m_value4 = "";
+ m_value4 = wxT("");
m_windowId = 0;
m_exStyle = 0;
}
{
wxExprDatabase db;
- FILE *fd = wxFopen(filename, _T("r"));
+ FILE *fd = wxFopen(filename, wxT("r"));
if (!fd)
return FALSE;
bool eof = FALSE;
//
bitmap.LoadFile(wxCROSS_BITMAP, wxBITMAP_TYPE_BMP_RESOURCE);
#else
- bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE);
+ bitmap.LoadFile(wxT("cross_bmp"), wxBITMAP_TYPE_BMP_RESOURCE);
#endif
control = new wxBitmapButton(parent, id, bitmap, pos, size,
childResource->GetStyle() | wxBU_AUTODRAW, wxDefaultValidator, childResource->GetName());
#ifdef __WXMSW__
// Use a default bitmap
if (!bitmap.Ok())
- bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE);
+ bitmap.LoadFile(wxT("cross_bmp"), wxBITMAP_TYPE_BMP_RESOURCE);
#endif
if (bitmap.Ok())
return table->ParseResourceData(resource);
}
+bool wxResourceParseData(const char* resource, wxResourceTable *table)
+{
+ wxString str(resource, wxConvLibc);
+ if (!table)
+ table = wxDefaultResourceTable;
+
+ return table->ParseResourceData(str);
+}
+
bool wxResourceParseFile(const wxString& filename, wxResourceTable *table)
{
if (!table)
if (!table)
table = wxDefaultResourceTable;
- FILE *fd = wxFopen(f, _T("r"));
+ FILE *fd = wxFopen(f, wxT("r"));
if (!fd)
{
return FALSE;
return TRUE;
}
+bool wxResourceParseString(const wxString& s, wxResourceTable *table)
+{
+#if wxUSE_UNICODE
+ return wxResourceParseString( (char*)s.mb_str().data() );
+#else
+ return wxResourceParseString( (char*)s.c_str() );
+#endif
+}
+
bool wxResourceParseString(char *s, wxResourceTable *table)
{
if (!table)