make access specifiers for the virtual functions match their access in the base class (patch 1400131)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-02-08 21:47:09 +00:00
parent e4ccedf7b2
commit 6f02a879ed
133 changed files with 611 additions and 533 deletions

View File

@@ -56,7 +56,6 @@ public:
void NotFocus();
void StartSelect();
void EndSelect();
void DoApplyWidgetStyle(GtkRcStyle *style);
bool m_hasFocus:1;
bool m_isSelected:1;
@@ -64,6 +63,7 @@ public:
protected:
virtual void OnSetBitmap();
virtual wxSize DoGetBestSize() const;
void DoApplyWidgetStyle(GtkRcStyle *style);
void Init();

View File

@@ -55,7 +55,7 @@ public:
void SetStyle( int style );
void SetStipple( const wxBitmap& stipple );
private:
protected:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;

View File

@@ -61,7 +61,6 @@ public:
// implementation
// --------------
void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow( GdkWindow *window );
// Since this wxButton doesn't derive from wxButtonBase (why?) we need
@@ -71,8 +70,12 @@ public:
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
// helper to allow access to protected member from GTK callback
void MoveWindow(int x, int y, int width, int height) { DoMoveWindow(x, y, width, height); }
protected:
virtual wxSize DoGetBestSize() const;
void DoApplyWidgetStyle(GtkRcStyle *style);
private:
DECLARE_DYNAMIC_CLASS(wxButton)

View File

@@ -47,7 +47,6 @@ public:
// implementation
// --------------
void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow( GdkWindow *window );
void OnInternalIdle();
@@ -58,6 +57,7 @@ public:
protected:
virtual wxSize DoGetBestSize() const;
void DoApplyWidgetStyle(GtkRcStyle *style);
void DoSet3StateValue(wxCheckBoxState state);
wxCheckBoxState DoGet3StateValue() const;

View File

@@ -77,6 +77,8 @@ public:
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
virtual bool IsOwnGtkWindow( GdkWindow *window );
protected:
wxList m_clientList; // contains the client data for the items
@@ -91,8 +93,6 @@ protected:
virtual wxSize DoGetBestSize() const;
virtual bool IsOwnGtkWindow( GdkWindow *window );
private:
// common part of Create() and DoAppend()
int GtkAddHelper(GtkWidget *menu, int pos, const wxString& item);

View File

@@ -152,7 +152,6 @@ public:
void EnableEvents();
GtkWidget* GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
void DoApplyWidgetStyle(GtkRcStyle *style);
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
@@ -160,6 +159,7 @@ public:
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
protected:
void DoApplyWidgetStyle(GtkRcStyle *style);
virtual int DoAppend(const wxString& item);
virtual int DoInsert(const wxString& item, int pos);

View File

@@ -34,6 +34,19 @@ public:
virtual size_t GetDataSize() const { return m_pngSize; }
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
// Must provide overloads to avoid hiding them (and warnings about it)
virtual size_t GetDataSize(const wxDataFormat&) const
{
return GetDataSize();
}
virtual bool GetDataHere(const wxDataFormat&, void *buf) const
{
return GetDataHere(buf);
}
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
{
return SetData(len, buf);
}
protected:
void Init() { m_pngData = (void *)NULL; m_pngSize = 0; }
@@ -44,15 +57,6 @@ protected:
void *m_pngData;
void DoConvertToPng();
private:
// virtual function hiding supression
size_t GetDataSize(const wxDataFormat& format) const
{ return(wxDataObjectSimple::GetDataSize(format)); }
bool GetDataHere(const wxDataFormat& format, void* pBuf) const
{ return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
};
// ----------------------------------------------------------------------------
@@ -70,15 +74,19 @@ public:
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
private:
// virtual function hiding supression
size_t GetDataSize(const wxDataFormat& format) const
{ return(wxDataObjectSimple::GetDataSize(format)); }
bool GetDataHere(const wxDataFormat& format, void* pBuf) const
{ return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
// Must provide overloads to avoid hiding them (and warnings about it)
virtual size_t GetDataSize(const wxDataFormat&) const
{
return GetDataSize();
}
virtual bool GetDataHere(const wxDataFormat&, void *buf) const
{
return GetDataHere(buf);
}
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
{
return SetData(len, buf);
}
};
#endif // _WX_GTK_DATAOBJ2_H_

View File

@@ -75,6 +75,8 @@ protected:
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,
wxFont *theFont = (wxFont *) NULL) const;
virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
virtual void DoSetClippingRegionAsRegion( const wxRegion &region );
public:
virtual wxCoord GetCharWidth() const;
@@ -92,9 +94,7 @@ public:
virtual void SetBackgroundMode( int mode );
virtual void SetPalette( const wxPalette& palette );
virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
virtual void DestroyClippingRegion();
virtual void DoSetClippingRegionAsRegion( const wxRegion &region );
// Resolution in pixels per logical inch
virtual wxSize GetPPI() const;

