本文整理汇总了C++中wxAboutDialogInfo::IsSimple方法的典型用法代码示例。如果您正苦于以下问题:C++ wxAboutDialogInfo::IsSimple方法的具体用法?C++ wxAboutDialogInfo::IsSimple怎么用?C++ wxAboutDialogInfo::IsSimple使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxAboutDialogInfo
的用法示例。
在下文中一共展示了wxAboutDialogInfo::IsSimple方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxAboutBox
// our public entry point
void wxAboutBox(const wxAboutDialogInfo& info)
{
// we prefer to show a simple message box if we don't have any fields which
// can't be shown in it because as much as there is a standard about box
// under MSW at all, this is it
if ( info.IsSimple() )
{
// build the text to show in the box
const wxString name = info.GetName();
wxString msg;
msg << name;
if ( info.HasVersion() )
msg << _(" Version ") << info.GetVersion();
msg << _T('\n');
if ( info.HasCopyright() )
msg << info.GetCopyright() << _T('\n');
// add everything remaining
msg << info.GetDescriptionAndCredits();
wxMessageBox(msg, _T("About ") + name);
}
else // simple "native" version is not enough
{
// we need to use the full-blown generic version
wxGenericAboutBox(info);
}
}
示例2: wxAboutBox
void wxAboutBox(const wxAboutDialogInfo& info)
{
// Mac native about box currently can show only name, version, copyright
// and description fields and we also shoehorn the credits text into the
// description but if we have anything else we must use the generic version
if ( info.IsSimple() )
{
AboutBoxOptions opts;
opts.Set(kHIAboutBoxNameKey, info.GetName());
if ( info.HasVersion() )
{
opts.Set(kHIAboutBoxVersionKey,
wxString::Format(_("Version %s"), info.GetVersion().c_str()));
}
if ( info.HasCopyright() )
opts.Set(kHIAboutBoxCopyrightKey, info.GetCopyright());
opts.Set(kHIAboutBoxDescriptionKey, info.GetDescriptionAndCredits());
HIAboutBox(opts);
}
else // simple "native" version is not enough
{
// we need to use the full-blown generic version
wxGenericAboutBox(info);
}
}
示例3: wxAboutBox
// our public entry point
void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent)
{
// we prefer to show a simple message box if we don't have any fields which
// can't be shown in it because as much as there is a standard about box
// under MSW at all, this is it
if ( info.IsSimple() )
{
// build the text to show in the box
const wxString name = info.GetName();
wxString msg;
msg << name;
if ( info.HasVersion() )
{
msg << wxT('\n');
msg << info.GetLongVersion();
}
msg << wxT("\n\n");
if ( info.HasCopyright() )
msg << info.GetCopyrightToDisplay() << wxT('\n');
// add everything remaining
msg << info.GetDescriptionAndCredits();
wxMessageBox(msg, wxString::Format(_("About %s"), name, wxOK | wxCENTRE, parent));
}
else // simple "native" version is not enough
{
// we need to use the full-blown generic version
wxGenericAboutBox(info, parent);
}
}