Applied patch/bug [ 748226 ] OGL samples does not follow settings from setup.h

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-06-05 17:26:35 +00:00
parent c1a23315cd
commit 6999716b96
11 changed files with 31 additions and 4 deletions

View File

@@ -10,7 +10,7 @@
WXDIR = $(WXWIN)
TARGET=mmboard
EXTRALIBS=$(WXDIR)\contrib\lib\mmedia.lib
EXTRALIBS=$(WXDIR)\lib\mmedia.lib
OBJECTS = $(TARGET).obj mmbman.obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -92,7 +92,9 @@ wxOutputStream& DiagramDocument::SaveObject(wxOutputStream& stream)
char buf[400];
(void) wxGetTempFileName("diag", buf);
#if wxUSE_PROLOGIO
diagram.SaveFile(buf);
#endif
wxTransferFileToStream(buf, stream);
@@ -113,7 +115,11 @@ wxInputStream& DiagramDocument::LoadObject(wxInputStream& stream)
wxTransferStreamToFile(stream, buf);
diagram.DeleteAllShapes();
#if wxUSE_PROLOGIO
diagram.LoadFile(buf);
#endif
wxRemoveFile(buf);
return stream;
@@ -548,6 +554,7 @@ void MyEvtHandler::OnEndSize(double x, double y)
* Diagram
*/
#if wxUSE_PROLOGIO
bool MyDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr)
{
wxDiagram::OnShapeSave(db, shape, expr);
@@ -568,6 +575,7 @@ bool MyDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr)
delete[] label;
return TRUE;
}
#endif
/*
* New shapes

View File

@@ -35,8 +35,10 @@ class MyDiagram: public wxDiagram
{
public:
MyDiagram(void) {}
#if wxUSE_PROLOGIO
bool OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr);
bool OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr);
#endif
};
/*

View File

@@ -25,6 +25,11 @@
#endif
#include <wx/resource.h>
#if !wxUSE_WX_RESOURCES
#error "OGL studio sample requires wxUSE_WX_RESOURCES"
#endif // wxUSE_WX_RESOURCES
#include "dialogs.h"
#include "doc.h"
#include "view.h"

View File

@@ -60,6 +60,7 @@ bool csDiagramDocument::OnSaveDocument(const wxString& file)
if (file == "")
return FALSE;
#if wxUSE_PROLOGIO
if (!m_diagram.SaveFile(file))
{
wxString msgTitle;
@@ -72,6 +73,7 @@ bool csDiagramDocument::OnSaveDocument(const wxString& file)
GetDocumentWindow());
return FALSE;
}
#endif
Modify(FALSE);
SetFilename(file);
@@ -90,12 +92,14 @@ bool csDiagramDocument::OnOpenDocument(const wxString& file)
msgTitle = wxString("File error");
m_diagram.DeleteAllShapes();
#if wxUSE_PROLOGIO
if (!m_diagram.LoadFile(file))
{
(void)wxMessageBox("Sorry, could not open this file.", msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());
return FALSE;
}
#endif
SetFilename(file, TRUE);
Modify(FALSE);
UpdateAllViews();

View File

@@ -705,6 +705,7 @@ bool csEvtHandler::EditProperties()
* Diagram
*/
#if wxUSE_PROLOGIO
bool csDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr)
{
wxDiagram::OnShapeSave(db, shape, expr);
@@ -723,6 +724,7 @@ bool csDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr)
return TRUE;
}
#endif
IMPLEMENT_DYNAMIC_CLASS(csThinRectangleShape, wxDrawnShape)

View File

@@ -37,8 +37,10 @@ DECLARE_CLASS(csDiagram)
public:
csDiagram(csDiagramDocument* doc) { m_doc = doc; }
~csDiagram();
#if wxUSE_PROLOGIO
bool OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr);
bool OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr);
#endif
inline csDiagramDocument* GetDocument() const { return m_doc; }
virtual void Redraw(wxDC& dc);

View File

@@ -25,6 +25,10 @@
#include "wx/config.h"
#include "wx/laywin.h"
#if !wxUSE_WX_RESOURCES
#error "OGL studio sample requires wxUSE_WX_RESOURCES"
#endif // wxUSE_WX_RESOURCES
#include "studio.h"
#include "view.h"
#include "doc.h"

View File

@@ -11,7 +11,7 @@ WXDIR = $(WXWIN)
TARGET=stctest
EXTRALIBS=$(WXDIR)\contrib\lib\stc.lib
EXTRALIBS=$(WXDIR)\lib\stc.lib
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -2334,7 +2334,7 @@ wxRealPoint *wxLineShape::GetNextControlPoint(wxShape *nodeObject)
return (wxRealPoint *)node->Data();
}
else
return FALSE;
return NULL;
}
/*

View File

@@ -11,7 +11,7 @@ WXDIR = $(WXWIN)
TARGET=stctest
EXTRALIBS=$(WXDIR)\contrib\lib\stc.lib
EXTRALIBS=$(WXDIR)\lib\stc.lib
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32