1. wxMSW::wxNotebook::SetPageSize() and SetPadding() added
2. wxNavigationKeyEvent changes: a) doesn't derive from wxCommandEvent any more b) has a new ShouldPropagate() accessor c) wxPanel::OnNavigationKey() changed significantly, beware git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1248,27 +1248,56 @@ protected:
|
||||
Event generated by dialog navigation keys
|
||||
wxEVT_NAVIGATION_KEY
|
||||
*/
|
||||
// must derive from command event to be propagated to the parent
|
||||
class WXDLLEXPORT wxNavigationKeyEvent : public wxCommandEvent
|
||||
// NB: don't derive from command event to avoid being propagated to the parent
|
||||
class WXDLLEXPORT wxNavigationKeyEvent : public wxEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxNavigationKeyEvent)
|
||||
|
||||
public:
|
||||
wxNavigationKeyEvent() : wxCommandEvent(wxEVT_NAVIGATION_KEY) { }
|
||||
wxNavigationKeyEvent()
|
||||
{
|
||||
SetEventType(wxEVT_NAVIGATION_KEY);
|
||||
|
||||
m_flags = IsForward | Propagate; // defaults are for TAB
|
||||
m_focus = (wxWindow *)NULL;
|
||||
}
|
||||
|
||||
// direction: forward (true) or backward (false)
|
||||
bool GetDirection() const { return m_commandInt == 1; }
|
||||
void SetDirection(bool bForward) { m_commandInt = bForward; }
|
||||
bool GetDirection() const
|
||||
{ return (m_flags & IsForward) != 0; }
|
||||
void SetDirection(bool bForward)
|
||||
{ if ( bForward ) m_flags |= IsForward; else m_flags &= ~IsForward; }
|
||||
|
||||
// it may be a window change event (MDI, notebook pages...) or a control
|
||||
// change event
|
||||
bool IsWindowChange() const { return m_extraLong == 1; }
|
||||
void SetWindowChange(bool bIs) { m_extraLong = bIs; }
|
||||
bool IsWindowChange() const
|
||||
{ return (m_flags & WinChange) != 0; }
|
||||
void SetWindowChange(bool bIs)
|
||||
{ if ( bIs ) m_flags |= WinChange; else m_flags &= ~WinChange; }
|
||||
|
||||
// some navigation events are meant to be propagated upwards (Windows
|
||||
// convention is to do this for TAB events) while others should always
|
||||
// cycle inside the panel/radiobox/whatever we're current inside
|
||||
bool ShouldPropagate() const
|
||||
{ return (m_flags & Propagate) != 0; }
|
||||
void SetPropagate(bool bDoIt)
|
||||
{ if ( bDoIt ) m_flags |= Propagate; else m_flags &= ~Propagate; }
|
||||
|
||||
// the child which has the focus currently (may be NULL - use
|
||||
// wxWindow::FindFocus then)
|
||||
wxWindow* GetCurrentFocus() const { return (wxWindow *)m_clientData; }
|
||||
void SetCurrentFocus(wxWindow *win) { m_clientData = (void *)win; }
|
||||
wxWindow* GetCurrentFocus() const { return m_focus; }
|
||||
void SetCurrentFocus(wxWindow *win) { m_focus = win; }
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
IsForward = 0x0001,
|
||||
WinChange = 0x0002,
|
||||
Propagate = 0x0004
|
||||
};
|
||||
|
||||
long m_flags;
|
||||
wxWindow *m_focus;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxNavigationKeyEvent)
|
||||
};
|
||||
|
||||
// Window creation/destruction events: the first is sent as soon as window is
|
||||
|
Reference in New Issue
Block a user