Exemplo n.º 1
0
// 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);
    }
}
Exemplo n.º 2
0
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);
    }
}
Exemplo n.º 3
0
// 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);
    }
}