const wxFont *theFont = (const wxFont *) NULL)
const;
- virtual void ClientToScreen( int *x, int *y ) const;
- virtual void ScreenToClient( int *x, int *y ) const;
- wxPoint ClientToScreen(const wxPoint& pt) const
- { int x = pt.x; int y = pt.y; ClientToScreen(& x, & y); return wxPoint(x, y); }
- wxPoint ScreenToClient(const wxPoint& pt) const
- { int x = pt.x; int y = pt.y; ScreenToClient(& x, & y); return wxPoint(x, y); }
-
virtual bool PopupMenu( wxMenu *menu, int x, int y );
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
wxInsertChildFunction m_insertCallback;
// implement the base class pure virtuals
+ virtual void DoClientToScreen( int *x, int *y ) const;
+ virtual void DoScreenToClient( int *x, int *y ) const;
virtual void DoGetPosition( int *x, int *y ) const;
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetClientSize( int *width, int *height ) const;
const wxFont *theFont = (const wxFont *) NULL)
const;
- virtual void ClientToScreen( int *x, int *y ) const;
- virtual void ScreenToClient( int *x, int *y ) const;
- wxPoint ClientToScreen(const wxPoint& pt) const
- { int x = pt.x; int y = pt.y; ClientToScreen(& x, & y); return wxPoint(x, y); }
- wxPoint ScreenToClient(const wxPoint& pt) const
- { int x = pt.x; int y = pt.y; ScreenToClient(& x, & y); return wxPoint(x, y); }
-
virtual bool PopupMenu( wxMenu *menu, int x, int y );
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
wxInsertChildFunction m_insertCallback;
// implement the base class pure virtuals
+ virtual void DoClientToScreen( int *x, int *y ) const;
+ virtual void DoScreenToClient( int *x, int *y ) const;
virtual void DoGetPosition( int *x, int *y ) const;
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetClientSize( int *width, int *height ) const;
const wxFont *theFont = (const wxFont *) NULL)
const;
- virtual void ClientToScreen( int *x, int *y ) const;
- virtual void ScreenToClient( int *x, int *y ) const;
- wxPoint ClientToScreen(const wxPoint& pt) const
- { int x = pt.x; int y = pt.y; ClientToScreen(& x, & y); return wxPoint(x, y); }
- wxPoint ScreenToClient(const wxPoint& pt) const
- { int x = pt.x; int y = pt.y; ScreenToClient(& x, & y); return wxPoint(x, y); }
-
virtual bool PopupMenu( wxMenu *menu, int x, int y );
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
wxButton *m_btnDefault;
// implement the base class pure virtuals
+ virtual void DoClientToScreen( int *x, int *y ) const;
+ virtual void DoScreenToClient( int *x, int *y ) const;
virtual void DoGetPosition( int *x, int *y ) const;
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetClientSize( int *width, int *height ) const;
const = 0;
// translate to/from screen/client coordinates (pointers may be NULL)
- virtual void ClientToScreen( int *x, int *y ) const = 0;
- virtual void ScreenToClient( int *x, int *y ) const = 0;
+ void ClientToScreen( int *x, int *y ) const
+ { DoClientToScreen(x, y); }
+ void ScreenToClient( int *x, int *y ) const
+ { DoScreenToClient(x, y); }
+ wxPoint ClientToScreen(const wxPoint& pt) const
+ {
+ int x = pt.x, y = pt.y;
+ DoClientToScreen(&x, &y);
+
+ return wxPoint(x, y);
+ }
+
+ wxPoint ScreenToClient(const wxPoint& pt) const
+ {
+ int x = pt.x, y = pt.y;
+ DoScreenToClient(&x, &y);
+
+ return wxPoint(x, y);
+ }
// misc
// ----
// overloaded Something()s in terms of DoSomething() which will be the
// only one to be virtual.
+ // coordinates translation
+ virtual void DoClientToScreen( int *x, int *y ) const = 0;
+ virtual void DoScreenToClient( int *x, int *y ) const = 0;
+
// retrieve the position/size of the window
virtual void DoGetPosition( int *x, int *y ) const = 0;
virtual void DoGetSize( int *width, int *height ) const = 0;
if (y) (*y) = m_y;
}
-void wxWindow::ClientToScreen( int *x, int *y ) const
+void wxWindow::DoClientToScreen( int *x, int *y ) const
{
wxCHECK_RET( (m_widget != NULL), _T("invalid window") );
if (y) *y += org_y;
}
-void wxWindow::ScreenToClient( int *x, int *y ) const
+void wxWindow::DoScreenToClient( int *x, int *y ) const
{
wxCHECK_RET( (m_widget != NULL), _T("invalid window") );
if (y) (*y) = m_y;
}
-void wxWindow::ClientToScreen( int *x, int *y ) const
+void wxWindow::DoClientToScreen( int *x, int *y ) const
{
wxCHECK_RET( (m_widget != NULL), _T("invalid window") );
if (y) *y += org_y;
}
-void wxWindow::ScreenToClient( int *x, int *y ) const
+void wxWindow::DoScreenToClient( int *x, int *y ) const
{
wxCHECK_RET( (m_widget != NULL), _T("invalid window") );
*y = point.y;
}
-void wxWindow::ScreenToClient(int *x, int *y) const
+void wxWindow::DoScreenToClient(int *x, int *y) const
{
POINT pt;
if ( x )
*y = pt.y;
}
-void wxWindow::ClientToScreen(int *x, int *y) const
+void wxWindow::DoClientToScreen(int *x, int *y) const
{
POINT pt;
if ( x )