Fixes to allow OGL building as a DLL

Also removed the hack I put in last week to allow building without the
deprecated headers and fixed it the right way.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-07-25 21:20:57 +00:00
parent d772bf4341
commit 5f331691d4
29 changed files with 138 additions and 163 deletions

View File

@@ -13,7 +13,7 @@
### Variables: ### ### Variables: ###
OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
OGLDLL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS)$(__DEBUGFLAG_3) /DWIN32 $(__DEBUGFLAG) /Fd..\..\src\ogl\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)\wx$(PORTNAME)$(WXUNIVNAME)250$(WXUNICODEFLAG)$(WXDEBUGFLAG)_ogl_vc$(VENDORTAG).pdb $(____DEBUGFLAG) $(__OPTIMIZEFLAG) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I..\..\src\ogl\..\..\..\include /I..\..\src\ogl\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I..\..\src\ogl\..\..\..\src\tiff /I..\..\src\ogl\..\..\..\src\jpeg /I..\..\src\ogl\..\..\..\src\png /I..\..\src\ogl\..\..\..\src\zlib /I..\..\src\ogl\..\..\..\src\regex /I..\..\src\ogl\..\..\..\src\expat\lib /Fp$(OBJS)\wxprec_ogldll.pch /I..\..\src\ogl\..\..\include /DWXUSINGDLL /DWXMAKINGDLL_OGL /DwxUSE_DEPRECATED=0 $(CXXFLAGS) /Yuwx/wxprec.h OGLDLL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS)$(__DEBUGFLAG_3) /DWIN32 $(__DEBUGFLAG) /Fd..\..\src\ogl\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)\wx$(PORTNAME)$(WXUNIVNAME)250$(WXUNICODEFLAG)$(WXDEBUGFLAG)_ogl_vc$(VENDORTAG).pdb $(____DEBUGFLAG) $(__OPTIMIZEFLAG) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I..\..\src\ogl\..\..\..\include /I..\..\src\ogl\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I..\..\src\ogl\..\..\..\src\tiff /I..\..\src\ogl\..\..\..\src\jpeg /I..\..\src\ogl\..\..\..\src\png /I..\..\src\ogl\..\..\..\src\zlib /I..\..\src\ogl\..\..\..\src\regex /I..\..\src\ogl\..\..\..\src\expat\lib /Fp$(OBJS)\wxprec_ogldll.pch /I..\..\src\ogl\..\..\include /DWXUSINGDLL /DWXMAKINGDLL_OGL $(CXXFLAGS) /Yuwx/wxprec.h
OGLLIB_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS)$(__DEBUGFLAG_3) /DWIN32 $(__DEBUGFLAG) /Fd..\..\src\ogl\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)\wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_ogl.pdb $(____DEBUGFLAG) $(__OPTIMIZEFLAG) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I..\..\src\ogl\..\..\..\include /I..\..\src\ogl\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I..\..\src\ogl\..\..\..\src\tiff /I..\..\src\ogl\..\..\..\src\jpeg /I..\..\src\ogl\..\..\..\src\png /I..\..\src\ogl\..\..\..\src\zlib /I..\..\src\ogl\..\..\..\src\regex /I..\..\src\ogl\..\..\..\src\expat\lib /Fp$(OBJS)\wxprec_ogllib.pch /I..\..\src\ogl\..\..\include $(CXXFLAGS) /Yuwx/wxprec.h OGLLIB_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS)$(__DEBUGFLAG_3) /DWIN32 $(__DEBUGFLAG) /Fd..\..\src\ogl\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)\wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_ogl.pdb $(____DEBUGFLAG) $(__OPTIMIZEFLAG) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I..\..\src\ogl\..\..\..\include /I..\..\src\ogl\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I..\..\src\ogl\..\..\..\src\tiff /I..\..\src\ogl\..\..\..\src\jpeg /I..\..\src\ogl\..\..\..\src\png /I..\..\src\ogl\..\..\..\src\zlib /I..\..\src\ogl\..\..\..\src\regex /I..\..\src\ogl\..\..\..\src\expat\lib /Fp$(OBJS)\wxprec_ogllib.pch /I..\..\src\ogl\..\..\include $(CXXFLAGS) /Yuwx/wxprec.h
### Conditionally set variables: ### ### Conditionally set variables: ###

View File

