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{wxOGLConstraint
}}\label{wxoglconstraint
}
9 \overview{wxCompositeShape overview
}{compositeshapeoverview
}
11 An wxOGLConstraint object helps specify how child shapes are laid out with respect
12 to siblings and parents.
14 \wxheading{Derived from
}
20 \helpref{wxCompositeShape
}{wxcompositeshape
}
22 \latexignore{\rtfignore{\wxheading{Members
}}}
24 \membersection{wxOGLConstraint::wxOGLConstraint
}\label{wxoglconstraintconstr
}
26 \func{}{wxOGLConstraint
}{\void}
30 \func{}{wxOGLConstraint
}{\param{int
}{ type
},
\param{wxShape *
}{constraining
},
\param{wxList\&
}{constrained
}}
34 \wxheading{Parameters
}
36 \docparam{constraining
}{The shape which is used as the reference for positioning the
{\it constrained
} objects.
}
38 \docparam{constrained
}{Contains a list of wxShapes which are to be constrained (with respect
39 to
{\it constraining
}) using
{\it type
}.
}
41 \docparam{type
}{Can be one of:
43 \begin{itemize
}\itemsep=
0pt
44 \item {\bf gyCONSTRAINT
\_CENTRED\_VERTICALLY}: the Y co-ordinates of the centres of the
45 bounding boxes of the constrained objects and the constraining object
47 \item {\bf gyCONSTRAINT
\_CENTRED\_HORIZONTALLY}: the X co-ordinates of the centres of the
48 bounding boxes of the constrained objects and the constraining object
50 \item {\bf gyCONSTRAINT
\_CENTRED\_BOTH}: the co-ordinates of the centres of the bounding boxes
51 of the constrained objects and the constraining object will be the same
52 \item {\bf gyCONSTRAINT
\_LEFT\_OF}: the X co-ordinates of the right hand vertical edges
53 of the bounding boxes of the constrained objects will be less than
54 the X co-ordinate of the left hand vertical edge of the bounding box
55 of the constraining object
56 \item {\bf gyCONSTRAINT
\_RIGHT\_OF}: the X co-ordinates of the left hand vertical edges
57 of the bounding boxes of the constrained objects will be greater than
58 the X co-ordinate of the right hand vertical edge of the bounding box
59 of the constraining object
60 \item {\bf gyCONSTRAINT
\_ABOVE}: the Y co-ordinates of the bottom horizontal edges of the
61 bounding boxes of the constrained objects will be less than the
62 Y co-ordinate of the top horizontal edge of the bounding box of the
64 \item {\bf gyCONSTRAINT
\_BELOW}: the Y co-ordinates of the top horizontal edges of the
65 bounding boxes of the constrained objects will be greater than
66 the X co-ordinate of the bottom horizontal edge of the bounding box
67 of the constraining object
68 \item {\bf gyCONSTRAINT
\_ALIGNED\_TOP}: the Y co-ordinates of the top horizontal edges of the
69 bounding boxes of the constrained objects will be the same as the
70 Y co-ordinate of the top horizontal edge of the bounding box of the
72 \item {\bf gyCONSTRAINT
\_ALIGNED\_BOTTOM}: the Y co-ordinates of the bottom horizontal edges
73 of the bounding boxes of the constrained objects will be the same as
74 the Y co-ordinate of the bottom horizontal edge of the bounding box
75 of the constraining object
76 \item {\bf gyCONSTRAINT
\_ALIGNED\_LEFT}: the X co-ordinates of the left hand vertical edges
77 of the bounding boxes of the constrained objects will be the same as
78 the X co-ordinate of the left hand vertical edge of the bounding box
79 of the constraining object
80 \item {\bf gyCONSTRAINT
\_ALIGNED\_RIGHT}: the X co-ordinates of the right hand vertical edges
81 of the bounding boxes of the constrained objects will be the same as
82 the X co-ordinate of the right hand vertical edge of the bounding box
83 of the constraining object
84 \item {\bf gyCONSTRAINT
\_MIDALIGNED\_TOP}: the Y co-ordinates of the centres of
85 the bounding boxes of the constrained objects will be the same
86 as the Y co-ordinate of the top horizontal edge of
87 the bounding box of the constraining object
88 \item {\bf gyCONSTRAINT
\_MIDALIGNED\_BOTTOM}: the Y co-ordinates of the centres of
89 the bounding boxes of the constrained objects will be the same
90 as the Y co-ordinate of the bottom horizontal edge of
91 the bounding box of the constraining object
92 \item {\bf gyCONSTRAINT
\_MIDALIGNED\_LEFT}: the X co-ordinates of the centres of
93 the bounding boxes of the constrained objects will be the same
94 as the X co-ordinate of the left hand vertical edge of
95 the bounding box of the constraining object
96 \item {\bf gyCONSTRAINT
\_MIDALIGNED\_RIGHT}: the X co-ordinates of the centres of
97 the bounding boxes of the constrained objects will be the same as
98 the X co-ordinate of the right hand vertical edge of
99 the bounding box of the constraining object
103 \membersection{wxOGLConstraint::
\destruct{wxOGLConstraint
}}
105 \func{}{\destruct{wxOGLConstraint
}}{\void}
109 \membersection{wxOGLConstraint::Equals
}
111 \func{bool
}{Equals
}{\param{double
}{ x
},
\param{double
}{ y
}}
113 Returns TRUE if
{\it x
} and
{\it y
} are approximately equal (for the purposes
114 of evaluating the constraint).
116 \membersection{wxOGLConstraint::Evaluate
}
118 \func{bool
}{Evaluate
}{\void}
120 Evaluates this constraint, returning TRUE if anything changed.
122 \membersection{wxOGLConstraint::SetSpacing
}\label{wxoglconstraintsetspacing
}
124 \func{void
}{SetSpacing
}{\param{double
}{ x
},
\param{double
}{ y
}}
126 Sets the horizontal and vertical spacing for the constraint.
128 \section{\class{wxBitmapShape
}}\label{wxbitmapshape
}
130 Draws a bitmap (non-resizable).
132 \wxheading{Derived from
}
134 \helpref{wxRectangleShape
}{wxrectangleshape
}
136 \latexignore{\rtfignore{\wxheading{Members
}}}
138 \membersection{wxBitmapShape::wxBitmapShape
}
140 \func{}{wxBitmapShape
}{\void}
144 \membersection{wxBitmapShape::
\destruct{wxBitmapShape
}}
146 \func{}{\destruct{wxBitmapShape
}}{\void}
150 \membersection{wxBitmapShape::GetBitmap
}
152 \constfunc{wxBitmap\&
}{GetBitmap
}{\void}
154 Returns a reference to the bitmap associated with this shape.
156 \membersection{wxBitmapShape::GetFilename
}
158 \constfunc{wxString
}{GetFilename
}{\void}
160 Returns the bitmap filename.
162 \membersection{wxBitmapShape::SetBitmap
}
164 \func{void
}{SetBitmap
}{\param{const wxBitmap\&
}{ bitmap
}}
166 Sets the bitmap associated with this shape. You can delete the bitmap
167 from the calling application, since reference counting will take care of
168 holding on to the internal bitmap data.
170 \membersection{wxBitmapShape::SetFilename
}
172 \func{void
}{SetFilename
}{\param{const wxString\&
}{filename
}}
174 Sets the bitmap filename.
176 \section{\class{wxDiagram
}}\label{wxdiagram
}
178 Encapsulates an entire diagram, with methods for reading/writing and drawing.
179 A diagram has an associated wxShapeCanvas.
181 \wxheading{Derived from
}
187 \helpref{wxShapeCanvas
}{wxshapecanvas
}
189 \latexignore{\rtfignore{\wxheading{Members
}}}
191 \membersection{wxDiagram::wxDiagram
}
193 \func{}{wxDiagram
}{\void}
197 \membersection{wxDiagram::
\destruct{wxDiagram
}}
199 \func{}{\destruct{wxDiagram
}}{\void}
203 \membersection{wxDiagram::AddShape
}
205 \func{void
}{AddShape
}{\param{wxShape*
}{shape
},
\param{wxShape *
}{addAfter = NULL
}}
207 Adds a shape to the diagram. If
{\it addAfter
} is non-NULL, the shape will be added after this
210 \membersection{wxDiagram::Clear
}
212 \func{void
}{Clear
}{\param{wxDC\&
}{ dc
}}
214 Clears the specified device context.
216 \membersection{wxDiagram::DeleteAllShapes
}
218 \func{void
}{DeletesAllShapes
}{\void}
220 Removes and deletes all shapes in the diagram.
222 \membersection{wxDiagram::DrawOutline
}
224 \func{void
}{DrawOutline
}{\param{wxDC\&
}{ dc
},
\param{double
}{ x1
},
\param{double
}{ y1
},
\param{double
}{ x2
},
\param{double
}{ y2
}}
226 Draws an outline rectangle on the current device context.
228 \membersection{wxDiagram::FindShape
}\label{wxdiagramfindshape
}
230 \constfunc{wxShape*
}{FindShape
}{\param{long
}{ id
}}
232 Returns the shape for the given identifier.
234 \membersection{wxDiagram::GetCanvas
}
236 \constfunc{wxShapeCanvas*
}{GetCanvas
}{\void}
238 Returns the shape canvas associated with this diagram.
240 \membersection{wxDiagram::GetCount
}\label{wxdiagramgetcount
}
242 \constfunc{int
}{GetCount
}{\void}
244 Returns the number of shapes in the diagram.
246 \membersection{wxDiagram::GetGridSpacing
}
248 \constfunc{double
}{GetGridSpacing
}{\void}
250 Returns the grid spacing.
252 \membersection{wxDiagram::GetMouseTolerance
}
254 \func{int
}{GetMouseTolerance
}{\void}
256 Returns the tolerance within which a mouse move is ignored.
258 \membersection{wxDiagram::GetShapeList
}
260 \constfunc{wxList*
}{GetShapeList
}{\void}
262 Returns a pointer to the internal shape list.
264 \membersection{wxDiagram::GetQuickEditMode
}
266 \constfunc{bool
}{GetQuickEditMode
}{\void}
268 Returns quick edit mode.
270 \membersection{wxDiagram::GetSnapToGrid
}
272 \constfunc{bool
}{GetSnapToGrid
}{\void}
274 Returns snap-to-grid mode.
276 \membersection{wxDiagram::InsertShape
}
278 \func{void
}{InsertShape
}{\param{wxShape *
}{shape
}}
280 Inserts a shape at the front of the shape list.
282 \membersection{wxDiagram::LoadFile
}
284 \func{bool
}{LoadFile
}{\param{const wxString\&
}{filename
}}
286 Loads the diagram from a file.
288 \membersection{wxDiagram::OnDatabaseLoad
}
290 \func{void
}{OnDatabaseLoad
}{\param{wxExprDatabase\&
}{ database
}}
292 Called just after the nodes and lines have been read from the wxExprDatabase. You may override this;
293 the default member does nothing.
295 \membersection{wxDiagram::OnDatabaseSave
}
297 \func{void
}{OnDatabaseSave
}{\param{wxExprDatabase\&
}{ database
}}
299 Called just after the nodes and lines have been written to the wxExprDatabase. You may override this;
300 the default member does nothing.
302 \membersection{wxDiagram::OnHeaderLoad
}
304 \func{bool
}{OnHeaderLoad
}{\param{wxExprDatabase\&
}{ database
},
\param{wxExpr\&
}{ expr
}}
306 Called to allow the `diagram' header object to be read. The default member reads no further information.
307 You may wish to override this to read version information, author name, etc.
309 \membersection{wxDiagram::OnHeaderSave
}
311 \func{bool
}{OnHeaderSave
}{\param{wxExprDatabase\&
}{ database
},
\param{wxExpr\&
}{ expr
}}
313 Called to allow instantiation of the `diagram' header object. The default member writes no further information.
314 You may wish to override this to include version information, author name, etc.
316 \membersection{wxDiagram::OnShapeLoad
}
318 \func{bool
}{OnShapeLoad
}{\param{wxExprDatabase\&
}{ database
},
\param{wxShape\&
}{ shape
},
\param{wxExpr\&
}{ expr
}}
320 Called to read the shape from the
{\it expr
}. You may override this, but call this function first.
321 The default member calls ReadAttributes for the shape.
323 \membersection{wxDiagram::OnShapeSave
}
325 \func{bool
}{OnShapeSave
}{\param{wxExprDatabase\&
}{ database
},
\param{wxShape\&
}{ shape
},
\param{wxExpr\&
}{ expr
}}
327 Called to save the shape to the
{\it expr
} and
{\it database
}. You may override this, but call this function first.
328 The default member calls WriteAttributes for the shape, appends the shape to the database, and of the shape
329 is a composite, recursively calls OnShapeSave for its children.
331 \membersection{wxDiagram::ReadContainerGeometry
}
333 \func{void
}{ReadContainerGeometry
}{\param{wxExprDatabase\&
}{ database
}}
335 Reads container geometry from a wxExprDatabase, linking up nodes which
336 are part of a composite. You probably won't need to redefine this.
338 \membersection{wxDiagram::ReadLines
}
340 \func{void
}{ReadLines
}{\param{wxExprDatabase\&
}{ database
}}
342 Reads lines from a wxExprDatabase. You probably won't need to redefine this.
344 \membersection{wxDiagram::ReadNodes
}
346 \func{void
}{ReadNodes
}{\param{wxExprDatabase\&
}{ database
}}
348 Reads nodes from a wxExprDatabase. You probably won't need to redefine this.
350 \membersection{wxDiagram::RecentreAll
}
352 \func{void
}{RecentreAll
}{\param{wxDC\&
}{ dc
}}
354 Make sure all text that should be centred, is centred.
356 \membersection{wxDiagram::Redraw
}
358 \func{void
}{Redraw
}{\param{wxDC\&
}{ dc
}}
360 Draws the shapes in the diagram on the specified device context.
362 \membersection{wxDiagram::RemoveAllShapes
}
364 \func{void
}{RemoveAllShapes
}{\void}
366 Removes all shapes from the diagram but does not delete the shapes.
368 \membersection{wxDiagram::RemoveShape
}
370 \func{void
}{RemoveShape
}{\param{wxShape*
}{ shape
}}
372 Removes the shape from the diagram (non-recursively) but does not delete it.
374 \membersection{wxDiagram::SaveFile
}
376 \func{bool
}{SaveFile
}{\param{const wxString\&
}{filename
}}
378 Saves the diagram in a file.
380 \membersection{wxDiagram::SetCanvas
}\label{wxdiagramsetcanvas
}
382 \func{void
}{SetCanvas
}{\param{wxShapeCanvas*
}{ canvas
}}
384 Sets the canvas associated with this diagram.
386 \membersection{wxDiagram::SetGridSpacing
}
388 \func{void
}{SetGridSpacing
}{\param{double
}{ spacing
}}
390 Sets the grid spacing. The default is
5.
392 \membersection{wxDiagram::SetMouseTolerance
}
394 \func{void
}{SetMouseTolerance
}{\param{int
}{ tolerance
}}
396 Sets the tolerance within which a mouse move is ignored. The default is
3 pixels.
398 \membersection{wxDiagram::SetQuickEditMode
}
400 \func{void
}{SetQuickEditMode
}{\param{bool
}{ mode
}}
402 Sets quick-edit-mode on or off. In this mode, refreshes are minimized, but the
403 diagram may need manual refreshing occasionally.
405 \membersection{wxDiagram::SetSnapToGrid
}
407 \func{void
}{SetSnapToGrid
}{\param{bool
}{ snap
}}
409 Sets snap-to-grid mode on or off. The default is on.
411 \membersection{wxDiagram::ShowAll
}
413 \func{void
}{ShowAll
}{\param{bool
}{ show
}}
415 Calls Show for each shape in the diagram.
417 \membersection{wxDiagram::Snap
}
419 \func{void
}{Snap
}{\param{double *
}{x
},
\param{double *
}{y
}}
421 `Snaps' the coordinate to the nearest grid position, if snap-to-grid is on.
423 \section{\class{wxDrawnShape
}}\label{wxdrawnshape
}
425 Draws a pseduo-metafile shape, which can be loaded from a simple Windows metafile.
427 wxDrawnShape allows you to specify a different shape for each of four orientations (North, West,
428 South and East). It also provides a set of drawing functions for programmatic drawing of a shape,
429 so that during construction of the shape you can draw into it as if it were a device context.
431 \wxheading{Derived from
}
433 \helpref{wxRectangleShape
}{wxrectangleshape
}
435 See also
\helpref{wxRectangleShape
}{wxrectangleshape
}.
437 \latexignore{\rtfignore{\wxheading{Members
}}}
439 \membersection{wxDrawnShape::wxDrawnShape
}
441 \func{}{wxDrawnShape
}{\void}
445 \membersection{wxDrawnShape::
\destruct{wxDrawnShape
}}
447 \func{}{\destruct{wxDrawnShape
}}{\void}
451 \membersection{wxDrawnShape::CalculateSize
}
453 \func{void
}{CalculateSize
}{\void}
455 Calculates the wxDrawnShape size from the current metafile. Call this after you have drawn
458 \membersection{wxDrawnShape::DestroyClippingRect
}\label{wxdrawnshapedestroyclippingrect
}
460 \func{void
}{DestroyClippingRect
}{\void}
462 Destroys the clipping rectangle. See also
\helpref{wxDrawnShape::SetClippingRect
}{wxdrawnshapesetclippingrect
}.
464 \membersection{wxDrawnShape::DrawArc
}\label{wxdrawnshapedrawarc
}
466 \func{void
}{DrawArc
}{\param{const wxPoint\&
}{ centrePoint
},
\param{const wxPoint\&
}{ startPoint
},
467 \param{const wxPoint\&
}{ endPoint
}}
469 Draws an arc (see wxWindows documentation for details).
471 \membersection{wxDrawnShape::DrawAtAngle
}\label{wxdrawnshapedrawatangle
}
473 \func{void
}{DrawAtAngle
}{\param{int
}{ angle
}}
475 Sets the metafile for the given orientation, which can be one of:
477 \begin{itemize
}\itemsep=
0pt
478 \item oglDRAWN
\_ANGLE\_0
479 \item oglDRAWN
\_ANGLE\_90
480 \item oglDRAWN
\_ANGLE\_180
481 \item oglDRAWN
\_ANGLE\_270
484 See also
\helpref{wxDrawnShape::GetAngle
}{wxdrawnshapegetangle
}.
486 \membersection{wxDrawnShape::DrawEllipticArc
}\label{wxdrawnshapedrawellipticarc
}
488 \func{void
}{DrawEllipticArc
}{\param{const wxRect\&
}{ rect
},
\param{double
}{ startAngle
},
\param{double
}{ endAngle
}}
490 Draws an elliptic arc (see wxWindows documentation for details).
492 \membersection{wxDrawnShape::DrawLine
}\label{wxdrawnshapedrawline
}
494 \func{void
}{DrawLine
}{\param{const wxPoint\&
}{ point1
},
\param{const wxPoint\&
}{ point2
}}
496 Draws a line from
{\it point1
} to
{\it point2
}.
498 \membersection{wxDrawnShape::DrawLines
}\label{wxdrawnshapedrawlines
}
500 \func{void
}{DrawLines
}{\param{int
}{ n
},
\param{wxPoint\&
}{ points
[]}}
504 \membersection{wxDrawnShape::DrawPoint
}\label{wxdrawnshapedrawpoint
}
506 \func{void
}{DrawPoint
}{\param{const wxPoint\&
}{ point
}}
510 \membersection{wxDrawnShape::DrawPolygon
}\label{wxdrawnshapedrawpolygon
}
512 \func{void
}{DrawPolygon
}{\param{int
}{ n
},
\param{wxPoint\&
}{ points
[]},
\param{int
}{ flags =
0}}
514 Draws a polygon.
{\it flags
} can be one or more of
{\bf oglMETAFLAGS
\_OUTLINE} (use this polygon for the drag outline)
515 and
{\bf oglMETAFLAGS
\_ATTACHMENTS} (use the vertices of this polygon for attachments).
517 \membersection{wxDrawnShape::DrawRectangle
}\label{wxdrawnshapedrawrectangle
}
519 \func{void
}{DrawRectangle
}{\param{const wxRect\&
}{ rect
}}
523 \membersection{wxDrawnShape::DrawRoundedRectangle
}\label{wxdrawnshapedrawroundedrectangle
}
525 \func{void
}{DrawRoundedRectangle
}{\param{const wxRect\&
}{ rect
},
\param{double
}{ radius
}}
527 Draws a rounded rectangle.
{\it radius
} is the corner radius. If
{\it radius
} is negative,
528 it expresses the radius as a proportion of the smallest dimension of the rectangle.
530 \membersection{wxDrawnShape::DrawSpline
}\label{wxdrawnshapedrawspline
}
532 \func{void
}{DrawSpline
}{\param{int
}{ n
},
\param{wxPoint\&
}{ points
[]}}
534 Draws a spline curve.
536 \membersection{wxDrawnShape::DrawText
}\label{wxdrawnshapedrawtext
}
538 \func{void
}{DrawText
}{\param{const wxString\&
}{ text
},
\param{const wxPoint\&
}{ point
}}
540 Draws text at the given point.
542 \membersection{wxDrawnShape::GetAngle
}\label{wxdrawnshapegetangle
}
544 \constfunc{int
}{GetAngle
}{\void}
546 Returns the current orientation, which can be one of:
548 \begin{itemize
}\itemsep=
0pt
549 \item oglDRAWN
\_ANGLE\_0
550 \item oglDRAWN
\_ANGLE\_90
551 \item oglDRAWN
\_ANGLE\_180
552 \item oglDRAWN
\_ANGLE\_270
555 See also
\helpref{wxDrawnShape::DrawAtAngle
}{wxdrawnshapedrawatangle
}.
557 \membersection{wxDrawnShape::GetMetaFile
}
559 \constfunc{wxPseudoMetaFile\&
}{GetMetaFile
}{\void}
561 Returns a reference to the internal `pseudo-metafile'.
563 \membersection{wxDrawnShape::GetRotation
}\label{wxdrawnshapegetrotation
}
565 \constfunc{double
}{GetRotation
}{\void}
567 Returns the current rotation of the shape in radians.
569 \membersection{wxDrawnShape::LoadFromMetaFile
}
571 \func{bool
}{LoadFromMetaFile
}{\param{const wxString\&
}{filename
}}
573 Loads a (very simple) Windows metafile, created for example by Top Draw, the Windows shareware graphics package.
575 \membersection{wxDrawnShape::Rotate
}
577 \func{void
}{Rotate
}{\param{double
}{x
},
\param{double
}{y
},
\param{double
}{theta
}}
579 Rotate about the given axis by the given amount in radians.
581 \membersection{wxDrawnShape::SetClippingRect
}\label{wxdrawnshapesetclippingrect
}
583 \func{void
}{SetClippingRect
}{\param{const wxRect\&
}{ rect
}}
585 Sets the clipping rectangle. See also
\helpref{wxDrawnShape::DestroyClippingRect
}{wxdrawnshapedestroyclippingrect
}.
587 \membersection{wxDrawnShape::SetDrawnBackgroundColour
}\label{wxdrawnshapesetdrawnbackgroundcolour
}
589 \func{void
}{SetDrawnBackgroundColour
}{\param{const wxColour\&
}{ colour
}}
591 Sets the current background colour for the current metafile.
593 \membersection{wxDrawnShape::SetDrawnBackgroundMode
}\label{wxdrawnshapesetdrawnbackgroundmode
}
595 \func{void
}{SetDrawnBackgroundMode
}{\param{int
}{ mode
}}
597 Sets the current background mode for the current metafile.
599 \membersection{wxDrawnShape::SetDrawnBrush
}\label{wxdrawnshapesetdrawnbrush
}
601 \func{void
}{SetDrawnBrush
}{\param{wxPen*
}{ pen
},
\param{bool
}{ isOutline = FALSE
}}
603 Sets the pen for this metafile. If
{\it isOutline
} is TRUE, this pen is taken to indicate the outline
604 (and if the outline pen is changed for the whole shape, the pen will be replaced with the outline pen).
606 \membersection{wxDrawnShape::SetDrawnFont
}\label{wxdrawnshapesetdrawnfont
}
608 \func{void
}{SetDrawnFont
}{\param{wxFont*
}{ font
}}
610 Sets the current font for the current metafile.
612 \membersection{wxDrawnShape::SetDrawnPen
}\label{wxdrawnshapesetdrawnpen
}
614 \func{void
}{SetDrawnPen
}{\param{wxPen*
}{ pen
},
\param{bool
}{ isOutline = FALSE
}}
616 Sets the pen for this metafile. If
{\it isOutline
} is TRUE, this pen is taken to indicate the outline
617 (and if the outline pen is changed for the whole shape, the pen will be replaced with the outline pen).
619 \membersection{wxDrawnShape::SetDrawnTextColour
}\label{wxdrawnshapesetdrawntextcolour
}
621 \func{void
}{SetDrawnTextColour
}{\param{const wxColour\&
}{ colour
}}
623 Sets the current text colour for the current metafile.
625 \membersection{wxDrawnShape::Scale
}
627 \func{void
}{Scale
}{\param{double
}{sx
},
\param{double
}{sy
}}
629 Scales the shape by the given amount.
631 \membersection{wxDrawnShape::SetSaveToFile
}
633 \func{void
}{SetSaveToFile
}{\param{bool
}{save
}}
635 If
{\it save
} is TRUE, the image will be saved along with the shape's other attributes. The reason
636 why this might not be desirable is that if there are many shapes with the same image, it would be
637 more efficient for the application to save one copy, and not duplicate the information for every
638 shape. The default is TRUE.
640 \membersection{wxDrawnShape::Translate
}
642 \func{void
}{Translate
}{\param{double
}{x
},
\param{double
}{y
}}
644 Translates the shape by the given amount.
646 \section{\class{wxCircleShape
}}\label{wxcircleshape
}
648 An wxEllipseShape whose width and height are the same.
650 \wxheading{Derived from
}
652 \helpref{wxEllipseShape
}{wxellipseshape
}.
654 \latexignore{\rtfignore{\wxheading{Members
}}}
656 \membersection{wxCircleShape::wxCircleShape
}
658 \func{}{wxCircleShape
}{\param{double
}{ width =
0.0}}
662 \membersection{wxCircleShape::
\destruct{wxCircleShape
}}
664 \func{}{\destruct{wxCircleShape
}}{\void}
668 \section{\class{wxCompositeShape
}}\label{wxcompositeshape
}
670 This is an object with a list of child objects, and a list of size
671 and positioning constraints between the children.
673 \wxheading{Derived from
}
675 \helpref{wxRectangleShape
}{wxrectangleshape
}
679 \helpref{wxCompositeShape overview
}{compositeshapeoverview
}
681 \latexignore{\rtfignore{\wxheading{Members
}}}
683 \membersection{wxCompositeShape::wxCompositeShape
}
685 \func{}{wxCompositeShape
}{\void}
689 \membersection{wxCompositeShape::
\destruct{wxCompositeShape
}}
691 \func{}{\destruct{wxCompositeShape
}}{\void}
695 \membersection{wxCompositeShape::AddChild
}\label{wxcompositeshapeaddchild
}
697 \func{void
}{AddChild
}{\param{wxShape *
}{child
},
\param{wxShape *
}{addAfter = NULL
}}
699 Adds a child shape to the composite. If
{\it addAfter
} is non-NULL, the shape will be added
702 \membersection{wxCompositeShape::AddConstraint
}\label{wxcompositeshapeaddconstraint
}
704 \func{wxOGLConstraint *
}{AddConstraint
}{\param{wxOGLConstraint *
}{constraint
}}
706 \func{wxOGLConstraint *
}{AddConstraint
}{\param{int
}{ type
},
\param{wxShape *
}{constraining
},
\param{wxList\&
}{constrained
}}
708 \func{wxOGLConstraint *
}{AddConstraint
}{\param{int
}{ type
},
\param{wxShape *
}{constraining
},
\param{wxShape *
}{constrained
}}
710 Adds a constraint to the composite.
712 \membersection{wxCompositeShape::CalculateSize
}
714 \func{void
}{CalculateSize
}{\void}
716 Calculates the size and position of the composite based on child sizes and positions.
718 \membersection{wxCompositeShape::ContainsDivision
}
720 \func{bool
}{FindContainerImage
}{\param{wxDivisionShape *
}{division
}}
722 Returns TRUE if
{\it division
} is a descendant of this container.
724 \membersection{wxCompositeShape::DeleteConstraint
}
726 \func{void
}{DeleteConstraint
}{\param{wxOGLConstraint *
}{constraint
}}
728 Deletes constraint from composite.
730 \membersection{wxCompositeShape::DeleteConstraintsInvolvingChild
}
732 \func{void
}{DeleteConstraintsInvolvingChild
}{\param{wxShape *
}{child
}}
734 This function deletes constraints which mention the given child. Used when
735 deleting a child from the composite.
737 \membersection{wxCompositeShape::FindConstraint
}
739 \func{wxOGLConstraint *
}{FindConstraint
}{\param{long
}{ id
},
\param{wxCompositeShape **
}{actualComposite
}}
741 Finds the constraint with the given id, also returning the actual composite the constraint was in,
742 in case that composite was a descendant of this composite.
744 \membersection{wxCompositeShape::FindContainerImage
}
746 \func{wxShape *
}{FindContainerImage
}{\void}
748 Finds the image used to visualize a container. This is any child
749 of the composite that is not in the divisions list.
751 \membersection{wxCompositeShape::GetConstraints
}
753 \constfunc{wxList\&
}{GetConstraints
}{\void}
755 Returns a reference to the list of constraints.
757 \membersection{wxCompositeShape::GetDivisions
}
759 \constfunc{wxList\&
}{GetDivisions
}{\void}
761 Returns a reference to the list of divisions.
763 \membersection{wxCompositeShape::MakeContainer
}\label{wxcompositeshapemakecontainer
}
765 \func{void
}{MakeContainer
}{\void}
767 Makes this composite into a container by creating one child wxDivisionShape.
769 \membersection{wxCompositeShape::OnCreateDivision
}
771 \func{wxDivisionShape *
}{OnCreateDivision
}{\void}
773 Called when a new division shape is required. Can be overriden to allow an application
774 to use a different class of division.
776 \membersection{wxCompositeShape::Recompute
}\label{wxcompositeshaperecompute
}
778 \func{bool
}{Recompute
}{\void}
780 Recomputes any constraints associated with the object. If FALSE is returned,
781 the constraints could not be satisfied (there was an inconsistency).
783 \membersection{wxCompositeShape::RemoveChild
}
785 \func{void
}{RemoveChild
}{\param{wxShape *
}{child
}}
787 Removes the child from the composite and any constraint relationships, but does not
790 \section{\class{wxDividedShape
}}\label{wxdividedshape
}
792 A wxDividedShape is a rectangle with a number of vertical divisions. Each
793 division may have its text formatted with independent characteristics, and
794 the size of each division relative to the whole image may be specified.
796 \wxheading{Derived from
}
798 \helpref{wxRectangleShape
}{wxrectangleshape
}
802 \helpref{wxDividedShape overview
}{dividedshapeoverview
}
804 \latexignore{\rtfignore{\wxheading{Members
}}}
806 \membersection{wxDividedShape::wxDividedShape
}
808 \func{}{wxDividedShape
}{\param{double
}{ width =
0.0},
\param{double
}{ height =
0.0}}
812 \membersection{wxDividedShape::
\destruct{wxDividedShape
}}
814 \func{}{\destruct{wxDividedShape
}}{\void}
818 \membersection{wxDividedShape::EditRegions
}
820 \func{void
}{EditRegions
}{\void}
822 Edit the region colours and styles.
824 \membersection{wxDividedShape::SetRegionSizes
}
826 \func{void
}{SetRegionSizes
}{\void}
828 Set all region sizes according to proportions and
829 this object total size.
831 \section{\class{wxDivisionShape
}}\label{wxdivisionshape
}
833 A division shape is like a composite in that it can contain further objects, but is used exclusively to
834 divide another shape into regions, or divisions. A wxDivisionShape is never free-standing.
836 \wxheading{Derived from
}
838 \helpref{wxCompositeShape
}{wxcompositeshape
}
842 \helpref{wxCompositeShape overview
}{compositeshapeoverview
}
844 \latexignore{\rtfignore{\wxheading{Members
}}}
846 \membersection{wxDivisionShape::wxDivisionShape
}
848 \func{}{wxDivisionShape
}{\void}
852 \membersection{wxDivisionShape::
\destruct{wxDivisionShape
}}
854 \func{}{\destruct{wxDivisionShape
}}{\void}
858 \membersection{wxDivisionShape::AdjustBottom
}
860 \func{void
}{AdjustBottom
}{\param{double
}{ bottom
},
\param{bool
}{ test
}}
862 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
864 \membersection{wxDivisionShape::AdjustLeft
}
866 \func{void
}{AdjustLeft
}{\param{double
}{ left
},
\param{bool
}{ test
}}
868 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
870 \membersection{wxDivisionShape::AdjustRight
}
872 \func{void
}{AdjustRight
}{\param{double
}{ right
},
\param{bool
}{ test
}}
874 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
876 \membersection{wxDivisionShape::AdjustTop
}
878 \func{void
}{AdjustTop
}{\param{double
}{ top
},
\param{bool
}{ test
}}
880 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
882 \membersection{wxDivisionShape::Divide
}\label{wxdivisionshapedivide
}
884 \func{void
}{Divide
}{\param{int
}{ direction
}}
886 Divide this division into two further divisions, horizontally (
{\it direction
} is wxHORIZONTAL) or
887 vertically (
{\it direction
} is wxVERTICAL).
889 \membersection{wxDivisionShape::EditEdge
}
891 \func{void
}{EditEdge
}{\param{int
}{ side
}}
893 Interactively edit style of left or top side.
895 \membersection{wxDivisionShape::GetBottomSide
}
897 \func{wxDivisionShape *
}{GetBottomSide
}{\void}
899 Returns a pointer to the division on the bottom side of this division.
901 \membersection{wxDivisionShape::GetHandleSide
}
903 \func{int
}{GetHandleSide
}{\void}
905 Returns the side which the handle appears on (DIVISION
\_SIDE\_LEFT or DIVISION
\_SIDE\_TOP).
907 \membersection{wxDivisionShape::GetLeftSide
}
909 \func{wxDivisionShape *
}{GetLeftSide
}{\void}
911 Returns a pointer to the division on the left side of this division.
913 \membersection{wxDivisionShape::GetLeftSideColour
}
915 \func{wxString
}{GetLeftSideColour
}{\void}
917 Returns a pointer to the colour used for drawing the left side of the division.
919 \membersection{wxDivisionShape::GetLeftSidePen
}
921 \func{wxPen *
}{GetLeftSidePen
}{\void}
923 Returns a pointer to the pen used for drawing the left side of the division.
925 \membersection{wxDivisionShape::GetRightSide
}
927 \func{wxDivisionShape *
}{GetRightSide
}{\void}
929 Returns a pointer to the division on the right side of this division.
931 \membersection{wxDivisionShape::GetTopSide
}
933 \func{wxDivisionShape *
}{GetTopSide
}{\void}
935 Returns a pointer to the division on the top side of this division.
937 \membersection{wxDivisionShape::GetTopSideColour
}
939 \func{wxString
}{GetTopSideColour
}{\void}
941 Returns a pointer to the colour used for drawing the top side of the division.
943 \membersection{wxDivisionShape::GetTopSidePen
}
945 \func{wxPen *
}{GetTopSidePen
}{\void}
947 Returns a pointer to the pen used for drawing the left side of the division.
949 \membersection{wxDivisionShape::ResizeAdjoining
}
951 \func{void
}{ResizeAdjoining
}{\param{int
}{ side
},
\param{double
}{ newPos
},
\param{bool
}{ test
}}
953 Resize adjoining divisions at the given side. If
{\it test
} is TRUE,
954 just see whether it's possible for each adjoining region,
955 returning FALSE if it's not.
957 {\it side
} can be one of:
959 \begin{itemize
}\itemsep=
0pt
960 \item DIVISION
\_SIDE\_NONE
961 \item DIVISION
\_SIDE\_LEFT
962 \item DIVISION
\_SIDE\_TOP
963 \item DIVISION
\_SIDE\_RIGHT
964 \item DIVISION
\_SIDE\_BOTTOM
967 \membersection{wxDivisionShape::PopupMenu
}
969 \func{void
}{PopupMenu
}{\param{double
}{ x
},
\param{double
}{ y
}}
971 Popup the division menu.
973 \membersection{wxDivisionShape::SetBottomSide
}
975 \func{void
}{SetBottomSide
}{\param{wxDivisionShape *
}{shape
}}
977 Set the pointer to the division on the bottom side of this division.
979 \membersection{wxDivisionShape::SetHandleSide
}
981 \func{int
}{SetHandleSide
}{\void}
983 Sets the side which the handle appears on (DIVISION
\_SIDE\_LEFT or DIVISION
\_SIDE\_TOP).
985 \membersection{wxDivisionShape::SetLeftSide
}
987 \func{void
}{SetLeftSide
}{\param{wxDivisionShape *
}{shape
}}
989 Set the pointer to the division on the left side of this division.
991 \membersection{wxDivisionShape::SetLeftSideColour
}
993 \func{void
}{SetLeftSideColour
}{\param{const wxString\&
}{colour
}}
995 Sets the colour for drawing the left side of the division.
997 \membersection{wxDivisionShape::SetLeftSidePen
}
999 \func{void
}{SetLeftSidePen
}{\param{wxPen *
}{pen
}}
1001 Sets the pen for drawing the left side of the division.
1003 \membersection{wxDivisionShape::SetRightSide
}
1005 \func{void
}{SetRightSide
}{\param{wxDivisionShape *
}{shape
}}
1007 Set the pointer to the division on the right side of this division.
1009 \membersection{wxDivisionShape::SetTopSide
}
1011 \func{void
}{SetTopSide
}{\param{wxDivisionShape *
}{shape
}}
1013 Set the pointer to the division on the top side of this division.
1015 \membersection{wxDivisionShape::SetTopSideColour
}
1017 \func{void
}{SetTopSideColour
}{\param{const wxString\&
}{colour
}}
1019 Sets the colour for drawing the top side of the division.
1021 \membersection{wxDivisionShape::SetTopSidePen
}
1023 \func{void
}{SetTopSidePen
}{\param{wxPen *
}{pen
}}
1025 Sets the pen for drawing the top side of the division.
1027 \section{\class{wxEllipseShape
}}\label{wxellipseshape
}
1029 The wxEllipseShape behaves similarly to the wxRectangleShape but is
1032 \wxheading{Derived from
}
1034 \helpref{wxShape
}{wxshape
}
1036 \latexignore{\rtfignore{\wxheading{Members
}}}
1038 \membersection{wxEllipseShape::wxEllipseShape
}
1040 \func{}{wxEllipseShape
}{\param{double
}{ width =
0.0},
\param{double
}{ height =
0.0}}
1044 \membersection{wxEllipseShape::
\destruct{wxEllipseShape
}}
1046 \func{}{\destruct{wxEllipseShape
}}{\void}
1050 \section{\class{wxLineShape
}}\label{wxlineshape
}
1052 A wxLineShape may be attached to two nodes; it may be segmented, in which
1053 case a control point is drawn for each joint.
1055 A wxLineShape may have arrows at the beginning, end and centre.
1057 \wxheading{Derived from
}
1059 \helpref{wxShape
}{wxshape
}
1061 \latexignore{\rtfignore{\wxheading{Members
}}}
1063 \membersection{wxLineShape::wxLineShape
}
1065 \func{}{wxLineShape
}{\void}
1069 Usually you will call
\helpref{wxLineShape::MakeLineControlPoints
}{wxlineshapemakelinecontrolpoints
} to
1070 specify the number of segments in the line.
1072 \membersection{wxLineShape::
\destruct{wxLineShape
}}
1074 \func{}{\destruct{wxLineShape
}}{\void}
1078 \membersection{wxLineShape::AddArrow
}\label{wxlineshapeaddarrow
}
1080 \func{void
}{AddArrow
}{\param{WXTYPE
}{ type
},
\param{bool
}{ end = ARROW
\_POSITION\_END},
\param{double
}{ arrowSize =
10.0},
1081 \param{double
}{ xOffset =
0.0},
\param{const wxString\&
}{name = ""
},
\param{wxPseudoMetaFile *
}{mf = NULL
},
\param{long
}{ arrowId = -
1}}
1083 Adds an arrow (or annotation) to the line.
1085 {\it type
} may currently be one of:
1087 \begin{description
}\itemsep=
0pt
1088 \item[ARROW
\_HOLLOW\_CIRCLE] Hollow circle.
1089 \item[ARROW
\_FILLED\_CIRCLE] Filled circle.
1090 \item[ARROW
\_ARROW] Conventional arrowhead.
1091 \item[ARROW
\_SINGLE\_OBLIQUE] Single oblique stroke.
1092 \item[ARROW
\_DOUBLE\_OBLIQUE] Double oblique stroke.
1093 \item[ARROW
\_DOUBLE\_METAFILE] Custom arrowhead.
1096 {\it end
} may currently be one of:
1098 \begin{description
}\itemsep=
0pt
1099 \item[ARROW
\_POSITION\_END] Arrow appears at the end.
1100 \item[ARROW
\_POSITION\_START] Arrow appears at the start.
1103 {\it arrowSize
} specifies the length of the arrow.
1105 {\it xOffset
} specifies the offset from the end of the line.
1107 {\it name
} specifies a name for the arrow.
1109 {\it mf
} can be a wxPseduoMetaFile, perhaps loaded from a simple Windows metafile.
1111 {\it arrowId
} is the id for the arrow.
1113 \membersection{wxLineShape::AddArrowOrdered
}
1115 \func{void
}{AddArrowOrdered
}{\param{wxArrowHead *
}{arrow
},
\param{wxList\&
}{ referenceList
},
\param{int
}{ end
}}
1117 Add an arrowhead in the position indicated by the reference
1118 list of arrowheads, which contains all legal arrowheads for this
1119 line, in the correct order.
1123 Reference list: a b c d e
1124 Current line list: a d
1127 Add c, then line list is: a c d.
1129 If no legal arrowhead position, return FALSE. Assume reference list is
1130 for one end only, since it potentially defines the ordering for any one
1131 of the
3 positions. So we don't check the reference list for arrowhead
1134 \membersection{wxLineShape::ClearArrow
}
1136 \func{bool
}{ClearArrow
}{\param{const wxString\&
}{name
}}
1138 Delete the arrow with the given name.
1140 \membersection{wxLineShape::ClearArrowsAtPosition
}
1142 \func{void
}{ClearArrowsAtPosition
}{\param{int
}{ position = -
1}}
1144 Delete the arrows at the specified position, or at any position if
{\it position
} is -
1.
1146 \membersection{wxLineShape::DrawArrow
}
1148 \func{void
}{DrawArrow
}{\param{ArrowHead *
}{arrow
},
\param{double
}{ xOffset
},
\param{bool
}{ proportionalOffset
}}
1150 Draws the given arrowhead (or annotation).
1152 \membersection{wxLineShape::DeleteArrowHead
}
1154 \func{bool
}{DeleteArrowHead
}{\param{long
}{ arrowId
}}
1156 \func{bool
}{DeleteArrowHead
}{\param{int
}{ position
},
\param{const wxString\&
}{name
}}
1158 Delete arrowhead by id or position and name.
1160 \membersection{wxLineShape::DeleteLineControlPoint
}
1162 \func{bool
}{DeleteLineControlPoint
}{\void}
1164 Deletes an arbitary point on the line.
1166 \membersection{wxLineShape::DrawArrows
}
1168 \func{void
}{DrawArrows
}{\param{wxDC\&
}{ dc
}}
1172 \membersection{wxLineShape::DrawRegion
}
1174 \func{void
}{DrawRegion
}{\param{wxDC\&
}{ dc
},
\param{wxShapeRegion *
}{region
},
\param{double
}{ x
},
\param{double
}{ y
}}
1176 Format one region at this position.
1178 \membersection{wxLineShape::EraseRegion
}
1180 \func{void
}{EraseRegion
}{\param{wxDC\&
}{ dc
},
\param{wxShapeRegion *
}{region
},
\param{double
}{ x
},
\param{double
}{ y
}}
1182 Format one region at this position.
1184 \membersection{wxLineShape::FindArrowHead
}
1186 \func{wxArrowHead *
}{FindArrowHead
}{\param{long
}{ arrowId
}}
1188 \func{wxArrowHead *
}{FindArrowHead
}{\param{int
}{ position
},
\param{const wxString\&
}{name
}}
1190 Find arrowhead by id or position and name.
1192 \membersection{wxLineShape::FindLineEndPoints
}
1194 \func{void
}{FindLineEndPoints
}{\param{double *
}{fromX
},
\param{double *
}{fromY
},
\param{double *
}{toX
},
\param{double *
}{toY
}}
1196 Finds the x, y points at the two ends of the line. This function can be
1197 used by e.g. line-routing routines to get the actual points on the two
1198 node images where the lines will be drawn to/from.
1200 \membersection{wxLineShape::FindLinePosition
}
1202 \func{int
}{FindLinePosition
}{\param{double
}{x
},
\param{double
}{y
}}
1204 Find which position we're talking about at this x, y.
1205 Returns ARROW
\_POSITION\_START, ARROW
\_POSITION\_MIDDLE, ARROW
\_POSITION\_END.
1207 \membersection{wxLineShape::FindMinimumWidth
}
1209 \func{double
}{FindMinimumWidth
}{\void}
1211 Finds the horizontal width for drawing a line with arrows in minimum
1212 space. Assume arrows at end only.
1214 \membersection{wxLineShape::FindNth
}
1216 \func{void
}{FindNth
}{\param{wxShape *
}{image
},
\param{int *
}{nth
},
\param{int *
}{noArcs
},
\param{bool
}{ incoming
}}
1218 Finds the position of the line on the given object. Specify whether incoming or outgoing lines are
1219 being considered with
{\it incoming
}.
1221 \membersection{wxLineShape::GetAttachmentFrom
}
1223 \constfunc{int
}{GetAttachmentFrom
}{\void}
1225 Returns the attachment point on the `from' node.
1227 \membersection{wxLineShape::GetAttachmentTo
}
1229 \constfunc{int
}{GetAttachmentTo
}{\void}
1231 Returns the attachment point on the `to' node.
1233 \membersection{wxLineShape::GetEnds
}
1235 \func{void
}{GetEnds
}{\param{double *
}{x1
},
\param{double *
}{y1
},
\param{double *
}{x2
},
\param{double *
}{y2
}}
1237 Gets the visible endpoints of the lines for drawing between two objects.
1239 \membersection{wxLineShape::GetFrom
}
1241 \constfunc{wxShape *
}{GetFrom
}{\void}
1243 Gets the `from' object.
1245 \membersection{wxLineShape::GetLabelPosition
}
1247 \func{void
}{GetLabelPosition
}{\param{int
}{ position
},
\param{double *
}{x
},
\param{double *
}{y
}}
1249 Get the reference point for a label. Region x and y are offsets from this.
1250 position is
0 (middle),
1 (start),
2 (end).
1252 \membersection{wxLineShape::GetNextControlPoint
}
1254 \func{wxPoint *
}{GetNextControlPoint
}{\param{wxShape *
}{shape
}}
1256 Find the next control point in the line after the start/end point,
1257 depending on whether the shape is at the start or end.
1259 \membersection{wxLineShape::GetTo
}
1261 \func{wxShape *
}{GetTo
}{\void}
1263 Gets the `to' object.
1265 \membersection{wxLineShape::Initialise
}
1267 \func{void
}{Initialise
}{\void}
1269 Initialises the line object.
1271 \membersection{wxLineShape::InsertLineControlPoint
}
1273 \func{void
}{InsertLineControlPoint
}{\void}
1275 Inserts a control point at an arbitrary position.
1277 \membersection{wxLineShape::IsEnd
}
1279 \func{bool
}{IsEnd
}{\param{wxShape *
}{shape
}}
1281 Returns TRUE if
{\it shape
} is at the end of the line.
1283 \membersection{wxLineShape::IsSpline
}
1285 \func{bool
}{IsSpline
}{\void}
1287 Returns TRUE if a spline is drawn through the control points, and FALSE otherwise.
1289 \membersection{wxLineShape::MakeLineControlPoints
}\label{wxlineshapemakelinecontrolpoints
}
1291 \func{void
}{MakeLineControlPoints
}{\param{int
}{ n
}}
1293 Make a given number of control points (minimum of two).
1295 \membersection{wxLineShape::OnMoveLink
}
1297 \func{void
}{OnMoveLink
}{\param{wxDC\&
}{ dc
},
\param{bool
}{ moveControlPoints = TRUE
}}
1299 Called when a connected object has moved, to move the link to
1302 \membersection{wxLineShape::SetAttachmentFrom
}
1304 \func{void
}{SetAttachmentTo
}{\param{int
}{ fromAttach
}}
1306 Sets the `from' shape attachment.
1308 \membersection{wxLineShape::SetAttachments
}
1310 \func{void
}{SetAttachments
}{\param{int
}{ fromAttach
},
\param{int
}{ toAttach
}}
1312 Specifies which object attachment points should be used at each end of the line.
1314 \membersection{wxLineShape::SetAttachmentTo
}
1316 \func{void
}{SetAttachmentTo
}{\param{int
}{ toAttach
}}
1318 Sets the `to' shape attachment.
1320 \membersection{wxLineShape::SetEnds
}
1322 \func{void
}{SetEnds
}{\param{double
}{ x1
},
\param{double
}{ y1
},
\param{double
}{ x2
},
\param{double
}{ y2
}}
1324 Sets the end positions of the line.
1326 \membersection{wxLineShape::SetFrom
}
1328 \func{void
}{SetFrom
}{\param{wxShape *
}{object
}}
1330 Sets the `from' object for the line.
1332 \membersection{wxLineShape::SetIgnoreOffsets
}
1334 \func{void
}{SetIgnoreOffsets
}{\param{bool
}{ ignore
}}
1336 Tells the shape whether to ignore offsets from the end of the line when drawing.
1338 \membersection{wxLineShape::SetSpline
}
1340 \func{void
}{SetSpline
}{\param{bool
}{ spline
}}
1342 Specifies whether a spline is to be drawn through the control points (TRUE), or a line (FALSE).
1344 \membersection{wxLineShape::SetTo
}
1346 \func{void
}{SetTo
}{\param{wxShape *
}{object
}}
1348 Sets the `to' object for the line.
1350 \membersection{wxLineShape::Straighten
}
1352 \func{void
}{Straighten
}{\param{wxDC*
}{ dc = NULL
}}
1354 Straighten verticals and horizontals.
{\it dc
} is optional.
1356 \membersection{wxLineShape::Unlink
}
1358 \func{void
}{Unlink
}{\void}
1360 Unlinks the line from the nodes at either end.
1362 \section{\class{wxPolygonShape
}}\label{wxpolygonshape
}
1364 A wxPolygonShape's shape is defined by a number of points passed to the object's
1365 constructor. It can be used to create new shapes such as diamonds and triangles.
1367 \wxheading{Derived from
}
1369 \helpref{wxShape
}{wxshape
}
1371 \latexignore{\rtfignore{\wxheading{Members
}}}
1373 \membersection{wxPolygonShape::wxPolygonShape
}
1375 \func{}{wxPolygonShape
}{void
}
1377 Constructor. Call
\helpref{wxPolygonShape::Create
}{wxpolygonshapecreate
} to specify the polygon's vertices.
1379 \membersection{wxPolygonShape::
\destruct{wxPolygonShape
}}
1381 \func{}{\destruct{wxPolygonShape
}}{\void}
1385 \membersection{wxPolygonShape::Create
}\label{wxpolygonshapecreate
}
1387 \func{void
}{Create
}{\param{wxList*
}{ points
}}
1389 Takes a list of wxRealPoints; each point is an
{\it offset
} from the centre.
1390 The polygon's destructor will delete these points, so do not delete them yourself.
1392 \membersection{wxPolygonShape::AddPolygonPoint
}
1394 \func{void
}{AddPolygonPoint
}{\param{int
}{ pos =
0}}
1396 Add a control point after the given point.
1398 \membersection{wxPolygonShape::CalculatePolygonCentre
}
1400 \func{void
}{CalculatePolygonCentre
}{\void}
1402 Recalculates the centre of the polygon.
1404 \membersection{wxPolygonShape::DeletePolygonPoint
}
1406 \func{void
}{DeletePolygonPoint
}{\param{int
}{ pos =
0}}
1408 Deletes a control point.
1410 \membersection{wxPolygonShape::GetPoints
}
1412 \func{wxList *
}{GetPoints
}{\void}
1414 Returns a pointer to the internal list of polygon vertices (wxRealPoints).
1416 \membersection{wxPolygonShape::UpdateOriginalPoints
}
1418 \func{void
}{UpdateOriginalPoints
}{\void}
1420 If we've changed the shape, must make the original
1421 points match the working points with this function.
1423 \section{\class{wxRectangleShape
}}\label{wxrectangleshape
}
1425 The wxRectangleShape has rounded or square corners.
1427 \wxheading{Derived from
}
1429 \helpref{wxShape
}{wxshape
}
1431 \latexignore{\rtfignore{\wxheading{Members
}}}
1433 \membersection{wxRectangleShape::wxRectangleShape
}
1435 \func{}{wxRectangleShape
}{\param{double
}{ width =
0.0},
\param{double
}{ height =
0.0}}
1439 \membersection{wxRectangleShape::
\destruct{wxRectangleShape
}}
1441 \func{}{\destruct{wxRectangleShape
}}{\void}
1445 \membersection{wxRectangleShape::SetCornerRadius
}
1447 \func{void
}{SetCornerRadius
}{\param{double
}{ radius
}}
1449 Sets the radius of the rectangle's rounded corners. If the radius is zero, a non-rounded
1450 rectangle will be drawn. If the radius is negative, the value is the proportion of the
1451 smaller dimension of the rectangle.
1453 \section{\class{wxPseudoMetaFile
}}\label{wxpseudometafile
}
1455 A simple metafile-like class which can load data from a Windows metafile on all platforms.
1457 \wxheading{Derived from
}
1461 \section{\class{wxShape
}}\label{wxshape
}
1463 The wxShape is the top-level, abstract object that all other
1464 objects are derived from. All common functionality is represented by
1465 wxShape's members, and overriden members that appear in derived
1466 classes and have behaviour as documented for wxShape, are not
1467 documented separately.
1469 \wxheading{Derived from
}
1471 \helpref{wxShapeEvtHandler
}{wxshapeevthandler
}
1473 \latexignore{\rtfignore{\wxheading{Members
}}}
1475 \membersection{wxShape::wxShape
}
1477 \func{}{wxShape
}{\param{wxShapeCanvas*
}{ canvas = NULL
}}
1479 Constructs a new wxShape.
1481 \membersection{wxShape::
\destruct{wxShape
}}
1483 \func{}{\destruct{wxShape
}}{\void}
1487 \membersection{wxShape::AddLine
}
1489 \func{void
}{AddLine
}{\param{wxLineShape*
}{ line
},
\param{wxShape*
}{ other
},
\param{int
}{ attachFrom =
0},
\param{int
}{ attachTo =
0},
1490 \param{int
}{ positionFrom = -
1},
\param{int
}{ positionTo = -
1}}
1492 Adds a line between the specified canvas shapes, at the specified attachment points.
1494 The position in the list of lines at each end can also be specified, so that the line will be drawn
1495 at a particular point on its attachment point.
1497 \membersection{wxShape::AddRegion
}
1499 \func{void
}{AddRegion
}{\param{wxShapeRegion*
}{ region
}}
1501 Adds a region to the shape.
1503 \membersection{wxShape::AddText
}
1505 \func{void
}{AddText
}{\param{const wxString\&
}{string
}}
1507 Adds a line of text to the shape's default text region.
1509 \membersection{wxShape::AddToCanvas
}
1511 \func{void
}{AddToCanvas
}{\param{wxShapeCanvas*
}{ theCanvas
},
\param{wxShape*
}{ addAfter=NULL
}}
1513 Adds the shape to the canvas's shape list. If
{\it addAfter
} is
1514 non-NULL, will add the shape after this one.
1516 \membersection{wxShape::AncestorSelected
}
1518 \constfunc{bool
}{AncestorSelected
}{\void}
1520 TRUE if the shape's ancestor is currently selected.
1522 \membersection{wxShape::ApplyAttachmentOrdering
}\label{wxshapeapplyattachmentordering
}
1524 \func{void
}{ApplyAttachmentOrdering
}{\param{wxList\&
}{ linesToSort
}}
1526 Applies the line ordering in
{\it linesToSort
} to the shape, to reorder the way lines are attached.
1528 \membersection{wxShape::AssignNewIds
}
1530 \func{void
}{AssignNewIds
}{\void}
1532 Assigns new ids to this image and its children.
1534 \membersection{wxShape::Attach
}\label{wxshapeattach
}
1536 \func{void
}{Attach
}{\param{wxShapeCanvas*
}{ can
}}
1538 Sets the shape's internal canvas pointer to point to the given canvas.
1540 \membersection{wxShape::AttachmentIsValid
}\label{wxshapeattachmentisvalid
}
1542 \constfunc{bool
}{AttachmentIsValid
}{\param{int
}{ attachment
}}
1544 Returns TRUE if
{\it attachment
} is a valid attachment point.
1546 \membersection{wxShape::AttachmentSortTest
}\label{wxshapeattachmentsorttest
}
1548 \constfunc{bool
}{AttachmentSortTest
}{\param{int
}{ attachment
},
\param{const wxRealPoint\&
}{ pt1
},
1549 \param{const wxRealPoint\&
}{ pt2
}}
1551 Returns TRUE if
{\it pt1
} is less than or equal to
{\it pt2
}, in the sense
1552 that one point comes before another on an edge of the shape.
{\it attachment
} is
1553 the attachment point (side) in question.
1555 This function is used in
\helpref{wxShape::MoveLineToNewAttachment
}{wxshapemovelinetonewattachment
} to
1556 determine the new line ordering.
1558 \membersection{wxShape::CalcSimpleAttachment
}\label{wxshapecalcsimpleattachment
}
1560 \func{wxRealPoint
}{CalcSimpleAttachment
}{\param{const wxRealPoint\&
}{ pt1
},
1561 \param{const wxRealPoint\&
}{ pt2
},
\param{int
}{ nth
},
\param{int
}{ noArcs
},
\param{wxLineShape*
}{ line
}}
1563 Assuming the attachment lies along a vertical or horizontal line,
1564 calculates the position on that point.
1566 \wxheading{Parameters
}
1568 \docparam{pt1
}{The first point of the line repesenting the edge of the shape.
}
1570 \docparam{pt2
}{The second point of the line representing the edge of the shape.
}
1572 \docparam{nth
}{The position on the edge (for example there may be
6 lines at this attachment point,
1573 and this may be the
2nd line.
}
1575 \docparam{noArcs
}{The number of lines at this edge.
}
1577 \docparam{line
}{The line shape.
}
1581 This function expects the line to be either vertical or horizontal, and determines which.
1583 \membersection{wxShape::CalculateSize
}
1585 \func{void
}{CalculateSize
}{\void}
1587 Called to calculate the shape's size if dependent on children sizes.
1589 \membersection{wxShape::ClearAttachments
}
1591 \func{void
}{ClearAttachments
}{\void}
1593 Clears internal custom attachment point shapes (of class wxAttachmentPoint).
1595 \membersection{wxShape::ClearRegions
}
1597 \func{void
}{ClearRegions
}{\void}
1599 Clears the wxShapeRegions from the shape.
1601 \membersection{wxShape::ClearText
}
1603 \func{void
}{ClearText
}{\param{int
}{ regionId =
0}}
1605 Clears the text from the specified text region.
1607 \membersection{wxShape::Constrain
}
1609 \func{bool
}{Constrain
}{\void}
1611 Calculates the shape's constraints (if any). Applicable
1612 only to wxCompositeShape, does nothing if the shape is of
1615 \membersection{wxShape::Copy
}\label{wxshapecopy
}
1617 \func{void
}{Copy
}{\param{wxShape\&
}{ copy
}}
1619 Copy this shape into
{\it copy
}. Every derived class must have one of these, and each Copy implementation
1620 must call the derived class's implementation to ensure everything is copied. See also
\helpref{wxShape::CreateNewCopy
}{wxshapecreatenewcopy
}.
1622 \membersection{wxShape::CreateNewCopy
}\label{wxshapecreatenewcopy
}
1624 \func{wxShape*
}{CreateNewCopy
}{\param{bool
}{ resetMapping = TRUE
},
\param{bool
}{ recompute = TRUE
}}
1626 Creates and returns a new copy of this shape (calling
\helpref{wxShape::Copy
}{wxshapecopy
}). Do not override this function.
1628 This function should always be used to create a new copy, since it must do special processing
1629 for copying constraints associated with constraints.
1631 If
{\it resetMapping
} is TRUE, a mapping table used for complex shapes is reset; this may not be desirable
1632 if the shape being copied is a child of a composite (and so the mapping table is in use).
1634 If
{\it recompute
} is TRUE,
\helpref{wxShape::Recompute
}{wxshaperecompute
} is called for the new shape.
1638 This function uses the wxWindows dynamic object creation system to create a new shape of the same
1639 type as `this', before calling Copy.
1641 If the event handler for this shape is not the same as the shape itself, the event handler is also copied
1642 using
\helpref{wxShapeEvtHandler::CreateNewCopy
}{wxshapeevthandlercreatenewcopy
}.
1644 \membersection{wxShape::DeleteControlPoints
}
1646 \func{void
}{DeleteControlPoints
}{\void}
1648 Deletes the control points (or handles) for the shape. Does not redraw
1651 \membersection{wxShape::Detach
}
1653 \func{void
}{Detach
}{\void}
1655 Disassociates the shape from its canvas by setting the internal shape
1656 canvas pointer to NULL.
1658 \membersection{wxShape::Draggable
}
1660 \func{bool
}{Draggable
}{\void}
1662 TRUE if the shape may be dragged by the user.
1664 \membersection{wxShape::Draw
}
1666 \func{void
}{Draw
}{\param{wxDC\&
}{ dc
}}
1668 Draws the whole shape and any lines attached to it.
1670 Do not override this function: override OnDraw, which is called
1673 \membersection{wxShape::DrawContents
}
1675 \func{void
}{DrawContents
}{\param{wxDC\&
}{ dc
}}
1677 Draws the internal graphic of the shape (such as
1680 Do not override this function: override OnDrawContents, which is called
1683 \membersection{wxShape::DrawLinks
}
1685 \func{void
}{DrawLinks
}{\param{wxDC\&
}{ dc
},
\param{int
}{ attachment = -
1}}
1687 Draws any lines linked to this shape.
1689 \membersection{wxShape::Erase
}
1691 \func{void
}{Erase
}{\param{wxDC\&
}{ dc
}}
1693 Erases the shape, but does not repair damage caused to other
1696 \membersection{wxShape::EraseContents
}
1698 \func{void
}{EraseContents
}{\param{wxDC\&
}{ dc
}}
1700 Erases the shape contents, that is, the area within the shape's
1701 minimum bounding box.
1703 \membersection{wxShape::EraseLinks
}
1705 \func{void
}{EraseLinks
}{\param{wxDC\&
}{ dc
},
\param{int
}{ attachment = -
1}}
1707 Erases links attached to this shape, but does not repair
1708 damage caused to other shapes.
1710 \membersection{wxShape::FindRegion
}
1712 \func{wxShape *
}{FindRegion
}{\param{const wxString\&
}{regionName
},
\param{int *
}{regionId
}}
1714 Finds the actual image (`this' if non-composite) and region id for the given
1717 \membersection{wxShape::FindRegionNames
}
1719 \func{void
}{FindRegionNames
}{\param{wxStringList\&
}{ list
}}
1721 Finds all region names for this image (composite or simple).
1722 Supply an empty string list.
1724 \membersection{wxShape::Flash
}
1726 \func{void
}{Flash
}{\void}
1730 \membersection{wxShape::FormatText
}
1732 \func{void
}{FormatText
}{\param{const wxString\&
}{s
},
\param{int
}{ i =
0}}
1734 Reformats the given text region; defaults to formatting the default region.
1736 \membersection{wxShape::GetAttachmentMode
}
1738 \constfunc{bool
}{GetAttachmentMode
}{\void}
1740 Returns the attachment mode, which is TRUE if attachments are used, FALSE otherwise (in which case
1741 lines will be drawn as if to the centre of the shape). See
\helpref{wxShape::SetAttachmentMode
}{wxshapesetattachmentmode
}.
1743 \membersection{wxShape::GetAttachmentPosition
}\label{wxshapegetattachmentposition
}
1745 \func{bool
}{GetAttachmentPosition
}{\param{int
}{ attachment
},
\param{double*
}{ x
},
\param{double*
}{ y
},
1746 \param{int
}{ nth =
0},
\param{int
}{ noArcs =
1},
\param{wxLineShape*
}{ line = NULL
}}
1748 Gets the position at which the given attachment point should be drawn.
1750 If
{\it attachment
} isn't found among the attachment points of the shape, returns FALSE.
1752 \membersection{wxShape::GetBoundingBoxMax
}
1754 \func{void
}{GetBoundingBoxMax
}{\param{double *
}{width
},
\param{double *
}{height
}}
1756 Gets the maximum bounding box for the shape, taking into
1757 account external features such as shadows.
1759 \membersection{wxShape::GetBoundingBoxMin
}
1761 \func{void
}{GetBoundingBoxMin
}{\param{double *
}{width
},
\param{double *
}{height
}}
1763 Gets the minimum bounding box for the shape, that defines
1764 the area available for drawing the contents (such as text).
1766 \membersection{wxShape::GetBrush
}
1768 \constfunc{wxBrush*
}{GetBrush
}{\void}
1770 Returns the brush used for filling the shape.
1772 \membersection{wxShape::GetCanvas
}
1774 \constfunc{wxShapeCanvas*
}{GetCanvas
}{\void}
1776 Gets the internal canvas pointer.
1778 \membersection{wxShape::GetCentreResize
}
1780 \constfunc{bool
}{GetCentreResize
}{\void}
1782 Returns TRUE if the shape is to be resized from the centre (the centre
1783 stands still), or FALSE if from the corner or side being dragged (the
1784 other corner or side stands still).
1786 \membersection{wxShape::GetChildren
}
1788 \constfunc{wxList\&
}{GetChildren
}{\void}
1790 Returns a reference to the list of children for this shape.
1792 \membersection{wxShape::GetClientData
}
1794 \func{wxObject*
}{GetClientData
}{\void}
1796 Gets the client data associated with the shape (NULL if there is
1799 \membersection{wxShape::GetDisableLabel
}
1801 \constfunc{bool
}{GetDisableLabel
}{\void}
1803 Returns TRUE if the default region will not be shown, FALSE otherwise.
1805 \membersection{wxShape::GetEventHandler
}
1807 \constfunc{wxShapeEvtHandler*
}{GetEventHandler
}{\void}
1809 Returns the event handler for this shape.
1811 \membersection{wxShape::GetFixedHeight
}
1813 \constfunc{bool
}{GetFixedHeight
}{\void}
1815 Returns TRUE if the shape cannot be resized in the vertical plane.
1817 \membersection{wxShape::GetFixedSize
}
1819 \func{void
}{GetFixedSize
}{\param{bool *
}{ x
},
\param{bool *
}{ y
}}
1821 Returns flags indicating whether the shape is of fixed size in either direction.
1823 \membersection{wxShape::GetFixedWidth
}
1825 \constfunc{bool
}{GetFixedWidth
}{\void}
1827 Returns TRUE if the shape cannot be resized in the horizontal plane.
1829 \membersection{wxShape::GetFont
}
1831 \constfunc{wxFont*
}{GetFont
}{\param{int
}{ regionId =
0}}
1833 Gets the font for the specified text region.
1835 \membersection{wxShape::GetFunctor
}
1837 \constfunc{wxString
}{GetFunctor
}{\void}
1839 Gets a string representing the type of the shape, to be used when
1840 writing out shape descriptions to a file. This is overridden by
1841 each derived shape class to provide an appropriate type string. By default,
1842 "node
\_image" is used for non-line shapes, and "arc
\_image" for lines.
1844 \membersection{wxShape::GetId
}
1846 \constfunc{long
}{GetId
}{\void}
1848 Returns the integer identifier for this shape.
1850 \membersection{wxShape::GetLinePosition
}\label{wxshapegetlineposition
}
1852 \func{int
}{GetLinePosition
}{\param{wxLineShape*
}{ line
}}
1854 Gets the zero-based position of
{\it line
} in the list of lines for this shape.
1856 \membersection{wxShape::GetLines
}
1858 \constfunc{wxList\&
}{GetLines
}{\void}
1860 Returns a reference to the list of lines connected to this shape.
1862 \membersection{wxShape::GetMaintainAspectRatio
}\label{wxshapegetmaintainaspectratio
}
1864 \constfunc{bool
}{GetMaintainAspectRatio
}{\void}
1866 If returns TRUE, resizing the shape will not change the aspect ratio
1867 (width and height will be in the original proportion).
1869 \membersection{wxShape::GetNumberOfAttachments
}\label{wxshapegetnumberofattachments
}
1871 \constfunc{int
}{GetNumberOfAttachments
}{\void}
1873 Gets the number of attachment points for this shape.
1875 \membersection{wxShape::GetNumberOfTextRegions
}
1877 \constfunc{int
}{GetNumberOfTextRegions
}{\void}
1879 Gets the number of text regions for this shape.
1881 \membersection{wxShape::GetParent
}
1883 \constfunc{wxShape *
}{GetParent
}{\void}
1885 Returns the parent of this shape, if it is part of a composite.
1887 \membersection{wxShape::GetPen
}
1889 \constfunc{wxPen*
}{GetPen
}{\void}
1891 Returns the pen used for drawing the shape's outline.
1893 \membersection{wxShape::GetPerimeterPoint
}
1895 \func{bool
}{GetPerimeterPoint
}{\param{double
}{ x1
},
\param{double
}{ y1
},
\param{double
}{ x2
},
\param{double
}{ y2
},
\param{double *
}{x3
},
\param{double *
}{y3
}}
1897 Gets the point at which the line from (x1, y1) to (x2, y2) hits the shape. Returns TRUE if the
1898 line hits the perimeter.
1900 \membersection{wxShape::GetRegionId
}\label{getregionid
}
1902 \func{int
}{GetRegionId
}{\param{const wxString\&
}{name
}}
1904 Gets the region's identifier by name. This is
{\it not
} unique for within an entire composite, but
1905 is unique for the image.
1907 \membersection{wxShape::GetRegionName
}\label{getregionname
}
1909 \func{wxString
}{GetRegionName
}{\param{int
}{ regionId =
0}}
1911 Gets the region's name. A region's name can be used to uniquely determine a region within
1912 an entire composite image hierarchy. See also
\helpref{wxShape::SetRegionName
}{wxshapesetregionname
}.
1914 \membersection{wxShape::GetRegions
}\label{getregions
}
1916 \func{wxList\&
}{GetRegions
}{\void}
1918 Returns the list of wxShapeRegions.
1920 \membersection{wxShape::GetRotation
}
1922 \constfunc{double
}{GetRotatation
}{\void}
1924 Returns the angle of rotation in radians.
1926 \membersection{wxShape::GetSensitivityFilter
}
1928 \constfunc{void
}{GetSensitivityFilter
}{\void}
1930 Returns the sensitivity filter, a bitlist of values. See
\helpref{wxShape::SetSensitivityFilter
}{wxshapesetsensitivityfilter
}.
1932 \membersection{wxShape::GetShadowMode
}
1934 \constfunc{int
}{SetShadowMode
}{\void}
1936 Returns the shadow mode. See
\helpref{wxShape::SetShadowMode
}{wxshapesetshadowmode
}.
1938 \membersection{wxShape::GetSpaceAttachments
}
1940 \constfunc{bool
}{GetSpaceAttachments
}{\void}
1942 Indicates whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they
1943 should join at a single point (FALSE).
1945 \membersection{wxShape::GetTextColour
}
1947 \constfunc{wxString
}{GetTextColour
}{\param{int
}{ regionId =
0}}
1949 Gets the colour for the specified text region.
1951 \membersection{wxShape::GetTopAncestor
}
1953 \constfunc{wxShape *
}{GetTopAncestor
}{\void}
1955 Returns the top-most ancestor of this shape (the root of the composite).
1957 \membersection{wxShape::GetX
}
1959 \constfunc{double
}{GetX
}{\void}
1961 Gets the x position of the centre of the shape.
1963 \membersection{wxShape::GetY
}
1965 \constfunc{double
}{GetY
}{\void}
1967 Gets the y position of the centre of the shape.
1969 \membersection{wxShape::HitTest
}
1971 \func{bool
}{HitTest
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int*
}{ attachment
},
\param{double*
}{ distance
}}
1973 Given a point on a canvas, returns TRUE if the point was on the shape, and returns
1974 the nearest attachment point and distance from the given point and target.
1976 \membersection{wxShape::Insert
}
1978 \func{void
}{InsertInCanvas
}{\param{wxShapeCanvas*
}{ canvas
}}
1980 Inserts the shape at the front of the shape list of
{\it canvas
}.
1982 \membersection{wxShape::IsHighlighted
}
1984 \constfunc{bool
}{IsHighlighted
}{\void}
1986 Returns TRUE if the shape is highlighted. Shape highlighting is unimplemented.
1988 \membersection{wxShape::IsShown
}
1990 \constfunc{bool
}{IsShown
}{\void}
1992 Returns TRUE if the shape is in a visible state, FALSE otherwise. Note
1993 that this has nothing to do with whether the window is hidden or the
1994 shape has scrolled off the canvas; it refers to the internal
1997 \membersection{wxShape::MakeControlPoints
}
1999 \func{void
}{MakeControlPoints
}{\void}
2001 Make a list of control points (draggable handles) appropriate to the shape.
2003 \membersection{wxShape::MakeMandatoryControlPoints
}
2005 \func{void
}{MakeMandatoryControlPoints
}{\void}
2007 Make the mandatory control points. For example, the control point on a dividing line should
2008 appear even if the divided rectangle shape's handles should not appear (because it is the child of
2009 a composite, and children are not resizable).
2011 \membersection{wxShape::Move
}\label{wxshapemove
}
2013 \func{void
}{Move
}{\param{wxDC\&
}{ dc
},
\param{double
}{ x1
},
\param{double
}{ y1
},
\param{bool
}{ display = TRUE
}}
2015 Move the shape to the given position, redrawing if
{\it display
} is TRUE.
2017 \membersection{wxShape::MoveLineToNewAttachment
}\label{wxshapemovelinetonewattachment
}
2019 \func{void
}{MoveLineToNewAttachment
}{\param{wxDC\&
}{ dc
},
\param{wxLineShape*
}{ toMove
},
\param{double
}{ x
},
\param{double
}{ y
}}
2021 Move the given line (which must already be attached to the shape) to
2022 a different attachment point on the shape, or a different order on the same attachment.
2024 Cals
\helpref{wxShape::AttachmentSortTest
}{wxshapeattachmentsorttest
} and then
\helpref{wxShapeEvtHandler::OnChangeAttachment
}{wxshapeevthandleronchangeattachment
}.
2026 \membersection{wxShape::MoveLinks
}
2028 \func{void
}{MoveLinks
}{\param{wxDC\&
}{ dc
}}
2030 Redraw all the lines attached to the shape.
2032 \membersection{wxShape::NameRegions
}
2034 \func{void
}{NameRegions
}{\param{const wxString\&
}{parentName = ``"
}}
2036 Make unique names for all the regions in a shape or composite shape.
2038 \membersection{wxShape::Rotate
}
2040 \func{void
}{Rotate
}{\param{double
}{x
},
\param{double
}{y
},
\param{double
}{theta
}}
2042 Rotate about the given axis by the given amount in radians (does nothing
2043 for most shapes). But even non-rotating shapes should record their
2044 notional rotation in case it's important (e.g. in dog-leg code).
2046 \membersection{wxShape::ReadConstraints
}
2048 \func{void
}{ReadConstraints
}{\param{wxExpr *
}{clause
},
\param{wxExprDatabase *
}{database
}}
2050 If the shape is a composite, it may have constraints that need to be read in in a separate pass.
2052 \membersection{wxShape::ReadAttributes
}
2054 \func{void
}{ReadAttributes
}{\param{wxExpr*
}{ clause
}}
2056 Reads the attributes (data member values) from the given expression.
2058 \membersection{wxShape::ReadRegions
}
2060 \func{void
}{ReadRegions
}{\param{wxExpr *
}{clause
}}
2062 Reads in the regions.
2064 \membersection{wxShape::Recentre
}
2066 \func{void
}{Recentre
}{\void}
2068 Does recentring (or other formatting) for all the text regions for this shape.
2070 \membersection{wxShape::RemoveFromCanvas
}
2072 \func{void
}{RemoveFromCanvas
}{\param{wxShapeCanvas*
}{ canvas
}}
2074 Removes the shape from the canvas.
2076 \membersection{wxShape::ResetControlPoints
}
2078 \func{void
}{ResetControlPoints
}{\void}
2080 Resets the positions of the control points (for instance when the
2081 shape's shape has changed).
2083 \membersection{wxShape::ResetMandatoryControlPoints
}
2085 \func{void
}{ResetMandatoryControlPoints
}{\void}
2087 Reset the mandatory control points. For example, the control point on a dividing line should
2088 appear even if the divided rectangle shape's handles should not appear (because it is the child of
2089 a composite, and children are not resizable).
2091 \membersection{wxShape::Recompute
}\label{wxshaperecompute
}
2093 \func{bool
}{Recompute
}{\void}
2095 Recomputes any constraints associated with the shape (normally
2096 applicable to wxCompositeShapes only, but harmless for other
2099 \membersection{wxShape::RemoveLine
}
2101 \func{void
}{RemoveLine
}{\param{wxLineShape*
}{ line
}}
2103 Removes the given line from the shape's list of attached lines.
2105 \membersection{wxShape::Select
}\label{wxshapeselect
}
2107 \func{void
}{Select
}{\param{bool
}{ select = TRUE
}}
2109 Selects or deselects the given shape, drawing or erasing control points
2110 (handles) as necessary.
2112 \membersection{wxShape::Selected
}\label{wxshapeselected
}
2114 \constfunc{bool
}{Selected
}{\void}
2116 TRUE if the shape is currently selected.
2118 \membersection{wxShape::SetAttachmentMode
}\label{wxshapesetattachmentmode
}
2120 \func{void
}{SetAttachmentMode
}{\param{bool
}{ flag
}}
2122 Sets the attachment mode to TRUE or FALSE. If TRUE, attachment points
2123 will be significant when drawing lines to and from this shape.
2124 If FALSE, lines will be drawn as if to the centre of the shape.
2126 \membersection{wxShape::SetBrush
}
2128 \func{void
}{SetBrush
}{\param{wxBrush *
}{brush
}}
2130 Sets the brush for filling the shape's shape.
2132 \membersection{wxShape::SetCanvas
}\label{wxshapesetcanvas
}
2134 \func{void
}{SetCanvas
}{\param{wxShapeCanvas*
}{ theCanvas
}}
2136 Identical to
\helpref{wxShape::Attach
}{wxshapesetcanvas
}.
2138 \membersection{wxShape::SetCentreResize
}
2140 \func{void
}{SetCentreResize
}{\param{bool
}{ cr
}}
2142 Specify whether the shape is to be resized from the centre (the centre stands still) or from the corner or side
2143 being dragged (the other corner or side stands still).
2145 \membersection{wxShape::SetClientData
}
2147 \func{void
}{SetClientData
}{\param{wxObject *
}{clientData
}}
2149 Sets the client data.
2151 \membersection{wxShape::SetDefaultRegionSize
}\label{setdefaultregionsize
}
2153 \func{void
}{SetDefaultRegionSize
}{\void}
2155 Set the default region to be consistent with the shape size.
2157 \membersection{wxShape::SetDisableLabel
}
2159 \func{void
}{SetDisableLabel
}{\param{bool
}{ flag
}}
2161 Set
{\it flag
} to TRUE to stop the default region being shown, FALSE otherwise.
2163 \membersection{wxShape::SetDraggable
}
2165 \func{void
}{SetDraggable
}{\param{bool
}{ drag
},
\param{bool
}{ recursive = FALSE
}}
2167 Sets the shape to be draggable or not draggable.
2169 \membersection{wxShape::SetDrawHandles
}
2171 \func{void
}{SetDrawHandles
}{\param{bool
}{ drawH
}}
2173 Sets the
{\it drawHandles
} flag for this shape and all descendants. If
{\it drawH
} is TRUE (the default),
2174 any handles (control points) will be drawn. Otherwise, the handles will not be drawn.
2176 \membersection{wxShape::SetEventHandler
}
2178 \func{void
}{GetEventHandler
}{\param{wxShapeEvtHandler *
}{handler
}}
2180 Sets the event handler for this shape.
2182 \membersection{wxShape::SetFixedSize
}
2184 \func{void
}{SetFixedSize
}{\param{bool
}{ x
},
\param{bool
}{ y
}}
2186 Sets the shape to be of the given, fixed size.
2188 \membersection{wxShape::SetFont
}
2190 \func{void
}{SetFont
}{\param{wxFont *
}{font
},
\param{int
}{ regionId =
0}}
2192 Sets the font for the specified text region.
2194 \membersection{wxShape::SetFormatMode
}\label{setformatmode
}
2196 \func{void
}{SetFormatMode
}{\param{int
}{ mode
},
\param{int
}{ regionId =
0}}
2198 Sets the format mode of the default text region. The argument can be a bit list
2201 \begin{description
}\itemsep=
0pt
2202 \item[FORMAT
\_NONE] No formatting.
2203 \item[FORMAT
\_CENTRE\_HORIZ] Horizontal centring.
2204 \item[FORMAT
\_CENTRE\_VERT] Vertical centring.
2207 \membersection{wxShape::SetHighlight
}
2209 \func{void
}{SetHighlight
}{\param{bool
}{ hi
},
\param{bool
}{ recurse = FALSE
}}
2211 Sets the highlight for a shape. Shape highlighting is unimplemented.
2213 \membersection{wxShape::SetId
}
2215 \func{void
}{SetId
}{\param{long
}{ id
}}
2217 Set the integer identifier for this shape.
2219 \membersection{wxShape::SetMaintainAspectRatio
}\label{wxshapesetmaintainaspectratio
}
2221 \func{void
}{SetMaintainAspectRatio
}{\param{bool
}{ flag
}}
2223 If the argument is TRUE, tells the shape that resizes should not change the aspect ratio
2224 (width and height should be in the original proportion).
2226 \membersection{wxShape::SetPen
}
2228 \func{void
}{SetPen
}{\param{wxPen *
}{pen
}}
2230 Sets the pen for drawing the shape's outline.
2232 \membersection{wxShape::SetRegionName
}\label{wxshapesetregionname
}
2234 \func{void
}{SetRegionName
}{\param{const wxString\&
}{name
},
\param{int
}{ regionId =
0}}
2236 Sets the name for this region. The name for a region is unique within the scope of the whole
2237 composite, whereas a region id is unique only for a single image.
2239 \membersection{wxShape::SetSensitivityFilter
}\label{wxshapesetsensitivityfilter
}
2241 \func{void
}{SetSensitivityFilter
}{\param{int
}{ sens=OP
\_ALL},
\param{bool
}{ recursive = FALSE
}}
2243 Sets the shape to be sensitive or insensitive to specific mouse operations.
2245 {\it sens
} is a bitlist of the following:
2247 \begin{itemize
}\itemsep=
0pt
2248 \item OP
\_CLICK\_LEFT
2249 \item OP
\_CLICK\_RIGHT
2250 \item OP
\_DRAG\_LEFT
2251 \item OP
\_DRAG\_RIGHT
2252 \item OP
\_ALL (equivalent to a combination of all the above).
2255 \membersection{wxShape::SetShadowMode
}\label{wxshapesetshadowmode
}
2257 \func{void
}{SetShadowMode
}{\param{int
}{ mode
},
\param{bool
}{ redraw = FALSE
}}
2259 Sets the shadow mode (whether a shadow is drawn or not).
{\it mode
} can be one of
2262 \begin{description
}\itemsep=
0pt
2263 \item[SHADOW
\_NONE] No shadow (the default).
2264 \item[SHADOW
\_LEFT] Shadow on the left side.
2265 \item[SHADOW
\_RIGHT] Shadow on the right side.
2268 \membersection{wxShape::SetSize
}
2270 \func{void
}{SetSize
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{bool
}{ recursive = TRUE
}}
2272 Sets the shape's size.
2274 \membersection{wxShape::SetSpaceAttachments
}
2276 \func{void
}{SetSpaceAttachments
}{\param{bool
}{ sp
}}
2278 Indicate whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they
2279 should join at a single point (FALSE).
2281 \membersection{wxShape::SetTextColour
}
2283 \func{void
}{SetTextColour
}{\param{const wxString\&
}{colour
},
\param{int
}{ regionId =
0}}
2285 Sets the colour for the specified text region.
2287 \membersection{wxShape::SetX
}
2289 \func{void
}{SetX
}{\param{double
}{ x
}}
2291 Sets the
{\it x
} position of the shape.
2293 \membersection{wxShape::SetX
}
2295 \func{void
}{SetY
}{\param{double
}{ y
}}
2297 Sets the
{\it y
} position of the shape.
2299 \membersection{wxShape::SpaceAttachments
}
2301 \func{void
}{SpaceAttachments
}{\param{bool
}{ sp
}}
2303 Sets the spacing mode: if TRUE, lines at the same attachment point will be
2304 spaced evenly across that side of the shape. If false, all lines at the
2305 same attachment point will emanate from the same point.
2307 \membersection{wxShape::Show
}
2309 \func{void
}{Show
}{\param{bool
}{ show
}}
2311 Sets a flag indicating whether the shape should be drawn.
2313 \membersection{wxShape::Unlink
}
2315 \func{void
}{Unlink
}{\void}
2317 If the shape is a line, unlinks the nodes attached to the shape, removing itself from the list of
2318 lines for each of the `to' and `from' nodes.
2320 \membersection{wxShape::WriteAttributes
}
2322 \func{void
}{WriteAttributes
}{\param{wxExpr *
}{clause
}}
2324 Writes the shape's attributes (data member values) into the given expression.
2326 \membersection{wxShape::WriteRegions
}
2328 \func{void
}{WriteRegions
}{\param{wxExpr *
}{clause
}}
2332 \section{\class{wxShapeCanvas
}}\label{wxshapecanvas
}
2334 A canvas for drawing diagrams on.
2336 \wxheading{Derived from
}
2340 \wxheading{See also
}
2342 \helpref{wxDiagram
}{wxdiagram
}
2344 \latexignore{\rtfignore{\wxheading{Members
}}}
2346 \membersection{wxShapeCanvas::wxShapeCanvas
}
2348 \func{}{wxShapeCanvas
}{\param{wxWindow*
}{ parent = NULL
},
\param{wxWindowID
}{ id = -
1},
2349 \param{const wxPoint\&
}{ pos = wxDefaultPosition
},
\param{const wxSize\&
}{ size = wxDefaultSize
},
2350 \param{long
}{ style = wxBORDER
}}
2354 \membersection{wxShapeCanvas::
\destruct{wxShapeCanvas
}}
2356 \func{}{\destruct{wxShapeCanvas
}}{\void}
2360 \membersection{wxShapeCanvas::AddShape
}
2362 \func{void
}{AddShape
}{\param{wxShape *
}{shape
},
\param{wxShape *
}{addAfter = NULL
}}
2364 Adds a shape to the diagram. If
{\it addAfter
} is non-NULL, the shape will be added after this
2367 \membersection{wxShapeCanvas::FindShape
}
2369 \func{wxShape *
}{FindShape
}{\param{double
}{ x1
},
\param{double
}{ y
},
\param{int *
}{attachment
},
\param{wxClassInfo *
}{info = NULL
},
2370 \param{wxShape *
}{notImage = NULL
}}
2372 Find a shape under this mouse click. Returns the shape (or NULL), and the nearest attachment point.
2374 If
{\it info
} is non-NULL, a shape whose class which is a descendant of the desired class is found.
2376 If
{\it notImage
} is non-NULL, shapes which are descendants of
{\it notImage
} are ignored.
2378 \membersection{wxShapeCanvas::FindFirstSensitiveShape
}
2380 \func{wxShape *
}{FindFirstSensitiveShape
}{\param{double
}{ x1
},
\param{double
}{ y
},
\param{int *
}{attachment
},
\param{int
}{ op
}}
2382 Finds the first sensitive shape whose sensitivity filter matches
{\it op
}, working up the hierarchy of composites until
2383 one (or none) is found.
2385 \membersection{wxShapeCanvas::GetDiagram
}
2387 \constfunc{wxDiagram*
}{GetDiagram
}{\void}
2389 Returns the canvas associated with this diagram.
2391 \membersection{wxShapeCanvas::GetGridSpacing
}
2393 \constfunc{double
}{GetGridSpacing
}{\void}
2395 Returns the grid spacing.
2397 \membersection{wxShapeCanvas::GetMouseTolerance
}
2399 \constfunc{int
}{GetMouseTolerance
}{\void}
2401 Returns the tolerance within which a mouse move is ignored.
2403 \membersection{wxShapeCanvas::GetShapeList
}
2405 \constfunc{wxList*
}{GetShapeList
}{\void}
2407 Returns a pointer to the internal shape list.
2409 \membersection{wxShapeCanvas::GetQuickEditMode
}
2411 \constfunc{bool
}{GetQuickEditMode
}{\void}
2413 Returns quick edit mode for the associated diagram.
2415 \membersection{wxShapeCanvas::InsertShape
}
2417 \func{void
}{InsertShape
}{\param{wxShape*
}{ shape
}}
2419 Inserts a shape at the front of the shape list.
2421 \membersection{wxShapeCanvas::OnBeginDragLeft
}\label{wxshapecanvasonbegindragleft
}
2423 \func{void
}{OnBeginDragLeft
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2425 Called when the start of a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2426 by default it does nothing.
2428 {\it keys
} is a bit list of the following:
2430 \begin{itemize
}\itemsep=
0pt
2435 See also
\helpref{wxShapeCanvas::OnDragLeft
}{wxshapecanvasondragleft
},
\helpref{wxShapeCanvas::OnEndDragLeft
}{wxshapecanvasonenddragleft
}.
2437 \membersection{wxShapeCanvas::OnBeginDragRight
}\label{wxshapecanvasonbegindragright
}
2439 \func{void
}{OnBeginDragRight
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2441 Called when the start of a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2442 by default it does nothing.
2444 {\it keys
} is a bit list of the following:
2446 \begin{itemize
}\itemsep=
0pt
2451 See also
\helpref{wxShapeCanvas::OnDragRight
}{wxshapecanvasondragright
},
\helpref{wxShapeCanvas::OnEndDragRight
}{wxshapecanvasonenddragright
}.
2453 \membersection{wxShapeCanvas::OnEndDragLeft
}\label{wxshapecanvasonenddragleft
}
2455 \func{void
}{OnEndDragLeft
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2457 Called when the end of a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2458 by default it does nothing.
2460 {\it keys
} is a bit list of the following:
2462 \begin{itemize
}\itemsep=
0pt
2467 See also
\helpref{wxShapeCanvas::OnDragLeft
}{wxshapecanvasondragleft
},
\helpref{wxShapeCanvas::OnBeginDragLeft
}{wxshapecanvasonbegindragleft
}.
2469 \membersection{wxShapeCanvas::OnEndDragRight
}\label{wxshapecanvasonenddragright
}
2471 \func{void
}{OnEndDragRight
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2473 Called when the end of a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2474 by default it does nothing.
2476 {\it keys
} is a bit list of the following:
2478 \begin{itemize
}\itemsep=
0pt
2483 See also
\helpref{wxShapeCanvas::OnDragRight
}{wxshapecanvasondragright
},
\helpref{wxShapeCanvas::OnBeginDragRight
}{wxshapecanvasonbegindragright
}.
2485 \membersection{wxShapeCanvas::OnDragLeft
}\label{wxshapecanvasondragleft
}
2487 \func{void
}{OnDragLeft
}{\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2489 Called when a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2490 by default it does nothing.
2492 {\it draw
} is alternately TRUE and FALSE, to assist drawing and erasing.
2494 {\it keys
} is a bit list of the following:
2496 \begin{itemize
}\itemsep=
0pt
2501 See also
\helpref{wxShapeCanvas::OnBeginDragLeft
}{wxshapecanvasonbegindragleft
},
\helpref{wxShapeCanvas::OnEndDragLeft
}{wxshapecanvasonenddragleft
}.
2503 \membersection{wxShapeCanvas::OnDragRight
}\label{wxshapecanvasondragright
}
2505 \func{void
}{OnDragRight
}{\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2507 Called when a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2508 by default it does nothing.
2510 {\it draw
} is alternately TRUE and FALSE, to assist drawing and erasing.
2512 {\it keys
} is a bit list of the following:
2514 \begin{itemize
}\itemsep=
0pt
2519 See also
\helpref{wxShapeCanvas::OnBeginDragRight
}{wxshapecanvasonbegindragright
},
\helpref{wxShapeCanvas::OnEndDragRight
}{wxshapecanvasonenddragright
}.
2521 \membersection{wxShapeCanvas::OnLeftClick
}\label{wxshapecanvasonleftclick
}
2523 \func{void
}{OnLeftClick
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2525 Called when a left click event on the canvas background is detected by OnEvent. You may override this member;
2526 by default it does nothing.
2528 {\it keys
} is a bit list of the following:
2530 \begin{itemize
}\itemsep=
0pt
2535 \membersection{wxShapeCanvas::OnRightClick
}\label{wxshapecanvasonrightclick
}
2537 \func{void
}{OnRightClick
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2539 Called when a right click event on the canvas background is detected by OnEvent. You may override this member;
2540 by default it does nothing.
2542 {\it keys
} is a bit list of the following:
2544 \begin{itemize
}\itemsep=
0pt
2549 \membersection{wxShapeCanvas::Redraw
}
2551 \func{void
}{Redraw
}{\void}
2553 Calls wxDiagram::Redraw.
2555 \membersection{wxShapeCanvas::RemoveShape
}
2557 \func{void
}{RemoveShape
}{\param{wxShape *
}{shape
}}
2559 Calls wxDiagram::RemoveShape.
2561 \membersection{wxShapeCanvas::SetDiagram
}
2563 \func{void
}{SetDiagram
}{\param{wxDiagram *
}{diagram
}}
2565 Sets the diagram associated with this diagram.
2567 \membersection{wxShapeCanvas::Snap
}
2569 \func{void
}{Snap
}{\param{double *
}{x
},
\param{double *
}{y
}}
2571 Calls wxDiagram::Snap.
2575 \section{\class{wxShapeEvtHandler
}}\label{wxshapeevthandler
}
2577 wxShapeEvtHandler is a class from which wxShape (and therefore all shape classes) are derived.
2578 A wxShape also contains a pointer to its current wxShapeEvtHandler. Event handlers
2579 can be swapped in and out, altering the behaviour of a shape. This allows, for example,
2580 a range of behaviours to be redefined in one class, rather than requiring
2581 each shape class to be subclassed.
2583 \wxheading{Derived from
}
2587 \latexignore{\rtfignore{\wxheading{Members
}}}
2589 \membersection{wxShapeEvtHandler::m
\_handlerShape}
2591 \member{wxShape*
}{m
\_handlerShape}
2593 Pointer to the shape associated with this handler.
2595 \membersection{wxShapeEvtHandler::m
\_previousHandler}
2597 \member{wxShapeEvtHandler*
}{m
\_previousHandler}
2599 Pointer to the previous handler.
2601 \membersection{wxShapeEvtHandler::wxShapeEvtHandler
}
2603 \func{void
}{wxShapeEvtHandler
}{\param{wxShapeEvtHandler *
}{previous = NULL
},
\param{wxShape *
}{shape = NULL
}}
2605 Constructs a new event handler.
2607 \membersection{wxShapeEvtHandler::
\destruct{wxShapeEvtHandler
}}
2609 \func{void
}{\destruct{wxShapeEvtHandler
}}{\void}
2613 \membersection{wxShapeEvtHandler::CopyData
}\label{wxshapeevthandlercopydata
}
2615 \func{void
}{CopyData
}{\param{wxShapeEvtHandler\&
}{ handler
}}
2617 A virtual function to copy the data from this object to
{\it handler
}. Override if you
2618 derive from wxShapeEvtHandler and have data to copy.
2620 \membersection{wxShapeEvtHandler::CreateNewCopy
}\label{wxshapeevthandlercreatenewcopy
}
2622 \func{wxShapeEvtHandler*
}{CreateNewCopy
}{\void}
2624 Creates a new event handler object of the same class as this object, and then
2625 calls
\helpref{wxShapeEvtHandler::CopyData
}{wxshapeevthandlercopydata
}.
2627 \membersection{wxShapeEvtHandler::GetPreviousHandler
}\label{wxshapeevthandlergetprevioushandler
}
2629 \constfunc{wxShapeEvtHandler*
}{GetPreviousHandler
}{\void}
2631 Returns the previous handler.
2633 \membersection{wxShapeEvtHandler::GetShape
}\label{wxshapeevthandlergetshape
}
2635 \constfunc{wxShape*
}{GetShape
}{\void}
2637 Returns the shape associated with this handler.
2639 \membersection{wxShapeEvtHandler::OnBeginDragLeft
}
2641 \func{void
}{OnBeginDragLeft
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2643 Called when the user is beginning to drag using the left mouse button.
2645 \membersection{wxShapeEvtHandler::OnBeginDragRight
}
2647 \func{void
}{OnBeginDragRight
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2649 Called when the user is beginning to drag using the right mouse button.
2651 \membersection{wxShapeEvtHandler::OnBeginSize
}
2653 \func{void
}{OnBeginSize
}{\param{double
}{ width
},
\param{double
}{ height
}}
2655 Called when a shape starts to be resized.
2657 \membersection{wxShapeEvtHandler::OnChangeAttachment
}\label{wxshapeevthandleronchangeattachment
}
2659 \func{void
}{OnChangeAttachment
}{\param{int
}{ attachment
},
\param{wxLineShape*
}{ line
},
\param{wxList\&
}{ ordering
}}
2661 Override this to prevent or intercept line reordering. wxShape's implementation of this function
2662 calls
\helpref{wxShape::ApplyAttachmentOrdering
}{wxshapeapplyattachmentordering
} to apply
2665 \membersection{wxShapeEvtHandler::OnDragLeft
}
2667 \func{void
}{OnDragLeft
}{\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2669 Called twice when the shape is being dragged, once to allow erasing the old
2670 image, and again to allow drawing at the new position.
2672 \membersection{wxShapeEvtHandler::OnDragRight
}
2674 \func{void
}{OnDragRight
}{\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2676 Called twice when the shape is being dragged, once to allow erasing the old
2677 image, and again to allow drawing at the new position.
2679 \membersection{wxShapeEvtHandler::OnDraw
}
2681 \func{void
}{OnDraw
}{\param{wxDC\&
}{ dc
}}
2683 Defined for each class to draw the main graphic, but
2686 \membersection{wxShapeEvtHandler::OnDrawContents
}
2688 \func{void
}{OnDrawContents
}{\param{wxDC\&
}{ dc
}}
2690 Defined for each class to draw the contents of the
2691 shape, such as text.
2693 \membersection{wxShapeEvtHandler::OnDrawControlPoints
}
2695 \func{void
}{OnDrawControlPoints
}{\param{wxDC\&
}{ dc
}}
2697 Called when the shape's control points (handles) should
2700 \membersection{wxShapeEvtHandler::OnDrawOutline
}
2702 \func{void
}{OnDrawOutline
}{\param{wxDC\&
}{ dc
}}
2704 Called when the outline of the shape should be drawn.
2706 \membersection{wxShapeEvtHandler::OnEndDragLeft
}
2708 \func{void
}{OnEndDragLeft
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2710 Called when the user is stopping dragging using the left mouse button.
2712 \membersection{wxShapeEvtHandler::OnEndDragRight
}
2714 \func{void
}{OnEndDragRight
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2716 Called when the user is stopping dragging using the right mouse button.
2718 \membersection{wxShapeEvtHandler::OnEndSize
}
2720 \func{void
}{OnEndSize
}{\param{double
}{ width
},
\param{double
}{ height
}}
2722 Called after a shape is resized.
2724 \membersection{wxShapeEvtHandler::OnErase
}
2726 \func{void
}{OnErase
}{\param{wxDC\&
}{ dc
}}
2728 Called when the whole shape should be erased.
2730 \membersection{wxShapeEvtHandler::OnEraseContents
}
2732 \func{void
}{OnEraseContents
}{\param{wxDC\&
}{ dc
}}
2734 Called when the contents should be erased.
2736 \membersection{wxShapeEvtHandler::OnEraseControlPoints
}
2738 \func{void
}{OnEraseControlPoints
}{\param{wxDC\&
}{ dc
}}
2740 Called when the shape's control points (handles) should
2743 \membersection{wxShapeEvtHandler::OnHighlight
}
2745 \func{void
}{OnHighlight
}{\param{wxDC\&
}{ dc
}}
2747 Called when the shape should be highlighted.
2749 \membersection{wxShapeEvtHandler::OnLeftClick
}
2751 \func{void
}{OnLeftClick
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0},
\param{int
}{ attachment =
0}}
2753 Called when the shape receives a left mouse click event.
2755 \membersection{wxShapeEvtHandler::OnMoveLink
}
2757 \func{void
}{OnMoveLink
}{\param{wxDC\&
}{ dc
},
\param{bool
}{ moveControlPoints=TRUE
}}
2759 Called when the line attached to an shape need to be repositioned,
2760 because the shape has moved.
2762 \membersection{wxShapeEvtHandler::OnMoveLinks
}
2764 \func{void
}{OnMoveLinks
}{\param{wxDC\&
}{ dc
}}
2766 Called when the lines attached to an shape need to be repositioned,
2767 because the shape has moved.
2769 \membersection{wxShapeEvtHandler::OnMovePost
}
2771 \func{bool
}{OnMovePost
}{\param{wxDC\&
}{ dc
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{double
}{ oldX
},
\param{double
}{ oldY
},
\param{bool
}{ display = TRUE
}}
2773 Called just after the shape receives a move request.
2775 \membersection{wxShapeEvtHandler::OnMovePre
}
2777 \func{bool
}{OnMovePre
}{\param{wxDC\&
}{ dc
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{double
}{ oldX
},
\param{double
}{ oldY
},
\param{bool
}{ display = TRUE
}}
2779 Called just before the shape receives a move request. Returning TRUE
2780 allows the move to be processed; returning FALSE vetoes the move.
2782 \membersection{wxShapeEvtHandler::OnRightClick
}
2784 \func{void
}{OnRightClick
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0},
\param{int
}{ attachment =
0}}
2786 Called when the shape receives a mouse mouse click event.
2788 \membersection{wxShapeEvtHandler::OnSize
}
2790 \func{void
}{OnSize
}{\param{double
}{ x
},
\param{double
}{ y
}}
2792 Called when the shape receives a resize request.
2794 \membersection{wxShapeEvtHandler::OnSizingBeginDragLeft
}
2796 \func{void
}{OnSizingBeginDragLeft
}{\param{wxControlPoint*
}{ pt
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2798 Called when a sizing drag is beginning.
2800 \membersection{wxShapeEvtHandler::OnSizingDragLeft
}
2802 \func{void
}{OnSizingDragLeft
}{\param{wxControlPoint*
}{ pt
},
\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2804 Called when a sizing drag is occurring.
2806 \membersection{wxShapeEvtHandler::OnSizingEndDragLeft
}
2808 \func{void
}{OnSizingEndDragLeft
}{\param{wxControlPoint*
}{ pt
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2810 Called when a sizing drag is ending.
2812 \membersection{wxShapeEvtHandler::SetPreviousHandler
}\label{wxshapeevthandlersetprevioushandler
}
2814 \func{void
}{SetPreviousHandler
}{\param{wxShapeEvtHandler*
}{ handler
}}
2816 Sets the previous handler.
2818 \membersection{wxShapeEvtHandler::SetShape
}\label{wxshapeevthandlersetshape
}
2820 \func{void
}{SetShape
}{\param{wxShape*
}{ shape
}}
2822 Sets the shape for this handler.
2824 \section{\class{wxTextShape
}}\label{wxtextshape
}
2826 As wxRectangleShape, but only the text is displayed.
2828 \wxheading{Derived from
}
2830 \helpref{wxRectangleShape
}{wxrectangleshape
}
2832 \latexignore{\rtfignore{\wxheading{Members
}}}
2834 \membersection{wxTextShape::wxTextShape
}
2836 \func{void
}{wxTextShape
}{\param{double
}{ width =
0.0},
\param{double
}{ height =
0.0}}
2840 \membersection{wxTextShape::
\destruct{wxTextShape
}}
2842 \func{void
}{\destruct{wxTextShape
}}{\void}
2846 \section{Functions
}\label{functions
}
2848 These are the OGL functions.
2850 \membersection{::wxOGLInitialize
}
2852 \func{void
}{wxOGLInitialize
}{\void}
2856 \membersection{::wxOGLCleanUp
}
2858 \func{void
}{wxOGLCleanUp
}{\void}