-1->wxID_ANY, TRUE->true, FALSE->false and tabs replacements. Correct help system in non MSW builds of OGL-Studio sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-06-09 16:42:34 +00:00
parent 45b8a2566d
commit 2ba06d5a8c
50 changed files with 835 additions and 818 deletions

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_BASIC_H_
@@ -145,7 +145,7 @@ class WXDLLIMPEXP_OGL wxShapeEvtHandler: public wxObject, public wxClientDataCon
virtual void OnDelete();
virtual void OnDraw(wxDC& dc);
virtual void OnDrawContents(wxDC& dc);
virtual void OnDrawBranches(wxDC& dc, bool erase = FALSE);
virtual void OnDrawBranches(wxDC& dc, bool erase = false);
virtual void OnMoveLinks(wxDC& dc);
virtual void OnErase(wxDC& dc);
virtual void OnEraseContents(wxDC& dc);
@@ -154,8 +154,8 @@ class WXDLLIMPEXP_OGL wxShapeEvtHandler: public wxObject, public wxClientDataCon
virtual void OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
virtual void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
virtual void OnSize(double x, double y);
virtual bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
virtual void OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
virtual bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
virtual void OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
virtual void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false
virtual void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -166,7 +166,7 @@ class WXDLLIMPEXP_OGL wxShapeEvtHandler: public wxObject, public wxClientDataCon
virtual void OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
virtual void OnDrawControlPoints(wxDC& dc);
virtual void OnEraseControlPoints(wxDC& dc);
virtual void OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
virtual void OnMoveLink(wxDC& dc, bool moveControlPoints = true);
// Control points ('handles') redirect control to the actual shape, to make it easier
// to override sizing behaviour.
@@ -234,8 +234,8 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
virtual void OnLeftDoubleClick(double WXUNUSED(x), double WXUNUSED(y), int WXUNUSED(keys) = 0, int WXUNUSED(attachment) = 0) {}
virtual void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
virtual void OnSize(double x, double y);
virtual bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
virtual void OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
virtual bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
virtual void OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
virtual void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false
virtual void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -268,24 +268,24 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
virtual void MakeMandatoryControlPoints();
virtual void ResetMandatoryControlPoints();
inline virtual bool Recompute() { return TRUE; };
inline virtual bool Recompute() { return true; };
// Calculate size recursively, if size changes. Size might depend on children.
inline virtual void CalculateSize() { };
virtual void Select(bool select = TRUE, wxDC* dc = NULL);
virtual void SetHighlight(bool hi = TRUE, bool recurse = FALSE);
virtual void Select(bool select = true, wxDC* dc = NULL);
virtual void SetHighlight(bool hi = true, bool recurse = false);
inline virtual bool IsHighlighted() const { return m_highlighted; };
virtual bool Selected() const;
virtual bool AncestorSelected() const;
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = FALSE);
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = false);
int GetSensitivityFilter() const { return m_sensitivity; }
void SetDraggable(bool drag, bool recursive = FALSE);
void SetDraggable(bool drag, bool recursive = false);
inline void SetFixedSize(bool x, bool y) { m_fixedWidth = x; m_fixedHeight = y; };
inline void GetFixedSize(bool *x, bool *y) const { *x = m_fixedWidth; *y = m_fixedHeight; };
inline bool GetFixedWidth() const { return m_fixedWidth; }
inline bool GetFixedHeight() const { return m_fixedHeight; }
inline void SetSpaceAttachments(bool sp) { m_spaceAttachments = sp; };
inline bool GetSpaceAttachments() const { return m_spaceAttachments; };
void SetShadowMode(int mode, bool redraw = FALSE);
void SetShadowMode(int mode, bool redraw = false);
inline int GetShadowMode() const { return m_shadowMode; }
virtual bool HitTest(double x, double y, int *attachment, double *distance);
inline void SetCentreResize(bool cr) { m_centreResize = cr; }
@@ -305,19 +305,19 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
virtual void Show(bool show);
virtual bool IsShown() const { return m_visible; }
virtual void Move(wxDC& dc, double x1, double y1, bool display = TRUE);
virtual void Move(wxDC& dc, double x1, double y1, bool display = true);
virtual void Erase(wxDC& dc);
virtual void EraseContents(wxDC& dc);
virtual void Draw(wxDC& dc);
virtual void Flash();
virtual void MoveLinks(wxDC& dc);
virtual void DrawContents(wxDC& dc); // E.g. for drawing text label
virtual void SetSize(double x, double y, bool recursive = TRUE);
virtual void SetSize(double x, double y, bool recursive = true);
virtual void SetAttachmentSize(double x, double y);
void Attach(wxShapeCanvas *can);
void Detach();
inline virtual bool Constrain() { return FALSE; } ;
inline virtual bool Constrain() { return false; } ;
void AddLine(wxLineShape *line, wxShape *other,
int attachFrom = 0, int attachTo = 0,
@@ -413,13 +413,13 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
virtual wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
int nth, int noArcs, wxLineShape* line);
// Returns TRUE if pt1 <= pt2 in the sense that one point comes before another on an
// Returns true if pt1 <= pt2 in the sense that one point comes before another on an
// edge of the shape.
// attachmentPoint is the attachment point (= side) in question.
virtual bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2);
virtual void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE);
virtual void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE);
virtual void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = false);
virtual void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = false);
virtual bool MoveLineToNewAttachment(wxDC& dc, wxLineShape *to_move,
double x, double y);
@@ -462,8 +462,8 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
virtual int GetAttachmentLineCount(int attachment) const;
// Draw the branches (not the actual arcs though)
virtual void OnDrawBranches(wxDC& dc, int attachment, bool erase = FALSE);
virtual void OnDrawBranches(wxDC& dc, bool erase = FALSE);
virtual void OnDrawBranches(wxDC& dc, int attachment, bool erase = false);
virtual void OnDrawBranches(wxDC& dc, bool erase = false);
// Branching attachment settings
inline void SetBranchNeckLength(int len) { m_branchNeckLength = len; }
@@ -490,13 +490,13 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
// This is really to distinguish between lines and other images.
// For lines, want to pass drag to canvas, since lines tend to prevent
// dragging on a canvas (they get in the way.)
virtual bool Draggable() const { return TRUE; }
virtual bool Draggable() const { return true; }
// Returns TRUE if image is a descendant of this image
// Returns true if image is a descendant of this image
bool HasDescendant(wxShape *image);
// Creates a copy of this shape.
wxShape *CreateNewCopy(bool resetMapping = TRUE, bool recompute = TRUE);
wxShape *CreateNewCopy(bool resetMapping = true, bool recompute = true);
// Does the copying for this object
virtual void Copy(wxShape& copy);
@@ -549,11 +549,11 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
bool m_draggable;
int m_attachmentMode; // 0 for no attachments, 1 if using normal attachments,
// 2 for branching attachments
bool m_spaceAttachments; // TRUE if lines at one side should be spaced
bool m_spaceAttachments; // true if lines at one side should be spaced
bool m_fixedWidth;
bool m_fixedHeight;
bool m_centreResize; // Default is to resize keeping the centre constant (TRUE)
bool m_drawHandles; // Don't draw handles if FALSE, usually TRUE
bool m_centreResize; // Default is to resize keeping the centre constant (true)
bool m_drawHandles; // Don't draw handles if false, usually true
wxList m_children; // In case it's composite
wxShape* m_parent; // In case it's a child
int m_formatMode;
@@ -589,7 +589,7 @@ class WXDLLIMPEXP_OGL wxPolygonShape: public wxShape
double x2, double y2,
double *x3, double *y3);
bool HitTest(double x, double y, int *attachment, double *distance);
void SetSize(double x, double y, bool recursive = TRUE);
void SetSize(double x, double y, bool recursive = true);
void OnDraw(wxDC& dc);
void OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
@@ -661,7 +661,7 @@ class WXDLLIMPEXP_OGL wxRectangleShape: public wxShape
double x2, double y2,
double *x3, double *y3);
void OnDraw(wxDC& dc);
void SetSize(double x, double y, bool recursive = TRUE);
void SetSize(double x, double y, bool recursive = true);
void SetCornerRadius(double rad); // If > 0, rounded corners
double GetCornerRadius() const { return m_cornerRadius; }
@@ -715,7 +715,7 @@ class WXDLLIMPEXP_OGL wxEllipseShape: public wxShape
double *x3, double *y3);
void OnDraw(wxDC& dc);
void SetSize(double x, double y, bool recursive = TRUE);
void SetSize(double x, double y, bool recursive = true);
#if wxUSE_PROLOGIO
void WriteAttributes(wxExpr *clause);

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_BASICP_H_
@@ -73,7 +73,7 @@ public:
double m_yoffset;
wxShape* m_shape;
wxCursor* m_oldCursor;
bool m_eraseObject; // If TRUE, erases object before dragging handle.
bool m_eraseObject; // If true, erases object before dragging handle.
/*
* Store original top-left, bottom-right coordinates

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_BITMAP_H_
@@ -35,7 +35,7 @@ class WXDLLIMPEXP_OGL wxBitmapShape: public wxRectangleShape
// Does the copying for this object
void Copy(wxShape& copy);
void SetSize(double w, double h, bool recursive = TRUE);
void SetSize(double w, double h, bool recursive = true);
inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_bitmap; }
void SetBitmap(const wxBitmap& bm);
inline void SetFilename(const wxString& f) { m_filename = f; };

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_CANVAS_H_
@@ -34,7 +34,7 @@ class WXDLLIMPEXP_OGL wxShapeCanvas: public wxScrolledWindow
{
DECLARE_DYNAMIC_CLASS(wxShapeCanvas)
public:
wxShapeCanvas(wxWindow *parent = NULL, wxWindowID id = -1,
wxShapeCanvas(wxWindow *parent = NULL, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBORDER | wxRETAINED,

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_COMPOSIT_H_
@@ -36,16 +36,16 @@ public:
void OnDraw(wxDC& dc);
void OnDrawContents(wxDC& dc);
void OnErase(wxDC& dc);
bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = TRUE);
bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = true);
void OnDragLeft(bool draw, double x, double y, int keys, int attachment = 0);
void OnBeginDragLeft(double x, double y, int keys, int attachment = 0);
void OnEndDragLeft(double x, double y, int keys, int attachment = 0);
void OnRightClick(double x, double y, int keys, int attachment = 0);
void SetSize(double w, double h, bool recursive = TRUE);
void SetSize(double w, double h, bool recursive = true);
// Returns TRUE if it settled down
// Returns true if it settled down
bool Recompute();
// New members
@@ -69,7 +69,7 @@ public:
// in case it had to find it recursively.
wxOGLConstraint *FindConstraint(long id, wxCompositeShape **actualComposite = NULL);
// Returns TRUE if something changed
// Returns true if something changed
bool Constrain();
// Make this composite into a container by creating one wxDivisionShape
@@ -93,7 +93,7 @@ public:
// of the composite that is not in the divisions list.
wxShape *FindContainerImage();
// Returns TRUE if division is a descendant of this container
// Returns true if division is a descendant of this container
bool ContainsDivision(wxDivisionShape *division);
inline wxList& GetDivisions() const { return (wxList&) m_divisions; }
@@ -133,7 +133,7 @@ class WXDLLIMPEXP_OGL wxDivisionShape: public wxCompositeShape
void OnDraw(wxDC& dc);
void OnDrawContents(wxDC& dc);
bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = TRUE);
bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = true);
void OnDragLeft(bool draw, double x, double y, int keys, int attachment = 0);
void OnBeginDragLeft(double x, double y, int keys, int attachment = 0);
void OnEndDragLeft(double x, double y, int keys, int attachment = 0);
@@ -142,7 +142,7 @@ class WXDLLIMPEXP_OGL wxDivisionShape: public wxCompositeShape
// Don't want this kind of composite to resize its subdiagrams, so
// override composite's SetSize.
void SetSize(double w, double h, bool recursive = TRUE);
void SetSize(double w, double h, bool recursive = true);
// Similarly for calculating size: it's fixed at whatever SetSize
// set it to, not in terms of children.
@@ -163,12 +163,12 @@ class WXDLLIMPEXP_OGL wxDivisionShape: public wxCompositeShape
// Divide horizontally (wxHORIZONTAL) or vertically (wxVERTICAL)
bool Divide(int direction);
// Resize adjoining divisions at the given side. If test is TRUE,
// Resize adjoining divisions at the given side. If test is true,
// just see whether it's possible for each adjoining region,
// returning FALSE if it's not.
// returning false if it's not.
bool ResizeAdjoining(int side, double newPos, bool test);
// Adjust a side, returning FALSE if it's not physically possible.
// Adjust a side, returning false if it's not physically possible.
bool AdjustLeft(double left, bool test);
bool AdjustTop(double top, bool test);
bool AdjustRight(double right, bool test);

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_CONSTRNT_H_
@@ -69,7 +69,7 @@ class WXDLLIMPEXP_OGL wxOGLConstraint: public wxObject
wxOGLConstraint(int type, wxShape *constraining, wxList& constrained);
~wxOGLConstraint();
// Returns TRUE if anything changed
// Returns true if anything changed
bool Evaluate();
inline void SetSpacing(double x, double y) { m_xSpacing = x; m_ySpacing = y; };
bool Equals(double a, double b);

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_DIVIDED_H_
@@ -39,7 +39,7 @@ class WXDLLIMPEXP_OGL wxDividedShape: public wxRectangleShape
void OnDraw(wxDC& dc);
void OnDrawContents(wxDC& dc);
void SetSize(double w, double h, bool recursive = TRUE);
void SetSize(double w, double h, bool recursive = true);
void MakeControlPoints();
void ResetControlPoints();

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_DRAWN_H_
@@ -100,8 +100,8 @@ public:
virtual void SetClippingRect(const wxRect& rect);
virtual void DestroyClippingRect();
virtual void SetPen(wxPen* pen, bool isOutline = FALSE); // TODO: eventually, just store GDI object attributes, not actual
virtual void SetBrush(wxBrush* brush, bool isFill = FALSE); // pens/brushes etc.
virtual void SetPen(wxPen* pen, bool isOutline = false); // TODO: eventually, just store GDI object attributes, not actual
virtual void SetBrush(wxBrush* brush, bool isFill = false); // pens/brushes etc.
virtual void SetFont(wxFont* font);
virtual void SetTextColour(const wxColour& colour);
virtual void SetBackgroundColour(const wxColour& colour);
@@ -155,7 +155,7 @@ class WXDLLIMPEXP_OGL wxDrawnShape: public wxRectangleShape
// Get current rotation
inline double GetRotation() const { return m_rotation; }
void SetSize(double w, double h, bool recursive = TRUE);
void SetSize(double w, double h, bool recursive = true);
bool LoadFromMetaFile(const wxString& filename);
inline void SetSaveToFile(bool save) { m_saveToFile = save; }
@@ -188,8 +188,8 @@ class WXDLLIMPEXP_OGL wxDrawnShape: public wxRectangleShape
virtual void SetClippingRect(const wxRect& rect);
virtual void DestroyClippingRect();
virtual void SetDrawnPen(wxPen* pen, bool isOutline = FALSE); // TODO: eventually, just store GDI object attributes, not actual
virtual void SetDrawnBrush(wxBrush* brush, bool isFill = FALSE); // pens/brushes etc.
virtual void SetDrawnPen(wxPen* pen, bool isOutline = false); // TODO: eventually, just store GDI object attributes, not actual
virtual void SetDrawnBrush(wxBrush* brush, bool isFill = false); // pens/brushes etc.
virtual void SetDrawnFont(wxFont* font);
virtual void SetDrawnTextColour(const wxColour& colour);
virtual void SetDrawnBackgroundColour(const wxColour& colour);

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_DRAWNP_H_
@@ -70,9 +70,9 @@ public:
#endif
inline int GetOp() const { return m_op; }
// Draw an outline using the current operation. By default, return FALSE (not drawn)
// Draw an outline using the current operation. By default, return false (not drawn)
virtual bool OnDrawOutline(wxDC& WXUNUSED(dc), double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(w), double WXUNUSED(h),
double WXUNUSED(oldW), double WXUNUSED(oldH)) { return FALSE; }
double WXUNUSED(oldW), double WXUNUSED(oldH)) { return false; }
// Get the perimeter point using this data
virtual bool GetPerimeterPoint(double WXUNUSED(x1), double WXUNUSED(y1),
@@ -80,7 +80,7 @@ public:
double *WXUNUSED(x3), double *WXUNUSED(y3),
double WXUNUSED(xOffset), double WXUNUSED(yOffset),
int WXUNUSED(attachmentMode))
{ return FALSE; }
{ return false; }
protected:
int m_op;

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_LINES_H_
@@ -83,7 +83,7 @@ class WXDLLIMPEXP_OGL wxArrowHead: public wxObject
double m_spacing; // Spacing from the last arrowhead
double m_arrowSize; // Length of arrowhead
wxString m_arrowName; // Name of arrow
bool m_saveToFile; // TRUE if we want to save custom arrowheads to file.
bool m_saveToFile; // true if we want to save custom arrowheads to file.
wxPseudoMetaFile* m_metaFile; // Pseudo metafile if this is a custom arrowhead
long m_id; // identifier
};
@@ -102,14 +102,14 @@ class WXDLLIMPEXP_OGL wxLineShape: public wxShape
// correct position
// moveControlPoints must be disabled when a control point is being
// dragged.
void OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void OnMoveLink(wxDC& dc, bool moveControlPoints = true);
bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void OnDraw(wxDC& dc);
void OnDrawContents(wxDC& dc);
void OnDrawControlPoints(wxDC& dc);
void OnEraseControlPoints(wxDC& dc);
void OnErase(wxDC& dc);
virtual bool OnMoveControlPoint(int WXUNUSED(which), double WXUNUSED(x), double WXUNUSED(y)) { return FALSE; }
virtual bool OnMoveControlPoint(int WXUNUSED(which), double WXUNUSED(x), double WXUNUSED(y)) { return false; }
virtual bool OnMoveMiddleControlPoint(wxDC& dc, wxLineControlPoint* lpt, const wxRealPoint& pt);
virtual bool OnLabelMovePre(wxDC& dc, wxLabelShape* labelShape, double x, double y, double old_x, double old_y, bool display);
void OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
@@ -176,9 +176,9 @@ class WXDLLIMPEXP_OGL wxLineShape: public wxShape
virtual void OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
// Override select, to create/delete temporary label-moving objects
void Select(bool select = TRUE, wxDC* dc = NULL);
void Select(bool select = true, wxDC* dc = NULL);
// Set to spline (TRUE) or line (FALSE)
// Set to spline (true) or line (false)
inline void SetSpline(bool spl) { m_isSpline = spl; }
inline bool IsSpline() const { return m_isSpline; }
@@ -204,7 +204,7 @@ class WXDLLIMPEXP_OGL wxLineShape: public wxShape
// This is really to distinguish between lines and other images.
// For lines, want to pass drag to canvas, since lines tend to prevent
// dragging on a canvas (they get in the way.)
virtual bool Draggable() const { return FALSE; }
virtual bool Draggable() const { return false; }
// Does the copying for this object
void Copy(wxShape& copy);
@@ -221,7 +221,7 @@ class WXDLLIMPEXP_OGL wxLineShape: public wxShape
// E.g. reference list: a b c d e
// Current line list: a d
// Add c, then line list is: a c d
// If no legal arrowhead position, return FALSE.
// If no legal arrowhead position, return false.
// Assume reference list is for one end only, since it potentially defines
// the ordering for any one of the 3 positions. So we don't check
// the reference list for arrowhead position.

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_LINESP_H_
@@ -68,7 +68,7 @@ class WXDLLIMPEXP_OGL wxLabelShape: public wxRectangleShape
void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
public:
wxLineShape* m_lineShape;

View File

@@ -7,7 +7,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _MFUTILS_H_
@@ -21,253 +21,253 @@
#include <wx/metafile.h>
#ifndef GetRValue
#define GetRValue(rgb) ((unsigned char)(rgb))
#define GetGValue(rgb) ((unsigned char)(((int)(rgb)) >> 8))
#define GetBValue(rgb) ((unsigned char)((rgb)>>16))
#define GetRValue(rgb) ((unsigned char)(rgb))
#define GetGValue(rgb) ((unsigned char)(((int)(rgb)) >> 8))
#define GetBValue(rgb) ((unsigned char)((rgb)>>16))
#endif
/* Metafile Functions */
// some compilers have them in their include files
#ifndef META_SETBKCOLOR
#define META_SETBKCOLOR 0x0201
#define META_SETBKCOLOR 0x0201
#endif
#ifndef META_SETBKMODE
#define META_SETBKMODE 0x0102
#define META_SETBKMODE 0x0102
#endif
#ifndef META_SETMAPMODE
#define META_SETMAPMODE 0x0103
#define META_SETMAPMODE 0x0103
#endif
#ifndef META_SETROP2
#define META_SETROP2 0x0104
#define META_SETROP2 0x0104
#endif
#ifndef META_SETRELABS
#define META_SETRELABS 0x0105
#define META_SETRELABS 0x0105
#endif
#ifndef META_SETPOLYFILLMODE
#define META_SETPOLYFILLMODE 0x0106
#define META_SETPOLYFILLMODE 0x0106
#endif
#ifndef META_SETSTRETCHBLTMODE
#define META_SETSTRETCHBLTMODE 0x0107
#define META_SETSTRETCHBLTMODE 0x0107
#endif
#ifndef META_SETTEXTCHAREXTRA
#define META_SETTEXTCHAREXTRA 0x0108
#define META_SETTEXTCHAREXTRA 0x0108
#endif
#ifndef META_SETTEXTCOLOR
#define META_SETTEXTCOLOR 0x0209
#define META_SETTEXTCOLOR 0x0209
#endif
#ifndef META_SETTEXTJUSTIFICATION
#define META_SETTEXTJUSTIFICATION 0x020A
#define META_SETTEXTJUSTIFICATION 0x020A
#endif
#ifndef META_SETWINDOWORG
#define META_SETWINDOWORG 0x020B
#define META_SETWINDOWORG 0x020B
#endif
#ifndef META_SETWINDOWEXT
#define META_SETWINDOWEXT 0x020C
#define META_SETWINDOWEXT 0x020C
#endif
#ifndef META_SETVIEWPORTORG
#define META_SETVIEWPORTORG 0x020D
#define META_SETVIEWPORTORG 0x020D
#endif
#ifndef META_SETVIEWPORTEXT
#define META_SETVIEWPORTEXT 0x020E
#define META_SETVIEWPORTEXT 0x020E
#endif
#ifndef META_OFFSETWINDOWORG
#define META_OFFSETWINDOWORG 0x020F
#define META_OFFSETWINDOWORG 0x020F
#endif
#ifndef META_SCALEWINDOWEXT
#define META_SCALEWINDOWEXT 0x0410
#define META_SCALEWINDOWEXT 0x0410
#endif
#ifndef META_OFFSETVIEWPORTORG
#define META_OFFSETVIEWPORTORG 0x0211
#define META_OFFSETVIEWPORTORG 0x0211
#endif
#ifndef META_SCALEVIEWPORTEXT
#define META_SCALEVIEWPORTEXT 0x0412
#define META_SCALEVIEWPORTEXT 0x0412
#endif
#ifndef META_LINETO
#define META_LINETO 0x0213
#define META_LINETO 0x0213
#endif
#ifndef META_MOVETO
#define META_MOVETO 0x0214
#define META_MOVETO 0x0214
#endif
#ifndef META_EXCLUDECLIPRECT
#define META_EXCLUDECLIPRECT 0x0415
#define META_EXCLUDECLIPRECT 0x0415
#endif
#ifndef META_INTERSECTCLIPRECT
#define META_INTERSECTCLIPRECT 0x0416
#define META_INTERSECTCLIPRECT 0x0416
#endif
#ifndef META_ARC
#define META_ARC 0x0817
#define META_ARC 0x0817
#endif
#ifndef META_ELLIPSE
#define META_ELLIPSE 0x0418
#define META_ELLIPSE 0x0418
#endif
#ifndef META_FLOODFILL
#define META_FLOODFILL 0x0419
#define META_FLOODFILL 0x0419
#endif
#ifndef META_PIE
#define META_PIE 0x081A
#define META_PIE 0x081A
#endif
#ifndef META_RECTANGLE
#define META_RECTANGLE 0x041B
#define META_RECTANGLE 0x041B
#endif
#ifndef META_ROUNDRECT
#define META_ROUNDRECT 0x061C
#define META_ROUNDRECT 0x061C
#endif
#ifndef META_PATBLT
#define META_PATBLT 0x061D
#define META_PATBLT 0x061D
#endif
#ifndef META_SAVEDC
#define META_SAVEDC 0x001E
#define META_SAVEDC 0x001E
#endif
#ifndef META_SETPIXEL
#define META_SETPIXEL 0x041F
#define META_SETPIXEL 0x041F
#endif
#ifndef META_OFFSETCLIPRGN
#define META_OFFSETCLIPRGN 0x0220
#define META_OFFSETCLIPRGN 0x0220
#endif
#ifndef META_TEXTOUT
#define META_TEXTOUT 0x0521
#define META_TEXTOUT 0x0521
#endif
#ifndef META_BITBLT
#define META_BITBLT 0x0922
#define META_BITBLT 0x0922
#endif
#ifndef META_STRETCHBLT
#define META_STRETCHBLT 0x0B23
#define META_STRETCHBLT 0x0B23
#endif
#ifndef META_POLYGON
#define META_POLYGON 0x0324
#define META_POLYGON 0x0324
#endif
#ifndef META_POLYLINE
#define META_POLYLINE 0x0325
#define META_POLYLINE 0x0325
#endif
#ifndef META_ESCAPE
#define META_ESCAPE 0x0626
#define META_ESCAPE 0x0626
#endif
#ifndef META_RESTOREDC
#define META_RESTOREDC 0x0127
#define META_RESTOREDC 0x0127
#endif
#ifndef META_FILLREGION
#define META_FILLREGION 0x0228
#define META_FILLREGION 0x0228
#endif
#ifndef META_FRAMEREGION
#define META_FRAMEREGION 0x0429
#define META_FRAMEREGION 0x0429
#endif
#ifndef META_INVERTREGION
#define META_INVERTREGION 0x012A
#define META_INVERTREGION 0x012A
#endif
#ifndef META_PAINTREGION
#define META_PAINTREGION 0x012B
#define META_PAINTREGION 0x012B
#endif
#ifndef META_SELECTCLIPREGION
#define META_SELECTCLIPREGION 0x012C
#define META_SELECTCLIPREGION 0x012C
#endif
#ifndef META_SELECTOBJECT
#define META_SELECTOBJECT 0x012D
#define META_SELECTOBJECT 0x012D
#endif
#ifndef META_SETTEXTALIGN
#define META_SETTEXTALIGN 0x012E
#define META_SETTEXTALIGN 0x012E
#endif
#ifndef META_DRAWTEXT
#define META_DRAWTEXT 0x062F
#define META_DRAWTEXT 0x062F
#endif
#ifndef META_CHORD
#define META_CHORD 0x0830
#define META_CHORD 0x0830
#endif
#ifndef META_SETMAPPERFLAGS
#define META_SETMAPPERFLAGS 0x0231
#define META_SETMAPPERFLAGS 0x0231
#endif
#ifndef META_EXTTEXTOUT
#define META_EXTTEXTOUT 0x0a32
#define META_EXTTEXTOUT 0x0a32
#endif
#ifndef META_SETDIBTODEV
#define META_SETDIBTODEV 0x0d33
#define META_SETDIBTODEV 0x0d33
#endif
#ifndef META_SELECTPALETTE
#define META_SELECTPALETTE 0x0234
#define META_SELECTPALETTE 0x0234
#endif
#ifndef META_REALIZEPALETTE
#define META_REALIZEPALETTE 0x0035
#define META_REALIZEPALETTE 0x0035
#endif
#ifndef META_ANIMATEPALETTE
#define META_ANIMATEPALETTE 0x0436
#define META_ANIMATEPALETTE 0x0436
#endif
#ifndef META_SETPALENTRIES
#define META_SETPALENTRIES 0x0037
#define META_SETPALENTRIES 0x0037
#endif
#ifndef META_POLYPOLYGON
#define META_POLYPOLYGON 0x0538
#define META_POLYPOLYGON 0x0538
#endif
#ifndef META_RESIZEPALETTE
#define META_RESIZEPALETTE 0x0139
#define META_RESIZEPALETTE 0x0139
#endif
#ifndef META_DIBBITBLT
#define META_DIBBITBLT 0x0940
#define META_DIBBITBLT 0x0940
#endif
#ifndef META_DIBSTRETCHBLT
#define META_DIBSTRETCHBLT 0x0b41
#define META_DIBSTRETCHBLT 0x0b41
#endif
#ifndef META_DIBCREATEPATTERNBRUSH
#define META_DIBCREATEPATTERNBRUSH 0x0142
#define META_DIBCREATEPATTERNBRUSH 0x0142
#endif
#ifndef META_STRETCHDIB
#define META_STRETCHDIB 0x0f43
#define META_STRETCHDIB 0x0f43
#endif
#ifndef META_EXTFLOODFILL
#define META_EXTFLOODFILL 0x0548
#define META_EXTFLOODFILL 0x0548
#endif
#ifndef META_RESETDC
#define META_RESETDC 0x014C
#define META_RESETDC 0x014C
#endif
#ifndef META_STARTDOC
#define META_STARTDOC 0x014D
#define META_STARTDOC 0x014D
#endif
#ifndef META_STARTPAGE
#define META_STARTPAGE 0x004F
#define META_STARTPAGE 0x004F
#endif
#ifndef META_ENDPAGE
#define META_ENDPAGE 0x0050
#define META_ENDPAGE 0x0050
#endif
#ifndef META_ABORTDOC
#define META_ABORTDOC 0x0052
#define META_ABORTDOC 0x0052
#endif
#ifndef META_ENDDOC
#define META_ENDDOC 0x005E
#define META_ENDDOC 0x005E
#endif
#ifndef META_DELETEOBJECT
#define META_DELETEOBJECT 0x01f0
#define META_DELETEOBJECT 0x01f0
#endif
#ifndef META_CREATEPALETTE
#define META_CREATEPALETTE 0x00f7
#define META_CREATEPALETTE 0x00f7
#endif
#ifndef META_CREATEBRUSH
#define META_CREATEBRUSH 0x00F8
#define META_CREATEBRUSH 0x00F8
#endif
#ifndef META_CREATEPATTERNBRUSH
#define META_CREATEPATTERNBRUSH 0x01F9
#define META_CREATEPATTERNBRUSH 0x01F9
#endif
#ifndef META_CREATEPENINDIRECT
#define META_CREATEPENINDIRECT 0x02FA
#define META_CREATEPENINDIRECT 0x02FA
#endif
#ifndef META_CREATEFONTINDIRECT
#define META_CREATEFONTINDIRECT 0x02FB
#define META_CREATEFONTINDIRECT 0x02FB
#endif
#ifndef META_CREATEBRUSHINDIRECT
#define META_CREATEBRUSHINDIRECT 0x02FC
#define META_CREATEBRUSHINDIRECT 0x02FC
#endif
#ifndef META_CREATEBITMAPINDIRECT
#define META_CREATEBITMAPINDIRECT 0x02FD
#define META_CREATEBITMAPINDIRECT 0x02FD
#endif
#ifndef META_CREATEBITMAP
#define META_CREATEBITMAP 0x06FE
#define META_CREATEBITMAP 0x06FE
#endif
#ifndef META_CREATEREGION
#define META_CREATEREGION 0x06FF
#define META_CREATEREGION 0x06FF
#endif
/* Background Modes */
@@ -280,25 +280,25 @@
/* Pen Styles */
#ifndef PS_SOLID
#define PS_SOLID 0
#define PS_SOLID 0
#endif
#ifndef PS_DASH
#define PS_DASH 1
#define PS_DASH 1
#endif
#ifndef PS_DOT
#define PS_DOT 2
#define PS_DOT 2
#endif
#ifndef PS_DASHDOT
#define PS_DASHDOT 3
#define PS_DASHDOT 3
#endif
#ifndef PS_DASHDOTDOT
#define PS_DASHDOTDOT 4
#define PS_DASHDOTDOT 4
#endif
#ifndef PS_NULL
#define PS_NULL 5
#define PS_NULL 5
#endif
#ifndef PS_INSIDEFRAME
#define PS_INSIDEFRAME 6
#define PS_INSIDEFRAME 6
#endif
/* PitchAndFamily family values (high 4 bits) */
@@ -323,25 +323,25 @@
/* Brush Styles */
#ifndef BS_SOLID
#define BS_SOLID 0
#define BS_SOLID 0
#endif
#ifndef BS_NULL
#define BS_NULL 1
#define BS_NULL 1
#endif
#ifndef BS_HOLLOW
#define BS_HOLLOW BS_NULL
#define BS_HOLLOW BS_NULL
#endif
#ifndef BS_HATCHED
#define BS_HATCHED 2
#define BS_HATCHED 2
#endif
#ifndef BS_PATTERN
#define BS_PATTERN 3
#define BS_PATTERN 3
#endif
#ifndef BS_INDEXED
#define BS_INDEXED 4
#define BS_INDEXED 4
#endif
#ifndef BS_DIBPATTERN
#define BS_DIBPATTERN 5
#define BS_DIBPATTERN 5
#endif
/* Hatch Styles */

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_MISC_H_

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_OGL_H_

View File

@@ -6,7 +6,7 @@
// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_OGLDIAG_H_