Addition at simple wxObject*, support into wxVariant.

This includes 2 new methods wxVariant::IsValueKindOf() and
wxVariantData::GetValueClassInfo() to allow query of the
wxRTTI data of the variant's data.

Also included is a macro analogues to dynamicCast for fetching
objects out of a wxVariant.

Documentation patches for the above.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Roger Gammans
2003-06-02 21:17:28 +00:00
parent 8647bec62d
commit cf6ae2907c
4 changed files with 183 additions and 2 deletions

View File

@@ -1052,6 +1052,15 @@ void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
{
textCtrl << _T("var1[") << (int) i << _T("] (type ") << var1[i].GetType() << _T(") = ") << var1[i].MakeString() << _T("\n");
}
var1 = wxVariant(new wxFont(wxSystemSettings::GetFont(wxSYS_OEM_FIXED_FONT)));
textCtrl << _T("var1 = (wxfont)\"");
wxFont* font = wxGetVariantCast(var1,wxFont);
if (font) {
textCtrl << font->GetNativeFontInfoDesc() << _T("\"\n");
} else {
textCtrl << _T("(null)\"\n");
}
}
BEGIN_EVENT_TABLE(MyFrame, wxFrame)