MCPcopy Create free account
hub / github.com/audacity/audacity / HasName

Function HasName

src/JournalWindowPaths.cpp:33–44  ·  view source on GitHub ↗

! @return a predicate, on a pointer to a window, that it has the given name. */

Source from the content-addressed store, hash-verified

31 that it has the given name.
32*/
33inline 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.

Callers 2

SameNameFunction · 0.85
FindByNameAmongPeersFunction · 0.85

Calls 1

GetNameMethod · 0.45

Tested by

no test coverage detected