Added wxPoem sample; fixed some Dialog Editor problems; wxStaticBitmap and wxBitmapButton

now recognised by resource.cpp.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-12-12 18:50:16 +00:00
parent ae0bdb016f
commit 3013b6f460
23 changed files with 4183 additions and 21 deletions

View File

@@ -38,12 +38,15 @@
#endif
// Sun CC compatibility (interference with xview/pkg.h, apparently...)
#if defined(SUN_CC) && defined(__XVIEW__)
// But XView is no longer supported.
/*
#if defined (SUN_CC) || defined(__SUNCC__) && defined(__XVIEW__)
#undef va_start
#undef va_end
#undef va_arg
#undef va_list
#endif
*/
// =============================================================================
// implementation

View File

@@ -797,6 +797,19 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
controlItem->SetId(id);
if (controlType == "wxButton")
{
// Check for bitmap resource name (in case loading old-style resource file)
if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord)))
{
wxString str(expr->Nth(count)->StringValue());
controlItem->SetValue4(str);
count ++;
controlItem->SetType("wxBitmapButton");
}
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
else if (controlType == "wxBitmapButton")
{
// Check for bitmap resource name
if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord)))
@@ -852,6 +865,19 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
}
}
else if (controlType == "wxMessage" || controlType == "wxStaticText")
{
// Check for bitmap resource name (in case it's an old-style .wxr file)
if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord)))
{
wxString str(expr->Nth(count)->StringValue());
controlItem->SetValue4(str);
count ++;
controlItem->SetType("wxStaticText");
}
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
else if (controlType == "wxStaticBitmap")
{
// Check for bitmap resource name
if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord)))
@@ -859,9 +885,9 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
wxString str(expr->Nth(count)->StringValue());
controlItem->SetValue4(str);
count ++;
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
else if (controlType == "wxGroupBox" || controlType == "wxStaticBox")
{