make DoSetSizeHints protected, remove parameter defaults

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2007-11-22 06:12:56 +00:00
parent 3f4049ffb2
commit b2e10daccc
10 changed files with 38 additions and 53 deletions

View File

@@ -169,13 +169,6 @@ public:
virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
#endif
// no size hints
virtual void DoSetSizeHints(int WXUNUSED(minW),
int WXUNUSED(minH),
int WXUNUSED(maxW) = wxDefaultCoord,
int WXUNUSED(maxH) = wxDefaultCoord,
int WXUNUSED(incW) = wxDefaultCoord,
int WXUNUSED(incH) = wxDefaultCoord) {}
#if wxUSE_TOOLBAR
// no toolbar bars
virtual wxToolBar* CreateToolBar(long WXUNUSED(style),
@@ -209,6 +202,10 @@ protected:
virtual void DoSetSize(int x, int y, int width, int height, int size_flags);
virtual void DoMoveWindow(int x, int y, int width, int height);
// no size hints
virtual void DoSetSizeHints(int WXUNUSED(minW), int WXUNUSED(minH),
int WXUNUSED(maxW), int WXUNUSED(maxH),
int WXUNUSED(incW), int WXUNUSED(incH)) {}
public:
// This function needs to be called when a size change is confirmed,
// we needed this function to prevent anybody from the outside

View File

@@ -152,14 +152,6 @@ public:
virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
#endif
// no size hints
virtual void DoSetSizeHints( int WXUNUSED(minW),
int WXUNUSED(minH),
int WXUNUSED(maxW) = wxDefaultCoord,
int WXUNUSED(maxH) = wxDefaultCoord,
int WXUNUSED(incW) = wxDefaultCoord,
int WXUNUSED(incH) = wxDefaultCoord) {}
#if wxUSE_TOOLBAR
// no toolbar bars
virtual wxToolBar* CreateToolBar( long WXUNUSED(style),
@@ -207,6 +199,11 @@ protected:
virtual void DoMoveWindow(int x, int y, int width, int height);
// no size hints
virtual void DoSetSizeHints(int WXUNUSED(minW), int WXUNUSED(minH),
int WXUNUSED(maxW), int WXUNUSED(maxH),
int WXUNUSED(incW), int WXUNUSED(incH)) {}
// This function needs to be called when a size change is confirmed,
// we needed this function to prevent any body from the outside
// changing the panel... it messes the UI layout when we would allow it.

View File

@@ -118,14 +118,6 @@ public:
virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
#endif
// no size hints
virtual void DoSetSizeHints( int WXUNUSED(minW),
int WXUNUSED(minH),
int WXUNUSED(maxW) = wxDefaultCoord,
int WXUNUSED(maxH) = wxDefaultCoord,
int WXUNUSED(incW) = wxDefaultCoord,
int WXUNUSED(incH) = wxDefaultCoord) {}
#if wxUSE_TOOLBAR
// no toolbar
virtual wxToolBar* CreateToolBar( long WXUNUSED(style),
@@ -168,6 +160,11 @@ protected:
int width, int height,
int sizeFlags = wxSIZE_AUTO);
// no size hints
virtual void DoSetSizeHints(int WXUNUSED(minW), int WXUNUSED(minH),
int WXUNUSED(maxW), int WXUNUSED(maxH),
int WXUNUSED(incW), int WXUNUSED(incH)) {}
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)

View File

@@ -44,10 +44,10 @@ public:
virtual void SetTitle( const wxString &title );
protected:
virtual void DoSetSizeHints( int minW, int minH,
int maxW, int maxH,
int incW, int incH );
protected:
virtual void DoGetClientSize(int* width, int* height) const;
// implementation

View File

@@ -106,12 +106,6 @@ public:
// wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle.
int m_urgency_hint;
// give hints to the Window Manager for how the size
// of the TLW can be changed by dragging
virtual void DoSetSizeHints( int minW, int minH,
int maxW = wxDefaultCoord, int maxH = wxDefaultCoord,
int incW = wxDefaultCoord, int incH = wxDefaultCoord );
// return the size of the window without WM decorations
void GTKDoGetSize(int *width, int *height) const;
@@ -119,6 +113,11 @@ public:
virtual bool IsDecorCacheable() const;
protected:
// give hints to the Window Manager for how the size
// of the TLW can be changed by dragging
virtual void DoSetSizeHints( int minW, int minH,
int maxW, int maxH,
int incW, int incH);
// common part of all ctors
void Init();

View File

@@ -74,11 +74,6 @@ public:
int GetThumbLength() const ;
void SetTick(int tickPos) ;
// set min/max size of the slider
virtual void DoSetSizeHints( int minW, int minH,
int maxW = -1, int maxH = -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);
@@ -88,6 +83,11 @@ protected:
virtual void DoSetSize(int x, int y, int w, int h, int sizeFlags);
virtual void DoMoveWindow(int x, int y, int w, int h);
// set min/max size of the slider
virtual void DoSetSizeHints( int minW, int minH,
int maxW, int maxH,
int incW, int incH);
// Common processing to invert slider values based on wxSL_INVERSE
virtual int ValueInvertOrNot(int value) const;

View File

@@ -152,12 +152,6 @@ public:
void ReleaseMouse();
void Raise();
void Lower(void);
void DoSetSizeHints(int minW = wxDefaultCoord,
int minH = wxDefaultCoord,
int maxW = wxDefaultCoord,
int maxH = wxDefaultCoord,
int incW = wxDefaultCoord,
int incH = wxDefaultCoord);
// MDI operations
virtual void Maximize();
@@ -199,6 +193,9 @@ protected:
void DoGetClientSize(int *width, int *height) const;
void DoGetSize(int *width, int *height) const;
void DoGetPosition(int *x, int *y) const ;
void DoSetSizeHints(int minW, int minH,
int maxW, int maxH,
int incW, int incH);
};
/* The client window is a child of the parent MDI frame, and itself

View File

@@ -52,10 +52,6 @@ public:
virtual wxString GetTitle() const { return m_title; }
virtual void SetTitle( const wxString& title ) { m_title = title; }
virtual void DoSetSizeHints( int minW, int minH,
int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1 );
virtual bool SetShape( const wxRegion& region );
WXWidget GetShellWidget() const;
@@ -66,6 +62,9 @@ protected:
void PreDestroy();
virtual void DoGetPosition(int* x, int* y) const;
virtual void DoSetSizeHints(int minW, int minH,
int maxW, int maxH,
int incW, int incH);
private:
// really create the Motif widget for TLW

View File

@@ -417,10 +417,6 @@ public:
const wxSize& incSize=wxDefaultSize)
{ DoSetSizeHints(minSize.x, minSize.y, maxSize.x, maxSize.y, incSize.x, incSize.y); }
virtual void DoSetSizeHints( int minW, int minH,
int maxW, int maxH,
int incW, int incH );
// Methods for setting virtual size hints
// FIXME: What are virtual size hints?
@@ -1495,6 +1491,10 @@ protected:
// same as DoSetSize() for the client size
virtual void DoSetClientSize(int width, int height) = 0;
virtual void DoSetSizeHints( int minW, int minH,
int maxW, int maxH,
int incW, int incH );
// move the window to the specified location and resize it: this is called
// from both DoSetSize() and DoSetClientSize() and would usually just
// reposition this window except for composite controls which will want to

View File

@@ -81,10 +81,6 @@ public:
virtual void ScrollWindow( int dx, int dy,
const wxRect* rect = (wxRect *) NULL );
virtual void DoSetSizeHints(int minW, int minH,
int maxW = wxDefaultCoord, int maxH = wxDefaultCoord,
int incW = wxDefaultCoord, int incH = wxDefaultCoord);
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget );
#endif // wxUSE_DRAG_AND_DROP
@@ -179,6 +175,9 @@ protected:
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void DoSetSizeHints(int minW, int minH,
int maxW, int maxH,
int incW, int incH);
virtual void DoCaptureMouse();
virtual void DoReleaseMouse();