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:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -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"
|
||||
|
@@ -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();
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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"
|
||||
|
@@ -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
|
||||
|
@@ -2334,7 +2334,7 @@ wxRealPoint *wxLineShape::GetNextControlPoint(wxShape *nodeObject)
|
||||
return (wxRealPoint *)node->Data();
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user