@@ -43,7 +43,6 @@
<dll id="ogldll" template="wx_contrib_dll" cond="SHARED=='1'"> <dll id="ogldll" template="wx_contrib_dll" cond="SHARED=='1'">
<define>WXUSINGDLL</define> <define>WXUSINGDLL</define>
<define>WXMAKINGDLL_OGL</define> <define>WXMAKINGDLL_OGL</define>
<define>wxUSE_DEPRECATED=0</define> <!-- this is a hack, we should do the RightThing later -->
<sources>$(OGL_SRC)</sources> <sources>$(OGL_SRC)</sources>
<wx-lib>core</wx-lib> <wx-lib>core</wx-lib>
<wx-lib>base</wx-lib> <wx-lib>base</wx-lib>

View File

@@ -16,6 +16,7 @@
#pragma interface "basic.h" #pragma interface "basic.h"
#endif #endif
#define OGL_VERSION 2.0 #define OGL_VERSION 2.0
#ifndef DEFAULT_MOUSE_TOLERANCE #ifndef DEFAULT_MOUSE_TOLERANCE
@@ -119,7 +120,7 @@ class WXDLLEXPORT wxExprDatabase;
class wxShapeEvtHandler: public wxObject, public wxClientDataContainer class WXDLLIMPEXP_OGL wxShapeEvtHandler: public wxObject, public wxClientDataContainer
{ {
DECLARE_DYNAMIC_CLASS(wxShapeEvtHandler) DECLARE_DYNAMIC_CLASS(wxShapeEvtHandler)
@@ -184,7 +185,7 @@ class wxShapeEvtHandler: public wxObject, public wxClientDataContainer
wxShape* m_handlerShape; wxShape* m_handlerShape;
}; };
class wxShape: public wxShapeEvtHandler class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
{ {
DECLARE_ABSTRACT_CLASS(wxShape) DECLARE_ABSTRACT_CLASS(wxShape)
@@ -561,7 +562,7 @@ class wxShape: public wxShapeEvtHandler
long m_branchStyle; long m_branchStyle;
}; };
class wxPolygonShape: public wxShape class WXDLLIMPEXP_OGL wxPolygonShape: public wxShape
{ {
DECLARE_DYNAMIC_CLASS(wxPolygonShape) DECLARE_DYNAMIC_CLASS(wxPolygonShape)
public: public:
@@ -634,7 +635,7 @@ class wxPolygonShape: public wxShape
double m_originalHeight; double m_originalHeight;
}; };
class wxRectangleShape: public wxShape class WXDLLIMPEXP_OGL wxRectangleShape: public wxShape
{ {
DECLARE_DYNAMIC_CLASS(wxRectangleShape) DECLARE_DYNAMIC_CLASS(wxRectangleShape)
public: public:
@@ -669,7 +670,7 @@ protected:
double m_cornerRadius; double m_cornerRadius;
}; };
class wxTextShape: public wxRectangleShape class WXDLLIMPEXP_OGL wxTextShape: public wxRectangleShape
{ {
DECLARE_DYNAMIC_CLASS(wxTextShape) DECLARE_DYNAMIC_CLASS(wxTextShape)
public: public:
@@ -685,7 +686,7 @@ class wxTextShape: public wxRectangleShape
void Copy(wxShape& copy); void Copy(wxShape& copy);
}; };
class wxEllipseShape: public wxShape class WXDLLIMPEXP_OGL wxEllipseShape: public wxShape
{ {
DECLARE_DYNAMIC_CLASS(wxEllipseShape) DECLARE_DYNAMIC_CLASS(wxEllipseShape)
public: public:
@@ -722,7 +723,7 @@ protected:
double m_height; double m_height;
}; };
class wxCircleShape: public wxEllipseShape class WXDLLIMPEXP_OGL wxCircleShape: public wxEllipseShape
{ {
DECLARE_DYNAMIC_CLASS(wxCircleShape) DECLARE_DYNAMIC_CLASS(wxCircleShape)
public: public:

View File

@@ -16,9 +16,10 @@
#pragma interface "basicp.h" #pragma interface "basicp.h"
#endif #endif
#define CONTROL_POINT_SIZE 6 #define CONTROL_POINT_SIZE 6
class wxShapeTextLine: public wxObject class WXDLLIMPEXP_OGL wxShapeTextLine: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxShapeTextLine) DECLARE_DYNAMIC_CLASS(wxShapeTextLine)
public: public:
@@ -40,13 +41,13 @@ protected:
double m_y; double m_y;
}; };
class wxShape; class WXDLLIMPEXP_OGL wxShape;
class wxControlPoint: public wxRectangleShape class WXDLLIMPEXP_OGL wxControlPoint: public wxRectangleShape
{ {
DECLARE_DYNAMIC_CLASS(wxControlPoint) DECLARE_DYNAMIC_CLASS(wxControlPoint)
friend class wxShapeEvtHandler; friend class WXDLLIMPEXP_OGL wxShapeEvtHandler;
friend class wxShape; friend class WXDLLIMPEXP_OGL wxShape;
public: public:
wxControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, double the_xoffset = 0.0, wxControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, double the_xoffset = 0.0,
@@ -88,11 +89,11 @@ public:
static double sm_controlPointDragPosY; static double sm_controlPointDragPosY;
}; };
class wxPolygonShape; class WXDLLIMPEXP_OGL wxPolygonShape;
class wxPolygonControlPoint: public wxControlPoint class WXDLLIMPEXP_OGL wxPolygonControlPoint: public wxControlPoint
{ {
DECLARE_DYNAMIC_CLASS(wxPolygonControlPoint) DECLARE_DYNAMIC_CLASS(wxPolygonControlPoint)
friend class wxPolygonShape; friend class WXDLLIMPEXP_OGL wxPolygonShape;
public: public:
wxPolygonControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, wxRealPoint *vertex = NULL, wxPolygonControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, wxRealPoint *vertex = NULL,
double the_xoffset = 0.0, double the_yoffset = 0.0); double the_xoffset = 0.0, double the_yoffset = 0.0);
@@ -123,7 +124,7 @@ public:
* *
*/ */
class wxShapeRegion: public wxObject class WXDLLIMPEXP_OGL wxShapeRegion: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxShapeRegion) DECLARE_DYNAMIC_CLASS(wxShapeRegion)
@@ -200,7 +201,7 @@ public:
* User-defined attachment point * User-defined attachment point
*/ */
class wxAttachmentPoint: public wxObject class WXDLLIMPEXP_OGL wxAttachmentPoint: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxAttachmentPoint) DECLARE_DYNAMIC_CLASS(wxAttachmentPoint)