View File

@@ -30,7 +30,6 @@ public:
wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC();
virtual void SelectObject( const wxBitmap& bitmap );
void DoGetSize( int *width, int *height ) const;
// these get reimplemented for mono-bitmaps to behave
// more like their Win32 couterparts. They now interpret
@@ -45,7 +44,9 @@ public:
// implementation
wxBitmap m_selected;
private:
protected:
void DoGetSize( int *width, int *height ) const;
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
};

View File

@@ -51,6 +51,7 @@ public:
//private:
bool m_destroyed_by_delete;
protected:
// override this from wxTLW since the native
// form doesn't have any m_wxwindow
virtual void DoSetSize(int x, int y,

View File

@@ -54,8 +54,6 @@ public:
virtual ~wxFrame();
#if wxUSE_STATUSBAR
virtual void PositionStatusBar();
virtual wxStatusBar* CreateStatusBar(int number = 1,
long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
wxWindowID id = 0,
@@ -88,6 +86,10 @@ protected:
// common part of all ctors
void Init();
#if wxUSE_STATUSBAR
virtual void PositionStatusBar();
#endif // wxUSE_STATUSBAR
// override wxWindow methods to take into account tool/menu/statusbars
virtual void DoSetClientSize(int width, int height);
virtual void DoGetClientSize( int *width, int *height ) const;

View File

@@ -74,6 +74,8 @@ public:
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
virtual wxVisualAttributes GetDefaultAttributes() const;
// implementation
// -------------
@@ -91,8 +93,6 @@ protected:
virtual wxSize DoGetBestSize() const;
virtual wxVisualAttributes GetDefaultAttributes() const;
private:
DECLARE_DYNAMIC_CLASS(wxGauge)
};

View File

@@ -76,21 +76,9 @@ public:
virtual int FindString(const wxString& s, bool bCase = false) const;
virtual bool IsSelected(int n) const;
virtual void DoSetSelection(int n, bool select);
virtual int GetSelection() const;
virtual int GetSelections(wxArrayInt& aSelections) const;
virtual int DoAppend(const wxString& item);
virtual void DoInsertItems(const wxArrayString& items, int pos);
virtual void DoSetItems(const wxArrayString& items, void **clientData);
virtual void DoSetFirstItem(int n);
virtual void DoSetItemClientData(int n, void* clientData);
virtual void* DoGetItemClientData(int n) const;
virtual void DoSetItemClientObject(int n, wxClientData* clientData);
virtual wxClientData* DoGetItemClientObject(int n) const;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -100,7 +88,6 @@ public:
int GtkGetIndex( GtkWidget *item ) const;
GtkWidget *GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
void DoApplyWidgetStyle(GtkRcStyle *style);
void OnInternalIdle();
#if wxUSE_TOOLTIPS
@@ -121,6 +108,16 @@ public:
protected:
virtual wxSize DoGetBestSize() const;
virtual void DoSetSelection(int n, bool select);
virtual int DoAppend(const wxString& item);
virtual void DoInsertItems(const wxArrayString& items, int pos);
virtual void DoSetItems(const wxArrayString& items, void **clientData);
virtual void DoSetFirstItem(int n);
virtual void DoSetItemClientData(int n, void* clientData);
virtual void* DoGetItemClientData(int n) const;
virtual void DoSetItemClientObject(int n, wxClientData* clientData);
virtual wxClientData* DoGetItemClientObject(int n) const;
void DoApplyWidgetStyle(GtkRcStyle *style);
// return the string label for the given item
wxString GetRealLabel(struct _GList *item) const;

View File

@@ -69,11 +69,6 @@ public:
virtual ~wxMenu();
// implement base class virtuals
virtual wxMenuItem* DoAppend(wxMenuItem *item);
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
virtual wxMenuItem* DoRemove(wxMenuItem *item);
// TODO: virtual void SetTitle(const wxString& title);
// implementation
@@ -84,6 +79,11 @@ public:
GtkWidget *m_owner;
GtkAccelGroup *m_accel;
protected:
virtual wxMenuItem* DoAppend(wxMenuItem *item);
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
virtual wxMenuItem* DoRemove(wxMenuItem *item);
private:
// common code for all constructors:
void Init();

View File

@@ -103,10 +103,6 @@ public:
void SetConstraintSizes(bool recurse);
bool DoPhase(int phase);
#endif
// set all page's attributes
void DoApplyWidgetStyle(GtkRcStyle *style);
// report if window belongs to notebook
bool IsOwnGtkWindow( GdkWindow *window );
@@ -127,6 +123,9 @@ public:
bool m_inSwitchPage;
protected:
// set all page's attributes
void DoApplyWidgetStyle(GtkRcStyle *style);
// remove one page from the notebook but do not destroy it
virtual wxNotebookPage *DoRemovePage(size_t nPage);

View File

@@ -63,7 +63,7 @@ public:
int GetDashCount() const;
wxDash* GetDash() const;
private:
protected:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;

View File

@@ -34,8 +34,6 @@ public:
// implementation
// --------------
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void OnInternalIdle();
@@ -46,6 +44,8 @@ protected:
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoMoveWindow(int x, int y, int width, int height);
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxPopupWindow)

