make more Init() functions private

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2012-10-02 15:57:03 +00:00
parent f33a5bc61c
commit 95dc31e001
14 changed files with 33 additions and 38 deletions

View File

@ -95,8 +95,6 @@ public:
Create(parent, id, anim, pos, size, style, name);
}
void Init();
bool Create(wxWindow *parent, wxWindowID id,
const wxAnimation& anim = wxNullAnimation,
const wxPoint& pos = wxDefaultPosition,
@ -146,6 +144,9 @@ protected: // internal vars
private:
typedef wxAnimationCtrlBase base_type;
void Init();
DECLARE_DYNAMIC_CLASS(wxAnimationCtrl)
DECLARE_EVENT_TABLE()
};

View File

@ -35,11 +35,6 @@ public:
Create(parent, winid, label, pos, size, style, val, name);
}
void Init()
{
m_bIgnoreNextChange = false;
}
bool Create(wxWindow *parent,
wxWindowID winid,
const wxString& label,
@ -69,6 +64,11 @@ public: // used by GTK callbacks
wxString m_strLabel;
private:
void Init()
{
m_bIgnoreNextChange = false;
}
void OnSize(wxSizeEvent&);
virtual void AddChildGTK(wxWindowGTK* child);
GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;

View File

@ -49,7 +49,6 @@ public:
}
protected:
void Init() { m_pngData = NULL; m_pngSize = 0; }
void Clear() { free(m_pngData); }
void ClearAll() { Clear(); Init(); }
@ -57,6 +56,9 @@ protected:
void *m_pngData;
void DoConvertToPng();
private:
void Init() { m_pngData = NULL; m_pngSize = 0; }
};
// ----------------------------------------------------------------------------

View File

@ -25,7 +25,7 @@ public:
virtual void DoGetSize(int *width, int *height) const;
protected:
private:
void Init();
DECLARE_ABSTRACT_CLASS(wxScreenDCImpl)

View File

@ -142,10 +142,9 @@ public:
virtual GtkCellRendererText *GtkGetTextRenderer() const;
protected:
private:
bool Init(wxDataViewCellMode mode, int align);
private:
// Called from GtkGetTextRenderer() to really create the renderer if
// necessary.
void GtkInitTextRenderer();

View File

@ -90,7 +90,6 @@ public:
virtual ~wxGtkFileCtrl() {}
void Init();
bool Create( wxWindow *parent,
wxWindowID id,
const wxString& defaultDirectory = wxEmptyString,
@ -134,6 +133,9 @@ protected:
wxGtkFileChooser m_fc;
wxString m_wildCard;
private:
void Init();
DECLARE_DYNAMIC_CLASS( wxGtkFileCtrl )
};

View File

@ -176,13 +176,6 @@ public: // overrides
FILEDIRBTN_OVERRIDES
protected:
// common part of all ctors
void Init()
{
m_dialog = NULL;
m_bIgnoreNextChange = false;
}
wxDialog *m_dialog;
public: // used by the GTK callback only
@ -192,6 +185,12 @@ public: // used by the GTK callback only
void GTKUpdatePath(const char *gtkpath);
private:
void Init()
{
m_dialog = NULL;
m_bIgnoreNextChange = false;
}
DECLARE_DYNAMIC_CLASS(wxDirButton)
};

View File

@ -119,15 +119,14 @@ public:
protected:
virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
// common part of all ctors
void Init();
virtual wxGDIRefData* CreateGDIRefData() const;
virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
virtual wxFontFamily DoGetFamily() const;
private:
void Init();
DECLARE_DYNAMIC_CLASS(wxFont)
};

View File

@ -64,9 +64,6 @@ public:
virtual bool SendIdleEvents(wxIdleEvent& event);
protected:
// common part of all ctors
void Init();
// override wxWindow methods to take into account tool/menu/statusbars
virtual void DoGetClientSize( int *width, int *height ) const;
@ -76,6 +73,8 @@ protected:
#endif // wxUSE_MENUS_NATIVE
private:
void Init();
long m_fsSaveFlag;
DECLARE_DYNAMIC_CLASS(wxFrame)

View File

@ -71,15 +71,14 @@ public:
m_gaugePos;
protected:
// common part of all ctors
void Init() { m_rangeMax = m_gaugePos = 0; }
// set the gauge value to the value of m_gaugePos
void DoSetGauge();
virtual wxSize DoGetBestSize() const;
private:
void Init() { m_rangeMax = m_gaugePos = 0; }
DECLARE_DYNAMIC_CLASS(wxGauge)
};

View File

@ -67,11 +67,11 @@ public:
virtual void OnInternalIdle();
protected:
void Init();
virtual void DoGetClientSize(int* width, int* height) const;
private:
friend class wxMDIChildFrame;
void Init();
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
};

View File

@ -107,9 +107,6 @@ public:
bool DoPhase(int phase);
#endif
// common part of all ctors
void Init();
// Called by GTK event handler when the current page is definitely changed.
void GTKOnPageChanged();
@ -138,6 +135,7 @@ private:
// the padding set by SetPadding()
int m_padding;
void Init();
virtual void AddChildGTK(wxWindowGTK* child);
DECLARE_DYNAMIC_CLASS(wxNotebook)

View File

@ -158,9 +158,6 @@ protected:
virtual void DoFreeze();
virtual void DoThaw();
// common part of all ctors
void Init();
// Widgets that use the style->base colour for the BG colour should
// override this and return true.
virtual bool UseGTKStyleBase() const { return true; }
@ -179,6 +176,8 @@ protected:
void GTKSetJustification();
private:
void Init();
// overridden wxTextEntry virtual methods
virtual GtkEditable *GetEditable() const;
virtual GtkEntry *GetEntry() const;

View File

@ -128,9 +128,6 @@ protected:
virtual void DoSetSizeHints( int minW, int minH,
int maxW, int maxH,
int incW, int incH);
// common part of all ctors
void Init();
// move the window to the specified location and resize it
virtual void DoMoveWindow(int x, int y, int width, int height);
@ -148,6 +145,7 @@ protected:
bool m_deferShow;
private:
void Init();
wxSize& GetCachedDecorSize();
// size hint increments