Disable sending of events by OS X Combobox during programmatic changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2010-02-19 03:00:07 +00:00
parent 76733d4cae
commit 809020fc97
3 changed files with 16 additions and 2 deletions

View File

@@ -276,6 +276,12 @@ public :
virtual bool ButtonClickDidStateChange() = 0;
virtual void InstallEventHandler( WXWidget control = NULL ) = 0;
// Mechanism used to keep track of whether a change should send an event
// Do SendEvents(false) when starting actions that would trigger programmatic events
// and SendEvents(true) at the end of the block.
virtual void SendEvents(bool shouldSendEvents) { m_shouldSendEvents = shouldSendEvents; }
virtual bool ShouldSendEvents() { return m_shouldSendEvents; }
// static methods for associating native controls and their implementations
@@ -490,6 +496,7 @@ protected :
wxWindowMac* m_wxPeer;
bool m_needsFocusRect;
bool m_needsFrame;
bool m_shouldSendEvents;
DECLARE_ABSTRACT_CLASS(wxWidgetImpl)
};