mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-16 00:27:42 +02:00
wxDialogWrapper and wxPanelWrapper have localized default window name
This commit is contained in:
parent
e8b875ff81
commit
729fd3767c
@ -32,10 +32,72 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class wxPanel;
|
class wxPanelWrapper : public wxTabTraversalWrapper<wxPanel>
|
||||||
using wxPanelWrapper = wxTabTraversalWrapper<wxPanel>;
|
{
|
||||||
|
public:
|
||||||
|
// Constructors
|
||||||
|
wxPanelWrapper() {}
|
||||||
|
|
||||||
class wxDialog;
|
wxPanelWrapper(
|
||||||
using wxDialogWrapper = wxTabTraversalWrapper<wxDialog>;
|
wxWindow *parent,
|
||||||
|
wxWindowID winid = wxID_ANY,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||||
|
// Important: default window name localizes!
|
||||||
|
const wxString& name = _("Panel"))
|
||||||
|
: wxTabTraversalWrapper<wxPanel> { parent, winid, pos, size, style, name }
|
||||||
|
{}
|
||||||
|
|
||||||
|
// Pseudo ctor
|
||||||
|
bool Create(
|
||||||
|
wxWindow *parent,
|
||||||
|
wxWindowID winid = wxID_ANY,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||||
|
// Important: default window name localizes!
|
||||||
|
const wxString& name = _("Panel"))
|
||||||
|
{
|
||||||
|
return wxTabTraversalWrapper<wxPanel>::Create(
|
||||||
|
parent, winid, pos, size, style, name
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class wxDialogWrapper : public wxTabTraversalWrapper<wxDialog>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Constructors
|
||||||
|
wxDialogWrapper() {}
|
||||||
|
|
||||||
|
// Constructor with no modal flag - the new convention.
|
||||||
|
wxDialogWrapper(
|
||||||
|
wxWindow *parent, wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDEFAULT_DIALOG_STYLE,
|
||||||
|
// Important: default window name localizes!
|
||||||
|
const wxString& name = _("Dialog"))
|
||||||
|
: wxTabTraversalWrapper<wxDialog>
|
||||||
|
{ parent, id, title, pos, size, style, name }
|
||||||
|
{}
|
||||||
|
|
||||||
|
// Pseudo ctor
|
||||||
|
bool Create(
|
||||||
|
wxWindow *parent, wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDEFAULT_DIALOG_STYLE,
|
||||||
|
// Important: default window name localizes!
|
||||||
|
const wxString& name = _("Dialog"))
|
||||||
|
{
|
||||||
|
return wxTabTraversalWrapper<wxDialog>::Create(
|
||||||
|
parent, id, title, pos, size, style, name
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user