/* static */ wxAcceleratorEntry *wxAcceleratorEntry::Create(const wxString& str) { int flags, keyCode; if ( !ParseAccel(str, &flags, &keyCode) ) return NULL; return new wxAcceleratorEntry(flags, keyCode); }
/* 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); }
bool wxAcceleratorEntry::FromString(const wxString& str) { return ParseAccel(str, &m_flags, &m_keyCode); }