+ m_inShow++;
+
+ wxASSERT( IsKindOf(CLASSINFO(wxPopupTransientWindow)) );
+
+ wxPopupTransientWindow* ptw = (wxPopupTransientWindow*) this;
+ wxComboCtrlBase* combo = (wxComboCtrlBase*) GetParent();
+
+ if ( show != ptw->IsShown() )
+ {
+ if ( show )
+ ptw->Popup(combo->GetPopupControl()->GetControl());
+ else
+ ptw->Dismiss();
+ }
+
+ m_inShow--;
+
+ return true;
+}
+
+bool wxComboPopupWindow::ProcessLeftDown(wxMouseEvent& event)
+{
+ return wxPopupTransientWindow::ProcessLeftDown(event);
+}
+
+// First thing that happens when a transient popup closes is that this method gets called.
+void wxComboPopupWindow::OnDismiss()
+{
+ wxComboCtrlBase* combo = (wxComboCtrlBase*) GetParent();
+ wxASSERT_MSG( combo->IsKindOf(CLASSINFO(wxComboCtrlBase)),
+ wxT("parent might not be wxComboCtrl, but check IMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") );
+
+ combo->OnPopupDismiss();
+}
+#endif // USES_WXPOPUPTRANSIENTWINDOW
+
+
+// ----------------------------------------------------------------------------
+// wxComboPopupWindowEvtHandler does bulk of the custom event handling
+// of a popup window. It is separate so we can have different types
+// of popup windows.
+// ----------------------------------------------------------------------------
+
+class wxComboPopupWindowEvtHandler : public wxEvtHandler
+{
+public:
+
+ wxComboPopupWindowEvtHandler( wxComboCtrlBase *parent )
+ {
+ m_combo = parent;
+ }
+
+ void OnSizeEvent( wxSizeEvent& event );
+ void OnKeyEvent(wxKeyEvent& event);
+#if USES_WXDIALOG
+ void OnActivate( wxActivateEvent& event );