13#include <wx/stattext.h>
14#include <wx/toplevel.h>
23namespace WindowPaths {
35 return [
name](
const wxWindow *pWindow2){
40 !
dynamic_cast<const wxStaticText *
>( pWindow2 ) &&
43 pWindow2->GetName() ==
name; };
51 return HasName( window.GetName() );
55template<
typename Pred >
57 const wxWindowList &list,
const Pred &pred )
59 const auto begin = list.begin(),
end = list.end();
60 auto iter1 = std::find_if(
begin,
end, pred);
63 auto next = iter1, iter2 = std::find_if(++next,
end, pred);
77 const wxString &
name,
const wxWindowList &list )
87 if (
dynamic_cast<const wxTopLevelWindow*
>( &window ) ) {
89 components.push_back( window.GetName() );
93 else if (
auto pParent = window.GetParent() ) {
96 if ( !components.empty() &&
98 components.push_back( window.GetName() );
119 if ( !components.empty() ) {
120 auto iter = components.begin(),
end = components.end();
122 while ( pWindow && iter !=
end )
An explicitly nonlocalized string, not meant for the user to see.
const wxString & GET() const
Explicit conversion to wxString, meant to be ugly-looking and demanding of a comment why it's correct...
is like wxStaticText, except it can be themed. wxStaticText can't be.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
wxWindow * UniqueWindowAmongPeers(const wxWindowList &list, const Pred &pred)
wxWindow * FindByNameAmongPeers(const wxString &name, const wxWindowList &list)
auto SameName(const wxWindow &window)
void PathComponents(const wxWindow &window, wxArrayStringEx &components)
bool HasUniqueNameAmongPeers(const wxWindow &window, const wxWindowList &list)
constexpr auto PathSeparator
auto HasName(const wxString &name)
Path FindPath(const wxWindow &window)
wxWindow * FindByPath(const Path &path)
Facilities for recording and playback of sequences of user interaction.
constexpr auto EscapeCharacter
const char * end(const char *str) noexcept
const char * begin(const char *str) noexcept