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

@@ -281,10 +281,6 @@ public:
virtual size_t GetDataSize(const wxDataFormat& format) const; virtual size_t GetDataSize(const wxDataFormat& format) const;
virtual bool GetDataHere(const wxDataFormat& format, void *buf) const; virtual bool GetDataHere(const wxDataFormat& format, void *buf) const;
virtual bool SetData(const wxDataFormat& format, size_t len, const void *buf); virtual bool SetData(const wxDataFormat& format, size_t len, const void *buf);
protected:
// returns the pointer to the object which supports this format or NULL
wxDataObjectSimple *GetObject(const wxDataFormat& format) const;
#if defined(__WXMSW__) #if defined(__WXMSW__)
virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size, virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size,
const wxDataFormat& format ); const wxDataFormat& format );
@@ -293,6 +289,10 @@ protected:
virtual size_t GetBufferOffset( const wxDataFormat& format ); virtual size_t GetBufferOffset( const wxDataFormat& format );
#endif #endif
protected:
// returns the pointer to the object which supports this format or NULL
wxDataObjectSimple *GetObject(const wxDataFormat& format) const;
private: private:
// the list of all (simple) data objects whose formats we support // the list of all (simple) data objects whose formats we support
wxSimpleDataObjectList m_dataObjects; wxSimpleDataObjectList m_dataObjects;
@@ -359,13 +359,19 @@ public:
virtual size_t GetDataSize() const; virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const; virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf); virtual bool SetData(size_t len, const void *buf);
// Must provide overloads to avoid hiding them (and warnings about it)
size_t GetDataSize(const wxDataFormat& format) const virtual size_t GetDataSize(const wxDataFormat&) const
{ return(wxDataObjectSimple::GetDataSize(format)); } {
bool GetDataHere(const wxDataFormat& format, void *pBuf) const return GetDataSize();
{ return(wxDataObjectSimple::GetDataHere(format, pBuf)); } }
bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf) virtual bool GetDataHere(const wxDataFormat&, void *buf) const
{ return(wxDataObjectSimple::SetData(format, nLen, pBuf)); } {
return GetDataHere(buf);
}
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
{
return SetData(len, buf);
}
#endif #endif
private: private:
@@ -415,20 +421,9 @@ public:
// get a reference to our array // get a reference to our array
const wxArrayString& GetFilenames() const { return m_filenames; } const wxArrayString& GetFilenames() const { return m_filenames; }
// the Get() functions do nothing for us
virtual size_t GetDataSize() const { return 0; }
virtual bool GetDataHere(void *WXUNUSED(buf)) const { return false; }
protected: protected:
wxArrayString m_filenames; wxArrayString m_filenames;
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)); }
DECLARE_NO_COPY_CLASS(wxFileDataObjectBase) DECLARE_NO_COPY_CLASS(wxFileDataObjectBase)
}; };
@@ -472,19 +467,24 @@ public:
virtual size_t GetDataSize() const; virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const; virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t size, const void *buf); virtual bool SetData(size_t size, 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);
}
private: private:
size_t m_size; size_t m_size;
void *m_data; void *m_data;
// 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)); }
DECLARE_NO_COPY_CLASS(wxCustomDataObject) DECLARE_NO_COPY_CLASS(wxCustomDataObject)
}; };

View File

@@ -163,6 +163,14 @@ public:
void OnSysColourChanged(wxSysColourChangedEvent& event); void OnSysColourChanged(wxSysColourChangedEvent& event);
protected:
// override some base class virtuals
virtual wxSize DoGetBestSize() const;
virtual void DoGetPosition(int *x, int *y) const;
virtual void DoGetSize(int *width, int *height) const;
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
virtual void DoMoveWindow(int x, int y, int width, int height);
private: private:
// common part of all ctors // common part of all ctors
void Init(); void Init();
@@ -179,13 +187,6 @@ private:
void OnYearChange(wxCommandEvent& event); void OnYearChange(wxCommandEvent& event);
void OnYearTextChange(wxCommandEvent& event); void OnYearTextChange(wxCommandEvent& event);
// override some base class virtuals
virtual wxSize DoGetBestSize() const;
virtual void DoGetPosition(int *x, int *y) const;
virtual void DoGetSize(int *width, int *height) const;
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
virtual void DoMoveWindow(int x, int y, int width, int height);
// (re)calc m_widthCol and m_heightRow // (re)calc m_widthCol and m_heightRow
void RecalcGeometry(); void RecalcGeometry();

View File

@@ -44,35 +44,8 @@ public:
virtual bool Ok() const; virtual bool Ok() const;
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style=wxFLOOD_SURFACE );
bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;
void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
void DoCrossHair(wxCoord x, wxCoord y) ;
void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc);
void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea);
void DoDrawPoint(wxCoord x, wxCoord y);
void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle=wxODDEVEN_RULE);
void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle=wxODDEVEN_RULE);
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
#if wxUSE_SPLINES
void DoDrawSpline(wxList *points);
#endif // wxUSE_SPLINES
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
bool CanDrawBitmap() const { return true; } bool CanDrawBitmap() const { return true; }
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
void Clear(); void Clear();
void SetFont( const wxFont& font ); void SetFont( const wxFont& font );
void SetPen( const wxPen& pen ); void SetPen( const wxPen& pen );
@@ -80,11 +53,8 @@ public:
void SetLogicalFunction( int function ); void SetLogicalFunction( int function );
void SetBackground( const wxBrush& brush ); void SetBackground( const wxBrush& brush );
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DestroyClippingRegion(); void DestroyClippingRegion();
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) { }
bool StartDoc(const wxString& message); bool StartDoc(const wxString& message);
void EndDoc(); void EndDoc();
void StartPage(); void StartPage();
@@ -93,13 +63,6 @@ public:
wxCoord GetCharHeight() const; wxCoord GetCharHeight() const;
wxCoord GetCharWidth() const; wxCoord GetCharWidth() const;
bool CanGetTextExtent() const { return true; } bool CanGetTextExtent() const { return true; }
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,
wxFont *theFont = (wxFont *) NULL ) const;
void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const;
// Resolution in pixels per logical inch // Resolution in pixels per logical inch
wxSize GetPPI() const; wxSize GetPPI() const;
@@ -130,6 +93,37 @@ private:
static float ms_PSScaleFactor; static float ms_PSScaleFactor;
protected: protected:
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style = wxFLOOD_SURFACE);
bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;
void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
void DoCrossHair(wxCoord x, wxCoord y) ;
void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc);
void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea);
void DoDrawPoint(wxCoord x, wxCoord y);
void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle = wxODDEVEN_RULE);
void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle = wxODDEVEN_RULE);
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
#if wxUSE_SPLINES
void DoDrawSpline(wxList *points);
#endif // wxUSE_SPLINES
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
void DoDrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false);
void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip)) { }
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxFont *theFont = NULL) const;
void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const;
FILE* m_pstream; // PostScript output stream FILE* m_pstream; // PostScript output stream
wxString m_title; wxString m_title;

View File

@@ -156,6 +156,8 @@ public:
bool ScrollList( int dx, int dy ); bool ScrollList( int dx, int dy );
bool SortItems( wxListCtrlCompare fn, long data ); bool SortItems( wxListCtrlCompare fn, long data );
bool Update( long item ); bool Update( long item );
// Must provide overload to avoid hiding it (and warnings about it)
virtual void Update() { wxControl::Update(); }
// are we in report mode? // are we in report mode?
bool InReportView() const { return HasFlag(wxLC_REPORT); } bool InReportView() const { return HasFlag(wxLC_REPORT); }
@@ -208,13 +210,9 @@ public:
virtual wxDropTarget *GetDropTarget() const; virtual wxDropTarget *GetDropTarget() const;
#endif #endif
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
virtual bool ShouldInheritColours() const { return false; } virtual bool ShouldInheritColours() const { return false; }
virtual void SetFocus(); virtual void SetFocus();
virtual wxSize DoGetBestSize() const;
// implementation // implementation
// -------------- // --------------
@@ -229,6 +227,10 @@ public:
wxCoord m_headerHeight; wxCoord m_headerHeight;
protected: protected:
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
virtual wxSize DoGetBestSize() const;
// return the text for the given column of the given item // return the text for the given column of the given item
virtual wxString OnGetItemText(long item, long column) const; virtual wxString OnGetItemText(long item, long column) const;
@@ -247,9 +249,6 @@ protected:
friend class WXDLLEXPORT wxListMainWindow; friend class WXDLLEXPORT wxListMainWindow;
private: private:
// Virtual function hiding supression
virtual void Update() { wxWindow::Update(); }
// create the header window // create the header window
void CreateHeaderWindow(); void CreateHeaderWindow();