View File

@@ -114,7 +114,6 @@ public:
void GtkDisableEvents();
void GtkEnableEvents();
bool IsOwnGtkWindow( GdkWindow *window );
void DoApplyWidgetStyle(GtkRcStyle *style);
#if wxUSE_TOOLTIPS
void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
#endif // wxUSE_TOOLTIPS
@@ -126,6 +125,8 @@ public:
wxList m_boxes;
protected:
void DoApplyWidgetStyle(GtkRcStyle *style);
// common part of all ctors
void Init();

View File

@@ -51,13 +51,13 @@ public:
virtual bool IsRadioButton() const { return TRUE; }
void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow( GdkWindow *window );
void OnInternalIdle();
bool m_blockEvent;
protected:
void DoApplyWidgetStyle(GtkRcStyle *style);
virtual wxSize DoGetBestSize() const;
private:

View File

@@ -28,7 +28,8 @@ public:
bool IsProtocolSupported();
wxEvtHandler *m_invokingWindow;
protected:
#if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS_NATIVE

View File

@@ -139,7 +139,6 @@ public:
GtkWidget* GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
void DoApplyWidgetStyle(GtkRcStyle *style);
void CalculateScrollbar();
void OnInternalIdle();
@@ -174,6 +173,7 @@ public:
protected:
virtual wxSize DoGetBestSize() const;
void DoApplyWidgetStyle(GtkRcStyle *style);
// common part of all ctors
void Init();

View File

@@ -75,10 +75,12 @@ public:
wxBitmap m_bitmap;
void OnSetBitmap();
void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow(GdkWindow *window);
virtual void OnInternalIdle();
protected:
void DoApplyWidgetStyle(GtkRcStyle *style);
virtual wxSize DoGetBestSize() const;
private:
@@ -129,10 +131,12 @@ public:
// implementation
bool m_blockEvent;
void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow(GdkWindow *window);
virtual void OnInternalIdle();
protected:
void DoApplyWidgetStyle(GtkRcStyle *style);
virtual wxSize DoGetBestSize() const;
private:

View File

@@ -78,10 +78,6 @@ public:
// implementation from now on
// --------------------------
// move the window to the specified location and resize it: this is called
// from both DoSetSize() and DoSetClientSize()
virtual void DoMoveWindow(int x, int y, int width, int height);
// GTK callbacks
virtual void GtkOnSize( int x, int y, int width, int height );
virtual void OnInternalIdle();
@@ -111,6 +107,10 @@ protected:
// common part of all ctors
void Init();
// move the window to the specified location and resize it: this is called
// from both DoSetSize() and DoSetClientSize()
virtual void DoMoveWindow(int x, int y, int width, int height);
// override wxWindow methods to take into account tool/menu/statusbars
virtual void DoSetSize(int x, int y,
int width, int height,

View File

@@ -91,10 +91,6 @@ public:
const wxFont *theFont = (const wxFont *) NULL)
const;
#if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS_NATIVE
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = true );
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
@@ -226,6 +222,7 @@ public:
// wxMDIFrame, wxNotebook etc. this is the callback that will get used.
wxInsertChildFunction m_insertCallback;
protected:
// implement the base class pure virtuals
virtual void DoClientToScreen( int *x, int *y ) const;
virtual void DoScreenToClient( int *x, int *y ) const;
@@ -238,6 +235,10 @@ public:
virtual void DoSetClientSize(int width, int height);
virtual void DoMoveWindow(int x, int y, int width, int height);
#if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS_NATIVE
virtual void DoCaptureMouse();
virtual void DoReleaseMouse();
@@ -245,7 +246,6 @@ public:
virtual void DoSetToolTip( wxToolTip *tip );
#endif // wxUSE_TOOLTIPS
protected:
// common part of all ctors (not virtual because called from ctor)
void Init();