move Freeze() and Thaw() to wxWindowBase to ensure that they behave consistently (i.e. recursively, as described in the docs) in all ports; removed different duplications of freeze count from derived classes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-01-05 00:21:31 +00:00
parent 001828ed69
commit 17808a7596
30 changed files with 197 additions and 317 deletions

View File

@@ -121,11 +121,6 @@ public:
void SetUpdateFont(bool WXUNUSED(update)) { }
// GTK+ textctrl is so dumb that you need to freeze/thaw it manually to
// avoid horrible flicker/scrolling back and forth
virtual void Freeze();
virtual void Thaw();
// implementation only from now on
// tell the control to ignore next text changed signal
@@ -148,9 +143,6 @@ public:
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
// has the control been frozen by Freeze()?
bool IsFrozen() const { return m_freezeCount > 0; }
protected:
// wxGTK-specific: called recursively by Enable,
// to give widgets an oppprtunity to correct their colours after they
@@ -162,6 +154,9 @@ protected:
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
virtual void DoFreeze();
virtual void DoThaw();
// common part of all ctors
void Init();
@@ -217,8 +212,6 @@ private:
// a dummy one when frozen
GtkTextBuffer *m_buffer;
// number of calls to Freeze() minus number of calls to Thaw()
unsigned m_freezeCount;
GtkTextMark* m_showPositionOnThaw;
// For wxTE_AUTO_URL