wxMenu *wxCurrentPopupMenu = NULL;
#endif // wxUSE_MENUS
+extern WXDLLEXPORT_DATA(const char) wxPanelNameStr[] = "panel";
+
// ----------------------------------------------------------------------------
// static data
// ----------------------------------------------------------------------------
// separately otherwise chaos occurs. Right now easiest is to test for negative ids,
// as windows with negative ids never can be recreated anyway
+
bool wxWindowStreamingCallback( const wxObject *object, wxObjectWriter *,
- wxObjectReaderCallback *, wxVariantBaseArray & )
+ wxObjectWriterCallback *, const wxStringToAnyHashMap & )
{
const wxWindow * win = wx_dynamic_cast(const wxWindow*, object);
if ( win && win->GetId() < 0 )
wxCOLLECTION_TYPE_INFO( wxWindow*, wxWindowList );
template<> void wxCollectionToVariantArray( wxWindowList const &theList,
- wxVariantBaseArray &value)
+ wxAnyList &value)
{
- wxListCollectionToVariantArray<wxWindowList::compatibility_iterator>( theList, value );
+ wxListCollectionToAnyList<wxWindowList::compatibility_iterator>( theList, value );
}
wxDEFINE_FLAGS( wxWindowStyle )
wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) // bg
wxPROPERTY( ForegroundColour, wxColour, SetForegroundColour, GetForegroundColour, \
wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) // fg
-wxPROPERTY( Enabled, bool, Enable, IsEnabled, wxVariantBase((bool)true), 0 /*flags*/, \
+wxPROPERTY( Enabled, bool, Enable, IsEnabled, wxAny((bool)true), 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
-wxPROPERTY( Shown, bool, Show, IsShown, wxVariantBase((bool)true), 0 /*flags*/, \
+wxPROPERTY( Shown, bool, Show, IsShown, wxAny((bool)true), 0 /*flags*/, \
wxT("Helpstring"), wxT("group"))
#if 0
Show(event.GetShown());
}
+// ----------------------------------------------------------------------------
+// Idle processing
+// ----------------------------------------------------------------------------
+
+// Send idle event to window and all subwindows
+bool wxWindowBase::SendIdleEvents(wxIdleEvent& event)
+{
+ bool needMore = false;
+
+ OnInternalIdle();
+
+ // should we send idle event to this window?
+ if (wxIdleEvent::GetMode() == wxIDLE_PROCESS_ALL ||
+ HasExtraStyle(wxWS_EX_PROCESS_IDLE))
+ {
+ event.SetEventObject(this);
+ HandleWindowEvent(event);
+
+ if (event.MoreRequested())
+ needMore = true;
+ }
+ wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
+ for (; node; node = node->GetNext())
+ {
+ wxWindow* child = node->GetData();
+ if (child->SendIdleEvents(event))
+ needMore = true;
+ }
+
+ return needMore;
+}
+
+void wxWindowBase::OnInternalIdle()
+{
+ if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
+ UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
+}
+
// ----------------------------------------------------------------------------
// dialog units translations
// ----------------------------------------------------------------------------