git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32215
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
public:
wxNavigationKeyEvent()
: wxEvent(0, wxEVT_NAVIGATION_KEY),
public:
wxNavigationKeyEvent()
: wxEvent(0, wxEVT_NAVIGATION_KEY),
- m_flags(IsForward), // defaults are for TAB
+ m_flags(IsForward | FromTab), // defaults are for TAB
m_focus((wxWindow *)NULL)
{
m_propagationLevel = wxEVENT_PROPAGATE_NONE;
m_focus((wxWindow *)NULL)
{
m_propagationLevel = wxEVENT_PROPAGATE_NONE;
void SetWindowChange(bool bIs)
{ if ( bIs ) m_flags |= WinChange; else m_flags &= ~WinChange; }
void SetWindowChange(bool bIs)
{ if ( bIs ) m_flags |= WinChange; else m_flags &= ~WinChange; }
+ // Set to true under MSW if the event was generated using the tab key.
+ // This is required for proper navogation over radio buttons
+ bool IsFromTab() const
+ { return (m_flags & FromTab) != 0; }
+ void SetFromTab(bool bIs)
+ { if ( bIs ) m_flags |= FromTab; else m_flags &= ~FromTab; }
+
// the child which has the focus currently (may be NULL - use
// wxWindow::FindFocus then)
wxWindow* GetCurrentFocus() const { return m_focus; }
// the child which has the focus currently (may be NULL - use
// wxWindow::FindFocus then)
wxWindow* GetCurrentFocus() const { return m_focus; }
{
IsBackward = 0x0000,
IsForward = 0x0001,
{
IsBackward = 0x0000,
IsForward = 0x0001,
+ WinChange = 0x0002,
+ FromTab = 0x0004
+ bWindowChange = false,
+ bFromTab = false;
// should we process this message specially?
bool bProcess = true;
// should we process this message specially?
bool bProcess = true;
// Ctrl-Tab cycles thru notebook pages
bWindowChange = bCtrlDown;
bForward = !bShiftDown;
// Ctrl-Tab cycles thru notebook pages
bWindowChange = bCtrlDown;
bForward = !bShiftDown;
wxNavigationKeyEvent event;
event.SetDirection(bForward);
event.SetWindowChange(bWindowChange);
wxNavigationKeyEvent event;
event.SetDirection(bForward);
event.SetWindowChange(bWindowChange);
+ event.SetFromTab(bFromTab);
event.SetEventObject(this);
if ( GetEventHandler()->ProcessEvent(event) )
event.SetEventObject(this);
if ( GetEventHandler()->ProcessEvent(event) )