compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -25,6 +25,10 @@
|
|||||||
#ifndef _WX_RENDERER_H_
|
#ifndef _WX_RENDERER_H_
|
||||||
#define _WX_RENDERER_H_
|
#define _WX_RENDERER_H_
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxDC;
|
||||||
|
class WXDLLEXPORT wxRect;
|
||||||
|
class WXDLLEXPORT wxWindow;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: generic/renderg.cpp
|
// Name: generic/renderg.cpp
|
||||||
// Purpose: generic implementation of wxRendererBase (for any platform)
|
// Purpose: generic implementation of wxRendererNative (for any platform)
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 20.07.2003
|
// Created: 20.07.2003
|
||||||
@@ -28,13 +28,18 @@
|
|||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#endif //WX_PRECOMP
|
#endif //WX_PRECOMP
|
||||||
|
|
||||||
|
#include "wx/gdicmn.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
|
|
||||||
|
#include "wx/settings.h"
|
||||||
|
|
||||||
#include "wx/renderer.h"
|
#include "wx/renderer.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxRendererGeneric: our wxRendererBase implementation
|
// wxRendererGeneric: our wxRendererNative implementation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLEXPORT wxRendererGeneric : public wxRendererBase
|
class WXDLLEXPORT wxRendererGeneric : public wxRendererNative
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// draw the header control button (used by wxListCtrl)
|
// draw the header control button (used by wxListCtrl)
|
||||||
@@ -59,7 +64,7 @@ public:
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
wxRendererNative *wxRendererGeneric::GetGeneric()
|
wxRendererNative& wxRendererNative::GetGeneric()
|
||||||
{
|
{
|
||||||
static wxRendererGeneric s_rendererGeneric;
|
static wxRendererGeneric s_rendererGeneric;
|
||||||
|
|
||||||
@@ -87,25 +92,30 @@ wxRendererGeneric::DrawHeaderButton(wxWindow *win,
|
|||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
int flags)
|
int flags)
|
||||||
{
|
{
|
||||||
const int m_corner = 1;
|
const int CORNER = 1;
|
||||||
|
|
||||||
dc->SetBrush( *wxTRANSPARENT_BRUSH );
|
const wxCoord x = rect.x,
|
||||||
|
y = rect.y,
|
||||||
|
w = rect.width,
|
||||||
|
h = rect.height;
|
||||||
|
|
||||||
dc->SetPen( *wxBLACK_PEN );
|
dc.SetBrush( *wxTRANSPARENT_BRUSH );
|
||||||
dc->DrawLine( x+w-m_corner+1, y, x+w, y+h ); // right (outer)
|
|
||||||
dc->DrawRectangle( x, y+h, w+1, 1 ); // bottom (outer)
|
dc.SetPen( *wxBLACK_PEN );
|
||||||
|
dc.DrawLine( x+w-CORNER+1, y, x+w, y+h ); // right (outer)
|
||||||
|
dc.DrawRectangle( x, y+h, w+1, 1 ); // bottom (outer)
|
||||||
|
|
||||||
wxPen pen( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNSHADOW ), 1, wxSOLID );
|
wxPen pen( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNSHADOW ), 1, wxSOLID );
|
||||||
|
|
||||||
dc->SetPen( pen );
|
dc.SetPen( pen );
|
||||||
dc->DrawLine( x+w-m_corner, y, x+w-1, y+h ); // right (inner)
|
dc.DrawLine( x+w-CORNER, y, x+w-1, y+h ); // right (inner)
|
||||||
dc->DrawRectangle( x+1, y+h-1, w-2, 1 ); // bottom (inner)
|
dc.DrawRectangle( x+1, y+h-1, w-2, 1 ); // bottom (inner)
|
||||||
|
|
||||||
dc->SetPen( *wxWHITE_PEN );
|
dc.SetPen( *wxWHITE_PEN );
|
||||||
dc->DrawRectangle( x, y, w-m_corner+1, 1 ); // top (outer)
|
dc.DrawRectangle( x, y, w-CORNER+1, 1 ); // top (outer)
|
||||||
dc->DrawRectangle( x, y, 1, h ); // left (outer)
|
dc.DrawRectangle( x, y, 1, h ); // left (outer)
|
||||||
dc->DrawLine( x, y+h-1, x+1, y+h-1 );
|
dc.DrawLine( x, y+h-1, x+1, y+h-1 );
|
||||||
dc->DrawLine( x+w-1, y, x+w-1, y+1 );
|
dc.DrawLine( x+w-1, y, x+w-1, y+1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw the plus or minus sign
|
// draw the plus or minus sign
|
||||||
@@ -126,7 +136,7 @@ wxRendererGeneric::DrawTreeItemButton(wxWindow *win,
|
|||||||
|
|
||||||
dc.SetPen(*wxBLACK_PEN);
|
dc.SetPen(*wxBLACK_PEN);
|
||||||
dc.DrawLine(xMiddle - 2, yMiddle, xMiddle + 3, yMiddle);
|
dc.DrawLine(xMiddle - 2, yMiddle, xMiddle + 3, yMiddle);
|
||||||
if ( !item->IsExpanded() )
|
if ( flags & wxCONTROL_EXPANDED )
|
||||||
{
|
{
|
||||||
// turn "-" into "+"
|
// turn "-" into "+"
|
||||||
dc.DrawLine(xMiddle, yMiddle - 2, xMiddle, yMiddle + 3);
|
dc.DrawLine(xMiddle, yMiddle - 2, xMiddle, yMiddle + 3);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: gtk/renderer.cpp
|
// Name: gtk/renderer.cpp
|
||||||
// Purpose: implementation of wxRendererBase for wxGTK
|
// Purpose: implementation of wxRendererNative for wxGTK
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 20.07.2003
|
// Created: 20.07.2003
|
||||||
@@ -30,13 +30,15 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "wx/gtk/win_gtk.h"
|
#include "wx/gtk/win_gtk.h"
|
||||||
|
|
||||||
|
#include "wx/window.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#include "wx/renderer.h"
|
#include "wx/renderer.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxRendererGTK: our wxRendererBase implementation
|
// wxRendererGTK: our wxRendererNative implementation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLEXPORT wxRendererGTK : public wxDelegateRendererBase
|
class WXDLLEXPORT wxRendererGTK : public wxDelegateRendererNative
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// draw the header control button (used by wxListCtrl)
|
// draw the header control button (used by wxListCtrl)
|
||||||
@@ -60,7 +62,7 @@ public:
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
wxRendererNative& wxRendererGTK::Get()
|
wxRendererNative& wxRendererNative::Get()
|
||||||
{
|
{
|
||||||
static wxRendererGTK s_rendererGTK;
|
static wxRendererGTK s_rendererGTK;
|
||||||
|
|
||||||
@@ -79,9 +81,10 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
|
|||||||
GTK_PIZZA(win->m_wxwindow)->bin_window,
|
GTK_PIZZA(win->m_wxwindow)->bin_window,
|
||||||
flags & wxCONTROL_DISABLED ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL,
|
flags & wxCONTROL_DISABLED ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL,
|
||||||
GTK_SHADOW_OUT,
|
GTK_SHADOW_OUT,
|
||||||
(GdkRectangle*) NULL, m_wxwindow,
|
(GdkRectangle*) NULL,
|
||||||
|
win->m_wxwindow,
|
||||||
(char *)"button", // const_cast
|
(char *)"button", // const_cast
|
||||||
dc.XLOG2DEV(rect.x) - 1, rect.y - 1, rect.width + 2, rect.h + 2
|
dc.XLOG2DEV(rect.x) - 1, rect.y - 1, rect.width + 2, rect.height + 2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: gtk/renderer.cpp
|
// Name: gtk/renderer.cpp
|
||||||
// Purpose: implementation of wxRendererBase for wxGTK
|
// Purpose: implementation of wxRendererNative for wxGTK
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 20.07.2003
|
// Created: 20.07.2003
|
||||||
@@ -30,13 +30,15 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "wx/gtk/win_gtk.h"
|
#include "wx/gtk/win_gtk.h"
|
||||||
|
|
||||||
|
#include "wx/window.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#include "wx/renderer.h"
|
#include "wx/renderer.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxRendererGTK: our wxRendererBase implementation
|
// wxRendererGTK: our wxRendererNative implementation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLEXPORT wxRendererGTK : public wxDelegateRendererBase
|
class WXDLLEXPORT wxRendererGTK : public wxDelegateRendererNative
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// draw the header control button (used by wxListCtrl)
|
// draw the header control button (used by wxListCtrl)
|
||||||
@@ -60,7 +62,7 @@ public:
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
wxRendererNative& wxRendererGTK::Get()
|
wxRendererNative& wxRendererNative::Get()
|
||||||
{
|
{
|
||||||
static wxRendererGTK s_rendererGTK;
|
static wxRendererGTK s_rendererGTK;
|
||||||
|
|
||||||
@@ -79,9 +81,10 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
|
|||||||
GTK_PIZZA(win->m_wxwindow)->bin_window,
|
GTK_PIZZA(win->m_wxwindow)->bin_window,
|
||||||
flags & wxCONTROL_DISABLED ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL,
|
flags & wxCONTROL_DISABLED ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL,
|
||||||
GTK_SHADOW_OUT,
|
GTK_SHADOW_OUT,
|
||||||
(GdkRectangle*) NULL, m_wxwindow,
|
(GdkRectangle*) NULL,
|
||||||
|
win->m_wxwindow,
|
||||||
(char *)"button", // const_cast
|
(char *)"button", // const_cast
|
||||||
dc.XLOG2DEV(rect.x) - 1, rect.y - 1, rect.width + 2, rect.h + 2
|
dc.XLOG2DEV(rect.x) - 1, rect.y - 1, rect.width + 2, rect.height + 2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: mac/renderer.cpp
|
// Name: mac/renderer.cpp
|
||||||
// Purpose: implementation of wxRendererBase for Mac
|
// Purpose: implementation of wxRendererNative for Mac
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 20.07.2003
|
// Created: 20.07.2003
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
#include "wx/renderer.h"
|
#include "wx/renderer.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxRendererMac: our wxRendererBase implementation
|
// wxRendererMac: our wxRendererNative implementation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLEXPORT wxRendererMac : public wxRendererBase
|
class WXDLLEXPORT wxRendererMac : public wxRendererNative
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// draw the header control button (used by wxListCtrl)
|
// draw the header control button (used by wxListCtrl)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: mac/renderer.cpp
|
// Name: mac/renderer.cpp
|
||||||
// Purpose: implementation of wxRendererBase for Mac
|
// Purpose: implementation of wxRendererNative for Mac
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 20.07.2003
|
// Created: 20.07.2003
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
#include "wx/renderer.h"
|
#include "wx/renderer.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxRendererMac: our wxRendererBase implementation
|
// wxRendererMac: our wxRendererNative implementation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLEXPORT wxRendererMac : public wxRendererBase
|
class WXDLLEXPORT wxRendererMac : public wxRendererNative
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// draw the header control button (used by wxListCtrl)
|
// draw the header control button (used by wxListCtrl)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: msw/renderer.cpp
|
// Name: msw/renderer.cpp
|
||||||
// Purpose: implementation of wxRendererBase for Windows
|
// Purpose: implementation of wxRendererNative for Windows
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 20.07.2003
|
// Created: 20.07.2003
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
#include "wx/renderer.h"
|
#include "wx/renderer.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxRendererMSW: our wxRendererBase implementation
|
// wxRendererMSW: our wxRendererNative implementation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLEXPORT wxRendererMSW : public wxDelegateRendererBase
|
class WXDLLEXPORT wxRendererMSW : public wxDelegateRendererNative
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user