Exemple #1
0
/* static */
wxAcceleratorEntry *wxAcceleratorEntry::Create(const wxString& str)
{
    int flags,
        keyCode;
    if ( !ParseAccel(str, &flags, &keyCode) )
        return NULL;

    return new wxAcceleratorEntry(flags, keyCode);
}
Exemple #2
0
/* static */
wxAcceleratorEntry *wxAcceleratorEntry::Create(const wxString& str)
{
    const wxString accelStr = str.AfterFirst('\t');
    if ( accelStr.empty() )
    {
        // It's ok to pass strings not containing any accelerators at all to
        // this function, wxMenuItem code does it and we should just return
        // NULL in this case.
        return NULL;
    }

    int flags,
        keyCode;
    if ( !ParseAccel(accelStr, &flags, &keyCode) )
        return NULL;

    return new wxAcceleratorEntry(flags, keyCode);
}
Exemple #3
0
bool wxAcceleratorEntry::FromString(const wxString& str)
{
    return ParseAccel(str, &m_flags, &m_keyCode);
}