View File

@@ -28,10 +28,11 @@ class WXDLLEXPORT wxLogTextCtrl : public wxLog
public: public:
wxLogTextCtrl(wxTextCtrl *pTextCtrl); wxLogTextCtrl(wxTextCtrl *pTextCtrl);
private: protected:
// implement sink function // implement sink function
virtual void DoLogString(const wxChar *szString, time_t t); virtual void DoLogString(const wxChar *szString, time_t t);
private:
// the control we use // the control we use
wxTextCtrl *m_pTextCtrl; wxTextCtrl *m_pTextCtrl;

View File

@@ -52,6 +52,8 @@ public:
@returns true if ABORT button has not been pressed @returns true if ABORT button has not been pressed
*/ */
virtual bool Update(int value, const wxString& newmsg = wxEmptyString, bool *skip = NULL); virtual bool Update(int value, const wxString& newmsg = wxEmptyString, bool *skip = NULL);
// Must provide overload to avoid hiding it (and warnings about it)
virtual void Update() { wxDialog::Update(); }
/* Can be called to continue after the cancel button has been pressed, but /* Can be called to continue after the cancel button has been pressed, but
the program decided to continue the operation (e.g., user didn't the program decided to continue the operation (e.g., user didn't
@@ -150,10 +152,6 @@ private:
class WXDLLEXPORT wxWindowDisabler *m_winDisabler; class WXDLLEXPORT wxWindowDisabler *m_winDisabler;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
private:
// Virtual function hiding supression
virtual void Update() { wxDialog::Update(); }
DECLARE_NO_COPY_CLASS(wxProgressDialog) DECLARE_NO_COPY_CLASS(wxProgressDialog)
}; };

View File

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

View File

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

View File

@@ -61,7 +61,6 @@ public:
// implementation // implementation
// -------------- // --------------
void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow( GdkWindow *window ); bool IsOwnGtkWindow( GdkWindow *window );
// Since this wxButton doesn't derive from wxButtonBase (why?) we need // Since this wxButton doesn't derive from wxButtonBase (why?) we need
@@ -71,8 +70,12 @@ public:
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); 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: protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
void DoApplyWidgetStyle(GtkRcStyle *style);
private: private:
DECLARE_DYNAMIC_CLASS(wxButton) DECLARE_DYNAMIC_CLASS(wxButton)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -76,21 +76,9 @@ public:
virtual int FindString(const wxString& s, bool bCase = false) const; virtual int FindString(const wxString& s, bool bCase = false) const;
virtual bool IsSelected(int n) const; virtual bool IsSelected(int n) const;
virtual void DoSetSelection(int n, bool select);
virtual int GetSelection() const; virtual int GetSelection() const;
virtual int GetSelections(wxArrayInt& aSelections) 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 static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -100,7 +88,6 @@ public:
int GtkGetIndex( GtkWidget *item ) const; int GtkGetIndex( GtkWidget *item ) const;
GtkWidget *GetConnectWidget(); GtkWidget *GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window ); bool IsOwnGtkWindow( GdkWindow *window );
void DoApplyWidgetStyle(GtkRcStyle *style);
void OnInternalIdle(); void OnInternalIdle();
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
@@ -121,6 +108,16 @@ public:
protected: protected:
virtual wxSize DoGetBestSize() const; 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 // return the string label for the given item
wxString GetRealLabel(struct _GList *item) const; wxString GetRealLabel(struct _GList *item) const;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -78,10 +78,6 @@ public:
// implementation from now on // 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 // GTK callbacks
virtual void GtkOnSize( int x, int y, int width, int height ); virtual void GtkOnSize( int x, int y, int width, int height );
virtual void OnInternalIdle(); virtual void OnInternalIdle();
@@ -111,6 +107,10 @@ protected:
// common part of all ctors // common part of all ctors
void Init(); 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 // override wxWindow methods to take into account tool/menu/statusbars
virtual void DoSetSize(int x, int y, virtual void DoSetSize(int x, int y,
int width, int height, int width, int height,

View File

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

View File

@@ -393,8 +393,6 @@ public:
size_t GetCount() const { return wxHashTableBase::GetCount(); } size_t GetCount() const { return wxHashTableBase::GetCount(); }
protected: protected:
virtual void DoDeleteContents( wxHashTableBase_Node* node );
// copy helper // copy helper
void DoCopy( const wxHashTable& copy ); void DoCopy( const wxHashTable& copy );
@@ -402,6 +400,8 @@ protected:
// m_curr to it and m_currBucket to its bucket // m_curr to it and m_currBucket to its bucket
void GetNextNode( size_t bucketStart ); void GetNextNode( size_t bucketStart );
private: private:
virtual void DoDeleteContents( wxHashTableBase_Node* node );
// current node // current node
Node* m_curr; Node* m_curr;
@@ -525,7 +525,7 @@ private:
eltype *Delete(long key) { return (eltype*)DoDelete(key, key); } \ eltype *Delete(long key) { return (eltype*)DoDelete(key, key); } \
eltype *Delete(long lhash, long key) \ eltype *Delete(long lhash, long key) \
{ return (eltype*)DoDelete(key, lhash); } \ { return (eltype*)DoDelete(key, lhash); } \
protected: \ private: \
virtual void DoDeleteContents( wxHashTableBase_Node* node ) \ virtual void DoDeleteContents( wxHashTableBase_Node* node ) \
{ delete (eltype*)node->GetData(); } \ { delete (eltype*)node->GetData(); } \
\ \

View File

@@ -213,6 +213,8 @@ public:
wxString ToText(); wxString ToText();
#endif // wxUSE_CLIPBOARD #endif // wxUSE_CLIPBOARD
virtual void OnInternalIdle();
protected: protected:
void Init(); void Init();
@@ -240,8 +242,6 @@ protected:
void OnMouseLeave(wxMouseEvent& event); void OnMouseLeave(wxMouseEvent& event);
#endif // wxUSE_CLIPBOARD #endif // wxUSE_CLIPBOARD
virtual void OnInternalIdle();
// Returns new filter (will be stored into m_DefaultFilter variable) // Returns new filter (will be stored into m_DefaultFilter variable)
virtual wxHtmlFilter *GetDefaultFilter() {return new wxHtmlFilterPlainText;} virtual wxHtmlFilter *GetDefaultFilter() {return new wxHtmlFilterPlainText;}

View File

@@ -61,9 +61,9 @@ public:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool DoCanRead( wxInputStream& stream );
protected: protected:
virtual bool DoCanRead( wxInputStream& stream );
bool SaveDib(wxImage *image, wxOutputStream& stream, bool verbose, bool SaveDib(wxImage *image, wxOutputStream& stream, bool verbose,
bool IsBmp, bool IsMask); bool IsBmp, bool IsMask);
bool DoLoadDib(wxImage *image, int width, int height, int bpp, int ncolors, bool DoLoadDib(wxImage *image, int width, int height, int bpp, int ncolors,
@@ -96,8 +96,9 @@ public:
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool DoLoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index ); virtual bool DoLoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index );
virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream ); virtual int GetImageCount( wxInputStream& stream );
protected:
virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
private: private:
@@ -124,6 +125,7 @@ public:
// formats are almost identical), but we hide this fact at // formats are almost identical), but we hide this fact at
// the API level, since it is a mere implementation detail. // the API level, since it is a mere implementation detail.
protected:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool DoCanRead( wxInputStream& stream ); virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
@@ -150,8 +152,9 @@ public:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose=true) ){return false ;}; virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose=true) ){return false ;};
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream ); virtual int GetImageCount( wxInputStream& stream );
protected:
virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
private: private:

View File

@@ -33,6 +33,7 @@ public:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
protected:
virtual bool DoCanRead( wxInputStream& stream ); virtual bool DoCanRead( wxInputStream& stream );
#endif #endif

View File

@@ -34,6 +34,7 @@ public:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
protected:
virtual bool DoCanRead( wxInputStream& stream ); virtual bool DoCanRead( wxInputStream& stream );
#endif #endif

View File

@@ -32,6 +32,7 @@ public:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
protected:
virtual bool DoCanRead( wxInputStream& stream ); virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS

View File

@@ -44,6 +44,7 @@ public:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
protected:
virtual bool DoCanRead( wxInputStream& stream ); virtual bool DoCanRead( wxInputStream& stream );
#endif #endif

View File

@@ -31,6 +31,7 @@ public:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
protected:
virtual bool DoCanRead( wxInputStream& stream ); virtual bool DoCanRead( wxInputStream& stream );
#endif #endif

View File

@@ -34,8 +34,9 @@ public:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream ); virtual int GetImageCount( wxInputStream& stream );
protected:
virtual bool DoCanRead( wxInputStream& stream );
#endif #endif
private: private:

View File

@@ -31,6 +31,7 @@ public:
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
protected:
virtual bool DoCanRead( wxInputStream& stream ); virtual bool DoCanRead( wxInputStream& stream );
#endif #endif

View File

@@ -34,12 +34,13 @@ public:
virtual void SetValue(bool); virtual void SetValue(bool);
virtual bool GetValue() const; virtual bool GetValue() const;
void DoSet3StateValue(wxCheckBoxState val);
virtual wxCheckBoxState DoGet3StateValue() const;
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
virtual void Command(wxCommandEvent& event); virtual void Command(wxCommandEvent& event);
protected:
void DoSet3StateValue(wxCheckBoxState val);
virtual wxCheckBoxState DoGet3StateValue() const;
DECLARE_DYNAMIC_CLASS(wxCheckBox) DECLARE_DYNAMIC_CLASS(wxCheckBox)
}; };

View File

@@ -69,9 +69,6 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr); const wxString& name = wxChoiceNameStr);
// implement base class pure virtuals
virtual int DoAppend(const wxString& item);
virtual int DoInsert(const wxString& item, int pos);
virtual void Delete(int n); virtual void Delete(int n);
virtual void Clear(); virtual void Clear();
@@ -87,14 +84,14 @@ public:
protected: protected:
virtual wxSize DoGetBestSize() const ; virtual wxSize DoGetBestSize() const ;
virtual int DoAppend(const wxString& item);
virtual int DoInsert(const wxString& item, int pos);
public: // for wxComboBox only
virtual void DoSetItemClientData( int n, void* clientData ); virtual void DoSetItemClientData( int n, void* clientData );
virtual void* DoGetItemClientData( int n ) const; virtual void* DoGetItemClientData( int n ) const;
virtual void DoSetItemClientObject( int n, wxClientData* clientData ); virtual void DoSetItemClientObject( int n, wxClientData* clientData );
virtual wxClientData* DoGetItemClientObject( int n ) const; virtual wxClientData* DoGetItemClientObject( int n ) const;
protected:
// free all memory we have (used by Clear() and dtor) // free all memory we have (used by Clear() and dtor)
// prevent collision with some BSD definitions of macro Free() // prevent collision with some BSD definitions of macro Free()
void FreeData(); void FreeData();

View File

@@ -29,9 +29,6 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
public: public:
inline wxComboBox() {} inline wxComboBox() {}
virtual ~wxComboBox(); virtual ~wxComboBox();
// override the base class virtuals involved in geometry calculations
virtual wxSize DoGetBestSize() const;
virtual void DoMoveWindow(int x, int y, int width, int height);
// forward these functions to all subcontrols // forward these functions to all subcontrols
virtual bool Enable(bool enable = true); virtual bool Enable(bool enable = true);
@@ -129,6 +126,10 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
protected: protected:
// override the base class virtuals involved in geometry calculations
virtual wxSize DoGetBestSize() const;
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual int DoAppend(const wxString& item) ; virtual int DoAppend(const wxString& item) ;
virtual int DoInsert(const wxString& item, int pos) ; virtual int DoInsert(const wxString& item, int pos) ;

View File

@@ -35,6 +35,19 @@ public:
virtual size_t GetDataSize() const ; virtual size_t GetDataSize() const ;
virtual bool GetDataHere(void *buf) const ; virtual bool GetDataHere(void *buf) const ;
virtual bool SetData(size_t len, const void *buf); 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 : protected :
void Init() ; void Init() ;
@@ -42,14 +55,6 @@ protected :
void* m_pictHandle ; void* m_pictHandle ;
bool m_pictCreated ; bool m_pictCreated ;
private:
// Virtual function hiding supression
size_t GetDataSize(const wxDataFormat& rFormat) const
{ return(wxDataObjectSimple::GetDataSize(rFormat)); }
bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const
{ return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); }
bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
{ return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -67,15 +72,19 @@ public:
virtual size_t GetDataSize() const; virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const; virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf); virtual bool SetData(size_t len, const void *buf);
// Must provide overloads to avoid hiding them (and warnings about it)
private: virtual size_t GetDataSize(const wxDataFormat&) const
// Virtual function hiding supression {
size_t GetDataSize(const wxDataFormat& rFormat) const return GetDataSize();
{ return(wxDataObjectSimple::GetDataSize(rFormat)); } }
bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const virtual bool GetDataHere(const wxDataFormat&, void *buf) const
{ return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); } {
bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf) return GetDataHere(buf);
{ return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); } }
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
{
return SetData(len, buf);
}
}; };
#endif // _WX_GTK_DATAOBJ2_H_ #endif // _WX_GTK_DATAOBJ2_H_

View File

@@ -108,12 +108,6 @@ public:
virtual wxCoord GetCharHeight() const; virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const; virtual wxCoord GetCharWidth() const;
virtual void DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool CanDrawBitmap() const; virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const; virtual bool CanGetTextExtent() const;
@@ -229,6 +223,13 @@ public:
#endif #endif
protected: protected:
virtual void DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
int style = wxFLOOD_SURFACE); int style = wxFLOOD_SURFACE);

View File

@@ -32,8 +32,8 @@ class WXDLLEXPORT wxWindowDC: public wxDC
wxWindowDC(wxWindow *win); wxWindowDC(wxWindow *win);
~wxWindowDC(void); ~wxWindowDC(void);
virtual void DoGetSize( int *width, int *height ) const;
protected : protected :
virtual void DoGetSize( int *width, int *height ) const;
wxWindow *m_window; wxWindow *m_window;
}; };
@@ -49,6 +49,8 @@ class WXDLLEXPORT wxClientDC: public wxWindowDC
wxClientDC(wxWindow *win); wxClientDC(wxWindow *win);
~wxClientDC(void); ~wxClientDC(void);
protected:
virtual void DoGetSize( int *width, int *height ) const; virtual void DoGetSize( int *width, int *height ) const;
}; };
@@ -63,6 +65,8 @@ class WXDLLEXPORT wxPaintDC: public wxWindowDC
wxPaintDC(wxWindow *win); wxPaintDC(wxWindow *win);
~wxPaintDC(void); ~wxPaintDC(void);
protected:
virtual void DoGetSize( int *width, int *height ) const; virtual void DoGetSize( int *width, int *height ) const;
}; };

View File

@@ -23,8 +23,11 @@ class WXDLLEXPORT wxMemoryDC: public wxPaintDC
wxMemoryDC( wxDC *dc ); // Create compatible DC wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC(void); ~wxMemoryDC(void);
virtual void SelectObject( const wxBitmap& bitmap ); virtual void SelectObject( const wxBitmap& bitmap );
virtual void DoGetSize( int *width, int *height ) const;
wxBitmap GetSelectedObject() { return m_selected ; } wxBitmap GetSelectedObject() { return m_selected ; }
protected:
virtual void DoGetSize( int *width, int *height ) const;
private: private:
wxBitmap m_selected; wxBitmap m_selected;
}; };

View File

@@ -32,11 +32,11 @@ class WXDLLEXPORT wxPrinterDC: public wxDC
virtual void StartPage(void) ; virtual void StartPage(void) ;
virtual void EndPage(void) ; virtual void EndPage(void) ;
wxPrintData& GetPrintData() { return m_printData; } wxPrintData& GetPrintData() { return m_printData; }
virtual void DoGetSize( int *width, int *height ) const;
#if wxMAC_USE_CORE_GRAPHICS #if wxMAC_USE_CORE_GRAPHICS
void MacSetCGContext( void * cg ) ; void MacSetCGContext( void * cg ) ;
#endif #endif
protected: protected:
virtual void DoGetSize( int *width, int *height ) const;
wxPrintData m_printData ; wxPrintData m_printData ;
wxNativePrinterDC* m_nativePrinterDC ; wxNativePrinterDC* m_nativePrinterDC ;
#endif // wxUSE_PRINTING_ARCHITECTURE #endif // wxUSE_PRINTING_ARCHITECTURE

View File

@@ -37,6 +37,7 @@ public:
virtual int ShowModal(); virtual int ShowModal();
protected:
// not supported for file dialog, RR // not supported for file dialog, RR
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(width), int WXUNUSED(height),

View File

@@ -72,7 +72,6 @@ public:
wxWindowID id = -1, wxWindowID id = -1,
const wxString& name = wxToolBarNameStr); const wxString& name = wxToolBarNameStr);
virtual void PositionToolBar();
virtual void SetToolBar(wxToolBar *toolbar); virtual void SetToolBar(wxToolBar *toolbar);
#endif // wxUSE_TOOLBAR #endif // wxUSE_TOOLBAR
@@ -82,8 +81,6 @@ public:
long style = wxST_SIZEGRIP, long style = wxST_SIZEGRIP,
wxWindowID id = 0, wxWindowID id = 0,
const wxString& name = wxStatusLineNameStr); const wxString& name = wxStatusLineNameStr);
virtual void PositionStatusBar();
#endif // wxUSE_STATUSBAR #endif // wxUSE_STATUSBAR
// tooltip management // tooltip management
@@ -97,10 +94,19 @@ public:
void SetLastFocus(wxWindow *win) { m_winLastFocused = win; } void SetLastFocus(wxWindow *win) { m_winLastFocused = win; }
wxWindow *GetLastFocus() const { return m_winLastFocused; } wxWindow *GetLastFocus() const { return m_winLastFocused; }
void PositionBars();
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
#if wxUSE_TOOLBAR
virtual void PositionToolBar();
#endif
#if wxUSE_STATUSBAR
virtual void PositionStatusBar();
#endif
// override base class virtuals // override base class virtuals
virtual void DoGetClientSize(int *width, int *height) const; virtual void DoGetClientSize(int *width, int *height) const;
virtual void DoSetClientSize(int width, int height); virtual void DoSetClientSize(int width, int height);

View File

@@ -83,22 +83,9 @@ public:
virtual int FindString(const wxString& s, bool bCase = false) const; virtual int FindString(const wxString& s, bool bCase = false) const;
virtual bool IsSelected(int n) const; virtual bool IsSelected(int n) const;
virtual void DoSetSelection(int n, bool select);
virtual int GetSelection() const; virtual int GetSelection() const;
virtual int GetSelections(wxArrayInt& aSelections) 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;
virtual void DoSetSize(int x, int y,int width, int height,int sizeFlags = wxSIZE_AUTO ) ;
// wxCheckListBox support // wxCheckListBox support
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -116,6 +103,17 @@ public:
// events in the latter case // events in the latter case
bool MacIsSelectionSuppressed() const { return m_suppressSelection ; } bool MacIsSelectionSuppressed() const { return m_suppressSelection ; }
protected: protected:
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;
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void MacDelete( int n ) ; void MacDelete( int n ) ;
void MacInsert( int n , const wxString& item) ; void MacInsert( int n , const wxString& item) ;
void MacAppend( const wxString& item) ; void MacAppend( const wxString& item) ;

View File

@@ -179,15 +179,14 @@ class WXDLLEXPORT wxMDIClientWindow: public wxWindow
// Note: this is virtual, to allow overridden behaviour. // Note: this is virtual, to allow overridden behaviour.
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL); virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
// Gets the size available for subwindows after menu size, toolbar size
// and status bar size have been subtracted. If you want to manage your own
// toolbar(s), don't call SetToolBar.
void DoGetClientSize(int *width, int *height) const;
// Explicitly call default scroll behaviour // Explicitly call default scroll behaviour
void OnScroll(wxScrollEvent& event); void OnScroll(wxScrollEvent& event);
protected: protected:
// Gets the size available for subwindows after menu size, toolbar size
// and status bar size have been subtracted. If you want to manage your own
// toolbar(s), don't call SetToolBar.
void DoGetClientSize(int *width, int *height) const;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };

View File

@@ -31,10 +31,6 @@ public:
virtual ~wxMenu(); virtual ~wxMenu();
// implement base class virtuals
virtual wxMenuItem* DoAppend(wxMenuItem *item);
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
virtual wxMenuItem* DoRemove(wxMenuItem *item);
virtual void Attach(wxMenuBarBase *menubar) ; virtual void Attach(wxMenuBarBase *menubar) ;
virtual void Break(); virtual void Break();
@@ -65,6 +61,11 @@ public:
short MacGetMenuId() { return m_macMenuId ; } short MacGetMenuId() { return m_macMenuId ; }
protected:
virtual wxMenuItem* DoAppend(wxMenuItem *item);
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
virtual wxMenuItem* DoRemove(wxMenuItem *item);
private: private:
// common part of all ctors // common part of all ctors
void Init(); void Init();

View File

@@ -85,13 +85,14 @@ class WXDLLEXPORT wxMetafileDC: public wxDC
// Should be called at end of drawing // Should be called at end of drawing
virtual wxMetafile *Close(void); virtual wxMetafile *Close(void);
virtual void DoGetSize(int *width, int *height) const ;
// Implementation // Implementation
inline wxMetafile *GetMetaFile(void) const { return m_metaFile; } inline wxMetafile *GetMetaFile(void) const { return m_metaFile; }
inline void SetMetaFile(wxMetafile *mf) { m_metaFile = mf; } inline void SetMetaFile(wxMetafile *mf) { m_metaFile = mf; }
protected: protected:
virtual void DoGetSize(int *width, int *height) const;
wxMetafile* m_metaFile; wxMetafile* m_metaFile;
}; };

View File

@@ -39,6 +39,7 @@ public:
int ShowModal(); int ShowModal();
protected:
// not supported for message dialog, RR // not supported for message dialog, RR
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(width), int WXUNUSED(height),

View File

@@ -114,9 +114,10 @@ public:
// base class virtuals // base class virtuals
// ------------------- // -------------------
virtual void Command(wxCommandEvent& event); virtual void Command(wxCommandEvent& event);
virtual wxInt32 MacControlHit(WXEVENTHANDLERREF handler, WXEVENTREF event);
protected: protected:
virtual wxNotebookPage *DoRemovePage(size_t page) ; virtual wxNotebookPage *DoRemovePage(size_t page) ;
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
// common part of all ctors // common part of all ctors
void Init(); void Init();

View File

@@ -79,15 +79,15 @@ public:
int maxW = -1, int maxH = -1, int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1 ); int incW = -1, int incH = -1 );
void Command(wxCommandEvent& event);
virtual wxInt32 MacControlHit(WXEVENTHANDLERREF handler, WXEVENTREF event);
void MacHandleControlClick(WXWidget control, wxInt16 controlpart, bool mouseStillDown);
protected: protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual void DoSetSize(int x, int y, int w, int h, int sizeFlags); virtual void DoSetSize(int x, int y, int w, int h, int sizeFlags);
virtual void DoMoveWindow(int x, int y, int w, int h); virtual void DoMoveWindow(int x, int y, int w, int h);
void Command(wxCommandEvent& event);
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
// Common processing to invert slider values based on wxSL_INVERSE // Common processing to invert slider values based on wxSL_INVERSE
virtual int ValueInvertOrNot(int value) const; virtual int ValueInvertOrNot(int value) const;

View File

@@ -53,9 +53,10 @@ class WXDLLEXPORT wxStaticBitmap: public wxStaticBitmapBase
// overriden base class virtuals // overriden base class virtuals
virtual bool AcceptsFocus() const { return FALSE; } virtual bool AcceptsFocus() const { return FALSE; }
virtual wxSize DoGetBestSize() const ;
protected: protected:
virtual wxSize DoGetBestSize() const;
wxBitmap m_bitmap; wxBitmap m_bitmap;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };

View File

@@ -38,10 +38,11 @@ public:
void SetLabel( const wxString &str ) ; void SetLabel( const wxString &str ) ;
bool SetFont( const wxFont &font ); bool SetFont( const wxFont &font );
virtual bool AcceptsFocus() const { return FALSE; }
protected : protected :
virtual wxSize DoGetBestSize() const ; virtual wxSize DoGetBestSize() const ;
virtual bool AcceptsFocus() const { return FALSE; }
DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticText) DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticText)
}; };

View File

@@ -50,8 +50,6 @@ class WXDLLEXPORT wxToolBar: public wxToolBarBase
virtual bool Show(bool show = true); virtual bool Show(bool show = true);
virtual bool IsShown() const; virtual bool IsShown() const;
virtual void DoGetSize(int *width, int *height) const;
virtual wxSize DoGetBestSize() const ;
virtual bool Realize(); virtual bool Realize();
virtual void SetToolBitmapSize(const wxSize& size); virtual void SetToolBitmapSize(const wxSize& size);
@@ -75,7 +73,8 @@ protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
// implement base class pure virtuals virtual void DoGetSize(int *width, int *height) const;
virtual wxSize DoGetBestSize() const;
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);

View File

@@ -82,9 +82,9 @@ public:
int *externalLeading = NULL, int *externalLeading = NULL,
const wxFont *theFont = NULL ) const wxFont *theFont = NULL )
const; const;
protected:
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
public:
virtual void SetScrollbar( int orient, int pos, int thumbVisible, virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = true ); int range, bool refresh = true );
virtual void SetScrollPos( int orient, int pos, bool refresh = true ); virtual void SetScrollPos( int orient, int pos, bool refresh = true );

View File

@@ -55,6 +55,7 @@ public:
virtual bool SetForegroundColour(const wxColour &colour); virtual bool SetForegroundColour(const wxColour &colour);
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item); virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
private: private:
void MakeOwnerDrawn(); void MakeOwnerDrawn();
@@ -72,7 +73,6 @@ protected:
// usually overridden base class virtuals // usually overridden base class virtuals
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const ;
private: private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton) DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton)

View File

@@ -45,10 +45,10 @@ public:
virtual bool MSWCommand(WXUINT param, WXWORD id); virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void Command(wxCommandEvent& event); virtual void Command(wxCommandEvent& event);
virtual bool SetForegroundColour(const wxColour& colour); virtual bool SetForegroundColour(const wxColour& colour);
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
protected: protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
virtual void DoSet3StateValue(wxCheckBoxState value); virtual void DoSet3StateValue(wxCheckBoxState value);
virtual wxCheckBoxState DoGet3StateValue() const; virtual wxCheckBoxState DoGet3StateValue() const;

View File

@@ -71,12 +71,12 @@ public:
// accessors // accessors
size_t GetItemHeight() const { return m_nItemHeight; } size_t GetItemHeight() const { return m_nItemHeight; }
protected:
// we create our items ourselves and they have non-standard size, // we create our items ourselves and they have non-standard size,
// so we need to override these functions // so we need to override these functions
virtual wxOwnerDrawn *CreateLboxItem(size_t n); virtual wxOwnerDrawn *CreateLboxItem(size_t n);
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item); virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
protected:
// this can't be called DoHitTest() because wxWindow already has this method // this can't be called DoHitTest() because wxWindow already has this method
int DoHitTestItem(wxCoord x, wxCoord y) const; int DoHitTestItem(wxCoord x, wxCoord y) const;

View File

@@ -66,9 +66,6 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr); const wxString& name = wxChoiceNameStr);
// implement base class pure virtuals
virtual int DoAppend(const wxString& item);
virtual int DoInsert(const wxString& item, int pos);
virtual void Delete(int n); virtual void Delete(int n);
virtual void Clear(); virtual void Clear();
@@ -85,11 +82,15 @@ public:
virtual bool MSWCommand(WXUINT param, WXWORD id); virtual bool MSWCommand(WXUINT param, WXWORD id);
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual WXHBRUSH MSWControlColor(WXHDC hDC, WXHWND hWnd); virtual WXHBRUSH MSWControlColor(WXHDC hDC, WXHWND hWnd);
virtual bool MSWShouldPreProcessMessage(WXMSG *pMsg);
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected: protected:
// common part of all ctors // common part of all ctors
void Init() { m_lastAcceptedSelection = wxID_NONE; } void Init() { m_lastAcceptedSelection = wxID_NONE; }
virtual int DoAppend(const wxString& item);
virtual int DoInsert(const wxString& item, int pos);
virtual void DoMoveWindow(int x, int y, int width, int height); virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void DoSetItemClientData( int n, void* clientData ); virtual void DoSetItemClientData( int n, void* clientData );
virtual void* DoGetItemClientData( int n ) const; virtual void* DoGetItemClientData( int n ) const;
@@ -103,10 +104,6 @@ protected:
int width, int height, int width, int height,
int sizeFlags = wxSIZE_AUTO); int sizeFlags = wxSIZE_AUTO);
virtual bool MSWShouldPreProcessMessage(WXMSG *pMsg);
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
// update the height of the drop down list to fit the number of items we // update the height of the drop down list to fit the number of items we
// have (without changing the visible height) // have (without changing the visible height)
void UpdateVisibleHeight(); void UpdateVisibleHeight();

View File

@@ -36,9 +36,8 @@ public:
virtual int ShowModal(); virtual int ShowModal();
virtual void DoGetPosition( int *x, int *y ) const;
protected: protected:
virtual void DoGetPosition( int *x, int *y ) const;
virtual void DoGetSize(int *width, int *height) const; virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetClientSize(int *width, int *height) const; virtual void DoGetClientSize(int *width, int *height) const;
virtual void DoSetSize(int x, int y, virtual void DoSetSize(int x, int y,

View File

@@ -130,9 +130,9 @@ public:
void OnUpdateDelete(wxUpdateUIEvent& event); void OnUpdateDelete(wxUpdateUIEvent& event);
void OnUpdateSelectAll(wxUpdateUIEvent& event); void OnUpdateSelectAll(wxUpdateUIEvent& event);
protected:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected:
// common part of all ctors // common part of all ctors
void Init() { m_selectionOld = -1; } void Init() { m_selectionOld = -1; }

View File

@@ -68,6 +68,9 @@ public:
// could call it // could call it
virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd); virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd);
// default style for the control include WS_TABSTOP if it AcceptsFocus()
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected: protected:
// choose the default border for this window // choose the default border for this window
virtual wxBorder GetDefaultBorder() const; virtual wxBorder GetDefaultBorder() const;
@@ -111,9 +114,6 @@ protected:
const wxString& label = wxEmptyString, const wxString& label = wxEmptyString,
WXDWORD exstyle = (WXDWORD)-1); WXDWORD exstyle = (WXDWORD)-1);
// default style for the control include WS_TABSTOP if it AcceptsFocus()
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
// call this from the derived class MSWControlColor() if you want to show // call this from the derived class MSWControlColor() if you want to show
// the control greyed out (and opaque) // the control greyed out (and opaque)
WXHBRUSH MSWControlColorDisabled(WXHDC pDC); WXHBRUSH MSWControlColorDisabled(WXHDC pDC);

View File

@@ -53,11 +53,11 @@ public:
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2); virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const; virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
protected:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;

View File

@@ -72,12 +72,6 @@ public:
virtual wxCoord GetCharHeight() const; virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const; virtual wxCoord GetCharWidth() const;
virtual void DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool CanDrawBitmap() const; virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const; virtual bool CanGetTextExtent() const;
@@ -160,6 +154,13 @@ protected:
// classes // classes
wxDC() { Init(); } wxDC() { Init(); }
virtual void DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
int style = wxFLOOD_SURFACE); int style = wxFLOOD_SURFACE);
@@ -301,6 +302,7 @@ public:
SetHDC((WXHDC)NULL); SetHDC((WXHDC)NULL);
} }
protected:
virtual void DoGetSize(int *w, int *h) const virtual void DoGetSize(int *w, int *h) const
{ {
wxFAIL_MSG( _T("no way to retrieve the size of generic DC") ); wxFAIL_MSG( _T("no way to retrieve the size of generic DC") );

View File

@@ -124,6 +124,9 @@ public:
// use IsModal() // use IsModal()
wxDEPRECATED( bool IsModalShowing() const ); wxDEPRECATED( bool IsModalShowing() const );
// handle Escape here
virtual bool MSWProcessMessage(WXMSG* pMsg);
protected: protected:
// find the window to use as parent for this dialog if none has been // find the window to use as parent for this dialog if none has been
// specified explicitly by the user // specified explicitly by the user
@@ -142,9 +145,6 @@ protected:
// return true if button was "clicked" or false if we don't have it // return true if button was "clicked" or false if we don't have it
bool EmulateButtonClickIfPresent(int id); bool EmulateButtonClickIfPresent(int id);
// handle Escape here
virtual bool MSWProcessMessage(WXMSG* pMsg);
private: private:
wxWindow* m_oldFocus; wxWindow* m_oldFocus;
bool m_endModalCalled; // allow for closing within InitDialog bool m_endModalCalled; // allow for closing within InitDialog

View File

@@ -86,9 +86,10 @@ public:
// obtain a pointer to the new metafile (caller should delete it) // obtain a pointer to the new metafile (caller should delete it)
wxEnhMetaFile *Close(); wxEnhMetaFile *Close();
private: protected:
virtual void DoGetSize(int *width, int *height) const; virtual void DoGetSize(int *width, int *height) const;
private:
// size passed to ctor and returned by DoGetSize() // size passed to ctor and returned by DoGetSize()
int m_width, int m_width,
m_height; m_height;

View File

@@ -51,8 +51,9 @@ public:
virtual bool SetForegroundColour(const wxColour& col); virtual bool SetForegroundColour(const wxColour& col);
virtual bool SetBackgroundColour(const wxColour& col); virtual bool SetBackgroundColour(const wxColour& col);
protected:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;

View File

@@ -87,21 +87,9 @@ public:
virtual int FindString(const wxString& s, bool bCase = false) const; virtual int FindString(const wxString& s, bool bCase = false) const;
virtual bool IsSelected(int n) const; virtual bool IsSelected(int n) const;
virtual void DoSetSelection(int n, bool select);
virtual int GetSelection() const; virtual int GetSelection() const;
virtual int GetSelections(wxArrayInt& aSelections) 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;
// wxCheckListBox support // wxCheckListBox support
#if wxUSE_OWNER_DRAWN #if wxUSE_OWNER_DRAWN
bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item); bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
@@ -124,6 +112,14 @@ public:
// Windows callbacks // Windows callbacks
bool MSWCommand(WXUINT param, WXWORD id); bool MSWCommand(WXUINT param, WXWORD id);
WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
// under XP when using "transition effect for menus and tooltips" if we
// return true for WM_PRINTCLIENT here then it causes noticable slowdown
virtual bool MSWShouldPropagatePrintChild()
{
return false;
}
virtual wxVisualAttributes GetDefaultAttributes() const virtual wxVisualAttributes GetDefaultAttributes() const
{ {
@@ -137,7 +133,15 @@ public:
} }
protected: protected:
WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) 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;
// free memory (common part of Clear() and dtor) // free memory (common part of Clear() and dtor)
void Free(); void Free();
@@ -147,13 +151,6 @@ protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
// under XP when using "transition effect for menus and tooltips" if we
// return true for WM_PRINTCLIENT here then it causes noticable slowdown
virtual bool MSWShouldPropagatePrintChild()
{
return false;
}
#if wxUSE_OWNER_DRAWN #if wxUSE_OWNER_DRAWN
// control items // control items
wxListBoxItemsArray m_aItems; wxListBoxItemsArray m_aItems;

View File

@@ -365,13 +365,6 @@ public:
// obsolete stuff, for compatibility only -- don't use // obsolete stuff, for compatibility only -- don't use
wxDEPRECATED( int GetItemSpacing(bool isSmall) const); wxDEPRECATED( int GetItemSpacing(bool isSmall) const);
protected:
// common part of all ctors
void Init();
// free memory taken by all internal data
void FreeAllInternalData();
// convert our styles to Windows // convert our styles to Windows
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
@@ -380,6 +373,12 @@ protected:
WXWPARAM wParam, WXWPARAM wParam,
WXLPARAM lParam); WXLPARAM lParam);
protected:
// common part of all ctors
void Init();
// free memory taken by all internal data
void FreeAllInternalData();
wxTextCtrl* m_textCtrl; // The control used for editing a label wxTextCtrl* m_textCtrl; // The control used for editing a label
wxImageList * m_imageListNormal; // The image list for normal icons wxImageList * m_imageListNormal; // The image list for normal icons

View File

@@ -183,6 +183,7 @@ protected:
virtual void DoSetClientSize(int width, int height); virtual void DoSetClientSize(int width, int height);
virtual void InternalSetMenuBar(); virtual void InternalSetMenuBar();
virtual bool IsMDIChild() const { return true; } virtual bool IsMDIChild() const { return true; }
virtual void DetachMenuBar();
virtual WXHICON GetDefaultIcon() const; virtual WXHICON GetDefaultIcon() const;
@@ -192,7 +193,6 @@ protected:
private: private:
bool m_needsInitialShow; // Show must be called in idle time after Creation bool m_needsInitialShow; // Show must be called in idle time after Creation
bool m_needsResize; // flag which tells us to artificially resize the frame bool m_needsResize; // flag which tells us to artificially resize the frame
virtual void DetachMenuBar() ;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMDIChildFrame) DECLARE_DYNAMIC_CLASS_NO_COPY(wxMDIChildFrame)
@@ -220,10 +220,11 @@ public:
// Explicitly call default scroll behaviour // Explicitly call default scroll behaviour
void OnScroll(wxScrollEvent& event); void OnScroll(wxScrollEvent& event);
protected:
virtual void DoSetSize(int x, int y, virtual void DoSetSize(int x, int y,
int width, int height, int width, int height,
int sizeFlags = wxSIZE_AUTO); int sizeFlags = wxSIZE_AUTO);
protected:
void Init() { m_scrollX = m_scrollY = 0; } void Init() { m_scrollX = m_scrollY = 0; }
int m_scrollX, m_scrollY; int m_scrollX, m_scrollY;

View File

@@ -56,11 +56,6 @@ public:
virtual ~wxMenu(); virtual ~wxMenu();
// implement base class virtuals
virtual wxMenuItem* DoAppend(wxMenuItem *item);
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
virtual wxMenuItem* DoRemove(wxMenuItem *item);
virtual void Break(); virtual void Break();
virtual void SetTitle(const wxString& title); virtual void SetTitle(const wxString& title);
@@ -91,6 +86,11 @@ public:
int FindAccel(int id) const; int FindAccel(int id) const;
#endif // wxUSE_ACCEL #endif // wxUSE_ACCEL
protected:
virtual wxMenuItem* DoAppend(wxMenuItem *item);
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
virtual wxMenuItem* DoRemove(wxMenuItem *item);
private: private:
// common part of all ctors // common part of all ctors
void Init(); void Init();

View File

@@ -181,13 +181,19 @@ public:
} }
#endif // wxUSE_UXTHEME #endif // wxUSE_UXTHEME
// translate wxWin styles to the Windows ones
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
// return the themed brush for painting our children
virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, WXHWND hWnd);
// draw child background
virtual bool MSWPrintChild(WXHDC hDC, wxWindow *win);
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
// translate wxWin styles to the Windows ones
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
// remove one page from the notebook, without deleting // remove one page from the notebook, without deleting
virtual wxNotebookPage *DoRemovePage(size_t nPage); virtual wxNotebookPage *DoRemovePage(size_t nPage);
@@ -206,12 +212,6 @@ protected:
// creates the brush to be used for drawing the tab control background // creates the brush to be used for drawing the tab control background
void UpdateBgBrush(); void UpdateBgBrush();
// return the themed brush for painting our children
virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, WXHWND hWnd);
// draw child background
virtual bool MSWPrintChild(WXHDC hDC, wxWindow *win);
// common part of QueryBgBitmap() and MSWPrintChild() // common part of QueryBgBitmap() and MSWPrintChild()
// //
// if child == NULL, draw background for the entire notebook itself // if child == NULL, draw background for the entire notebook itself

View File

@@ -28,16 +28,16 @@ public:
virtual bool Show(bool show = true); virtual bool Show(bool show = true);
protected:
// popups handle the position like wxTopLevelWindow, not wxWindow
virtual void DoGetPosition(int *x, int *y) const;
// return the style to be used for the popup windows // return the style to be used for the popup windows
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const; virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const;
// get the HWND to be used as parent of this window with CreateWindow() // get the HWND to be used as parent of this window with CreateWindow()
virtual WXHWND MSWGetParent() const; virtual WXHWND MSWGetParent() const;
protected:
// popups handle the position like wxTopLevelWindow, not wxWindow
virtual void DoGetPosition(int *x, int *y) const;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow) DECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow)
}; };

View File

@@ -56,9 +56,10 @@ public:
// override wxControl version to not use solid background here // override wxControl version to not use solid background here
virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd); virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd);
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected: protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
int m_pageSize; int m_pageSize;
int m_viewSize; int m_viewSize;

View File

@@ -92,6 +92,8 @@ public:
virtual bool Enable(bool show = true); virtual bool Enable(bool show = true);
virtual bool SetFont(const wxFont& font); virtual bool SetFont(const wxFont& font);
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
@@ -114,8 +116,6 @@ protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
// the labels windows, if any // the labels windows, if any
wxSubwindows *m_labels; wxSubwindows *m_labels;

View File

@@ -52,11 +52,11 @@ public:
virtual wxBitmap GetBitmap() const; virtual wxBitmap GetBitmap() const;
virtual wxIcon GetIcon() const; virtual wxIcon GetIcon() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected: protected:
virtual wxBorder GetDefaultBorder() const; virtual wxBorder GetDefaultBorder() const;
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
// ctor/dtor helpers // ctor/dtor helpers
void Init() { m_isIcon = true; m_image = NULL; m_currentHandle = 0; } void Init() { m_isIcon = true; m_image = NULL; m_currentHandle = 0; }

View File

@@ -38,17 +38,19 @@ public:
/// Implementation only /// Implementation only
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; virtual void GetBordersForSizer(int *borderTop, int *borderOther) const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected: protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
// choose the default border for this window // choose the default border for this window
virtual wxBorder GetDefaultBorder() const; virtual wxBorder GetDefaultBorder() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
#ifndef __WXWINCE__ #ifndef __WXWINCE__
public:
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
protected:
// return the region with all the windows inside this static box excluded // return the region with all the windows inside this static box excluded
virtual WXHRGN MSWGetRegionWithoutChildren(); virtual WXHRGN MSWGetRegionWithoutChildren();

View File

@@ -57,6 +57,9 @@ public:
virtual int GetBorderX() const; virtual int GetBorderX() const;
virtual int GetBorderY() const; virtual int GetBorderY() const;
virtual WXLRESULT MSWWindowProc(WXUINT nMsg,
WXWPARAM wParam,
WXLPARAM lParam);
protected: protected:
void CopyFieldsWidth(const int widths[]); void CopyFieldsWidth(const int widths[]);
void SetFieldsWidth(); void SetFieldsWidth();
@@ -64,10 +67,6 @@ protected:
// override base class virtual // override base class virtual
void DoMoveWindow(int x, int y, int width, int height); void DoMoveWindow(int x, int y, int width, int height);
virtual WXLRESULT MSWWindowProc(WXUINT nMsg,
WXWPARAM wParam,
WXLPARAM lParam);
private: private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar95) DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar95)
}; };

View File

@@ -41,7 +41,6 @@ public:
// overriden base class virtuals // overriden base class virtuals
virtual bool AcceptsFocus() const { return false; } virtual bool AcceptsFocus() const { return false; }
protected:
// usually overridden base class virtuals // usually overridden base class virtuals
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;

View File

@@ -40,14 +40,14 @@ public:
virtual void SetLabel(const wxString& label); virtual void SetLabel(const wxString& label);
virtual bool SetFont( const wxFont &font ); virtual bool SetFont( const wxFont &font );
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
protected: protected:
// implement/override some base class virtuals // implement/override some base class virtuals
virtual wxBorder GetDefaultBorder() const; virtual wxBorder GetDefaultBorder() const;
virtual void DoSetSize(int x, int y, int w, int h, virtual void DoSetSize(int x, int y, int w, int h,
int sizeFlags = wxSIZE_AUTO); int sizeFlags = wxSIZE_AUTO);
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticText) DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticText)
}; };

View File

@@ -70,6 +70,11 @@ public:
static WXHBITMAP MapBitmap(WXHBITMAP bitmap, int width, int height); static WXHBITMAP MapBitmap(WXHBITMAP bitmap, int width, int height);
// override WndProc mainly to process WM_SIZE
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
@@ -98,12 +103,8 @@ protected:
const wxString& longHelp); const wxString& longHelp);
virtual wxToolBarToolBase *CreateTool(wxControl *control); virtual wxToolBarToolBase *CreateTool(wxControl *control);
// override WndProc mainly to process WM_SIZE
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
// return the appropriate size and flags for the toolbar control // return the appropriate size and flags for the toolbar control
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
// handlers for various events // handlers for various events
bool HandleSize(WXWPARAM wParam, WXLPARAM lParam); bool HandleSize(WXWPARAM wParam, WXLPARAM lParam);

View File

@@ -196,13 +196,17 @@ public:
// called HideNativeCaret() before // called HideNativeCaret() before
void OnSetFocus(wxFocusEvent& event); void OnSetFocus(wxFocusEvent& event);
// intercept WM_GETDLGCODE
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
virtual wxVisualAttributes GetDefaultAttributes() const;
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
// intercept WM_GETDLGCODE
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
// return true if this control has a user-set limit on amount of text (i.e. // return true if this control has a user-set limit on amount of text (i.e.
// the limit is due to a previous call to SetMaxLength() and not built in) // the limit is due to a previous call to SetMaxLength() and not built in)
bool HasSpaceLimit(unsigned int *len) const; bool HasSpaceLimit(unsigned int *len) const;
@@ -240,12 +244,8 @@ protected:
// send TEXT_UPDATED event, return true if it was handled, false otherwise // send TEXT_UPDATED event, return true if it was handled, false otherwise
bool SendUpdateEvent(); bool SendUpdateEvent();
// override some base class virtuals
virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
#if wxUSE_RICHEDIT #if wxUSE_RICHEDIT
// we're using RICHEDIT (and not simple EDIT) control if this field is not // we're using RICHEDIT (and not simple EDIT) control if this field is not
// 0, it also gives the version of the RICHEDIT control being used (1, 2 or // 0, it also gives the version of the RICHEDIT control being used (1, 2 or
@@ -257,8 +257,6 @@ protected:
// text ourselves: we want this to be exactly 1 // text ourselves: we want this to be exactly 1
int m_updatesCount; int m_updatesCount;
virtual wxVisualAttributes GetDefaultAttributes() const;
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl) DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl)

View File

@@ -46,11 +46,11 @@ public:
virtual bool MSWCommand(WXUINT param, WXWORD id); virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void Command(wxCommandEvent& event); virtual void Command(wxCommandEvent& event);
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
protected: protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual wxBorder GetDefaultBorder() const; virtual wxBorder GetDefaultBorder() const;
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
private: private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton) DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)

View File

@@ -92,6 +92,15 @@ public:
virtual bool HandleSettingChange(WXWPARAM wParam, WXLPARAM lParam); virtual bool HandleSettingChange(WXWPARAM wParam, WXLPARAM lParam);
#endif #endif
// translate wxWidgets flags to Windows ones
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const;
// choose the right parent to use with CreateWindow()
virtual WXHWND MSWGetParent() const;
// window proc for the frames
WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
@@ -111,15 +120,6 @@ protected:
// common part of Iconize(), Maximize() and Restore() // common part of Iconize(), Maximize() and Restore()
void DoShowWindow(int nShowCmd); void DoShowWindow(int nShowCmd);
// translate wxWidgets flags to Windows ones
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const;
// choose the right parent to use with CreateWindow()
virtual WXHWND MSWGetParent() const;
// window proc for the frames
WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
// is the window currently iconized? // is the window currently iconized?
bool m_iconized; bool m_iconized;

View File

@@ -251,16 +251,6 @@ protected:
wxTextCtrl *m_textCtrl; // text control in which it is edited wxTextCtrl *m_textCtrl; // text control in which it is edited
wxTreeItemId m_idEdited; // the item being edited wxTreeItemId m_idEdited; // the item being edited
private:
// the common part of all ctors
void Init();
// helper functions
inline bool DoGetItem(wxTreeViewItem *tvItem) const;
inline void DoSetItem(wxTreeViewItem *tvItem);
inline void DoExpand(const wxTreeItemId& item, int flag);
virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent, virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
size_t pos, size_t pos,
const wxString& text, const wxString& text,
@@ -273,6 +263,16 @@ private:
wxTreeItemData *data = NULL); wxTreeItemData *data = NULL);
virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags); virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags);
private:
// the common part of all ctors
void Init();
// helper functions
inline bool DoGetItem(wxTreeViewItem *tvItem) const;
inline void DoSetItem(wxTreeViewItem *tvItem);
inline void DoExpand(const wxTreeItemId& item, int flag);
int DoGetItemImageFromData(const wxTreeItemId& item, int DoGetItemImageFromData(const wxTreeItemId& item,
wxTreeItemIcon which) const; wxTreeItemIcon which) const;
void DoSetItemImageFromData(const wxTreeItemId& item, void DoSetItemImageFromData(const wxTreeItemId& item,

View File

@@ -97,10 +97,6 @@ public:
const wxFont *theFont = (const wxFont *) NULL) const wxFont *theFont = (const wxFont *) NULL)
const; 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, virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = true ); int range, bool refresh = true );
virtual void SetScrollPos( int orient, int pos, bool refresh = true ); virtual void SetScrollPos( int orient, int pos, bool refresh = true );
@@ -403,6 +399,11 @@ public:
virtual void OnInternalIdle(); virtual void OnInternalIdle();
protected: protected:
#if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS_NATIVE
// the window handle // the window handle
WXHWND m_hWnd; WXHWND m_hWnd;

View File

@@ -671,6 +671,7 @@ public:
long GetFirstVisiblePosition() const; long GetFirstVisiblePosition() const;
// Overrides // Overrides
protected:
virtual wxSize DoGetBestSize() const ; virtual wxSize DoGetBestSize() const ;

View File

@@ -30,11 +30,6 @@ public:
: wxRichTextFileHandler(name, ext, type) : wxRichTextFileHandler(name, ext, type)
{ } { }
#if wxUSE_STREAMS
virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream);
#endif
/// Can we save using this handler? /// Can we save using this handler?
virtual bool CanSave() const { return true; } virtual bool CanSave() const { return true; }
@@ -51,7 +46,10 @@ public:
virtual void OutputParagraphFormatting(const wxTextAttrEx& currentStyle, const wxTextAttrEx& thisStyle, wxOutputStream& stream, bool start); virtual void OutputParagraphFormatting(const wxTextAttrEx& currentStyle, const wxTextAttrEx& thisStyle, wxOutputStream& stream, bool start);
protected: protected:
#if wxUSE_STREAMS
virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream);
#endif
}; };
#endif #endif

View File

@@ -192,9 +192,6 @@ public:
const wxSize& size = wxDefaultSize, long style = 0); const wxSize& size = wxDefaultSize, long style = 0);
~wxRichTextStyleListBox(); ~wxRichTextStyleListBox();
/// Returns the HTML for this item
virtual wxString OnGetItem(size_t n) const;
/// Creates a suitable HTML fragment for a definition /// Creates a suitable HTML fragment for a definition
wxString CreateHTML(wxRichTextStyleDefinition* def) const; wxString CreateHTML(wxRichTextStyleDefinition* def) const;
@@ -226,6 +223,10 @@ public:
// Convert units in tends of a millimetre to device units // Convert units in tends of a millimetre to device units
int ConvertTenthsMMToPixels(wxDC& dc, int units) const; int ConvertTenthsMMToPixels(wxDC& dc, int units) const;
protected:
/// Returns the HTML for this item
virtual wxString OnGetItem(size_t n) const;
private: private:
wxRichTextStyleSheet* m_styleSheet; wxRichTextStyleSheet* m_styleSheet;

View File

@@ -35,9 +35,6 @@ public:
{ } { }
#if wxUSE_STREAMS #if wxUSE_STREAMS
virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream);
/// Recursively export an object /// Recursively export an object
bool ExportXML(wxOutputStream& stream, wxMBConv* convMem, wxMBConv* convFile, wxRichTextObject& obj, int level); bool ExportXML(wxOutputStream& stream, wxMBConv* convMem, wxMBConv* convFile, wxRichTextObject& obj, int level);
@@ -66,7 +63,10 @@ public:
wxString GetText(wxXmlNode *node, const wxString& param = wxEmptyString, bool translate = false); wxString GetText(wxXmlNode *node, const wxString& param = wxEmptyString, bool translate = false);
protected: protected:
#if wxUSE_STREAMS
virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream);
#endif
}; };
#endif #endif

View File

@@ -241,6 +241,7 @@ protected:
{ ScrollDoSetVirtualSize(x, y); } \ { ScrollDoSetVirtualSize(x, y); } \
virtual wxSize GetBestVirtualSize() const \ virtual wxSize GetBestVirtualSize() const \
{ return ScrollGetBestVirtualSize(); } \ { return ScrollGetBestVirtualSize(); } \
protected: \
virtual wxSize GetWindowSizeForVirtualSize(const wxSize& size) const \ virtual wxSize GetWindowSizeForVirtualSize(const wxSize& size) const \
{ return ScrollGetWindowSizeForVirtualSize(size); } { return ScrollGetWindowSizeForVirtualSize(size); }
@@ -282,6 +283,12 @@ public:
long style = wxScrolledWindowStyle, long style = wxScrolledWindowStyle,
const wxString& name = wxPanelNameStr); const wxString& name = wxPanelNameStr);
// we need to return a special WM_GETDLGCODE value to process just the
// arrows but let the other navigation characters through
#ifdef __WXMSW__
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif // __WXMSW__
WX_FORWARD_TO_SCROLL_HELPER() WX_FORWARD_TO_SCROLL_HELPER()
protected: protected:
@@ -289,12 +296,6 @@ protected:
// wxScrollHelperEvtHandler::ProcessEvent() // wxScrollHelperEvtHandler::ProcessEvent()
void OnPaint(wxPaintEvent& event); void OnPaint(wxPaintEvent& event);
// we need to return a special WM_GETDLGCODE value to process just the
// arrows but let the other navigation characters through
#ifdef __WXMSW__
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif // __WXMSW__
private: private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrolledWindow) DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrolledWindow)
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()

View File

@@ -378,11 +378,6 @@ public:
virtual void SelectAll(); virtual void SelectAll();
virtual void SetEditable(bool editable) = 0; virtual void SetEditable(bool editable) = 0;
// override streambuf method
#if wxHAS_TEXT_WINDOW_STREAM
int overflow(int i);
#endif // wxHAS_TEXT_WINDOW_STREAM
// stream-like insertion operators: these are always available, whether we // stream-like insertion operators: these are always available, whether we
// were, or not, compiled with streambuf support // were, or not, compiled with streambuf support
wxTextCtrl& operator<<(const wxString& s); wxTextCtrl& operator<<(const wxString& s);
@@ -398,6 +393,11 @@ public:
virtual bool ShouldInheritColours() const { return false; } virtual bool ShouldInheritColours() const { return false; }
protected: protected:
// override streambuf method
#if wxHAS_TEXT_WINDOW_STREAM
int overflow(int i);
#endif // wxHAS_TEXT_WINDOW_STREAM
// the name of the last file loaded with LoadFile() which will be used by // the name of the last file loaded with LoadFile() which will be used by
// SaveFile() by default // SaveFile() by default
wxString m_filename; wxString m_filename;

View File

@@ -138,6 +138,9 @@ public:
virtual bool DeleteAllPages(); virtual bool DeleteAllPages();
protected: protected:
// Implementation of a page removal. See DeletPage for comments.
wxTreebookPage *DoRemovePage(size_t pos);
// This subclass of wxBookCtrlBase accepts NULL page pointers (empty pages) // This subclass of wxBookCtrlBase accepts NULL page pointers (empty pages)
virtual bool AllowNullPage() const { return true; } virtual bool AllowNullPage() const { return true; }
@@ -180,9 +183,6 @@ private:
bool bSelect = false, bool bSelect = false,
int imageId = wxNOT_FOUND); int imageId = wxNOT_FOUND);
// Implementation of a page removal. See DeletPage for comments.
wxTreebookPage *DoRemovePage(size_t pos);
// Sets selection in the tree control and updates the page being shown. // Sets selection in the tree control and updates the page being shown.
int DoSetSelection(size_t pos); int DoSetSelection(size_t pos);

View File

@@ -100,17 +100,18 @@ public:
virtual void Release(); virtual void Release();
virtual void Click(); virtual void Click();
protected:
virtual bool PerformAction(const wxControlAction& action, virtual bool PerformAction(const wxControlAction& action,
long numArg = -1, long numArg = -1,
const wxString& strArg = wxEmptyString); const wxString& strArg = wxEmptyString);
virtual bool CanBeHighlighted() const { return true; }
protected:
virtual wxSize DoGetBestClientSize() const; virtual wxSize DoGetBestClientSize() const;
virtual bool DoDrawBackground(wxDC& dc); virtual bool DoDrawBackground(wxDC& dc);
virtual void DoDraw(wxControlRenderer *renderer); virtual void DoDraw(wxControlRenderer *renderer);
virtual bool CanBeHighlighted() const { return true; }
// common part of all ctors // common part of all ctors
void Init(); void Init();

Some files were not shown because too many files have changed in this diff Show More