]> git.saurik.com Git - wxWidgets.git/blame - src/gtk/dc.cpp
Auto complete file names in the text controls of wx{File,Dir}PickerCtrl.
[wxWidgets.git] / src / gtk / dc.cpp
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: src/gtk/dc.cpp
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
6f65e337 5// RCS-ID: $Id$
6c9a19aa 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
14f355c2
VS
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
c801d85f 12
18591d70 13#include "wx/gtk/dc.h"
d296fd8f 14
d296fd8f 15//-----------------------------------------------------------------------------
888dde65 16// wxGTKDCImpl
d296fd8f
RR
17//-----------------------------------------------------------------------------
18
888dde65 19IMPLEMENT_ABSTRACT_CLASS(wxGTKDCImpl, wxDCImpl)
c801d85f 20
03647350 21wxGTKDCImpl::wxGTKDCImpl( wxDC *owner )
888dde65 22 : wxDCImpl( owner )
c801d85f 23{
4bc67cc5 24 m_ok = FALSE;
a23fd0e1 25
4bc67cc5
RR
26 m_pen = *wxBLACK_PEN;
27 m_font = *wxNORMAL_FONT;
41bf0eb3 28 m_brush = *wxWHITE_BRUSH;
ff7b1510 29}
c801d85f 30
888dde65 31wxGTKDCImpl::~wxGTKDCImpl()
ab171e95
RR
32{
33}
34
888dde65 35void wxGTKDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
c801d85f 36{
4bc67cc5
RR
37 m_clipping = TRUE;
38 m_clipX1 = x;
39 m_clipY1 = y;
40 m_clipX2 = x + width;
41 m_clipY2 = y + height;
ff7b1510 42}
c801d85f 43
a23fd0e1
VZ
44// ---------------------------------------------------------------------------
45// get DC capabilities
46// ---------------------------------------------------------------------------
c801d85f 47
888dde65 48void wxGTKDCImpl::DoGetSizeMM( int* width, int* height ) const
c801d85f 49{
4bc67cc5
RR
50 int w = 0;
51 int h = 0;
ab171e95 52 GetOwner()->GetSize( &w, &h );
ce83033f
VZ
53 if (width) *width = int( double(w) / (m_userScaleX*m_mm_to_pix_x) );
54 if (height) *height = int( double(h) / (m_userScaleY*m_mm_to_pix_y) );
7bcb11d3
JS
55}
56
57// Resolution in pixels per logical inch
888dde65 58wxSize wxGTKDCImpl::GetPPI() const
7bcb11d3
JS
59{
60 // TODO (should probably be pure virtual)
61 return wxSize(0, 0);
ff7b1510 62}