X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5e0dbc8dd94d7ba16cb97cb050c9588db4c3a12f..2c3ebf8be5f192f23d8266603a72d19a7267c7c5:/contrib/samples/ogl/studio/view.cpp diff --git a/contrib/samples/ogl/studio/view.cpp b/contrib/samples/ogl/studio/view.cpp index f3073fc44a..8a5e625c62 100644 --- a/contrib/samples/ogl/studio/view.cpp +++ b/contrib/samples/ogl/studio/view.cpp @@ -1,18 +1,14 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: view.cpp +// Name: contrib/samples/ogl/studio/view.cpp // Purpose: Implements view functionality // Author: Julian Smart // Modified by: // Created: 12/07/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -// #pragma implementation -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -21,10 +17,10 @@ #endif #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif -#include +#include "wx/colordlg.h" #if !wxUSE_DOC_VIEW_ARCHITECTURE #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! @@ -36,8 +32,8 @@ #include "cspalette.h" #include "symbols.h" #include "dialogs.h" -#include -#include +#include "wx/ogl/basicp.h" +#include "wx/ogl/linesp.h" IMPLEMENT_DYNAMIC_CLASS(csDiagramView, wxView) @@ -309,8 +305,6 @@ void csDiagramView::OnCopyUpdate(wxUpdateUIEvent& event) void csDiagramView::OnPasteUpdate(wxUpdateUIEvent& event) { - /* csDiagramDocument *doc = */ (csDiagramDocument *)GetDocument(); - int n = wxGetApp().GetDiagramClipboard().GetCount(); event.Enable( (n > 0) ); @@ -853,7 +847,7 @@ csCanvas::~csCanvas(void) void csCanvas::DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2) { - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); + wxPen dottedPen(*wxBLACK, 1, wxDOT); dc.SetPen(dottedPen); dc.SetBrush(* wxTRANSPARENT_BRUSH); @@ -877,6 +871,9 @@ void csCanvas::OnLeftClick(double x, double y, int WXUNUSED(keys)) if (palette->GetSelection() == PALETTE_TEXT_TOOL) { + wxString newLabel; + +#if wxUSE_WX_RESOURCES // Ask for a label and create a new free-floating text region csLabelEditingDialog* dialog = new csLabelEditingDialog(GetParent()); @@ -888,8 +885,9 @@ void csCanvas::OnLeftClick(double x, double y, int WXUNUSED(keys)) return; } - wxString newLabel = dialog->GetShapeLabel(); + newLabel = dialog->GetShapeLabel(); dialog->Destroy(); +#endif // wxUSE_WX_RESOURCES wxShape* shape = new csTextBoxShape; shape->AssignNewIds();