View File

@@ -16,9 +16,8 @@
#pragma interface "bmpshape.h" #pragma interface "bmpshape.h"
#endif #endif
#include <wx/ogl/basic.h>
class wxBitmapShape: public wxRectangleShape class WXDLLIMPEXP_OGL wxBitmapShape: public wxRectangleShape
{ {
DECLARE_DYNAMIC_CLASS(wxBitmapShape) DECLARE_DYNAMIC_CLASS(wxBitmapShape)
public: public:

View File

@@ -16,6 +16,7 @@
#pragma interface "canvas.h" #pragma interface "canvas.h"
#endif #endif
// Drag states // Drag states
#define NoDragging 0 #define NoDragging 0
#define StartDraggingLeft 1 #define StartDraggingLeft 1
@@ -23,13 +24,13 @@
#define StartDraggingRight 3 #define StartDraggingRight 3
#define ContinueDraggingRight 4 #define ContinueDraggingRight 4
extern const wxChar* wxShapeCanvasNameStr; WXDLLIMPEXP_OGL extern const wxChar* wxShapeCanvasNameStr;
// When drag_count reaches 0, process drag message // When drag_count reaches 0, process drag message
class wxDiagram; class WXDLLIMPEXP_OGL wxDiagram;
class wxShapeCanvas: public wxScrolledWindow class WXDLLIMPEXP_OGL wxShapeCanvas: public wxScrolledWindow
{ {
DECLARE_DYNAMIC_CLASS(wxShapeCanvas) DECLARE_DYNAMIC_CLASS(wxShapeCanvas)
public: public:

View File

@@ -16,15 +16,16 @@
#pragma interface "composit.h" #pragma interface "composit.h"
#endif #endif
class wxDivisionShape;
class wxOGLConstraint; class WXDLLIMPEXP_OGL wxDivisionShape;
class WXDLLIMPEXP_OGL wxOGLConstraint;
/* /*
* A composite object is an invisible rectangle surrounding all children * A composite object is an invisible rectangle surrounding all children
* *
*/ */
class wxCompositeShape: public wxRectangleShape class WXDLLIMPEXP_OGL wxCompositeShape: public wxRectangleShape
{ {
DECLARE_DYNAMIC_CLASS(wxCompositeShape) DECLARE_DYNAMIC_CLASS(wxCompositeShape)
public: public:
@@ -122,7 +123,7 @@ protected:
#define DIVISION_SIDE_RIGHT 3 #define DIVISION_SIDE_RIGHT 3
#define DIVISION_SIDE_BOTTOM 4 #define DIVISION_SIDE_BOTTOM 4
class wxDivisionShape: public wxCompositeShape class WXDLLIMPEXP_OGL wxDivisionShape: public wxCompositeShape
{ {
DECLARE_DYNAMIC_CLASS(wxDivisionShape) DECLARE_DYNAMIC_CLASS(wxDivisionShape)
public: public:

View File

@@ -16,12 +16,13 @@
#pragma interface "constrnt.h" #pragma interface "constrnt.h"
#endif #endif
/* /*
* OGL Constraints * OGL Constraints
* *
*/ */
class wxOGLConstraintType: public wxObject class WXDLLIMPEXP_OGL wxOGLConstraintType: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxOGLConstraintType) DECLARE_DYNAMIC_CLASS(wxOGLConstraintType)
public: public:
@@ -57,7 +58,7 @@ extern wxList* wxOGLConstraintTypes;
#define gyCONSTRAINT_MIDALIGNED_LEFT 14 #define gyCONSTRAINT_MIDALIGNED_LEFT 14
#define gyCONSTRAINT_MIDALIGNED_RIGHT 15 #define gyCONSTRAINT_MIDALIGNED_RIGHT 15
class wxOGLConstraint: public wxObject class WXDLLIMPEXP_OGL wxOGLConstraint: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxOGLConstraint) DECLARE_DYNAMIC_CLASS(wxOGLConstraint)
public: public:

View File

@@ -13,9 +13,10 @@
#define _OGL_DIVIDED_H_ #define _OGL_DIVIDED_H_
#if defined(__GNUG__) && !defined(__APPLE__) #if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "basic.h" #pragma interface "divided.h"
#endif #endif
/* /*
* Definition of a region * Definition of a region
* *
@@ -27,7 +28,7 @@
*/ */
extern wxFont *g_oglNormalFont; extern wxFont *g_oglNormalFont;
class wxDividedShape: public wxRectangleShape class WXDLLIMPEXP_OGL wxDividedShape: public wxRectangleShape
{ {
DECLARE_DYNAMIC_CLASS(wxDividedShape) DECLARE_DYNAMIC_CLASS(wxDividedShape)

View File

@@ -16,13 +16,12 @@
#pragma interface "drawn.h" #pragma interface "drawn.h"
#endif #endif
#include <wx/ogl/basic.h>
#define oglMETAFLAGS_OUTLINE 1 #define oglMETAFLAGS_OUTLINE 1
#define oglMETAFLAGS_ATTACHMENTS 2 #define oglMETAFLAGS_ATTACHMENTS 2
class wxDrawnShape; class WXDLLIMPEXP_OGL wxDrawnShape;
class wxPseudoMetaFile: public wxObject class WXDLLIMPEXP_OGL wxPseudoMetaFile: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxPseudoMetaFile) DECLARE_DYNAMIC_CLASS(wxPseudoMetaFile)
public: public:
@@ -130,7 +129,7 @@ public:
#define oglDRAWN_ANGLE_180 2 #define oglDRAWN_ANGLE_180 2
#define oglDRAWN_ANGLE_270 3 #define oglDRAWN_ANGLE_270 3
class wxDrawnShape: public wxRectangleShape class WXDLLIMPEXP_OGL wxDrawnShape: public wxRectangleShape
{ {
DECLARE_DYNAMIC_CLASS(wxDrawnShape) DECLARE_DYNAMIC_CLASS(wxDrawnShape)
public: public:

View File

@@ -16,7 +16,6 @@
#pragma interface "drawnp.h" #pragma interface "drawnp.h"
#endif #endif
#include <wx/ogl/drawn.h>
/* /*
* Drawing operations * Drawing operations
@@ -55,7 +54,7 @@
* *
*/ */
class wxDrawOp: public wxObject class WXDLLIMPEXP_OGL wxDrawOp: public wxObject
{ {
public: public:
inline wxDrawOp(int theOp) { m_op = theOp; } inline wxDrawOp(int theOp) { m_op = theOp; }
@@ -93,7 +92,7 @@ protected:
* *
*/ */
class wxOpSetGDI: public wxDrawOp class WXDLLIMPEXP_OGL wxOpSetGDI: public wxDrawOp
{ {
public: public:
wxOpSetGDI(int theOp, wxPseudoMetaFile *theImage, int theGdiIndex, int theMode = 0); wxOpSetGDI(int theOp, wxPseudoMetaFile *theImage, int theGdiIndex, int theMode = 0);
@@ -118,7 +117,7 @@ public:
* *
*/ */
class wxOpSetClipping: public wxDrawOp class WXDLLIMPEXP_OGL wxOpSetClipping: public wxDrawOp
{ {
public: public:
wxOpSetClipping(int theOp, double theX1, double theY1, double theX2, double theY2); wxOpSetClipping(int theOp, double theX1, double theY1, double theX2, double theY2);
@@ -143,7 +142,7 @@ public:
* *
*/ */
class wxOpDraw: public wxDrawOp class WXDLLIMPEXP_OGL wxOpDraw: public wxDrawOp
{ {
public: public:
wxOpDraw(int theOp, double theX1, double theY1, double theX2, double theY2, wxOpDraw(int theOp, double theX1, double theY1, double theX2, double theY2,
@@ -176,7 +175,7 @@ public:
* *
*/ */
class wxOpPolyDraw: public wxDrawOp class WXDLLIMPEXP_OGL wxOpPolyDraw: public wxDrawOp
{ {
public: public:
wxOpPolyDraw(int theOp, int n, wxRealPoint *thePoints); wxOpPolyDraw(int theOp, int n, wxRealPoint *thePoints);

View File

@@ -16,9 +16,10 @@
#pragma interface "lines.h" #pragma interface "lines.h"
#endif #endif
class wxLabelShape;
class wxPseudoMetaFile; class WXDLLIMPEXP_OGL wxLabelShape;
class wxLineControlPoint; class WXDLLIMPEXP_OGL wxPseudoMetaFile;
class WXDLLIMPEXP_OGL wxLineControlPoint;
/* /*
* Arcs with multiple arrowheads * Arcs with multiple arrowheads
* *
@@ -46,7 +47,7 @@ class wxLineControlPoint;
#define LINE_ALIGNMENT_TO_NEXT_HANDLE 2 #define LINE_ALIGNMENT_TO_NEXT_HANDLE 2
#define LINE_ALIGNMENT_NONE 0 #define LINE_ALIGNMENT_NONE 0
class wxArrowHead: public wxObject class WXDLLIMPEXP_OGL wxArrowHead: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxArrowHead) DECLARE_DYNAMIC_CLASS(wxArrowHead)
@@ -88,8 +89,8 @@ class wxArrowHead: public wxObject
}; };
// Line object // Line object
class wxLabelShape; class WXDLLIMPEXP_OGL wxLabelShape;
class wxLineShape: public wxShape class WXDLLIMPEXP_OGL wxLineShape: public wxShape
{ {
DECLARE_DYNAMIC_CLASS(wxLineShape) DECLARE_DYNAMIC_CLASS(wxLineShape)

View File

@@ -16,11 +16,12 @@
#pragma interface "linesp.h" #pragma interface "linesp.h"
#endif #endif
class wxLineShape;
class wxLineControlPoint: public wxControlPoint class WXDLLIMPEXP_OGL wxLineShape;
class WXDLLIMPEXP_OGL wxLineControlPoint: public wxControlPoint
{ {
DECLARE_DYNAMIC_CLASS(wxLineControlPoint) DECLARE_DYNAMIC_CLASS(wxLineControlPoint)
friend class wxLineShape; friend class WXDLLIMPEXP_OGL wxLineShape;
public: public:
wxLineControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, wxLineControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0,
@@ -51,8 +52,8 @@ public:
/* /*
* Temporary arc label object * Temporary arc label object
*/ */
class wxLabelShape: public wxRectangleShape class WXDLLIMPEXP_OGL wxLabelShape: public wxRectangleShape
{ {
DECLARE_DYNAMIC_CLASS(wxLabelShape) DECLARE_DYNAMIC_CLASS(wxLabelShape)

View File

@@ -17,6 +17,7 @@
#pragma interface "mfutils.h" #pragma interface "mfutils.h"
#endif #endif
#include <wx/metafile.h> #include <wx/metafile.h>
#ifndef GetRValue #ifndef GetRValue
@@ -157,7 +158,7 @@
#endif // metafile functions #endif // metafile functions
class wxMetaRecord: public wxObject class WXDLLIMPEXP_OGL wxMetaRecord: public wxObject
{ {
public: public:
int metaFunction; int metaFunction;
@@ -180,7 +181,7 @@ class wxMetaRecord: public wxObject
~wxMetaRecord(void); ~wxMetaRecord(void);
}; };
class wxXMetaFile: public wxObject class WXDLLIMPEXP_OGL wxXMetaFile: public wxObject
{ {
public: public:
double lastX; double lastX;

View File

@@ -16,6 +16,7 @@
#pragma interface "misc.h" #pragma interface "misc.h"
#endif #endif
// List to use when copying objects; may need to associate elements of new objects // List to use when copying objects; may need to associate elements of new objects
// with elements of old objects, e.g. when copying constraint.s // with elements of old objects, e.g. when copying constraint.s
extern wxList oglObjectCopyMapping; extern wxList oglObjectCopyMapping;
@@ -27,51 +28,51 @@ extern wxList oglObjectCopyMapping;
// Centres the given list of wxShapeTextLine strings in the given box // Centres the given list of wxShapeTextLine strings in the given box
// (changing the positions in situ). Doesn't actually draw into the DC. // (changing the positions in situ). Doesn't actually draw into the DC.
void oglCentreText(wxDC& dc, wxList *text, double m_xpos, double m_ypos, WXDLLIMPEXP_OGL void oglCentreText(wxDC& dc, wxList *text, double m_xpos, double m_ypos,
double width, double height, double width, double height,
int formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT); int formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT);
// Given a string, returns a list of strings that fit within the given // Given a string, returns a list of strings that fit within the given
// width of box. Height is ignored. // width of box. Height is ignored.
wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double height, int formatMode = 0); WXDLLIMPEXP_OGL wxStringList* oglFormatText(wxDC& dc, const wxString& text, double width, double height, int formatMode = 0);
// Centres the list of wxShapeTextLine strings, doesn't clip. // Centres the list of wxShapeTextLine strings, doesn't clip.
// Doesn't actually draw into the DC. // Doesn't actually draw into the DC.
void oglCentreTextNoClipping(wxDC& dc, wxList *text_list, WXDLLIMPEXP_OGL void oglCentreTextNoClipping(wxDC& dc, wxList *text_list,
double m_xpos, double m_ypos, double width, double height); double m_xpos, double m_ypos, double width, double height);
// Gets the maximum width and height of the given list of wxShapeTextLines. // Gets the maximum width and height of the given list of wxShapeTextLines.
void oglGetCentredTextExtent(wxDC& dc, wxList *text_list, WXDLLIMPEXP_OGL void oglGetCentredTextExtent(wxDC& dc, wxList *text_list,
double m_xpos, double m_ypos, double width, double height, double m_xpos, double m_ypos, double width, double height,
double *actual_width, double *actual_height); double *actual_width, double *actual_height);
// Actually draw the preformatted list of wxShapeTextLines. // Actually draw the preformatted list of wxShapeTextLines.
void oglDrawFormattedText(wxDC& context, wxList *text_list, WXDLLIMPEXP_OGL void oglDrawFormattedText(wxDC& context, wxList *text_list,
double m_xpos, double m_ypos, double width, double height, double m_xpos, double m_ypos, double width, double height,
int formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT); int formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT);
// Give it a list of points, finds the centre. // Give it a list of points, finds the centre.
void oglFindPolylineCentroid(wxList *points, double *x, double *y); WXDLLIMPEXP_OGL void oglFindPolylineCentroid(wxList *points, double *x, double *y);
void oglCheckLineIntersection(double x1, double y1, double x2, double y2, WXDLLIMPEXP_OGL void oglCheckLineIntersection(double x1, double y1, double x2, double y2,
double x3, double y3, double x4, double y4, double x3, double y3, double x4, double y4,
double *ratio1, double *ratio2); double *ratio1, double *ratio2);
void oglFindEndForPolyline(double n, double xvec[], double yvec[], WXDLLIMPEXP_OGL void oglFindEndForPolyline(double n, double xvec[], double yvec[],
double x1, double y1, double x2, double y2, double *x3, double *y3); double x1, double y1, double x2, double y2, double *x3, double *y3);
void oglFindEndForBox(double width, double height, WXDLLIMPEXP_OGL void oglFindEndForBox(double width, double height,
double x1, double y1, // Centre of box (possibly) double x1, double y1, // Centre of box (possibly)
double x2, double y2, // other end of line double x2, double y2, // other end of line
double *x3, double *y3); // End on box edge double *x3, double *y3); // End on box edge
void oglFindEndForCircle(double radius, WXDLLIMPEXP_OGL void oglFindEndForCircle(double radius,
double x1, double y1, // Centre of circle double x1, double y1, // Centre of circle
double x2, double y2, // Other end of line double x2, double y2, // Other end of line
double *x3, double *y3); double *x3, double *y3);
void oglGetArrowPoints(double x1, double y1, double x2, double y2, WXDLLIMPEXP_OGL void oglGetArrowPoints(double x1, double y1, double x2, double y2,
double length, double width, double length, double width,
double *tip_x, double *tip_y, double *tip_x, double *tip_y,
double *side1_x, double *side1_y, double *side1_x, double *side1_y,
@@ -88,10 +89,10 @@ void oglGetArrowPoints(double x1, double y1, double x2, double y2,
* Author: Ian Harrison * Author: Ian Harrison
*/ */
void oglDrawArcToEllipse(double x1, double y1, double a1, double b1, double x2, double y2, double x3, double y3, WXDLLIMPEXP_OGL void oglDrawArcToEllipse(double x1, double y1, double a1, double b1, double x2, double y2, double x3, double y3,
double *x4, double *y4); double *x4, double *y4);
bool oglRoughlyEqual(double val1, double val2, double tol = 0.00001); WXDLLIMPEXP_OGL bool oglRoughlyEqual(double val1, double val2, double tol = 0.00001);
extern wxFont* g_oglNormalFont; extern wxFont* g_oglNormalFont;
extern wxPen* g_oglBlackPen; extern wxPen* g_oglBlackPen;

View File

@@ -12,16 +12,34 @@
#ifndef _OGL_OGL_H_ #ifndef _OGL_OGL_H_
#define _OGL_OGL_H_ #define _OGL_OGL_H_
#include <wx/ogl/basic.h> // Basic shapes #ifdef WXMAKINGDLL_OGL
#include <wx/ogl/lines.h> // Lines and splines #define WXDLLIMPEXP_OGL WXEXPORT
#include <wx/ogl/divided.h> // Vertically-divided rectangle #elif defined(WXUSINGDLL)
#include <wx/ogl/composit.h> // Composite images #define WXDLLIMPEXP_OGL WXIMPORT
#include <wx/ogl/canvas.h> // wxShapeCanvas for displaying objects #else // not making nor using DLL
#include <wx/ogl/ogldiag.h> // wxDiagram #define WXDLLIMPEXP_OGL
#endif
#include "wx/ogl/basic.h" // Basic shapes
#include "wx/ogl/basicp.h"
#include "wx/ogl/lines.h" // Lines and splines
#include "wx/ogl/linesp.h"
#include "wx/ogl/divided.h" // Vertically-divided rectangle
#include "wx/ogl/composit.h" // Composite images
#include "wx/ogl/canvas.h" // wxShapeCanvas for displaying objects
#include "wx/ogl/ogldiag.h" // wxDiagram
#include "wx/ogl/bmpshape.h"
#include "wx/ogl/constrnt.h"
#include "wx/ogl/drawn.h"
#include "wx/ogl/drawnp.h"
#include "wx/ogl/mfutils.h"
#include "wx/ogl/misc.h"
// TODO: replace with wxModule implementation // TODO: replace with wxModule implementation
extern void wxOGLInitialize(); extern WXDLLIMPEXP_OGL void wxOGLInitialize();
extern void wxOGLCleanUp(); extern WXDLLIMPEXP_OGL void wxOGLCleanUp();
#endif #endif
// _OGL_OGL_H_ // _OGL_OGL_H_

View File

@@ -16,17 +16,13 @@
#pragma interface "ogldiag.h" #pragma interface "ogldiag.h"
#endif #endif
#if wxUSE_DEPRECATED
#include <wx/deprecated/wxexpr.h>
#endif
#if wxUSE_PROLOGIO #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
#include <wx/ogl/basic.h>
class wxDiagram: public wxObject class WXDLLIMPEXP_OGL wxDiagram: public wxObject
{ {
DECLARE_DYNAMIC_CLASS(wxDiagram) DECLARE_DYNAMIC_CLASS(wxDiagram)
@@ -101,7 +97,7 @@ protected:
wxList* m_shapeList; wxList* m_shapeList;
}; };
class wxLineCrossing: public wxObject class WXDLLIMPEXP_OGL wxLineCrossing: public wxObject
{ {
public: public:
wxLineCrossing() { m_lineShape1 = NULL; m_lineShape2 = NULL; } wxLineCrossing() { m_lineShape1 = NULL; m_lineShape2 = NULL; }
@@ -114,7 +110,7 @@ public:
wxLineShape* m_lineShape2; wxLineShape* m_lineShape2;
}; };
class wxLineCrossings: public wxObject class WXDLLIMPEXP_OGL wxLineCrossings: public wxObject
{ {
public: public:
wxLineCrossings(); wxLineCrossings();

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
@@ -36,13 +36,8 @@
#include <ctype.h> #include <ctype.h>
#include <math.h> #include <math.h>
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/composit.h>
#include <wx/ogl/lines.h>
#include <wx/ogl/canvas.h>
#include <wx/ogl/divided.h>
#include <wx/ogl/misc.h>
// Control point types // Control point types
// Rectangle and most other shapes // Rectangle and most other shapes

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
@@ -36,13 +36,8 @@
#include <ctype.h> #include <ctype.h>
#include <math.h> #include <math.h>
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/composit.h>
#include <wx/ogl/lines.h>
#include <wx/ogl/canvas.h>
#include <wx/ogl/divided.h>
#include <wx/ogl/misc.h>
// Control point types // Control point types
// Rectangle and most other shapes // Rectangle and most other shapes

View File

@@ -24,15 +24,12 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/canvas.h>
#include <wx/ogl/bmpshape.h>
#include <wx/ogl/misc.h>
/* /*
* Bitmap object * Bitmap object

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
@@ -36,13 +36,7 @@
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/canvas.h>
#include <wx/ogl/ogldiag.h>
#include <wx/ogl/misc.h>
#include <wx/ogl/lines.h>
#include <wx/ogl/composit.h>
#define CONTROL_POINT_SIZE 6 #define CONTROL_POINT_SIZE 6

View File

@@ -24,16 +24,12 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/constrnt.h>
#include <wx/ogl/composit.h>
#include <wx/ogl/misc.h>
#include <wx/ogl/canvas.h>
#if wxUSE_PROLOGIO #if wxUSE_PROLOGIO
// Sometimes, objects need to access the whole database to // Sometimes, objects need to access the whole database to

View File

@@ -24,13 +24,12 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/constrnt.h>
#include <wx/ogl/canvas.h>
wxList *wxOGLConstraintTypes = NULL; wxList *wxOGLConstraintTypes = NULL;

View File

@@ -24,16 +24,12 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/canvas.h>
#include <wx/ogl/divided.h>
#include <wx/ogl/lines.h>
#include <wx/ogl/misc.h>
class wxDividedShapeControlPoint: public wxControlPoint class wxDividedShapeControlPoint: public wxControlPoint
{ {

View File

@@ -25,17 +25,12 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/canvas.h>
#include <wx/ogl/mfutils.h>
#include <wx/ogl/drawn.h>
#include <wx/ogl/drawnp.h>
#include <wx/ogl/misc.h>
#include <math.h> #include <math.h>

View File

@@ -25,7 +25,7 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
@@ -36,13 +36,8 @@
#include <ctype.h> #include <ctype.h>
#include <math.h> #include <math.h>
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/lines.h>
#include <wx/ogl/linesp.h>
#include <wx/ogl/drawn.h>
#include <wx/ogl/misc.h>
#include <wx/ogl/canvas.h>
// Line shape // Line shape
IMPLEMENT_DYNAMIC_CLASS(wxLineShape, wxShape) IMPLEMENT_DYNAMIC_CLASS(wxLineShape, wxShape)
@@ -519,7 +514,7 @@ bool wxLineShape::HitTest(double x, double y, int *attachment, double *distance)
seg_len*((x-point1->x)*dy-(y-point1->y)*dx)/(dy*dy+dx*dx); seg_len*((x-point1->x)*dy-(y-point1->y)*dx)/(dy*dy+dx*dx);
double distance_from_prev = double distance_from_prev =
seg_len*((y-point1->y)*dy+(x-point1->x)*dx)/(dy*dy+dx*dx); seg_len*((y-point1->y)*dy+(x-point1->x)*dx)/(dy*dy+dx*dx);
if ((fabs(distance_from_seg) < extra && if ((fabs(distance_from_seg) < extra &&
distance_from_prev >= 0 && distance_from_prev <= seg_len) distance_from_prev >= 0 && distance_from_prev <= seg_len)
|| inLabelRegion) || inLabelRegion)

View File

@@ -27,7 +27,8 @@
#include <wx/metafile.h> #include <wx/metafile.h>
#include <wx/utils.h> #include <wx/utils.h>
#include <wx/ogl/mfutils.h> #include "wx/ogl/ogl.h"
#include <stdio.h> #include <stdio.h>
static char _buf[1024]; // a temp buffer to use inplace of wxBuffer, which is deprecated. static char _buf[1024]; // a temp buffer to use inplace of wxBuffer, which is deprecated.

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
@@ -36,13 +36,8 @@
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/canvas.h>
#include <wx/ogl/ogldiag.h>
#include <wx/ogl/lines.h>
#include <wx/ogl/composit.h>
#include <wx/ogl/misc.h>
IMPLEMENT_DYNAMIC_CLASS(wxDiagram, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxDiagram, wxObject)

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
#if wxUSE_DEPRECATED #if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h> #include <wx/deprecated/wxexpr.h>
#endif #endif
@@ -38,11 +38,8 @@
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <wx/ogl/basic.h> #include "wx/ogl/ogl.h"
#include <wx/ogl/basicp.h>
#include <wx/ogl/misc.h>
#include <wx/ogl/constrnt.h>
#include <wx/ogl/composit.h>
wxFont* g_oglNormalFont; wxFont* g_oglNormalFont;
wxPen* g_oglBlackPen; wxPen* g_oglBlackPen;