Added wxFrameBase::OnMenuOpen, and wxUSE_IDLEMENUUPDATES in platform.h

Experimental wxUpdateUIEvent::SetUpdateInterval() function to limit
UI update frequency


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-07-07 16:21:44 +00:00
parent f65a450a11
commit 0b30bb0bda
41 changed files with 186 additions and 29 deletions

View File

@@ -1529,6 +1529,20 @@ public:
void Enable(bool enable) { m_enabled = enable; m_setEnabled = TRUE; }
void SetText(const wxString& text) { m_text = text; m_setText = TRUE; }
// Sets the interval between updates in milliseconds.
// Set to -1 to disable updates, or to 0 to update as frequently as possible.
static void SetUpdateInterval(long updateInterval) { m_updateInterval = updateInterval; }
// Returns the current interval between updates in milliseconds
static long GetUpdateInterval() { return m_updateInterval ; }
// Can we update?
static bool CanUpdate() ;
// Reset the update time to provide a delay until the next
// time we should update
static void ResetUpdateTime() ;
virtual wxEvent *Clone() const { return new wxUpdateUIEvent(*this); }
protected:
@@ -1538,6 +1552,10 @@ protected:
bool m_setText;
bool m_setChecked;
wxString m_text;
#if wxUSE_LONGLONG
static wxLongLong m_lastUpdate;
#endif
static long m_updateInterval;
private:
DECLARE_DYNAMIC_CLASS(wxUpdateUIEvent)