1 \chapter{Class reference
}\label{classref
}
2 \setheader{{\it CHAPTER
\thechapter}}{}{}{}{}{{\it CHAPTER
\thechapter}}%
3 \setfooter{\thepage}{}{}{}{}{\thepage}
5 These are the main
\ogl\ classes.
7 \section{\class{OGLConstraint
}: wxObject
}\label{oglconstraint
}
9 \overview{wxCompositeShape overview
}{compositeshapeoverview
}
11 An OGLConstraint object helps specify how child shapes are laid out with respect
12 to siblings and parents.
14 \membersection{OGLConstraint::OGLConstraint
}\label{oglconstraintconstr
}
16 \func{void
}{OGLConstraint
}{\void}
20 \func{void
}{OGLConstraint
}{\param{int
}{ type
},
\param{wxShape *
}{constraining
},
\param{wxList\&
}{constrained
}}
24 {\it constraining
} is the shape which is used as the reference for positioning the
{\it constrained
} objects.
26 {\it constrained
} contains a list of wxShapes which are to be constrained (with respect
27 to
{\it constraining
}) using
{\it type
}.
29 {\it type
} can be one of:
31 \begin{itemize
}\itemsep=
0pt
32 \item {\bf gyCONSTRAINT
\_CENTRED\_VERTICALLY}: the Y co-ordinates of the centres of the
33 bounding boxes of the constrained objects and the constraining object
35 \item {\bf gyCONSTRAINT
\_CENTRED\_HORIZONTALLY}: the X co-ordinates of the centres of the
36 bounding boxes of the constrained objects and the constraining object
38 \item {\bf gyCONSTRAINT
\_CENTRED\_BOTH}: the co-ordinates of the centres of the bounding boxes
39 of the constrained objects and the constraining object will be the same
40 \item {\bf gyCONSTRAINT
\_LEFT\_OF}: the X co-ordinates of the right hand vertical edges
41 of the bounding boxes of the constrained objects will be less than
42 the X co-ordinate of the left hand vertical edge of the bounding box
43 of the constraining object
44 \item {\bf gyCONSTRAINT
\_RIGHT\_OF}: the X co-ordinates of the left hand vertical edges
45 of the bounding boxes of the constrained objects will be greater than
46 the X co-ordinate of the right hand vertical edge of the bounding box
47 of the constraining object
48 \item {\bf gyCONSTRAINT
\_ABOVE}: the Y co-ordinates of the bottom horizontal edges of the
49 bounding boxes of the constrained objects will be less than the
50 Y co-ordinate of the top horizontal edge of the bounding box of the
52 \item {\bf gyCONSTRAINT
\_BELOW}: the Y co-ordinates of the top horizontal edges of the
53 bounding boxes of the constrained objects will be greater than
54 the X co-ordinate of the bottom horizontal edge of the bounding box
55 of the constraining object
56 \item {\bf gyCONSTRAINT
\_ALIGNED\_TOP}: the Y co-ordinates of the top horizontal edges of the
57 bounding boxes of the constrained objects will be the same as the
58 Y co-ordinate of the top horizontal edge of the bounding box of the
60 \item {\bf gyCONSTRAINT
\_ALIGNED\_BOTTOM}: the Y co-ordinates of the bottom horizontal edges
61 of the bounding boxes of the constrained objects will be the same as
62 the Y co-ordinate of the bottom horizontal edge of the bounding box
63 of the constraining object
64 \item {\bf gyCONSTRAINT
\_ALIGNED\_LEFT}: the X co-ordinates of the left hand vertical edges
65 of the bounding boxes of the constrained objects will be the same as
66 the X co-ordinate of the left hand vertical edge of the bounding box
67 of the constraining object
68 \item {\bf gyCONSTRAINT
\_ALIGNED\_RIGHT}: the X co-ordinates of the right hand vertical edges
69 of the bounding boxes of the constrained objects will be the same as
70 the X co-ordinate of the right hand vertical edge of the bounding box
71 of the constraining object
72 \item {\bf gyCONSTRAINT
\_MIDALIGNED\_TOP}: the Y co-ordinates of the centres of
73 the bounding boxes of the constrained objects will be the same
74 as the Y co-ordinate of the top horizontal edge of
75 the bounding box of the constraining object
76 \item {\bf gyCONSTRAINT
\_MIDALIGNED\_BOTTOM}: the Y co-ordinates of the centres of
77 the bounding boxes of the constrained objects will be the same
78 as the Y co-ordinate of the bottom horizontal edge of
79 the bounding box of the constraining object
80 \item {\bf gyCONSTRAINT
\_MIDALIGNED\_LEFT}: the X co-ordinates of the centres of
81 the bounding boxes of the constrained objects will be the same
82 as the X co-ordinate of the left hand vertical edge of
83 the bounding box of the constraining object
84 \item {\bf gyCONSTRAINT
\_MIDALIGNED\_RIGHT}: the X co-ordinates of the centres of
85 the bounding boxes of the constrained objects will be the same as
86 the X co-ordinate of the right hand vertical edge of
87 the bounding box of the constraining object
91 \membersection{OGLConstraint::
\destruct{OGLConstraint
}}
93 \func{void
}{\destruct{OGLConstraint
}}{\void}
97 \membersection{OGLConstraint::Equals
}
99 \func{bool
}{Equals
}{\param{float
}{ x
},
\param{float
}{ y
}}
101 Returns TRUE if
{\it x
} and
{\it y
} are approximately equal (for the purposes
102 of evaluating the constraint).
104 \membersection{OGLConstraint::Evaluate
}
106 \func{bool
}{Evaluate
}{\void}
108 Evaluates this constraint, returning TRUE if anything changed.
110 \membersection{OGLConstraint::SetSpacing
}\label{oglconstraintsetspacing
}
112 \func{void
}{SetSpacing
}{\param{float
}{ x
},
\param{float
}{ y
}}
114 Sets the horizontal and vertical spacing for the constraint.
117 \section{\class{wxBitmapShape
}: wxRectangleShape
}\label{wxbitmapshape
}
119 Draws a bitmap (non-resizable).
121 See also
\helpref{wxRectangleShape
}{wxrectangleshape
}.
123 \membersection{wxBitmapShape::wxBitmapShape
}
125 \func{void
}{wxBitmapShape
}{\void}
129 \membersection{wxBitmapShape::
\destruct{wxBitmapShape
}}
131 \func{void
}{\destruct{wxBitmapShape
}}{\void}
135 \membersection{wxBitmapShape::GetDeleteBitmap
}
137 \func{bool
}{GetDeleteBitmap
}{\void}
139 Returns TRUE if the bitmap will be deleted when the shape is deleted.
141 \membersection{wxBitmapShape::GetBitmap
}
143 \func{wxBitmap\&
}{GetBitmap
}{\void}
145 Returns a reference to the bitmap associated with this shape.
147 \membersection{wxBitmapShape::GetFilename
}
149 \func{wxString
}{GetFilename
}{\void}
151 Returns the bitmap filename.
153 \membersection{wxBitmapShape::SetDeleteBitmap
}
155 \func{void
}{SetDeleteBitmap
}{\param{bool
}{ deleteBitmap
}}
157 Determines whether the bitmap will be deleted when the shape is deleted.
159 \membersection{wxBitmapShape::SetBitmap
}
161 \func{void
}{SetBitmap
}{\param{const wxBitmap\&
}{ bitmap
}}
163 Sets the bitmap associated with this shape. You can delete the bitmap
164 from the calling application, since reference counting will take care of
165 holding on to the internal bitmap data.
167 \membersection{wxBitmapShape::SetFilename
}
169 \func{void
}{SetFilename
}{\param{const wxString\&
}{filename
}}
171 Sets the bitmap filename.
173 \section{\class{wxDiagram
}: wxObject
}\label{wxdiagram
}
175 Encapsulates an entire diagram, with methods for reading/writing and drawing.
177 \membersection{wxDiagram::wxDiagram
}
179 \func{void
}{wxDiagram
}{\void}
183 \membersection{wxDiagram::
\destruct{wxDiagram
}}
185 \func{void
}{\destruct{wxDiagram
}}{\void}
189 \membersection{wxDiagram::AddShape
}
191 \func{void
}{AddShape
}{\param{wxShape *
}{shape
},
\param{wxShape *
}{addAfter = NULL
}}
193 Adds a shape to the diagram. If
{\it addAfter
} is non-NULL, the shape will be added after this
196 \membersection{wxDiagram::Clear
}
198 \func{void
}{Clear
}{\void}
200 Clears the device context associated with the diagram.
202 \membersection{wxDiagram::DeleteAllShapes
}
204 \func{void
}{DeletesAllShapes
}{\void}
206 Removes and deletes all shapes in the diagram.
208 \membersection{wxDiagram::DrawOutline
}
210 \func{void
}{DrawOutline
}{\param{float
}{ x1
},
\param{float
}{ y1
},
\param{float
}{ x2
},
\param{float
}{ y2
}}
212 Draws an outline rectangle on the current device context.
214 \membersection{wxDiagram::GetCanvas
}
216 \func{wxCanvas *
}{GetCanvas
}{\void}
218 Returns the canvas associated with this diagram.
220 \membersection{wxDiagram::GetGridSpacing
}
222 \func{float
}{GetGridSpacing
}{\void}
224 Returns the grid spacing.
226 \membersection{wxDiagram::GetMouseTolerance
}
228 \func{int
}{GetMouseTolerance
}{\void}
230 Returns the tolerance within which a mouse move is ignored.
232 \membersection{wxDiagram::GetShapeList
}
234 \func{wxList *
}{GetShapeList
}{\void}
236 Returns a pointer to the internal shape list.
238 \membersection{wxDiagram::GetQuickEditMode
}
240 \func{bool
}{GetQuickEditMode
}{\void}
242 Returns quick edit mode.
244 \membersection{wxDiagram::GetSnapToGrid
}
246 \func{bool
}{GetSnapToGrid
}{\void}
248 Returns snap-to-grid mode.
250 \membersection{wxDiagram::InsertShape
}
252 \func{void
}{InsertShape
}{\param{wxShape *
}{shape
}}
254 Inserts a shape at the front of the shape list.
256 \membersection{wxDiagram::LoadFile
}
258 \func{bool
}{LoadFile
}{\param{const wxString\&
}{filename
}}
260 Loads the diagram from a PrologIO file.
262 \membersection{wxDiagram::OnDatabaseLoad
}
264 \func{void
}{OnDatabaseLoad
}{\param{PrologDatabase\&
}{ database
}}
266 Called just after the nodes and lines have been read from the PrologDatabase. You may override this;
267 the default member does nothing.
270 \membersection{wxDiagram::OnDatabaseSave
}
272 \func{void
}{OnDatabaseSave
}{\param{PrologDatabase\&
}{ database
}}
274 Called just after the nodes and lines have been written to the PrologDatabase. You may override this;
275 the default member does nothing.
277 \membersection{wxDiagram::OnHeaderLoad
}
279 \func{bool
}{OnHeaderLoad
}{\param{PrologDatabase\&
}{ database
},
\param{PrologExpr\&
}{ expr
}}
281 Called to allow the `diagram' header object to be read. The default member reads no further information.
282 You may wish to override this to read version information, author name, etc.
285 \membersection{wxDiagram::OnHeaderSave
}
287 \func{bool
}{OnHeaderSave
}{\param{PrologDatabase\&
}{ database
},
\param{PrologExpr\&
}{ expr
}}
289 Called to allow instantiation of the `diagram' header object. The default member writes no further information.
290 You may wish to override this to include version information, author name, etc.
292 \membersection{wxDiagram::OnShapeLoad
}
294 \func{bool
}{OnShapeLoad
}{\param{PrologDatabase\&
}{ database
},
\param{wxShape\&
}{ shape
},
\param{PrologExpr\&
}{ expr
}}
296 Called to read the shape from the
{\it expr
}. You may override this, but call this function first.
297 The default member calls ReadPrologAttributes for the shape.
299 \membersection{wxDiagram::OnShapeSave
}
301 \func{bool
}{OnShapeSave
}{\param{PrologDatabase\&
}{ database
},
\param{wxShape\&
}{ shape
},
\param{PrologExpr\&
}{ expr
}}
303 Called to save the shape to the
{\it expr
} and
{\it database
}. You may override this, but call this function first.
304 The default member calls WritePrologAttributes for the shape, appends the shape to the database, and of the shape
305 is a composite, recursively calls OnShapeSave for its children.
307 \membersection{wxDiagram::ReadContainerGeometry
}
309 \func{void
}{ReadContainerGeometry
}{\param{PrologDatabase\&
}{ database
}}
311 Reads container geometry from a PrologDatabase, linking up nodes which
312 are part of a composite. You probably won't need to redefine this.
314 \membersection{wxDiagram::ReadLines
}
316 \func{void
}{ReadLines
}{\param{PrologDatabase\&
}{ database
}}
318 Reads lines from a PrologDatabase. You probably won't need to redefine this.
320 \membersection{wxDiagram::ReadNodes
}
322 \func{void
}{ReadNodes
}{\param{PrologDatabase\&
}{ database
}}
324 Reads nodes from a PrologDatabase. You probably won't need to redefine this.
327 \membersection{wxDiagram::RecentreAll
}
329 \func{void
}{RecentreAll
}{\void}
331 Make sure all text that should be centred, is centred.
333 \membersection{wxDiagram::Redraw
}
335 \func{void
}{Redraw
}{\void}
337 Draws the shapes in the diagram on the currently set device context.
339 \membersection{wxDiagram::RemoveAllShapes
}
341 \func{void
}{RemoveAllShapes
}{\void}
343 Removes all shapes from the diagram but does not delete the shapes.
345 \membersection{wxDiagram::RemoveShape
}
347 \func{void
}{RemoveShape
}{\param{wxShape *
}{shape
}}
349 Removes the shape from the diagram (non-recursively) but does not delete it.
351 \membersection{wxDiagram::SaveFile
}
353 \func{bool
}{SaveFile
}{\param{const wxString\&
}{filename
}}
355 Saves the diagram in a PrologIO file.
357 \membersection{wxDiagram::SetCanvas
}
359 \func{void
}{SetCanvas
}{\param{wxShapeCanvas *
}{canvas
}}
361 Sets the canvas associated with this diagram.
363 \membersection{wxDiagram::SetGridSpacing
}
365 \func{void
}{SetGridSpacing
}{\param{float
}{ spacing
}}
367 Sets the grid spacing. The default is
5.
369 \membersection{wxDiagram::SetMouseTolerance
}
371 \func{void
}{SetMouseTolerance
}{\param{int
}{ tolerance
}}
373 Sets the tolerance within which a mouse move is ignored. The default is
3 pixels.
375 \membersection{wxDiagram::SetQuickEditMode
}
377 \func{void
}{SetQuickEditMode
}{\param{bool
}{ mode
}}
379 Sets quick-edit-mode on or off. In this mode, refreshes are minimized, but the
380 diagram may need manual refreshing occasionally.
382 \membersection{wxDiagram::SetSnapToGrid
}
384 \func{void
}{SetSnapToGrid
}{\param{bool
}{ snap
}}
386 Sets snap-to-grid mode on or off. The default is on.
388 \membersection{wxDiagram::ShowAll
}
390 \func{void
}{ShowAll
}{\param{bool
}{ show
}}
392 Calls Show for each shape in the diagram.
394 \membersection{wxDiagram::Snap
}
396 \func{void
}{Snap
}{\param{float *
}{x
},
\param{float *
}{y
}}
398 `Snaps' the coordinate to the nearest grid position, if snap-to-grid is on.
401 \section{\class{wxDrawnShape
}: wxRectangleShape
}\label{wxdrawnshape
}
403 Draws a pseduo-metafile shape, which can be loaded from a simple Windows metafile.
405 See also
\helpref{wxRectangleShape
}{wxrectangleshape
}.
407 \membersection{wxDrawnShape::wxDrawnShape
}
409 \func{void
}{wxDrawnShape
}{\void}
413 \membersection{wxDrawnShape::
\destruct{wxDrawnShape
}}
415 \func{void
}{\destruct{wxDrawnShape
}}{\void}
419 \membersection{wxDrawnShape::GetMetaFile
}
421 \func{wxPseudoMetaFile\&
}{GetMetaFile
}{\void}
423 Returns a reference to the internal `pseudo-metafile'.
425 \membersection{wxDrawnShape::LoadFromMetaFile
}
427 \func{bool
}{LoadFromMetaFile
}{\param{const wxString\&
}{filename
}}
429 Loads a (very simple) Windows metafile, created for example by Top Draw, the Windows shareware graphics package.
431 \membersection{wxDrawnShape::Rotate
}
433 \func{void
}{Rotate
}{\param{float
}{x
},
\param{float
}{y
},
\param{float
}{theta
}}
435 Rotate about the given axis by the given amount in radians.
437 \membersection{wxDrawnShape::Scale
}
439 \func{void
}{Scale
}{\param{float
}{sx
},
\param{float
}{sy
}}
441 Scales the shape by the given amount.
443 \membersection{wxDrawnShape::SetSaveToFile
}
445 \func{void
}{SetSaveToFile
}{\param{bool
}{save
}}
447 If
{\it save
} is TRUE, the image will be saved along with the shape's other attributes. The reason
448 why this might not be desirable is that if there are many shapes with the same image, it would be
449 more efficient for the application to save one copy, and not duplicate the information for every
450 shape. The default is TRUE.
452 \membersection{wxDrawnShape::Translate
}
454 \func{void
}{Translate
}{\param{float
}{x
},
\param{float
}{y
}}
456 Translates the shape by the given amount.
458 \section{\class{wxCircleShape
}: wxEllipseShape
}\label{wxcircleshape
}
460 An wxEllipseShape whose width and height are the same.
462 See also
\helpref{wxEllipseShape
}{wxellipseshape
}.
464 \membersection{wxCircleShape::wxCircleShape
}
466 \func{void
}{wxCircleShape
}{\param{float
}{ width =
0.0}}
470 \membersection{wxCircleShape::
\destruct{wxCircleShape
}}
472 \func{void
}{\destruct{wxCircleShape
}}{\void}
477 \section{\class{wxCompositeShape
}: wxRectangleShape
}\label{wxcompositeshape
}
479 \overview{wxCompositeShape overview
}{compositeshapeoverview
}
481 This is an object with a list of child objects, and a list of size
482 and positioning constraints between the children.
484 See also
\helpref{wxRectangleShape
}{wxrectangleshape
}.
486 \membersection{wxCompositeShape::wxCompositeShape
}
488 \func{void
}{wxCompositeShape
}{\void}
492 \membersection{wxCompositeShape::
\destruct{wxCompositeShape
}}
494 \func{void
}{\destruct{wxCompositeShape
}}{\void}
498 \membersection{wxCompositeShape::AddChild
}\label{wxcompositeshapeaddchild
}
500 \func{void
}{AddChild
}{\param{wxShape *
}{child
},
\param{wxShape *
}{addAfter = NULL
}}
502 Adds a child shape to the composite. If
{\it addAfter
} is non-NULL, the shape will be added
505 \membersection{wxCompositeShape::AddConstraint
}\label{wxcompositeshapeaddconstraint
}
507 \func{OGLConstraint *
}{AddConstraint
}{\param{OGLConstraint *
}{constraint
}}
509 \func{OGLConstraint *
}{AddConstraint
}{\param{int
}{ type
},
\param{wxShape *
}{constraining
},
\param{wxList\&
}{constrained
}}
511 \func{OGLConstraint *
}{AddConstraint
}{\param{int
}{ type
},
\param{wxShape *
}{constraining
},
\param{wxShape *
}{constrained
}}
513 Adds a constraint to the composite.
515 \membersection{wxCompositeShape::CalculateSize
}
517 \func{void
}{CalculateSize
}{\void}
519 Calculates the size and position of the composite based on child sizes and positions.
521 \membersection{wxCompositeShape::ContainsDivision
}
523 \func{bool
}{FindContainerImage
}{\param{wxDivisionShape *
}{division
}}
525 Returns TRUE if
{\it division
} is a descendant of this container.
527 \membersection{wxCompositeShape::DeleteConstraint
}
529 \func{void
}{DeleteConstraint
}{\param{OGLConstraint *
}{constraint
}}
531 Deletes constraint from composite.
533 \membersection{wxCompositeShape::DeleteConstraintsInvolvingChild
}
535 \func{void
}{DeleteConstraintsInvolvingChild
}{\param{wxShape *
}{child
}}
537 This function deletes constraints which mention the given child. Used when
538 deleting a child from the composite.
540 \membersection{wxCompositeShape::FindConstraint
}
542 \func{OGLConstraint *
}{FindConstraint
}{\param{long
}{ id
},
\param{wxCompositeShape **
}{actualComposite
}}
544 Finds the constraint with the given id, also returning the actual composite the constraint was in,
545 in case that composite was a descendant of this composite.
547 \membersection{wxCompositeShape::FindContainerImage
}
549 \func{wxShape *
}{FindContainerImage
}{\void}
551 Finds the image used to visualize a container. This is any child
552 of the composite that is not in the divisions list.
554 \membersection{wxCompositeShape::GetConstraints
}
556 \func{wxList\&
}{GetConstraints
}{\void}
558 Returns a reference to the list of constraints.
560 \membersection{wxCompositeShape::GetDivisions
}
562 \func{wxList\&
}{GetDivisions
}{\void}
564 Returns a reference to the list of divisions.
566 \membersection{wxCompositeShape::MakeContainer
}\label{wxcompositeshapemakecontainer
}
568 \func{void
}{MakeContainer
}{\void}
570 Makes this composite into a container by creating one child wxDivisionShape.
572 \membersection{wxCompositeShape::OnCreateDivision
}
574 \func{wxDivisionShape *
}{OnCreateDivision
}{\void}
576 Called when a new division shape is required. Can be overriden to allow an application
577 to use a different class of division.
579 \membersection{wxCompositeShape::Recompute
}\label{wxcompositeshaperecompute
}
581 \func{bool
}{Recompute
}{\void}
583 Recomputes any constraints associated with the object. If FALSE is returned,
584 the constraints could not be satisfied (there was an inconsistency).
586 \membersection{wxCompositeShape::RemoveChild
}
588 \func{void
}{RemoveChild
}{\param{wxShape *
}{child
}}
590 Removes the child from the composite and any constraint relationships, but does not
593 \section{\class{wxDividedShape
}: wxRectangleShape
}\label{wxdividedshape
}
595 \overview{wxDividedShape overview
}{dividedshapeoverview
}
597 A wxDividedShape is a rectangle with a number of vertical divisions. Each
598 division may have its text formatted with independent characteristics, and
599 the size of each division relative to the whole image may be specified.
601 See also
\helpref{wxRectangleShape
}{wxrectangleshape
}.
603 \membersection{wxDividedShape::wxDividedShape
}
605 \func{void
}{wxDividedShape
}{\param{float
}{ width =
0.0},
\param{float
}{ height =
0.0}}
609 \membersection{wxDividedShape::
\destruct{wxDividedShape
}}
611 \func{void
}{\destruct{wxDividedShape
}}{\void}
615 \membersection{wxDividedShape::EditRegions
}
617 \func{void
}{EditRegions
}{\void}
619 Edit the region colours and styles.
621 \membersection{wxDividedShape::SetRegionSizes
}
623 \func{void
}{SetRegionSizes
}{\void}
625 Set all region sizes according to proportions and
626 this object total size.
631 \section{\class{wxDivisionShape
}: wxCompositeShape
}\label{wxdivisionshape
}
633 \overview{wxCompositeShape overview
}{compositeshapeoverview
}
635 A division shape is like a composite in that it can contain further objects, but is used exclusively to
636 divide another shape into regions, or divisions. A wxDivisionShape is never free-standing.
638 See also
\helpref{wxCompositeShape
}{wxcompositeshape
}.
640 \membersection{wxDivisionShape::wxDivisionShape
}
642 \func{void
}{wxDivisionShape
}{\void}
646 \membersection{wxDivisionShape::
\destruct{wxDivisionShape
}}
648 \func{void
}{\destruct{wxDivisionShape
}}{\void}
652 \membersection{wxDivisionShape::AdjustBottom
}
654 \func{void
}{AdjustBottom
}{\param{float
}{ bottom
},
\param{bool
}{ test
}}
656 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
658 \membersection{wxDivisionShape::AdjustLeft
}
660 \func{void
}{AdjustLeft
}{\param{float
}{ left
},
\param{bool
}{ test
}}
662 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
664 \membersection{wxDivisionShape::AdjustRight
}
666 \func{void
}{AdjustRight
}{\param{float
}{ right
},
\param{bool
}{ test
}}
668 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
670 \membersection{wxDivisionShape::AdjustTop
}
672 \func{void
}{AdjustTop
}{\param{float
}{ top
},
\param{bool
}{ test
}}
674 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
676 \membersection{wxDivisionShape::Divide
}\label{wxdivisionshapedivide
}
678 \func{void
}{Divide
}{\param{int
}{ direction
}}
680 Divide this division into two further divisions, horizontally (
{\it direction
} is wxHORIZONTAL) or
681 vertically (
{\it direction
} is wxVERTICAL).
683 \membersection{wxDivisionShape::EditEdge
}
685 \func{void
}{EditEdge
}{\param{int
}{ side
}}
687 Interactively edit style of left or top side.
689 \membersection{wxDivisionShape::GetBottomSide
}
691 \func{wxDivisionShape *
}{GetBottomSide
}{\void}
693 Returns a pointer to the division on the bottom side of this division.
695 \membersection{wxDivisionShape::GetHandleSide
}
697 \func{int
}{GetHandleSide
}{\void}
699 Returns the side which the handle appears on (DIVISION
\_SIDE\_LEFT or DIVISION
\_SIDE\_TOP).
701 \membersection{wxDivisionShape::GetLeftSide
}
703 \func{wxDivisionShape *
}{GetLeftSide
}{\void}
705 Returns a pointer to the division on the left side of this division.
707 \membersection{wxDivisionShape::GetLeftSideColour
}
709 \func{wxString
}{GetLeftSideColour
}{\void}
711 Returns a pointer to the colour used for drawing the left side of the division.
713 \membersection{wxDivisionShape::GetLeftSidePen
}
715 \func{wxPen *
}{GetLeftSidePen
}{\void}
717 Returns a pointer to the pen used for drawing the left side of the division.
719 \membersection{wxDivisionShape::GetRightSide
}
721 \func{wxDivisionShape *
}{GetRightSide
}{\void}
723 Returns a pointer to the division on the right side of this division.
725 \membersection{wxDivisionShape::GetTopSide
}
727 \func{wxDivisionShape *
}{GetTopSide
}{\void}
729 Returns a pointer to the division on the top side of this division.
731 \membersection{wxDivisionShape::GetTopSideColour
}
733 \func{wxString
}{GetTopSideColour
}{\void}
735 Returns a pointer to the colour used for drawing the top side of the division.
737 \membersection{wxDivisionShape::GetTopSidePen
}
739 \func{wxPen *
}{GetTopSidePen
}{\void}
741 Returns a pointer to the pen used for drawing the left side of the division.
744 \membersection{wxDivisionShape::ResizeAdjoining
}
746 \func{void
}{ResizeAdjoining
}{\param{int
}{ side
},
\param{float
}{ newPos
},
\param{bool
}{ test
}}
748 Resize adjoining divisions at the given side. If
{\it test
} is TRUE,
749 just see whether it's possible for each adjoining region,
750 returning FALSE if it's not.
752 {\it side
} can be one of:
754 \begin{itemize
}\itemsep=
0pt
755 \item DIVISION
\_SIDE\_NONE
756 \item DIVISION
\_SIDE\_LEFT
757 \item DIVISION
\_SIDE\_TOP
758 \item DIVISION
\_SIDE\_RIGHT
759 \item DIVISION
\_SIDE\_BOTTOM
762 \membersection{wxDivisionShape::PopupMenu
}
764 \func{void
}{PopupMenu
}{\param{float
}{ x
},
\param{float
}{ y
}}
766 Popup the division menu.
768 \membersection{wxDivisionShape::SetBottomSide
}
770 \func{void
}{SetBottomSide
}{\param{wxDivisionShape *
}{shape
}}
772 Set the pointer to the division on the bottom side of this division.
774 \membersection{wxDivisionShape::SetHandleSide
}
776 \func{int
}{SetHandleSide
}{\void}
778 Sets the side which the handle appears on (DIVISION
\_SIDE\_LEFT or DIVISION
\_SIDE\_TOP).
780 \membersection{wxDivisionShape::SetLeftSide
}
782 \func{void
}{SetLeftSide
}{\param{wxDivisionShape *
}{shape
}}
784 Set the pointer to the division on the left side of this division.
786 \membersection{wxDivisionShape::SetLeftSideColour
}
788 \func{void
}{SetLeftSideColour
}{\param{const wxString\&
}{colour
}}
790 Sets the colour for drawing the left side of the division.
792 \membersection{wxDivisionShape::SetLeftSidePen
}
794 \func{void
}{SetLeftSidePen
}{\param{wxPen *
}{pen
}}
796 Sets the pen for drawing the left side of the division.
798 \membersection{wxDivisionShape::SetRightSide
}
800 \func{void
}{SetRightSide
}{\param{wxDivisionShape *
}{shape
}}
802 Set the pointer to the division on the right side of this division.
804 \membersection{wxDivisionShape::SetTopSide
}
806 \func{void
}{SetTopSide
}{\param{wxDivisionShape *
}{shape
}}
808 Set the pointer to the division on the top side of this division.
810 \membersection{wxDivisionShape::SetTopSideColour
}
812 \func{void
}{SetTopSideColour
}{\param{const wxString\&
}{colour
}}
814 Sets the colour for drawing the top side of the division.
816 \membersection{wxDivisionShape::SetTopSidePen
}
818 \func{void
}{SetTopSidePen
}{\param{wxPen *
}{pen
}}
820 Sets the pen for drawing the top side of the division.
824 \section{\class{wxEllipseShape
}: wxShape
}\label{wxellipseshape
}
826 The wxEllipseShape behaves similarly to the wxRectangleShape but is
829 See also
\helpref{wxShape
}{wxshape
}.
831 \membersection{wxEllipseShape::wxEllipseShape
}
833 \func{void
}{wxEllipseShape
}{\param{float
}{ width =
0.0},
\param{float
}{ height =
0.0}}
837 \membersection{wxEllipseShape::
\destruct{wxEllipseShape
}}
839 \func{void
}{\destruct{wxEllipseShape
}}{\void}
843 \section{\class{wxLineShape
}: wxShape
}\label{wxlineshape
}
845 A wxLineShape may be attached to two nodes; it may be segmented, in which
846 case a control point is drawn for each joint.
848 See also
\helpref{wxShape
}{wxshape
}.
850 \membersection{wxLineShape::wxLineShape
}
852 \func{void
}{wxLineShape
}{\void}
854 \func{void
}{wxLineShape
}{\param{wxList *
}{list
}}
856 Constructors. In the second (usual) form, supply a list of wxPoints, each to be used
857 as a `control point' for the line. The minimum number of points is two.
859 \membersection{wxLineShape::
\destruct{wxLineShape
}}
861 \func{void
}{\destruct{wxLineShape
}}{\void}
865 \membersection{wxLineShape::AddArrow
}
867 \func{void
}{AddArrow
}{\param{WXTYPE
}{ type
},
\param{bool
}{ end = ARROW
\_POSITION\_END},
\param{float
}{ arrowSize =
10.0},
868 \param{float
}{ xOffset =
0.0},
\param{const wxString\&
}{name = NULL
},
\param{wxPseudoMetaFile *
}{mf = NULL
},
\param{long
}{ arrowId = -
1}}
870 Adds an arrow (or annotation) to the line.
872 {\it type
} may currently be one of:
874 \begin{description
}\itemsep=
0pt
875 \item[ARROW
\_HOLLOW\_CIRCLE] Hollow circle.
876 \item[ARROW
\_FILLED\_CIRCLE] Filled circle.
877 \item[ARROW
\_ARROW] Conventional arrowhead.
878 \item[ARROW
\_SINGLE\_OBLIQUE] Single oblique stroke.
879 \item[ARROW
\_DOUBLE\_OBLIQUE] Double oblique stroke.
880 \item[ARROW
\_DOUBLE\_METAFILE] Custom arrowhead.
883 {\it end
} may currently be one of:
885 \begin{description
}\itemsep=
0pt
886 \item[ARROW
\_POSITION\_END] Arrow appears at the end.
887 \item[ARROW
\_POSITION\_START] Arrow appears at the start.
890 {\it arrowSize
} specifies the length of the arrow.
892 {\it xOffset
} specifies the offset from the end of the line.
894 {\it name
} specifies a name for the arrow.
896 {\it mf
} can be a wxPseduoMetaFile, perhaps loaded from a simple Windows metafile.
898 {\it arrowId
} is the id for the arrow.
900 \membersection{wxLineShape::AddArrowOrdered
}
902 \func{void
}{AddArrowOrdered
}{\param{wxArrowHead *
}{arrow
},
\param{wxList\&
}{ referenceList
},
\param{int
}{ end
}}
904 Add an arrowhead in the position indicated by the reference
905 list of arrowheads, which contains all legal arrowheads for this
906 line, in the correct order.
910 Reference list: a b c d e
911 Current line list: a d
914 Add c, then line list is: a c d.
916 If no legal arrowhead position, return FALSE. Assume reference list is
917 for one end only, since it potentially defines the ordering for any one
918 of the
3 positions. So we don't check the reference list for arrowhead
921 \membersection{wxLineShape::ClearArrow
}
923 \func{bool
}{ClearArrow
}{\param{const wxString\&
}{name
}}
925 Delete the arrow with the given name.
927 \membersection{wxLineShape::ClearArrowsAtPosition
}
929 \func{void
}{ClearArrowsAtPosition
}{\param{int
}{ position = -
1}}
931 Delete the arrows at the specified position, or at any position if
{\it position
} is -
1.
933 \membersection{wxLineShape::DrawArrow
}
935 \func{void
}{DrawArrow
}{\param{ArrowHead *
}{arrow
},
\param{float
}{ xOffset
},
\param{bool
}{ proportionalOffset
}}
937 Draws the given arrowhead (or annotation).
939 \membersection{wxLineShape::DeleteArrowHead
}
941 \func{bool
}{DeleteArrowHead
}{\param{long
}{ arrowId
}}
943 \func{bool
}{DeleteArrowHead
}{\param{int
}{ position
},
\param{const wxString\&
}{name
}}
945 Delete arrowhead by id or position and name.
947 \membersection{wxLineShape::DeleteLineControlPoint
}
949 \func{bool
}{DeleteLineControlPoint
}{\void}
951 Deletes an arbitary point on the line.
953 \membersection{wxLineShape::DrawArrows
}
955 \func{void
}{DrawArrows
}{\void}
959 \membersection{wxLineShape::DrawRegion
}
961 \func{void
}{DrawRegion
}{\param{wxShapeRegion *
}{region
},
\param{float
}{ x
},
\param{float
}{ y
}}
963 Format one region at this position.
965 \membersection{wxLineShape::EraseRegion
}
967 \func{void
}{EraseRegion
}{\param{wxShapeRegion *
}{region
},
\param{float
}{ x
},
\param{float
}{ y
}}
969 Format one region at this position.
971 \membersection{wxLineShape::FindArrowHead
}
973 \func{wxArrowHead *
}{FindArrowHead
}{\param{long
}{ arrowId
}}
975 \func{wxArrowHead *
}{FindArrowHead
}{\param{int
}{ position
},
\param{const wxString\&
}{name
}}
977 Find arrowhead by id or position and name.
979 \membersection{wxLineShape::FindLineEndPoints
}
981 \func{void
}{FindLineEndPoints
}{\param{float *
}{fromX
},
\param{float *
}{fromY
},
\param{float *
}{toX
},
\param{float *
}{toY
}}
983 Finds the x, y points at the two ends of the line. This function can be
984 used by e.g. line-routing routines to get the actual points on the two
985 node images where the lines will be drawn to/from.
987 \membersection{wxLineShape::FindLinePosition
}
989 \func{int
}{FindLinePosition
}{\param{float
}{x
},
\param{float
}{y
}}
991 Find which position we're talking about at this x, y.
992 Returns ARROW
\_POSITION\_START, ARROW
\_POSITION\_MIDDLE, ARROW
\_POSITION\_END.
994 \membersection{wxLineShape::FindMinimumWidth
}
996 \func{float
}{FindMinimumWidth
}{\void}
998 Finds the horizontal width for drawing a line with arrows in minimum
999 space. Assume arrows at end only.
1001 \membersection{wxLineShape::FindNth
}
1003 \func{void
}{FindNth
}{\param{wxShape *
}{image
},
\param{int *
}{nth
},
\param{int *
}{noArcs
},
\param{bool
}{ incoming
}}
1005 Finds the position of the line on the given object. Specify whether incoming or outgoing lines are
1006 being considered with
{\it incoming
}.
1008 \membersection{wxLineShape::GetAttachmentFrom
}
1010 \func{int
}{GetAttachmentFrom
}{\void}
1012 Returns the attachment point on the `from' node.
1014 \membersection{wxLineShape::GetAttachmentTo
}
1016 \func{int
}{GetAttachmentTo
}{\void}
1018 Returns the attachment point on the `to' node.
1020 \membersection{wxLineShape::GetEnds
}
1022 \func{void
}{GetEnds
}{\param{float *
}{x1
},
\param{float *
}{y1
},
\param{float *
}{x2
},
\param{float *
}{y2
}}
1024 Gets the visible endpoints of the lines for drawing between two objects.
1026 \membersection{wxLineShape::GetFormatMode
}
1028 \func{int
}{GetFormatMode
}{\param{int
}{ regionId =
0}}
1030 Returns the format mode for this region. See als
\helpref{SetFormatMode
}{setformatmode
}.
1032 \membersection{wxLineShape::GetFrom
}
1034 \func{wxShape *
}{GetFrom
}{\void}
1036 Gets the `from' object.
1038 \membersection{wxLineShape::GetLabelPosition
}
1040 \func{void
}{GetLabelPosition
}{\param{int
}{ position
},
\param{float *
}{x
},
\param{float *
}{y
}}
1042 Get the reference point for a label. Region x and y are offsets from this.
1043 position is
0 (middle),
1 (start),
2 (end).
1045 \membersection{wxLineShape::GetNextControlPoint
}
1047 \func{wxPoint *
}{GetNextControlPoint
}{\param{wxShape *
}{shape
}}
1049 Find the next control point in the line after the start/end point,
1050 depending on whether the shape is at the start or end.
1052 \membersection{wxLineShape::GetTo
}
1054 \func{wxShape *
}{GetTo
}{\void}
1056 Gets the `to' object.
1058 \membersection{wxLineShape::Initialise
}
1060 \func{void
}{Initialise
}{\void}
1062 Initialises the line object.
1064 \membersection{wxLineShape::InsertLineControlPoint
}
1066 \func{void
}{InsertLineControlPoint
}{\void}
1068 Inserts a control point at an arbitrary position.
1070 \membersection{wxLineShape::IsEnd
}
1072 \func{bool
}{IsEnd
}{\param{wxShape *
}{shape
}}
1074 Returns TRUE if
{\it shape
} is at the end of the line.
1076 \membersection{wxLineShape::IsSpline
}
1078 \func{bool
}{IsSpline
}{\void}
1080 Returns TRUE if a spline is drawn through the control points, and FALSE otherwise.
1082 \membersection{wxLineShape::MakeLineControlPoints
}
1084 \func{void
}{MakeLineControlPoints
}{\param{int
}{ n
}}
1086 Make a given number of control points.
1088 \membersection{wxLineShape::OnMoveLink
}
1090 \func{void
}{OnMoveLink
}{\void}
1092 Called when a connected object has moved, to move the link to
1095 \membersection{wxLineShape::SetAttachments
}
1097 \func{void
}{SetAttachments
}{\param{int
}{ fromAttach
},
\param{int
}{ toAttach
}}
1099 Specifies which object attachment points should be used at each end of the line.
1101 \membersection{wxLineShape::SetEnds
}
1103 \func{void
}{SetEnds
}{\param{float
}{ x1
},
\param{float
}{ y1
},
\param{float
}{ x2
},
\param{float
}{ y2
}}
1105 Sets the end positions of the line.
1107 \membersection{wxLineShape::SetFrom
}
1109 \func{void
}{SetFrom
}{\param{wxShape *
}{object
}}
1111 Sets the `from' object for the line.
1113 \membersection{wxLineShape::SetIgnoreOffsets
}
1115 \func{void
}{SetIgnoreOffsets
}{\param{bool
}{ ignore
}}
1117 Tells the shape whether to ignore offsets from the end of the line when drawing.
1119 \membersection{wxLineShape::SetSpline
}
1121 \func{void
}{SetSpline
}{\param{bool
}{ spline
}}
1123 Specifies whether a spline is to be drawn through the control points (TRUE), or a line (FALSE).
1125 \membersection{wxLineShape::SetTo
}
1127 \func{void
}{SetTo
}{\param{wxShape *
}{object
}}
1129 Sets the `to' object for the line.
1131 \membersection{wxLineShape::Straighten
}
1133 \func{void
}{Straighten
}{\void}
1135 Straighten verticals and horizontals.
1137 \membersection{wxLineShape::Unlink
}
1139 \func{void
}{Unlink
}{\void}
1141 Unlinks the line from the nodes at either end.
1144 \section{\class{wxPolygonShape
}: wxShape
}\label{wxpolygonshape
}
1146 A wxPolygonShape's shape is defined by a number of points passed to the object's
1147 constructor. It can be used to create new shapes such as diamonds and triangles.
1149 See also
\helpref{wxShape
}{wxshape
}.
1151 \membersection{wxPolygonShape::wxPolygonShape
}
1153 \func{void
}{wxPolygonShape
}{void
}
1155 Constructor. Call Create to specify the polygon's vertices.
1157 \membersection{wxPolygonShape::
\destruct{wxPolygonShape
}}
1159 \func{void
}{\destruct{wxPolygonShape
}}{\void}
1163 \membersection{wxPolygonShape::Create
}
1165 \func{void
}{Create
}{\param{wxList *
}{points
}}
1167 Takes a list of wxPoints; each point is an
{\it offset
} from the centre.
1168 The polygon's destructor will delete these points, so do not delete them yourself.
1170 \membersection{wxPolygonShape::AddPolygonPoint
}
1172 \func{void
}{AddPolygonPoint
}{\param{int
}{ pos =
0}}
1174 Add a control point after the given point.
1176 \membersection{wxPolygonShape::CalculatePolygonCentre
}
1178 \func{void
}{CalculatePolygonCentre
}{\void}
1180 Recalculates the centre of the polygon.
1182 \membersection{wxPolygonShape::DeletePolygonPoint
}
1184 \func{void
}{DeletePolygonPoint
}{\param{int
}{ pos =
0}}
1186 Deletes a control point.
1188 \membersection{wxPolygonShape::GetPoints
}
1190 \func{wxList *
}{GetPoints
}{\void}
1192 Returns a pointer to the internal list of polygon vertices.
1194 \membersection{wxPolygonShape::UpdateOriginalPoints
}
1196 \func{void
}{UpdateOriginalPoints
}{\void}
1198 If we've changed the shape, must make the original
1199 points match the working points with this function.
1201 \section{\class{wxRectangleShape
}: wxShape
}\label{wxrectangleshape
}
1203 The wxRectangleShape has rounded or square corners.
1205 See also
\helpref{wxShape
}{wxshape
}.
1207 \membersection{wxRectangleShape::wxRectangleShape
}
1209 \func{void
}{wxRectangleShape
}{\param{float
}{ width =
0.0},
\param{float
}{ height =
0.0}}
1213 \membersection{wxRectangleShape::
\destruct{wxRectangleShape
}}
1215 \func{void
}{\destruct{wxRectangleShape
}}{\void}
1219 \membersection{wxRectangleShape::SetCornerRadius
}
1221 \func{void
}{SetCornerRadius
}{\param{float
}{ radius
}}
1223 Sets the radius of the rectangle's rounded corners. If the radius is zero, a non-rounded
1224 rectangle will be drawn. If the radius is negative, the value is the proportion of the
1225 smaller dimension of the rectangle.
1227 \section{\class{wxPseudoMetaFile
}: wxObject
}\label{wxpseudometafile
}
1229 A simple metafile-like class which can load data from a Windows metafile on all platforms.
1232 \section{\class{wxShape
}: wxShapeEvtHandler
}\label{wxshape
}
1234 The wxShape is the top-level, abstract object that all other
1235 objects are derived from. All common functionality is represented by
1236 wxShape's members, and overriden members that appear in derived
1237 classes and have behaviour as documented for wxShape, are not
1238 documented separately.
1240 See also
\helpref{wxShapeEvtHandler
}{wxshapeevthandler
}.
1242 \membersection{wxShape::wxShape
}
1244 \func{void
}{wxShape
}{\param{wxShapeCanvas *
}{canvas = NULL
}}
1246 Constructs a new wxShape.
1248 \membersection{wxShape::
\destruct{wxShape
}}
1250 \func{void
}{\destruct{wxShape
}}{\void}
1254 \membersection{wxShape::AddLine
}
1256 \func{void
}{AddLine
}{\param{wxLineShape *
}{line
},
\param{wxShape *
}{other
},
\param{int
}{attachFrom =
0},
\param{int
}{ attachTo =
0}}
1258 Adds a line between the specified canvas objects, at the specified attachment points.
1260 \membersection{wxShape::AddRegion
}
1262 \func{void
}{AddRegion
}{\param{wxShapeRegion *
}{region
}}
1264 Adds a region to the shape.
1266 \membersection{wxShape::AddText
}
1268 \func{void
}{AddText
}{\param{const wxString\&
}{string
}}
1270 Adds a line of text to the object's default text region.
1272 \membersection{wxShape::AddToCanvas
}
1274 \func{void
}{AddToCanvas
}{\param{wxShapeCanvas *
}{theCanvas
},
\param{wxShape *
}{addAfter=NULL
}}
1276 Adds the object to the canvas's object list. If
{\it addAfter
} is
1277 non-NULL, will add the shape after this one.
1279 \membersection{wxShape::AncestorSelected
}
1281 \func{bool
}{AncestorSelected
}{\void}
1283 TRUE if the object's ancestor is currently selected.
1285 \membersection{wxShape::AssignNewIds
}
1287 \func{void
}{AssignNewIds
}{\void}
1289 Assigns new ids to this image and its children.
1291 \membersection{wxShape::Attach
}
1293 \func{void
}{Attach
}{\param{wxShapeCanvas *
}{can
}}
1295 Sets the object's internal canvas pointer to point to the given canvas.
1297 \membersection{wxShape::CalculateSize
}
1299 \func{void
}{CalculateSize
}{\void}
1301 Called to calculate the object's size if dependent on children sizes.
1303 \membersection{wxShape::ClearAttachments
}
1305 \func{void
}{ClearAttachments
}{\void}
1307 Clears internal custom attachment point objects (of class wxAttachmentPoint).
1309 \membersection{wxShape::ClearRegions
}
1311 \func{void
}{ClearRegions
}{\void}
1313 Clears the wxShapeRegions from the shape.
1315 \membersection{wxShape::ClearText
}
1317 \func{void
}{ClearText
}{\param{int
}{ regionId =
0}}
1319 Clears the text from the specified text region.
1321 \membersection{wxShape::Constrain
}
1323 \func{bool
}{Constrain
}{\void}
1325 Calculates the object's constraints (if any). Applicable
1326 only to wxCompositeShape, does nothing if the object is of
1329 \membersection{wxShape::Copy
}
1331 \func{void
}{Copy
}{\param{wxShape\&
}{ copy
}}
1333 Copy the object into the given object. Every derived class must have one of these.
1335 \membersection{wxShape::CreateNewCopy
}
1337 \func{wxShape *
}{CreateNewCopy
}{\param{wxShapeCanvas *
}{theCanvas = NULL
}}
1339 Creates and returns a new copy of this object (calling PrivateCopy). Do not override this function.
1341 This function should always be used to create a new copy, since it must do special processing
1342 for copying constraints associated with constraints.
1344 \membersection{wxShape::DeleteControlPoints
}
1346 \func{void
}{DeleteControlPoints
}{\void}
1348 Deletes the control points (or handles) for the object. Does not redraw
1351 \membersection{wxShape::Detach
}
1353 \func{void
}{Detach
}{\void}
1355 Disassociates the object from its canvas by setting the internal object
1356 canvas pointer to NULL.
1358 \membersection{wxShape::Draggable
}
1360 \func{bool
}{Draggable
}{\void}
1362 TRUE if the object may be dragged by the user.
1364 \membersection{wxShape::Draw
}
1366 \func{void
}{Draw
}{\void}
1368 Draws the whole object and any lines attached to it.
1370 Do not override this function: override OnDraw, which is called
1373 \membersection{wxShape::DrawContents
}
1375 \func{void
}{DrawContents
}{\void}
1377 Draws the internal graphic of the object (such as
1380 Do not override this function: override OnDrawContents, which is called
1383 \membersection{wxShape::DrawLines
}
1385 \func{void
}{DrawLinks
}{\param{int
}{ attachment = -
1}}
1387 Draws any lines linked to this object.
1389 \membersection{wxShape::Erase
}
1391 \func{void
}{Erase
}{\void}
1393 Erases the object, but does not repair damage caused to other
1396 \membersection{wxShape::EraseContents
}
1398 \func{void
}{EraseContents
}{\void}
1400 Erases the object contents, that is, the area within the object's
1401 minimum bounding box.
1403 \membersection{wxShape::EraseLinks
}
1405 \func{void
}{EraseLinks
}{\param{int
}{ attachment = -
1}}
1407 Erases links attached to this object, but does not repair
1408 damage caused to other objects.
1410 \membersection{wxShape::FindRegion
}
1412 \func{wxShape *
}{FindRegion
}{\param{const wxString\&
}{regionName
},
\param{int *
}{regionId
}}
1414 Finds the actual image (`this' if non-composite) and region id for the given
1417 \membersection{wxShape::FindRegionNames
}
1419 \func{void
}{FindRegionNames
}{\param{wxStringList\&
}{ list
}}
1421 Finds all region names for this image (composite or simple).
1422 Supply an empty string list.
1424 \membersection{wxShape::Flash
}
1426 \func{void
}{Flash
}{\void}
1430 \membersection{wxShape::FormatText
}
1432 \func{void
}{FormatText
}{\param{const wxString\&
}{s
},
\param{int
}{ i =
0}}
1434 Reformats the given text region; defaults to formatting the default region.
1436 \membersection{wxShape::GetAttachmentMode
}
1438 \func{void
}{GetAttachmentMode
}{\void}
1440 Returns the attachment mode. See
\helpref{SetAttachmentMode
}{setattachmentmode
}.
1442 \membersection{wxShape::GetAttachmentPosition
}
1444 \func{void
}{GetAttachmentPosition
}{\param{int
}{ attachment
},
\param{float *
}{x
},
\param{float *
}{y
},
\param{int
}{ nth =
0},
\param{int
}{ noArcs =
1}}
1446 Gets the position at which the given attachment point should be drawn.
1448 \membersection{wxShape::GetBoundingBoxMax
}
1450 \func{void
}{GetBoundingBoxMax
}{\param{float *
}{width
},
\param{float *
}{height
}}
1452 Gets the maximum bounding box for the object, taking into
1453 account external features such as shadows.
1455 \membersection{wxShape::GetBoundingBoxMin
}
1457 \func{void
}{GetBoundingBoxMin
}{\param{float *
}{width
},
\param{float *
}{height
}}
1459 Gets the minimum bounding box for the object, that defines
1460 the area available for drawing the contents (such as text).
1462 \membersection{wxShape::GetBrush
}
1464 \func{wxBrush *
}{GetBrush
}{\void}
1466 Returns the brush used for filling the shape.
1468 \membersection{wxShape::GetCanvas
}
1470 \func{wxShapeCanvas *
}{GetCanvas
}{\void}
1472 Gets the internal canvas pointer.
1474 \membersection{wxShape::GetCentreResize
}
1476 \func{bool
}{GetCentreResize
}{\void}
1478 Returns TRUE if the shape is to be resized from the centre (the centre
1479 stands still), or FALSE if from the corner or side being dragged (the
1480 other corner or side stands still).
1482 \membersection{wxShape::GetChildren
}
1484 \func{wxList\&
}{GetChildren
}{\void}
1486 Returns a reference to the list of children for this shape.
1488 \membersection{wxShape::GetClientData
}
1490 \func{wxObject *
}{GetClientData
}{\void}
1492 Gets the client data associated with the object (NULL if there is
1495 \membersection{wxShape::GetDisableLabel
}
1497 \func{bool
}{GetDisableLabel
}{\void}
1499 Returns TRUE if the default region will not be shown, FALSE otherwise.
1501 \membersection{wxShape::GetEventHandler
}
1503 \func{wxShapeEvtHandler *
}{GetEventHandler
}{\void}
1505 Returns the event handler for this shape.
1507 \membersection{wxShape::GetFixedHeight
}
1509 \func{bool
}{GetFixedHeight
}{\void}
1511 Returns TRUE if the shape cannot be resized in the vertical plane.
1513 \membersection{wxShape::GetFixedSize
}
1515 \func{void
}{GetFixedSize
}{\param{bool *
}{ x
},
\param{bool *
}{ y
}}
1517 Returns flags indicating whether the shape is of fixed size in either direction.
1519 \membersection{wxShape::GetFixedWidth
}
1521 \func{bool
}{GetFixedWidth
}{\void}
1523 Returns TRUE if the shape cannot be resized in the horizontal plane.
1525 \membersection{wxShape::GetFont
}
1527 \func{int
}{GetFont
}{\param{int
}{ regionId =
0}}
1529 Gets the font for the specified text region.
1531 \membersection{wxShape::GetFunctor
}
1533 \func{char*
}{GetFunctor
}{\void}
1535 Gets a string representing the type of the object, to be used when
1536 writing out object descriptions to a file. This is overridden by
1537 each derived object class to provide an appropriate type string.
1539 \membersection{wxShape::GetId
}
1541 \func{long
}{GetId
}{\void}
1543 Returns the integer identifier for this shape.
1545 \membersection{wxShape::GetLines
}
1547 \func{wxList\&
}{GetLines
}{\void}
1549 Returns a reference to the list of lines connected to this shape.
1551 \membersection{wxShape::GetNumberOfAttachments
}
1553 \func{int
}{GetNumberOfAttachments
}{\void}
1555 Gets the number of attachment points for this object.
1557 \membersection{wxShape::GetNumberOfTextRegions
}
1559 \func{int
}{GetNumberOfTextRegions
}{\void}
1561 Gets the number of text regions for this object.
1563 \membersection{wxShape::GetParent
}
1565 \func{wxShape *
}{GetParent
}{\void}
1567 Returns the parent of this shape, if it is part of a composite.
1569 \membersection{wxShape::GetPen
}
1571 \func{wxPen *
}{GetPen
}{\void}
1573 Returns the pen used for drawing the shape's outline.
1575 \membersection{wxShape::GetPerimeterPoint
}
1577 \func{bool
}{GetPerimeterPoint
}{\param{float
}{ x1
},
\param{float
}{ y1
},
\param{float
}{ x2
},
\param{float
}{ y2
},
\param{float *
}{x3
},
\param{float *
}{y3
}}
1579 Gets the point at which the line from (x1, y1) to (x2, y2) hits the object. Returns TRUE if the
1580 line hits the perimeter.
1582 \membersection{wxShape::GetRegionId
}\label{getregionid
}
1584 \func{int
}{GetRegionId
}{\param{const wxString\&
}{name
}}
1586 Gets the region's identifier by name. This is
{\it not
} unique for within an entire composite, but
1587 is unique for the image.
1589 \membersection{wxShape::GetRegionName
}\label{getregionname
}
1591 \func{wxString
}{GetRegionName
}{\param{int
}{ regionId =
0}}
1593 Gets the region's name. A region's name can be used to uniquely determine a region within
1594 an entire composite image hierarchy. See also
\helpref{SetRegionName
}{setregionname
}.
1596 \membersection{wxShape::GetRegions
}\label{getregions
}
1598 \func{wxList\&
}{GetRegions
}{\void}
1600 Returns the list of wxShapeRegions.
1602 \membersection{wxShape::GetRotation
}
1604 \func{float
}{GetRotatation
}{\void}
1606 Returns the angle of rotation in radians.
1608 \membersection{wxShape::GetSensitivityFilter
}
1610 \func{void
}{GetSensitivityFilter
}{\void}
1612 Returns the sensitivity filter, a bitlist of values. See
\helpref{SetSensitivityFilter
}{setsensitivityfilter
}.
1614 \membersection{wxShape::GetShadowMode
}
1616 \func{int
}{SetShadowMode
}{\void}
1618 Returns the shadow mode. See
\helpref{SetShadowMode
}{setshadowmode
}.
1620 \membersection{wxShape::GetSpaceAttachments
}
1622 \func{bool
}{GetSpaceAttachments
}{\void}
1624 Indicates whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they
1625 should join at a single point (FALSE).
1627 \membersection{wxShape::GetTextColour
}
1629 \func{wxString
}{GetTextColour
}{\param{int
}{ regionId =
0}}
1631 Gets the colour for the specified text region.
1633 \membersection{wxShape::GetTopAncestor
}
1635 \func{wxShape *
}{GetTopAncestor
}{\void}
1637 Returns the top-most ancestor of this shape (the root of the composite).
1639 \membersection{wxShape::GetX
}
1641 \func{float
}{GetX
}{\void}
1643 Gets the x position of the centre of the object.
1645 \membersection{wxShape::GetY
}
1647 \func{float
}{GetY
}{\void}
1649 Gets the y position of the centre of the object.
1651 \membersection{wxShape::HitTest
}
1653 \func{bool
}{HitTest
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int *
}{attachment
},
\param{float *
}{distance
}}
1655 Given a point on a canvas, returns TRUE if the point was on the object, and returns
1656 the nearest attachment point and distance from the given point and target.
1658 \membersection{wxShape::Insert
}
1660 \func{void
}{InsertInCanvas
}{\param{wxShapeCanvas *
}{canvas
}}
1662 Inserts the shape at the front of the object list of
{\it canvas
}.
1664 \membersection{wxShape::IsHighlighted
}
1666 \func{bool
}{IsHighlighted
}{\void}
1668 Returns TRUE if the shape is highlighted. Shape highlighting is unimplemented.
1670 \membersection{wxShape::IsShown
}
1672 \func{bool
}{IsShown
}{\void}
1674 Returns TRUE if the shape is in a visible state, FALSE otherwise. Note
1675 that this has nothing to do with whether the window is hidden or the
1676 shape has scrolled off the canvas; it refers to the internal
1679 \membersection{wxShape::MakeControlPoints
}
1681 \func{void
}{MakeControlPoints
}{\void}
1683 Make a list of control points (draggable handles) appropriate to the object.
1685 \membersection{wxShape::MakeMandatoryControlPoints
}
1687 \func{void
}{MakeMandatoryControlPoints
}{\void}
1689 Make the mandatory control points. For example, the control point on a dividing line should
1690 appear even if the divided rectangle shape's handles should not appear (because it is the child of
1691 a composite, and children are not resizable).
1693 \membersection{wxShape::Move
}
1695 \func{void
}{Move
}{\param{float
}{ x1
},
\param{float
}{ y1
},
\param{bool
}{ display = TRUE
}}
1697 Move the object to the given position, redrawing if
{\it display
} is TRUE.
1699 \membersection{wxShape::MoveLineToNewAttachment
}
1701 \func{void
}{MoveLineToNewAttachment
}{\param{wxLineShape *
}{toMove
},
\param{float
}{ x
},
\param{float
}{ y
}}
1703 Move the given line (which must already be attached to the object) to
1704 a different attachment point on the object.
1706 \membersection{wxShape::MoveLinks
}
1708 \func{void
}{MoveLinks
}{\void}
1710 Redraw all the lines attached to the object.
1712 \membersection{wxShape::NameRegions
}
1714 \func{void
}{NameRegions
}{\param{const wxString\&
}{parentName = ``"
}}
1716 Make unique names for all the regions in a shape or composite shape.
1718 \membersection{wxShape::NewCopy
}
1720 \func{wxShape *
}{NewCopy
}{\void}
1722 Returns a new instance, and does the copy for this class. Should be
1723 defined for each object class.
1725 \membersection{wxShape::PrivateCopy
}
1727 \func{wxShape *
}{PrivateCopy
}{\void}
1729 Returns a new instance, and does the copy for this class. This member
1730 should be define for each class.
1732 \membersection{wxShape::Rotate
}
1734 \func{void
}{Rotate
}{\param{float
}{x
},
\param{float
}{y
},
\param{float
}{theta
}}
1736 Rotate about the given axis by the given amount in radians (does nothing
1737 for most objects). But even non-rotating objects should record their
1738 notional rotation in case it's important (e.g. in dog-leg code).
1740 \membersection{wxShape::ReadConstraints
}
1742 \func{void
}{ReadConstraints
}{\param{PrologExpr *
}{clause
},
\param{PrologDatabase *
}{database
}}
1744 If the object is a composite, it may have constraints that need to be read in in a separate pass.
1746 \membersection{wxShape::ReadPrologAttributes
}
1748 \func{void
}{ReadPrologAttributes
}{\param{PrologExpr *
}{clause
}}
1750 Reads the attributes (data member values) from the given expression.
1752 \membersection{wxShape::ReadRegions
}
1754 \func{void
}{ReadRegions
}{\param{PrologExpr *
}{clause
}}
1756 Reads in the regions.
1758 \membersection{wxShape::Recentre
}
1760 \func{void
}{Recentre
}{\void}
1762 Does recentring (or other formatting) for all the text regions for this object.
1764 \membersection{wxShape::RemoveFromCanvas
}
1766 \func{void
}{RemoveFromCanvas
}{\param{wxShapeCanvas *
}{canvas
}}
1768 Removes the shape from the canvas.
1770 \membersection{wxShape::ResetControlPoints
}
1772 \func{void
}{ResetControlPoints
}{\void}
1774 Resets the positions of the control points (for instance when the
1775 object's shape has changed).
1777 \membersection{wxShape::ResetMandatoryControlPoints
}
1779 \func{void
}{ResetMandatoryControlPoints
}{\void}
1781 Reset the mandatory control points. For example, the control point on a dividing line should
1782 appear even if the divided rectangle shape's handles should not appear (because it is the child of
1783 a composite, and children are not resizable).
1785 \membersection{wxShape::Recompute
}
1787 \func{bool
}{Recompute
}{\void}
1789 Recomputes any constraints associated with the object (normally
1790 applicable to wxCompositeShapes only, but harmless for other
1793 \membersection{wxShape::RemoveLine
}
1795 \func{void
}{RemoveLine
}{\param{wxLineShape *
}{line
}}
1797 Removes the given line from the object's list of attached lines.
1799 \membersection{wxShape::Select
}
1801 \func{void
}{Select
}{\param{bool
}{ select = TRUE
}}
1803 Selects or deselects the given object, drawing or erasing control points
1804 (handles) as necessary.
1806 \membersection{wxShape::Selected
}
1808 \func{bool
}{Selected
}{\void}
1810 TRUE if the object is currently selected.
1812 \membersection{wxShape::SetAttachmentMode
}\label{setattachmentmode
}
1814 \func{void
}{SetAttachmentMode
}{\param{bool
}{ flag
}}
1816 Sets the attachment mode to TRUE or FALSE. If TRUE, attachment points
1817 will be significant when drawing lines to and from this object.
1818 If FALSE, lines will be drawn as if to the centre of the object.
1820 \membersection{wxShape::SetBrush
}
1822 \func{void
}{SetBrush
}{\param{wxBrush *
}{brush
}}
1824 Sets the brush for filling the object's shape.
1826 \membersection{wxShape::SetCanvas
}
1828 \func{void
}{SetCanvas
}{\param{wxShapeCanvas *
}{theCanvas
}}
1830 Identical to Attach.
1832 \membersection{wxShape::SetCentreResize
}
1834 \func{void
}{SetCentreResize
}{\param{bool
}{ cr
}}
1836 Specify whether the shape is to be resized from the centre (the centre stands still) or from the corner or side
1837 being dragged (the other corner or side stands still).
1839 \membersection{wxShape::SetClientData
}
1841 \func{void
}{SetClientData
}{\param{wxObject *
}{clientData
}}
1843 Sets the client data.
1846 \membersection{wxShape::SetDC
}
1848 \func{void
}{SetDC
}{\param{wxDC *
}{dc
}}
1850 Sets the device context associated with the object. This may temporarily be set
1851 to (for example) a printer device context, so that the object will be printed
1852 instead of drawn on a canvas.
1854 \membersection{wxShape::SetDefaultRegionSize
}\label{setdefaultregionsize
}
1856 \func{void
}{SetDefaultRegionSize
}{\void}
1858 Set the default region to be consistent with the shape size.
1860 \membersection{wxShape::SetDisableLabel
}
1862 \func{void
}{SetDisableLabel
}{\param{bool
}{ flag
}}
1864 Set
{\it flag
} to TRUE to stop the default region being shown, FALSE otherwise.
1866 \membersection{wxShape::SetDraggable
}
1868 \func{void
}{SetDraggable
}{\param{bool
}{ drag
},
\param{bool
}{ recursive = FALSE
}}
1870 Sets the object to be draggable or not draggable.
1872 \membersection{wxShape::SetDrawHandles
}
1874 \func{void
}{SetDrawHandles
}{\param{bool
}{ drawH
}}
1876 Sets the
{\it drawHandles
} flag for this shape and all descendants. If
{\it drawH
} is TRUE (the default),
1877 any handles (control points) will be drawn. Otherwise, the handles will not be drawn.
1879 \membersection{wxShape::SetEventHandler
}
1881 \func{void
}{GetEventHandler
}{\param{wxShapeEvtHandler *
}{handler
}}
1883 Sets the event handler for this shape.
1885 \membersection{wxShape::SetFixedSize
}
1887 \func{void
}{SetFixedSize
}{\param{bool
}{ x
},
\param{bool
}{ y
}}
1889 Sets the object to be of the given, fixed size.
1891 \membersection{wxShape::SetFont
}
1893 \func{void
}{SetFont
}{\param{wxFont *
}{font
},
\param{int
}{ regionId =
0}}
1895 Sets the font for the specified text region.
1897 \membersection{wxShape::SetFormatMode
}\label{setformatmode
}
1899 \func{void
}{SetFormatMode
}{\param{int
}{ mode
},
\param{int
}{ regionId =
0}}
1901 Sets the format mode of the default text region. The argument can be a bit list
1904 \begin{description
}\itemsep=
0pt
1905 \item[FORMAT
\_NONE] No formatting.
1906 \item[FORMAT
\_CENTRE\_HORIZ] Horizontal centring.
1907 \item[FORMAT
\_CENTRE\_VERT] Vertical centring.
1910 \membersection{wxShape::SetHighlight
}
1912 \func{void
}{SetHighlight
}{\param{bool
}{ hi
},
\param{bool
}{ recurse = FALSE
}}
1914 Sets the highlight for a shape. Shape highlighting is unimplemented.
1916 \membersection{wxShape::SetId
}
1918 \func{void
}{SetId
}{\param{long
}{ id
}}
1920 Set the integer identifier for this shape.
1922 \membersection{wxShape::SetPen
}
1924 \func{void
}{SetPen
}{\param{wxPen *
}{pen
}}
1926 Sets the pen for drawing the object's outline.
1928 \membersection{wxShape::SetRegionName
}\label{setregionname
}
1930 \func{void
}{SetRegionName
}{\param{const wxString\&
}{name
},
\param{int
}{ regionId =
0}}
1932 Sets the name for this region. The name for a region is unique within the scope of the whole
1933 composite, whereas a region id is unique only for a single image.
1935 \membersection{wxShape::SetSensitivityFilter
}\label{setsensitivityfilter
}
1937 \func{void
}{SetSensitivityFilter
}{\param{int
}{ sens=OP
\_ALL},
\param{bool
}{ recursive = FALSE
}}
1939 Sets the object to be sensitive or insensitive to specific mouse operations.
1941 {\it sens
} is a bitlist of the following:
1943 \begin{itemize
}\itemsep=
0pt
1944 \item OP
\_CLICK\_LEFT
1945 \item OP
\_CLICK\_RIGHT
1946 \item OP
\_DRAG\_LEFT
1947 \item OP
\_DRAG\_RIGHT
1948 \item OP
\_ALL (equivalent to a combination of all the above).
1951 \membersection{wxShape::SetShadowMode
}\label{setshadowmode
}
1953 \func{void
}{SetShadowMode
}{\param{int
}{ mode
},
\param{bool
}{ redraw = FALSE
}}
1955 Sets the shadow mode (whether a shadow is drawn or not).
{\it mode
} can be one of
1958 \begin{description
}\itemsep=
0pt
1959 \item[SHADOW
\_NONE] No shadow (the default).
1960 \item[SHADOW
\_LEFT] Shadow on the left side.
1961 \item[SHADOW
\_RIGHT] Shadow on the right side.
1964 \membersection{wxShape::SetSize
}
1966 \func{void
}{SetSize
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{bool
}{ recursive = TRUE
}}
1968 Sets the object's size.
1970 \membersection{wxShape::SetSpaceAttachments
}
1972 \func{void
}{SetSpaceAttachments
}{\param{bool
}{ sp
}}
1974 Indicate whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they
1975 should join at a single point (FALSE).
1977 \membersection{wxShape::SetTextColour
}
1979 \func{void
}{SetTextColour
}{\param{const wxString\&
}{colour
},
\param{int
}{ regionId =
0}}
1981 Sets the colour for the specified text region.
1983 \membersection{wxShape::SetX
}
1985 \func{void
}{SetX
}{\param{float
}{ x
}}
1987 Sets the
{\it x
} position of the shape.
1989 \membersection{wxShape::SetX
}
1991 \func{void
}{SetY
}{\param{float
}{ y
}}
1993 Sets the
{\it y
} position of the shape.
1995 \membersection{wxShape::SpaceAttachments
}
1997 \func{void
}{SpaceAttachments
}{\param{bool
}{ sp
}}
1999 Sets the spacing mode: if TRUE, lines at the same attachment point will be
2000 spaced evenly across that side of the object. If false, all lines at the
2001 same attachment point will emanate from the same point.
2003 \membersection{wxShape::Show
}
2005 \func{void
}{Show
}{\param{bool
}{ show
}}
2007 Sets a flag indicating whether the object should be drawn.
2009 \membersection{wxShape::Unlink
}
2011 \func{void
}{Unlink
}{\void}
2013 If the shape is a line, unlinks the nodes attached to the object, removing itself from the list of
2014 lines for each of the `to' and `from' nodes.
2016 \membersection{wxShape::WritePrologAttributes
}
2018 \func{void
}{WritePrologAttributes
}{\param{PrologExpr *
}{clause
}}
2020 Writes the object's attributes (data member values) into the given expression.
2022 \membersection{wxShape::WriteRegions
}
2024 \func{void
}{WriteRegions
}{\param{PrologExpr *
}{clause
}}
2030 \section{\class{wxShapeCanvas
}: wxCanvas
}\label{wxshapecanvas
}
2032 A canvas for drawing diagrams on.
2034 \membersection{wxShapeCanvas::wxShapeCanvas
}
2036 \func{void
}{wxShapeCanvas
}{\void}
2040 \membersection{wxShapeCanvas::
\destruct{wxShapeCanvas
}}
2042 \func{void
}{\destruct{wxShapeCanvas
}}{\void}
2046 \membersection{wxShapeCanvas::AddShape
}
2048 \func{void
}{AddShape
}{\param{wxShape *
}{shape
},
\param{wxShape *
}{addAfter = NULL
}}
2050 Adds a shape to the diagram. If
{\it addAfter
} is non-NULL, the shape will be added after this
2053 \membersection{wxShapeCanvas::Clear
}
2055 \func{void
}{Clear
}{\void}
2057 Clears the device context associated with the diagram.
2059 \membersection{wxShapeCanvas::DrawOutline
}
2061 \func{void
}{DrawOutline
}{\param{float
}{ x1
},
\param{float
}{ y1
},
\param{float
}{ x2
},
\param{float
}{ y2
}}
2063 Draws an outline rectangle on the current device context.
2065 \membersection{wxShapeCanvas::FindShape
}
2067 \func{wxShape *
}{FindShape
}{\param{float
}{ x1
},
\param{float
}{ y
},
\param{int *
}{attachment
},
\param{wxClassInfo *
}{info = NULL
},
2068 \param{wxShape *
}{notImage = NULL
}}
2070 Find a shape under this mouse click. Returns the shape (or NULL), and the nearest attachment point.
2072 If
{\it info
} is non-NULL, a shape whose class which is a descendant of the desired class is found.
2074 If
{\it notImage
} is non-NULL, shapes which are descendants of
{\it notImage
} are ignored.
2076 \membersection{wxShapeCanvas::FindFirstSensitiveShape
}
2078 \func{wxShape *
}{FindFirstSensitiveShape
}{\param{float
}{ x1
},
\param{float
}{ y
},
\param{int *
}{attachment
},
\param{int
}{ op
}}
2080 Finds the first sensitive shape whose sensitivity filter matches
{\it op
}, working up the hierarchy of composites until
2081 one (or none) is found.
2083 \membersection{wxShapeCanvas::GetCanvas
}
2085 \func{wxCanvas *
}{GetCanvas
}{\void}
2087 Returns the canvas associated with this diagram.
2089 \membersection{wxShapeCanvas::GetDC
}
2091 \func{wxDC *
}{GetDC
}{\void}
2093 Returns the device context associated with this diagram.
2095 \membersection{wxShapeCanvas::GetGridSpacing
}
2097 \func{float
}{GetGridSpacing
}{\void}
2099 Returns the grid spacing.
2101 \membersection{wxShapeCanvas::GetMouseTolerance
}
2103 \func{int
}{GetMouseTolerance
}{\void}
2105 Returns the tolerance within which a mouse move is ignored.
2107 \membersection{wxShapeCanvas::GetShapeList
}
2109 \func{wxList *
}{GetShapeList
}{\void}
2111 Returns a pointer to the internal shape list.
2113 \membersection{wxShapeCanvas::GetQuickEditMode
}
2115 \func{bool
}{GetQuickEditMode
}{\void}
2117 Returns quick edit mode for the associated diagram.
2119 \membersection{wxShapeCanvas::InsertShape
}
2121 \func{void
}{InsertShape
}{\param{wxShape *
}{shape
}}
2123 Inserts a shape at the front of the shape list.
2125 \membersection{wxShapeCanvas::OnBeginDragLeft
}\label{onbegindragleft
}
2127 \func{void
}{OnBeginDragLeft
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0}}
2129 Called when the start of a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2130 by default it does nothing.
2132 {\it keys
} is a bit list of the following:
2134 \begin{itemize
}\itemsep=
0pt
2139 See also
\helpref{OnDragLeft
}{ondragleft
},
\helpref{OnEndDragLeft
}{onenddragleft
}.
2141 \membersection{wxShapeCanvas::OnBeginDragRight
}\label{onbegindragright
}
2143 \func{void
}{OnBeginDragRight
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0}}
2145 Called when the start of a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2146 by default it does nothing.
2148 {\it keys
} is a bit list of the following:
2150 \begin{itemize
}\itemsep=
0pt
2155 See also
\helpref{OnDragRight
}{ondragright
},
\helpref{OnEndDragRight
}{onenddragright
}.
2157 \membersection{wxShapeCanvas::OnEndDragLeft
}\label{onenddragleft
}
2159 \func{void
}{OnEndDragLeft
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0}}
2161 Called when the end of a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2162 by default it does nothing.
2164 {\it keys
} is a bit list of the following:
2166 \begin{itemize
}\itemsep=
0pt
2171 See also
\helpref{OnDragLeft
}{ondragleft
},
\helpref{OnBeginDragLeft
}{onbegindragleft
}.
2173 \membersection{wxShapeCanvas::OnEndDragRight
}\label{onenddragright
}
2175 \func{void
}{OnEndDragRight
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0}}
2177 Called when the end of a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2178 by default it does nothing.
2180 {\it keys
} is a bit list of the following:
2182 \begin{itemize
}\itemsep=
0pt
2187 See also
\helpref{OnDragRight
}{ondragright
},
\helpref{OnBeginDragRight
}{onbegindragright
}.
2189 \membersection{wxShapeCanvas::OnDragLeft
}\label{ondragleft
}
2191 \func{void
}{OnDragLeft
}{\param{bool
}{ draw
},
\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0}}
2193 Called when a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2194 by default it does nothing.
2196 {\it draw
} is alternately TRUE and FALSE, to assist drawing and erasing.
2198 {\it keys
} is a bit list of the following:
2200 \begin{itemize
}\itemsep=
0pt
2205 See also
\helpref{OnBeginDragLeft
}{onbegindragleft
},
\helpref{OnEndDragLeft
}{onenddragleft
}.
2207 \membersection{wxShapeCanvas::OnDragRight
}\label{ondragright
}
2209 \func{void
}{OnDragRight
}{\param{bool
}{ draw
},
\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0}}
2211 Called when a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2212 by default it does nothing.
2214 {\it draw
} is alternately TRUE and FALSE, to assist drawing and erasing.
2216 {\it keys
} is a bit list of the following:
2218 \begin{itemize
}\itemsep=
0pt
2223 See also
\helpref{OnBeginDragRight
}{onbegindragright
},
\helpref{OnEndDragRight
}{onenddragright
}.
2225 \membersection{wxShapeCanvas::OnLeftClick
}\label{onleftclick
}
2227 \func{void
}{OnLeftClick
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0}}
2229 Called when a left click event on the canvas background is detected by OnEvent. You may override this member;
2230 by default it does nothing.
2232 {\it keys
} is a bit list of the following:
2234 \begin{itemize
}\itemsep=
0pt
2239 \membersection{wxShapeCanvas::OnRightClick
}\label{onrightclick
}
2241 \func{void
}{OnRightClick
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0}}
2243 Called when a right click event on the canvas background is detected by OnEvent. You may override this member;
2244 by default it does nothing.
2246 {\it keys
} is a bit list of the following:
2248 \begin{itemize
}\itemsep=
0pt
2253 \membersection{wxShapeCanvas::Redraw
}
2255 \func{void
}{Redraw
}{\void}
2257 Calls wxDiagram::Redraw.
2259 \membersection{wxShapeCanvas::RemoveShape
}
2261 \func{void
}{RemoveShape
}{\param{wxShape *
}{shape
}}
2263 Calls wxDiagram::RemoveShape.
2265 \membersection{wxShapeCanvas::SetDiagram
}
2267 \func{void
}{SetDiagram
}{\param{wxDiagram *
}{diagram
}}
2269 Sets the diagram associated with this diagram.
2271 \membersection{wxShapeCanvas::Snap
}
2273 \func{void
}{Snap
}{\param{float *
}{x
},
\param{float *
}{y
}}
2275 Calls wxDiagram::Snap.
2279 \section{\class{wxShapeEvtHandler
}: wxObject
}\label{wxshapeevthandler
}
2281 wxShapeEvtHandler is a class from which wxShape (and therefore all shape classes) are derived.
2282 A wxShape also contains a pointer to its current wxShapeEvtHandler. Event handlers
2283 can be swapped in and out, altering the behaviour of a shape. This allows, for example,
2284 a range of behaviours to be redefined in one class, rather than requiring
2285 each shape class to be subclassed.
2287 \membersection{wxShapeEvtHandler::handlerShape
}
2289 \member{wxShape *
}{handlerShape
}
2291 Pointer to the shape associated with this handler.
2293 \membersection{wxShapeEvtHandler::previousHandler
}
2295 \member{wxShapeEvtHandler *
}{previousHandler
}
2297 Pointer to the previous handler.
2299 \membersection{wxShapeEvtHandler::wxShapeEvtHandler
}
2301 \func{void
}{wxShapeEvtHandler
}{\param{wxShapeEvtHandler *
}{previous = NULL
},
\param{wxShape *
}{shape = NULL
}}
2303 Constructs a new event handler.
2305 \membersection{wxShapeEvtHandler::
\destruct{wxShapeEvtHandler
}}
2307 \func{void
}{\destruct{wxShapeEvtHandler
}}{\void}
2311 \membersection{wxShapeEvtHandler::GetShape
}
2313 \func{void
}{GetShape
}{\void}
2315 Returns the shape associated with this handler.
2317 \membersection{wxShapeEvtHandler::OnBeginDragLeft
}
2319 \func{void
}{OnBeginDragLeft
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2321 Called when the user is beginning to drag using the left mouse button.
2323 \membersection{wxShapeEvtHandler::OnBeginDragRight
}
2325 \func{void
}{OnBeginDragRight
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2327 Called when the user is beginning to drag using the right mouse button.
2329 \membersection{wxShapeEvtHandler::OnBeginSize
}
2331 \func{void
}{OnBeginSize
}{\param{float
}{ width
},
\param{float
}{ height
}}
2333 Called when a shape starts to be resized.
2335 \membersection{wxShapeEvtHandler::OnDragLeft
}
2337 \func{void
}{OnDragLeft
}{\param{bool
}{ draw
},
\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2339 Called twice when the object is being dragged, once to allow erasing the old
2340 image, and again to allow drawing at the new position.
2342 \membersection{wxShapeEvtHandler::OnDragRight
}
2344 \func{void
}{OnDragRight
}{\param{bool
}{ draw
},
\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2346 Called twice when the object is being dragged, once to allow erasing the old
2347 image, and again to allow drawing at the new position.
2349 \membersection{wxShapeEvtHandler::OnDraw
}
2351 \func{void
}{OnDraw
}{\void}
2353 Defined for each class to draw the main graphic, but
2356 \membersection{wxShapeEvtHandler::OnDrawContents
}
2358 \func{void
}{OnDrawContents
}{\void}
2360 Defined for each class to draw the contents of the
2361 object, such as text.
2363 \membersection{wxShapeEvtHandler::OnDrawControlPoints
}
2365 \func{void
}{OnDrawControlPoints
}{\void}
2367 Called when the object's control points (handles) should
2370 \membersection{wxShapeEvtHandler::OnDrawOutline
}
2372 \func{void
}{OnDrawOutline
}{\void}
2374 Called when the outline of the object should be drawn.
2376 \membersection{wxShapeEvtHandler::OnEndDragLeft
}
2378 \func{void
}{OnEndDragLeft
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2380 Called when the user is stopping dragging using the left mouse button.
2382 \membersection{wxShapeEvtHandler::OnEndDragRight
}
2384 \func{void
}{OnEndDragRight
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2386 Called when the user is stopping dragging using the right mouse button.
2388 \membersection{wxShapeEvtHandler::OnEndSize
}
2390 \func{void
}{OnEndSize
}{\param{float
}{ width
},
\param{float
}{ height
}}
2392 Called after a shape is resized.
2394 \membersection{wxShapeEvtHandler::OnErase
}
2396 \func{void
}{OnErase
}{\void}
2398 Called when the whole object should be erased.
2400 \membersection{wxShapeEvtHandler::OnEraseContents
}
2402 \func{void
}{OnEraseContents
}{\void}
2404 Called when the contents should be erased.
2406 \membersection{wxShapeEvtHandler::OnEraseControlPoints
}
2408 \func{void
}{OnEraseControlPoints
}{\void}
2410 Called when the object's control points (handles) should
2413 \membersection{wxShapeEvtHandler::OnHighlight
}
2415 \func{void
}{OnHighlight
}{\void}
2417 Called when the object should be highlighted.
2419 \membersection{wxShapeEvtHandler::OnLeftClick
}
2421 \func{void
}{OnLeftClick
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0},
\param{int
}{ attachment =
0}}
2423 Called when the object receives a left mouse click event.
2425 \membersection{wxShapeEvtHandler::OnMove
}
2427 \func{void
}{OnMove
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{float
}{ oldX
},
\param{float
}{ oldY
},
\param{bool
}{ display = TRUE
}}
2429 Called when the object receives a move request.
2431 \membersection{wxShapeEvtHandler::OnMoveLink
}
2433 \func{void
}{OnMoveLink
}{\param{bool
}{ moveControlPoints=TRUE
}}
2435 Called when the line attached to an object need to be repositioned,
2436 because the object has moved.
2438 \membersection{wxShapeEvtHandler::OnMoveLinks
}
2440 \func{void
}{OnMoveLinks
}{\void}
2442 Called when the lines attached to an object need to be repositioned,
2443 because the object has moved.
2445 \membersection{wxShapeEvtHandler::OnMovePre
}
2447 \func{bool
}{OnMovePre
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{float
}{ oldX
},
\param{float
}{ oldY
},
\param{bool
}{ display = TRUE
}}
2449 Called just after the object receives a move request.
2451 \membersection{wxShapeEvtHandler::OnMovePre
}
2453 \func{bool
}{OnMovePre
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{float
}{ oldX
},
\param{float
}{ oldY
},
\param{bool
}{ display = TRUE
}}
2455 Called just before the object receives a move request. Returning TRUE
2456 allows the move to be processed; returning FALSE vetoes the move.
2458 \membersection{wxShapeEvtHandler::OnRightClick
}
2460 \func{void
}{OnRightClick
}{\param{float
}{ x
},
\param{float
}{ y
},
\param{int
}{ keys =
0},
\param{int
}{ attachment =
0}}
2462 Called when the object receives a mouse mouse click event.
2464 \membersection{wxShapeEvtHandler::OnSize
}
2466 \func{void
}{OnSize
}{\param{float
}{ x
},
\param{float
}{ y
}}
2468 Called when the object receives a resize request.
2472 \section{\class{wxTextShape
}: wxRectangleShape
}\label{wxtextshape
}
2474 As wxRectangleShape, but only the text is displayed.
2476 See also
\helpref{wxRectangleShape
}{wxrectangleshape
}.
2478 \membersection{wxTextShape::wxTextShape
}
2480 \func{void
}{wxTextShape
}{\param{float
}{ width =
0.0},
\param{float
}{ height =
0.0}}
2484 \membersection{wxTextShape::
\destruct{wxTextShape
}}
2486 \func{void
}{\destruct{wxTextShape
}}{\void}
2490 \section{Functions
}\label{functions
}
2492 These are the OGL functions.
2494 \membersection{::wxOGLInitialize
}
2496 \func{void
}{wxOGLInitialize
}{\param{wxHelpInstance *
}{helpInstance = NULL
},
\param{const wxString\&
}{helpFile = NULL
},
2497 \param{wxFont *
}{buttonFont = NULL
},
\param{wxFont *
}{labelFont = NULL
}}
2499 Initializes OGL. The optional parameters tell OGL what to use for on-line help and font sizes.
2501 \membersection{::wxOGLCleanUp
}
2503 \func{void
}{wxOGLCleanUp
}{\void}