! @return a predicate, on a pointer to a window, that it has the given name. */
| 31 | that it has the given name. |
| 32 | */ |
| 33 | inline auto HasName( const wxString &name ) |
| 34 | { |
| 35 | return [name](const wxWindow *pWindow2){ |
| 36 | return pWindow2 && |
| 37 | // Ignore wxStaticText windows, which ShuttleGui may assign the same |
| 38 | // name as the related control. Those windows are non-interactive so |
| 39 | // don't interest us for journalling. |
| 40 | !dynamic_cast<const wxStaticText *>( pWindow2 ) && |
| 41 | // Also exclude this special window type defined in Audacity. |
| 42 | !dynamic_cast<const auStaticText *>( pWindow2 ) && |
| 43 | pWindow2->GetName() == name; }; |
| 44 | } |
| 45 | |
| 46 | /*! @return a predicate, on a pointer to a window, |
| 47 | that it has the same name as the given window. |
no test coverage detected