wxToolBarSimple fix + OGL studio sample compilation
authorJulian Smart <julian@anthemion.co.uk>
Thu, 24 Feb 2000 16:26:20 +0000 (16:26 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 24 Feb 2000 16:26:20 +0000 (16:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/tbarsmpl.h
src/generic/tbarsmpl.cpp
utils/ogl/samples/ogledit/doc.cpp
utils/ogl/samples/studio/csprint.cpp
utils/ogl/samples/studio/shapes.cpp
utils/ogl/samples/studio/view.cpp

index 4fed98e06ae0264997478d7c2fe3f3c81d487e09..195b930f347ce2e65056cc7601f3d618479a41fb 100644 (file)
@@ -155,7 +155,6 @@ protected:
     bool                  m_yScrollingEnabled;
     int                   m_xScrollPosition;
     int                   m_yScrollPosition;
-    bool                  m_calcScrolledOffset; // If TRUE, wxCanvasDC uses scrolled offsets
     int                   m_xScrollLines;
     int                   m_yScrollLines;
     int                   m_xScrollLinesPerPage;
index 88f45ba452d6178bd917134e7c7c3b0a6a18096a..f5fd33d74141bf11543429d206d63bec3ea02ad6 100644 (file)
@@ -143,6 +143,17 @@ void wxToolBarSimple::Init()
 
     m_defaultWidth = 16;
     m_defaultHeight = 15;
+
+    m_xScrollPixelsPerLine = 1;
+    m_yScrollPixelsPerLine = 1;
+    m_xScrollingEnabled = FALSE;
+    m_yScrollingEnabled = FALSE;
+    m_xScrollPosition = 0;
+    m_yScrollPosition = 0;
+    m_xScrollLines = 0;
+    m_yScrollLines = 0;
+    m_xScrollLinesPerPage = 0;
+    m_yScrollLinesPerPage = 0;
 }
 
 wxToolBarToolBase *wxToolBarSimple::AddTool(int id,
index b5f2ef9e892ad425f53bb51f895b57f29ee7a8f8..3557696662e84dade897865b5527e0c4c11448f7 100644 (file)
@@ -495,7 +495,7 @@ void MyEvtHandler::OnBeginDragRight(double x, double y, int keys, int attachment
   GetShape()->GetCanvas()->PrepareDC(dc);
 
   wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
-  dc.SetLogicalFunction(wxXOR);
+  dc.SetLogicalFunction(OGLRBLF);
   dc.SetPen(dottedPen);
   double xp, yp;
   GetShape()->GetAttachmentPosition(attachment, &xp, &yp);
@@ -512,7 +512,7 @@ void MyEvtHandler::OnDragRight(bool draw, double x, double y, int keys, int atta
   GetShape()->GetCanvas()->PrepareDC(dc);
 
   wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
-  dc.SetLogicalFunction(wxXOR);
+  dc.SetLogicalFunction(OGLRBLF);
   dc.SetPen(dottedPen);
   double xp, yp;
   GetShape()->GetAttachmentPosition(attachment, &xp, &yp);
index 8006c2717f64248e945583940b5b0863066f16f1..6bf5dad26e801da01548d1d8dde49656e4096cbf 100644 (file)
@@ -211,12 +211,14 @@ bool wxDiagramClipboard::CopyToClipboard(double scale)
         // Copy the bitmap to the clipboard
         wxSetClipboardData(wxDF_BITMAP, newBitmap, 0, 0);
 
+#if 0 // TODO: replace this code (wxEnhMetaFile doesn't have SetClipboard)
         if (mf)
         {
             // Copy the metafile to the clipboard
             // Allow a small margin
             bool success = mf->SetClipboard((int)(mfDC.MaxX() + 15), (int)(mfDC.MaxY() + 15));
         }
+#endif
 
         // Close clipboard
         wxCloseClipboard();
index ddae9bf453a87cf62466546dab4c7d0d4949765f..92657392ddc04aec812118cd13b6be9600775339 100644 (file)
@@ -194,7 +194,7 @@ void csEvtHandler::OnBeginDragRight(double x, double y, int keys, int attachment
   GetShape()->GetCanvas()->PrepareDC(dc);
 
   wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
-  dc.SetLogicalFunction(wxXOR);
+  dc.SetLogicalFunction(OGLRBLF);
   dc.SetPen(dottedPen);
   double xp, yp;
   GetShape()->GetAttachmentPositionEdge(attachment, &xp, &yp);
@@ -208,7 +208,7 @@ void csEvtHandler::OnDragRight(bool draw, double x, double y, int keys, int atta
   GetShape()->GetCanvas()->PrepareDC(dc);
 
   wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
-  dc.SetLogicalFunction(wxXOR);
+  dc.SetLogicalFunction(OGLRBLF);
   dc.SetPen(dottedPen);
   double xp, yp;
   GetShape()->GetAttachmentPositionEdge(attachment, &xp, &yp);
@@ -277,7 +277,7 @@ void csEvtHandler::OnDragLeft(bool draw, double x, double y, int keys, int attac
   wxClientDC dc(GetShape()->GetCanvas());
   GetShape()->GetCanvas()->PrepareDC(dc);
 
-  dc.SetLogicalFunction(wxXOR);
+  dc.SetLogicalFunction(OGLRBLF);
 
   wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
   dc.SetPen(dottedPen);
@@ -346,7 +346,7 @@ void csEvtHandler::OnBeginDragLeft(double x, double y, int keys, int attachment)
   double offsetX = xx - g_DragStartX;
   double offsetY = yy - g_DragStartY;
 
-  dc.SetLogicalFunction(wxXOR);
+  dc.SetLogicalFunction(OGLRBLF);
 
   wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
   dc.SetPen(dottedPen);
index d9a3d132abfcf9a25821e52da47943c506e675a8..da5e0f21f107e7d6174b6c0fa91b2e36f7ecceff 100644 (file)
@@ -965,7 +965,7 @@ void csCanvas::OnDragLeft(bool draw, double x, double y, int keys)
     wxClientDC dc(this);
     PrepareDC(dc);
 
-    dc.SetLogicalFunction(wxXOR);
+    dc.SetLogicalFunction(OGLRBLF);
     DrawOutline(dc, sg_initialX, sg_initialY, x, y);
 }
 
@@ -977,7 +977,7 @@ void csCanvas::OnBeginDragLeft(double x, double y, int keys)
     wxClientDC dc(this);
     PrepareDC(dc);
 
-    dc.SetLogicalFunction(wxXOR);
+    dc.SetLogicalFunction(OGLRBLF);
     DrawOutline(dc, sg_initialX, sg_initialY, x, y);
     CaptureMouse();
 }