projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Explicitly include X11/Xlib.h to fix AIX build.
[wxWidgets.git]
/
src
/
gtk
/
dcmemory.cpp
diff --git
a/src/gtk/dcmemory.cpp
b/src/gtk/dcmemory.cpp
index d77d307dc5c3c76da744cbfb1ecd0bc61937dc94..d502b5bd48d9ce06fee27693e0e67b10c944373d 100644
(file)
--- a/
src/gtk/dcmemory.cpp
+++ b/
src/gtk/dcmemory.cpp
@@
-16,27
+16,23
@@
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
-#if wxUSE_GRAPHICS_CONTEXT
-#include "wx/graphics.h"
-#endif
-
//-----------------------------------------------------------------------------
// wxMemoryDCImpl
//-----------------------------------------------------------------------------
IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxWindowDCImpl)
//-----------------------------------------------------------------------------
// wxMemoryDCImpl
//-----------------------------------------------------------------------------
IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxWindowDCImpl)
-wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner )
+wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner )
: wxWindowDCImpl( owner )
: wxWindowDCImpl( owner )
-{
- Init();
+{
+ Init();
}
}
-wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap)
+wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap)
: wxWindowDCImpl( owner )
: wxWindowDCImpl( owner )
-{
- Init();
- DoSelect(bitmap);
+{
+ Init();
+ DoSelect(bitmap);
}
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *WXUNUSED(dc) )
}
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *WXUNUSED(dc) )
@@
-64,20
+60,12
@@
void wxMemoryDCImpl::Init()
m_fontdesc = pango_font_description_copy( pango_context_get_font_description( m_context ) );
}
m_fontdesc = pango_font_description_copy( pango_context_get_font_description( m_context ) );
}
-#if wxUSE_GRAPHICS_CONTEXT
-wxGraphicsContext* wxMemoryDCImpl::CreateGraphicsContext()
-{
- wxMemoryDC *memdc = (wxMemoryDC*) GetOwner();
- return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext( *memdc );
-}
-#endif
-
void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
{
Destroy();
m_selected = bitmap;
void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
{
Destroy();
m_selected = bitmap;
- if (m_selected.Ok())
+ if (m_selected.
Is
Ok())
{
m_gdkwindow = m_selected.GetPixmap();
{
m_gdkwindow = m_selected.GetPixmap();
@@
-88,14
+76,14
@@
void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
else
{
m_ok = false;
else
{
m_ok = false;
- m_gdkwindow =
(GdkWindow *)
NULL;
+ m_gdkwindow = NULL;
}
}
void wxMemoryDCImpl::SetPen( const wxPen& penOrig )
{
wxPen pen( penOrig );
}
}
void wxMemoryDCImpl::SetPen( const wxPen& penOrig )
{
wxPen pen( penOrig );
- if ( m_selected.Ok() &&
+ if ( m_selected.
Is
Ok() &&
m_selected.GetDepth() == 1 &&
(pen != *wxTRANSPARENT_PEN) )
{
m_selected.GetDepth() == 1 &&
(pen != *wxTRANSPARENT_PEN) )
{
@@
-108,7
+96,7
@@
void wxMemoryDCImpl::SetPen( const wxPen& penOrig )
void wxMemoryDCImpl::SetBrush( const wxBrush& brushOrig )
{
wxBrush brush( brushOrig );
void wxMemoryDCImpl::SetBrush( const wxBrush& brushOrig )
{
wxBrush brush( brushOrig );
- if ( m_selected.Ok() &&
+ if ( m_selected.
Is
Ok() &&
m_selected.GetDepth() == 1 &&
(brush != *wxTRANSPARENT_BRUSH) )
{
m_selected.GetDepth() == 1 &&
(brush != *wxTRANSPARENT_BRUSH) )
{
@@
-122,7
+110,7
@@
void wxMemoryDCImpl::SetBackground( const wxBrush& brushOrig )
{
wxBrush brush(brushOrig);
{
wxBrush brush(brushOrig);
- if ( m_selected.Ok() &&
+ if ( m_selected.
Is
Ok() &&
m_selected.GetDepth() == 1 &&
(brush != *wxTRANSPARENT_BRUSH) )
{
m_selected.GetDepth() == 1 &&
(brush != *wxTRANSPARENT_BRUSH) )
{
@@
-134,7
+122,7
@@
void wxMemoryDCImpl::SetBackground( const wxBrush& brushOrig )
void wxMemoryDCImpl::SetTextForeground( const wxColour& col )
{
void wxMemoryDCImpl::SetTextForeground( const wxColour& col )
{
- if ( m_selected.Ok() && m_selected.GetDepth() == 1 )
+ if ( m_selected.
Is
Ok() && m_selected.GetDepth() == 1 )
wxWindowDCImpl::SetTextForeground( col == *wxWHITE ? *wxBLACK : *wxWHITE);
else
wxWindowDCImpl::SetTextForeground( col );
wxWindowDCImpl::SetTextForeground( col == *wxWHITE ? *wxBLACK : *wxWHITE);
else
wxWindowDCImpl::SetTextForeground( col );
@@
-142,7
+130,7
@@
void wxMemoryDCImpl::SetTextForeground( const wxColour& col )
void wxMemoryDCImpl::SetTextBackground( const wxColour &col )
{
void wxMemoryDCImpl::SetTextBackground( const wxColour &col )
{
- if (m_selected.Ok() && m_selected.GetDepth() == 1)
+ if (m_selected.
Is
Ok() && m_selected.GetDepth() == 1)
wxWindowDCImpl::SetTextBackground( col == *wxWHITE ? *wxBLACK : *wxWHITE );
else
wxWindowDCImpl::SetTextBackground( col );
wxWindowDCImpl::SetTextBackground( col == *wxWHITE ? *wxBLACK : *wxWHITE );
else
wxWindowDCImpl::SetTextBackground( col );
@@
-150,7
+138,7
@@
void wxMemoryDCImpl::SetTextBackground( const wxColour &col )
void wxMemoryDCImpl::DoGetSize( int *width, int *height ) const
{
void wxMemoryDCImpl::DoGetSize( int *width, int *height ) const
{
- if (m_selected.Ok())
+ if (m_selected.
Is
Ok())
{
if (width) (*width) = m_selected.GetWidth();
if (height) (*height) = m_selected.GetHeight();
{
if (width) (*width) = m_selected.GetWidth();
if (height) (*height) = m_selected.GetHeight();