add alt popup window style allowing to use keyboard and comboboxes in the popup window and use it for the generic date picker (patch 1582391 from Jaakko)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -83,7 +83,9 @@ enum
|
||||
// Internal use: SetTextIndent has been called
|
||||
wxCC_IFLAG_INDENT_SET = 0x0400,
|
||||
// Internal use: Set wxTAB_TRAVERSAL to parent when popup is dismissed
|
||||
wxCC_IFLAG_PARENT_TAB_TRAVERSAL = 0x0800
|
||||
wxCC_IFLAG_PARENT_TAB_TRAVERSAL = 0x0800,
|
||||
// Internal use: Secondary popup window type should be used (if available).
|
||||
wxCC_IFLAG_USE_ALT_POPUP = 0x1000
|
||||
};
|
||||
|
||||
|
||||
@@ -305,6 +307,21 @@ public:
|
||||
return m_tcArea;
|
||||
}
|
||||
|
||||
// Call with enable as true to use a type of popup window that guarantees ability
|
||||
// to focus the popup control, and normal function of common native controls.
|
||||
// This alternative popup window is usually a wxDialog, and as such it's parent
|
||||
// frame will appear as if the focus has been lost from it.
|
||||
void UseAltPopupWindow( bool enable = true )
|
||||
{
|
||||
wxASSERT_MSG( !m_winPopup,
|
||||
wxT("call this only before SetPopupControl") );
|
||||
|
||||
if ( enable )
|
||||
m_iFlags |= wxCC_IFLAG_USE_ALT_POPUP;
|
||||
else
|
||||
m_iFlags &= ~wxCC_IFLAG_USE_ALT_POPUP;
|
||||
}
|
||||
|
||||
//
|
||||
// Utilies needed by the popups or native implementations
|
||||
//
|
||||
@@ -459,6 +476,9 @@ protected:
|
||||
// this is for the control in popup
|
||||
wxEvtHandler* m_popupExtraHandler;
|
||||
|
||||
// this is for the popup window
|
||||
wxEvtHandler* m_popupWinEvtHandler;
|
||||
|
||||
// used to prevent immediate re-popupping incase closed popup
|
||||
// by clicking on the combo control (needed because of inconsistent
|
||||
// transient implementation across platforms).
|
||||
@@ -527,6 +547,9 @@ private:
|
||||
|
||||
wxByte m_ignoreEvtText; // Number of next EVT_TEXTs to ignore
|
||||
|
||||
// Is popup window wxPopupTransientWindow, wxPopupWindow or wxDialog?
|
||||
wxByte m_popupWinType;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxComboCtrlBase)
|
||||
|
Reference in New Issue
Block a user