]> git.saurik.com Git - wxWidgets.git/blame - src/gtk/dcscreen.cpp
Increase the number of index items shown by default in wxHTML.
[wxWidgets.git] / src / gtk / dcscreen.cpp
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
cdccdfab 2// Name: src/gtk/dcscreen.cpp
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 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"
12
c801d85f 13#include "wx/dcscreen.h"
888dde65 14#include "wx/gtk/dcscreen.h"
cdccdfab
WS
15
16#ifndef WX_PRECOMP
17 #include "wx/window.h"
18#endif
dbf858b5 19
071a2d78 20#include <gdk/gdk.h>
5d25c050 21#include <gdk/gdkx.h>
071a2d78 22#include <gtk/gtk.h>
83624f79 23
c801d85f 24//-----------------------------------------------------------------------------
888dde65 25// wxScreenDCImpl
c801d85f
KB
26//-----------------------------------------------------------------------------
27
888dde65 28IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl)
ab171e95 29
03647350 30wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner )
888dde65 31 : wxWindowDCImpl( owner )
03647350
VZ
32{
33 Init();
ab171e95 34}
c801d85f 35
888dde65 36void wxScreenDCImpl::Init()
c801d85f 37{
cdccdfab 38 m_ok = false;
4bc67cc5 39 m_cmap = gdk_colormap_get_system();
888dde65 40 m_gdkwindow = gdk_get_default_root_window();
72cdf4c9 41
3e3b7e75 42 m_context = gdk_pango_context_get();
e90d93d1
MW
43 // Note: The Sun customised version of Pango shipping with Solaris 10
44 // crashes if the language is left NULL (see bug 1374114)
203b65dd 45 pango_context_set_language( m_context, gtk_get_default_language() );
3e3b7e75
RD
46 m_layout = pango_layout_new( m_context );
47// m_fontdesc = pango_font_description_copy( widget->style->font_desc );
3e3b7e75 48
cdccdfab 49 m_isScreenDC = true;
e1208c31 50
4bc67cc5 51 SetUpDC();
72cdf4c9 52
4bc67cc5
RR
53 gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
54 gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS );
55 gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS );
56 gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS );
ff7b1510 57}
c801d85f 58
888dde65 59wxScreenDCImpl::~wxScreenDCImpl()
c801d85f 60{
5d25c050
RR
61 gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
62 gdk_gc_set_subwindow( m_brushGC, GDK_CLIP_BY_CHILDREN );
63 gdk_gc_set_subwindow( m_textGC, GDK_CLIP_BY_CHILDREN );
64 gdk_gc_set_subwindow( m_bgGC, GDK_CLIP_BY_CHILDREN );
ff7b1510
RR
65}
66
888dde65 67void wxScreenDCImpl::DoGetSize(int *width, int *height) const
376aa62a
VZ
68{
69 wxDisplaySize(width, height);
70}