// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-// #pragma implementation
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
#endif
-#include <wx/deprecated/setup.h>
-#include <wx/deprecated/wxexpr.h>
+#include <wx/ogl/ogl.h> // base header of OGL, includes and adjusts wx/deprecated/setup.h
#include "studio.h"
#include "doc.h"
#include "shapes.h"
#include "view.h"
-#include <wx/ogl/basicp.h>
-#include <wx/ogl/linesp.h>
#include "cspalette.h"
#include "dialogs.h"
csEvtHandler& csCopy = (csEvtHandler&) copy;
csCopy.m_label = m_label;
}
-
+
void csEvtHandler::OnLeftClick(double WXUNUSED(x), double WXUNUSED(y), int keys, int WXUNUSED(attachment))
{
wxClientDC dc(GetShape()->GetCanvas());
wxClientDC dc(GetShape()->GetCanvas());
GetShape()->GetCanvas()->PrepareDC(dc);
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
dc.SetLogicalFunction(OGLRBLF);
dc.SetPen(dottedPen);
double xp, yp;
wxClientDC dc(GetShape()->GetCanvas());
GetShape()->GetCanvas()->PrepareDC(dc);
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
dc.SetLogicalFunction(OGLRBLF);
dc.SetPen(dottedPen);
double xp, yp;
// Check if we're on an object
int new_attachment;
wxShape *otherShape = canvas->FindFirstSensitiveShape(x, y, &new_attachment, OP_DRAG_RIGHT);
-
+
if (otherShape && !otherShape->IsKindOf(CLASSINFO(wxLineShape)))
{
wxLineShape* theShape = new csLineShape;
dc.SetLogicalFunction(OGLRBLF);
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
dc.SetPen(dottedPen);
dc.SetBrush(* wxTRANSPARENT_BRUSH);
dc.SetLogicalFunction(OGLRBLF);
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
dc.SetPen(dottedPen);
dc.SetBrush((* wxTRANSPARENT_BRUSH));
return false;
}
+ wxString newLabel(m_label);
+
+#if wxUSE_WX_RESOURCES
csShapePropertiesDialog* dialog = new csShapePropertiesDialog(shape->GetCanvas()->GetParent(), title, attributeDialog, attributeDialogName);
dialog->GetGeneralPropertiesDialog()->SetShapeLabel(m_label);
if (dialog->ShowModal() == wxID_CANCEL)
return false;
}
- wxString newLabel = dialog->GetGeneralPropertiesDialog()->GetShapeLabel();
+ newLabel = dialog->GetGeneralPropertiesDialog()->GetShapeLabel();
dialog->Destroy();
+#else
+ wxUnusedVar(attributeDialog);
+#endif // wxUSE_WX_RESOURCES
wxShape* newShape = shape->CreateNewCopy();
/*
* Diagram
*/
-
+
+#if wxUSE_PROLOGIO
bool csDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr)
{
wxDiagram::OnShapeSave(db, shape, expr);
expr.GetAttributeValue(_T("label"), label);
csEvtHandler *handler = new csEvtHandler(&shape, &shape, label);
shape.SetEventHandler(handler);
-
+
return true;
}
+#endif // wxUSE_PROLOGIO
IMPLEMENT_DYNAMIC_CLASS(csThinRectangleShape, wxDrawnShape)
break;
double theta = shape->GetRotation();
- const double myPi = 3.1415926535897932384626433832795 ;
+ const double myPi = M_PI;
double ninetyDegrees = myPi/2.0;
wxString opStr;