containers don't always accept focus (patch 718913)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,6 +69,9 @@ public:
|
||||
// the focus and the default processing should take place
|
||||
bool DoSetFocus();
|
||||
|
||||
// can our child get the focus?
|
||||
bool AcceptsFocus() const;
|
||||
|
||||
// called from OnChildFocus() handler, i.e. when one of our (grand)
|
||||
// children gets the focus
|
||||
void SetLastFocus(wxWindow *win);
|
||||
@@ -111,6 +114,7 @@ public: \
|
||||
virtual wxWindow *GetDefaultItem() const; \
|
||||
virtual wxWindow *SetDefaultItem(wxWindow *child); \
|
||||
virtual void SetTmpDefaultItem(wxWindow *win); \
|
||||
virtual bool AcceptsFocus() const; \
|
||||
\
|
||||
protected: \
|
||||
wxControlContainer m_container
|
||||
@@ -164,6 +168,10 @@ void classname::OnChildFocus(wxChildFocusEvent& event) \
|
||||
void classname::OnFocus(wxFocusEvent& event) \
|
||||
{ \
|
||||
m_container.HandleOnFocus(event); \
|
||||
} \
|
||||
bool classname::AcceptsFocus() const \
|
||||
{ \
|
||||
return m_container.AcceptsFocus(); \
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user