git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10682
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxWindowDC();
wxWindowDC( wxWindow *win );
wxWindowDC();
wxWindowDC( wxWindow *win );
virtual bool CanDrawBitmap() const { return TRUE; }
virtual bool CanGetTextExtent() const { return TRUE; }
virtual bool CanDrawBitmap() const { return TRUE; }
virtual bool CanGetTextExtent() const { return TRUE; }
class wxClientDC : public wxWindowDC
{
public:
class wxClientDC : public wxWindowDC
{
public:
wxClientDC( wxWindow *win );
protected:
wxClientDC( wxWindow *win );
protected:
wxWindowDC();
wxWindowDC( wxWindow *win );
wxWindowDC();
wxWindowDC( wxWindow *win );
virtual bool CanDrawBitmap() const { return TRUE; }
virtual bool CanGetTextExtent() const { return TRUE; }
virtual bool CanDrawBitmap() const { return TRUE; }
virtual bool CanGetTextExtent() const { return TRUE; }
class wxClientDC : public wxWindowDC
{
public:
class wxClientDC : public wxWindowDC
{
public:
wxClientDC( wxWindow *win );
protected:
wxClientDC( wxWindow *win );
protected:
wxClientDC::wxClientDC( wxWindow *win )
: wxWindowDC( win )
{
wxClientDC::wxClientDC( wxWindow *win )
: wxWindowDC( win )
{
+ wxCHECK_RET( win, _T("NULL window in wxClientDC::wxClientDC") );
+
#ifdef __WXUNIVERSAL__
wxPoint ptOrigin = win->GetClientAreaOrigin();
SetDeviceOrigin(ptOrigin.x, ptOrigin.y);
#ifdef __WXUNIVERSAL__
wxPoint ptOrigin = win->GetClientAreaOrigin();
SetDeviceOrigin(ptOrigin.x, ptOrigin.y);
#endif // __WXUNIVERSAL__
}
#endif // __WXUNIVERSAL__
}
+void wxClientDC::DoGetSize(int *width, int *height) const
+{
+ wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") );
+
+ m_owner->GetClientSize( width, height );
+}
+
// ----------------------------------------------------------------------------
// wxDCModule
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxDCModule
// ----------------------------------------------------------------------------
wxClientDC::wxClientDC( wxWindow *win )
: wxWindowDC( win )
{
wxClientDC::wxClientDC( wxWindow *win )
: wxWindowDC( win )
{
+ wxCHECK_RET( win, _T("NULL window in wxClientDC::wxClientDC") );
+
#ifdef __WXUNIVERSAL__
wxPoint ptOrigin = win->GetClientAreaOrigin();
SetDeviceOrigin(ptOrigin.x, ptOrigin.y);
#ifdef __WXUNIVERSAL__
wxPoint ptOrigin = win->GetClientAreaOrigin();
SetDeviceOrigin(ptOrigin.x, ptOrigin.y);
#endif // __WXUNIVERSAL__
}
#endif // __WXUNIVERSAL__
}
+void wxClientDC::DoGetSize(int *width, int *height) const
+{
+ wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") );
+
+ m_owner->GetClientSize( width, height );
+}
+
// ----------------------------------------------------------------------------
// wxDCModule
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxDCModule
// ----------------------------------------------------------------------------