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::GetCanvas
}
230 \constfunc{wxShapeCanvas*
}{GetCanvas
}{\void}
232 Returns the shape canvas associated with this diagram.
234 \membersection{wxDiagram::GetGridSpacing
}
236 \constfunc{double
}{GetGridSpacing
}{\void}
238 Returns the grid spacing.
240 \membersection{wxDiagram::GetMouseTolerance
}
242 \func{int
}{GetMouseTolerance
}{\void}
244 Returns the tolerance within which a mouse move is ignored.
246 \membersection{wxDiagram::GetShapeList
}
248 \constfunc{wxList*
}{GetShapeList
}{\void}
250 Returns a pointer to the internal shape list.
252 \membersection{wxDiagram::GetQuickEditMode
}
254 \constfunc{bool
}{GetQuickEditMode
}{\void}
256 Returns quick edit mode.
258 \membersection{wxDiagram::GetSnapToGrid
}
260 \constfunc{bool
}{GetSnapToGrid
}{\void}
262 Returns snap-to-grid mode.
264 \membersection{wxDiagram::InsertShape
}
266 \func{void
}{InsertShape
}{\param{wxShape *
}{shape
}}
268 Inserts a shape at the front of the shape list.
270 \membersection{wxDiagram::LoadFile
}
272 \func{bool
}{LoadFile
}{\param{const wxString\&
}{filename
}}
274 Loads the diagram from a file.
276 \membersection{wxDiagram::OnDatabaseLoad
}
278 \func{void
}{OnDatabaseLoad
}{\param{wxExprDatabase\&
}{ database
}}
280 Called just after the nodes and lines have been read from the wxExprDatabase. You may override this;
281 the default member does nothing.
283 \membersection{wxDiagram::OnDatabaseSave
}
285 \func{void
}{OnDatabaseSave
}{\param{wxExprDatabase\&
}{ database
}}
287 Called just after the nodes and lines have been written to the wxExprDatabase. You may override this;
288 the default member does nothing.
290 \membersection{wxDiagram::OnHeaderLoad
}
292 \func{bool
}{OnHeaderLoad
}{\param{wxExprDatabase\&
}{ database
},
\param{wxExpr\&
}{ expr
}}
294 Called to allow the `diagram' header object to be read. The default member reads no further information.
295 You may wish to override this to read version information, author name, etc.
297 \membersection{wxDiagram::OnHeaderSave
}
299 \func{bool
}{OnHeaderSave
}{\param{wxExprDatabase\&
}{ database
},
\param{wxExpr\&
}{ expr
}}
301 Called to allow instantiation of the `diagram' header object. The default member writes no further information.
302 You may wish to override this to include version information, author name, etc.
304 \membersection{wxDiagram::OnShapeLoad
}
306 \func{bool
}{OnShapeLoad
}{\param{wxExprDatabase\&
}{ database
},
\param{wxShape\&
}{ shape
},
\param{wxExpr\&
}{ expr
}}
308 Called to read the shape from the
{\it expr
}. You may override this, but call this function first.
309 The default member calls ReadAttributes for the shape.
311 \membersection{wxDiagram::OnShapeSave
}
313 \func{bool
}{OnShapeSave
}{\param{wxExprDatabase\&
}{ database
},
\param{wxShape\&
}{ shape
},
\param{wxExpr\&
}{ expr
}}
315 Called to save the shape to the
{\it expr
} and
{\it database
}. You may override this, but call this function first.
316 The default member calls WriteAttributes for the shape, appends the shape to the database, and of the shape
317 is a composite, recursively calls OnShapeSave for its children.
319 \membersection{wxDiagram::ReadContainerGeometry
}
321 \func{void
}{ReadContainerGeometry
}{\param{wxExprDatabase\&
}{ database
}}
323 Reads container geometry from a wxExprDatabase, linking up nodes which
324 are part of a composite. You probably won't need to redefine this.
326 \membersection{wxDiagram::ReadLines
}
328 \func{void
}{ReadLines
}{\param{wxExprDatabase\&
}{ database
}}
330 Reads lines from a wxExprDatabase. You probably won't need to redefine this.
332 \membersection{wxDiagram::ReadNodes
}
334 \func{void
}{ReadNodes
}{\param{wxExprDatabase\&
}{ database
}}
336 Reads nodes from a wxExprDatabase. You probably won't need to redefine this.
338 \membersection{wxDiagram::RecentreAll
}
340 \func{void
}{RecentreAll
}{\param{wxDC\&
}{ dc
}}
342 Make sure all text that should be centred, is centred.
344 \membersection{wxDiagram::Redraw
}
346 \func{void
}{Redraw
}{\param{wxDC\&
}{ dc
}}
348 Draws the shapes in the diagram on the specified device context.
350 \membersection{wxDiagram::RemoveAllShapes
}
352 \func{void
}{RemoveAllShapes
}{\void}
354 Removes all shapes from the diagram but does not delete the shapes.
356 \membersection{wxDiagram::RemoveShape
}
358 \func{void
}{RemoveShape
}{\param{wxShape*
}{ shape
}}
360 Removes the shape from the diagram (non-recursively) but does not delete it.
362 \membersection{wxDiagram::SaveFile
}
364 \func{bool
}{SaveFile
}{\param{const wxString\&
}{filename
}}
366 Saves the diagram in a file.
368 \membersection{wxDiagram::SetCanvas
}\label{wxdiagramsetcanvas
}
370 \func{void
}{SetCanvas
}{\param{wxShapeCanvas*
}{ canvas
}}
372 Sets the canvas associated with this diagram.
374 \membersection{wxDiagram::SetGridSpacing
}
376 \func{void
}{SetGridSpacing
}{\param{double
}{ spacing
}}
378 Sets the grid spacing. The default is
5.
380 \membersection{wxDiagram::SetMouseTolerance
}
382 \func{void
}{SetMouseTolerance
}{\param{int
}{ tolerance
}}
384 Sets the tolerance within which a mouse move is ignored. The default is
3 pixels.
386 \membersection{wxDiagram::SetQuickEditMode
}
388 \func{void
}{SetQuickEditMode
}{\param{bool
}{ mode
}}
390 Sets quick-edit-mode on or off. In this mode, refreshes are minimized, but the
391 diagram may need manual refreshing occasionally.
393 \membersection{wxDiagram::SetSnapToGrid
}
395 \func{void
}{SetSnapToGrid
}{\param{bool
}{ snap
}}
397 Sets snap-to-grid mode on or off. The default is on.
399 \membersection{wxDiagram::ShowAll
}
401 \func{void
}{ShowAll
}{\param{bool
}{ show
}}
403 Calls Show for each shape in the diagram.
405 \membersection{wxDiagram::Snap
}
407 \func{void
}{Snap
}{\param{double *
}{x
},
\param{double *
}{y
}}
409 `Snaps' the coordinate to the nearest grid position, if snap-to-grid is on.
411 \section{\class{wxDrawnShape
}}\label{wxdrawnshape
}
413 Draws a pseduo-metafile shape, which can be loaded from a simple Windows metafile.
415 wxDrawnShape allows you to specify a different shape for each of four orientations (North, West,
416 South and East). It also provides a set of drawing functions for programmatic drawing of a shape,
417 so that during construction of the shape you can draw into it as if it were a device context.
419 \wxheading{Derived from
}
421 \helpref{wxRectangleShape
}{wxrectangleshape
}
423 See also
\helpref{wxRectangleShape
}{wxrectangleshape
}.
425 \latexignore{\rtfignore{\wxheading{Members
}}}
427 \membersection{wxDrawnShape::wxDrawnShape
}
429 \func{}{wxDrawnShape
}{\void}
433 \membersection{wxDrawnShape::
\destruct{wxDrawnShape
}}
435 \func{}{\destruct{wxDrawnShape
}}{\void}
439 \membersection{wxDrawnShape::CalculateSize
}
441 \func{void
}{CalculateSize
}{\void}
443 Calculates the wxDrawnShape size from the current metafile. Call this after you have drawn
446 \membersection{wxDrawnShape::DestroyClippingRect
}\label{wxdrawnshapedestroyclippingrect
}
448 \func{void
}{DestroyClippingRect
}{\void}
450 Destroys the clipping rectangle. See also
\helpref{wxDrawnShape::SetClippingRect
}{wxdrawnshapesetclippingrect
}.
452 \membersection{wxDrawnShape::DrawArc
}\label{wxdrawnshapedrawarc
}
454 \func{void
}{DrawArc
}{\param{const wxPoint\&
}{ centrePoint
},
\param{const wxPoint\&
}{ startPoint
},
455 \param{const wxPoint\&
}{ endPoint
}}
457 Draws an arc (see wxWindows documentation for details).
459 \membersection{wxDrawnShape::DrawAtAngle
}\label{wxdrawnshapedrawatangle
}
461 \func{void
}{DrawAtAngle
}{\param{int
}{ angle
}}
463 Sets the metafile for the given orientation, which can be one of:
465 \begin{itemize
}\itemsep=
0pt
466 \item oglDRAWN
\_ANGLE_0
467 \item oglDRAWN
\_ANGLE_90
468 \item oglDRAWN
\_ANGLE_180
469 \item oglDRAWN
\_ANGLE_270
472 See also
\helpref{wxDrawnShape::GetAngle
}{wxdrawnshapegetangle
}.
474 \membersection{wxDrawnShape::DrawEllipticArc
}\label{wxdrawnshapedrawellipticarc
}
476 \func{void
}{DrawEllipticArc
}{\param{const wxRect\&
}{ rect
},
\param{double
}{ startAngle
},
\param{double
}{ endAngle
}}
478 Draws an elliptic arc (see wxWindows documentation for details).
480 \membersection{wxDrawnShape::DrawLine
}\label{wxdrawnshapedrawline
}
482 \func{void
}{DrawLine
}{\param{const wxPoint\&
}{ point1
},
\param{const wxPoint\&
}{ point2
}}
484 Draws a line from
{\it point1
} to
{\it point2
}.
486 \membersection{wxDrawnShape::DrawLines
}\label{wxdrawnshapedrawlines
}
488 \func{void
}{DrawLines
}{\param{int
}{ n
},
\param{wxPoint\&
}{ points
[]}}
492 \membersection{wxDrawnShape::DrawPoint
}\label{wxdrawnshapedrawpoint
}
494 \func{void
}{DrawPoint
}{\param{const wxPoint\&
}{ point
}}
498 \membersection{wxDrawnShape::DrawPolygon
}\label{wxdrawnshapedrawpolygon
}
500 \func{void
}{DrawPolygon
}{\param{int
}{ n
},
\param{wxPoint\&
}{ points
[]},
\param{int
}{ flags =
0}}
502 Draws a polygon.
{\it flags
} can be one or more of
{\bf oglMETAFLAGS
\_OUTLINE} (use this polygon for the drag outline)
503 and
{\bf oglMETAFLAGS
\_ATTACHMENTS} (use the vertices of this polygon for attachments).
505 \membersection{wxDrawnShape::DrawRectangle
}\label{wxdrawnshapedrawrectangle
}
507 \func{void
}{DrawRectangle
}{\param{const wxRect\&
}{ rect
}}
511 \membersection{wxDrawnShape::DrawRoundedRectangle
}\label{wxdrawnshapedrawroundedrectangle
}
513 \func{void
}{DrawRoundedRectangle
}{\param{const wxRect\&
}{ rect
},
\param{double
}{ radius
}}
515 Draws a rounded rectangle.
{\it radius
} is the corner radius. If
{\it radius
} is negative,
516 it expresses the radius as a proportion of the smallest dimension of the rectangle.
518 \membersection{wxDrawnShape::DrawSpline
}\label{wxdrawnshapedrawspline
}
520 \func{void
}{DrawSpline
}{\param{int
}{ n
},
\param{wxPoint\&
}{ points
[]}}
522 Draws a spline curve.
524 \membersection{wxDrawnShape::DrawText
}\label{wxdrawnshapedrawtext
}
526 \func{void
}{DrawText
}{\param{const wxString\&
}{ text
},
\param{const wxPoint\&
}{ point
}}
528 Draws text at the given point.
530 \membersection{wxDrawnShape::GetAngle
}\label{wxdrawnshapegetangle
}
532 \constfunc{int
}{GetAngle
}{\void}
534 Returns the current orientation, which can be one of:
536 \begin{itemize
}\itemsep=
0pt
537 \item oglDRAWN
\_ANGLE_0
538 \item oglDRAWN
\_ANGLE_90
539 \item oglDRAWN
\_ANGLE_180
540 \item oglDRAWN
\_ANGLE_270
543 See also
\helpref{wxDrawnShape::DrawAtAngle
}{wxdrawnshapedrawatangle
}.
545 \membersection{wxDrawnShape::GetMetaFile
}
547 \constfunc{wxPseudoMetaFile\&
}{GetMetaFile
}{\void}
549 Returns a reference to the internal `pseudo-metafile'.
551 \membersection{wxDrawnShape::GetRotation
}\label{wxdrawnshapegetrotation
}
553 \constfunc{double
}{GetRotation
}{\void}
555 Returns the current rotation of the shape in radians.
557 \membersection{wxDrawnShape::LoadFromMetaFile
}
559 \func{bool
}{LoadFromMetaFile
}{\param{const wxString\&
}{filename
}}
561 Loads a (very simple) Windows metafile, created for example by Top Draw, the Windows shareware graphics package.
563 \membersection{wxDrawnShape::Rotate
}
565 \func{void
}{Rotate
}{\param{double
}{x
},
\param{double
}{y
},
\param{double
}{theta
}}
567 Rotate about the given axis by the given amount in radians.
569 \membersection{wxDrawnShape::SetClippingRect
}\label{wxdrawnshapesetclippingrect
}
571 \func{void
}{SetClippingRect
}{\param{const wxRect\&
}{ rect
}}
573 Sets the clipping rectangle. See also
\helpref{wxDrawnShape::DestroyClippingRect
}{wxdrawnshapedestroyclippingrect
}.
575 \membersection{wxDrawnShape::SetDrawnBackgroundColour
}\label{wxdrawnshapesetdrawnbackgroundcolour
}
577 \func{void
}{SetDrawnBackgroundColour
}{\param{const wxColour\&
}{ colour
}}
579 Sets the current background colour for the current metafile.
581 \membersection{wxDrawnShape::SetDrawnBackgroundMode
}\label{wxdrawnshapesetdrawnbackgroundmode
}
583 \func{void
}{SetDrawnBackgroundMode
}{\param{int
}{ mode
}}
585 Sets the current background mode for the current metafile.
587 \membersection{wxDrawnShape::SetDrawnBrush
}\label{wxdrawnshapesetdrawnbrush
}
589 \func{void
}{SetDrawnBrush
}{\param{wxPen*
}{ pen
},
\param{bool
}{ isOutline = FALSE
}}
591 Sets the pen for this metafile. If
{\it isOutline
} is TRUE, this pen is taken to indicate the outline
592 (and if the outline pen is changed for the whole shape, the pen will be replaced with the outline pen).
594 \membersection{wxDrawnShape::SetDrawnFont
}\label{wxdrawnshapesetdrawnfont
}
596 \func{void
}{SetDrawnFont
}{\param{wxFont*
}{ font
}}
598 Sets the current font for the current metafile.
600 \membersection{wxDrawnShape::SetDrawnPen
}\label{wxdrawnshapesetdrawnpen
}
602 \func{void
}{SetDrawnPen
}{\param{wxPen*
}{ pen
},
\param{bool
}{ isOutline = FALSE
}}
604 Sets the pen for this metafile. If
{\it isOutline
} is TRUE, this pen is taken to indicate the outline
605 (and if the outline pen is changed for the whole shape, the pen will be replaced with the outline pen).
607 \membersection{wxDrawnShape::SetDrawnTextColour
}\label{wxdrawnshapesetdrawntextcolour
}
609 \func{void
}{SetDrawnTextColour
}{\param{const wxColour\&
}{ colour
}}
611 Sets the current text colour for the current metafile.
613 \membersection{wxDrawnShape::Scale
}
615 \func{void
}{Scale
}{\param{double
}{sx
},
\param{double
}{sy
}}
617 Scales the shape by the given amount.
619 \membersection{wxDrawnShape::SetSaveToFile
}
621 \func{void
}{SetSaveToFile
}{\param{bool
}{save
}}
623 If
{\it save
} is TRUE, the image will be saved along with the shape's other attributes. The reason
624 why this might not be desirable is that if there are many shapes with the same image, it would be
625 more efficient for the application to save one copy, and not duplicate the information for every
626 shape. The default is TRUE.
628 \membersection{wxDrawnShape::Translate
}
630 \func{void
}{Translate
}{\param{double
}{x
},
\param{double
}{y
}}
632 Translates the shape by the given amount.
634 \section{\class{wxCircleShape
}}\label{wxcircleshape
}
636 An wxEllipseShape whose width and height are the same.
638 \wxheading{Derived from
}
640 \helpref{wxEllipseShape
}{wxellipseshape
}.
642 \latexignore{\rtfignore{\wxheading{Members
}}}
644 \membersection{wxCircleShape::wxCircleShape
}
646 \func{}{wxCircleShape
}{\param{double
}{ width =
0.0}}
650 \membersection{wxCircleShape::
\destruct{wxCircleShape
}}
652 \func{}{\destruct{wxCircleShape
}}{\void}
656 \section{\class{wxCompositeShape
}}\label{wxcompositeshape
}
658 This is an object with a list of child objects, and a list of size
659 and positioning constraints between the children.
661 \wxheading{Derived from
}
663 \helpref{wxRectangleShape
}{wxrectangleshape
}
667 \helpref{wxCompositeShape overview
}{compositeshapeoverview
}
669 \latexignore{\rtfignore{\wxheading{Members
}}}
671 \membersection{wxCompositeShape::wxCompositeShape
}
673 \func{}{wxCompositeShape
}{\void}
677 \membersection{wxCompositeShape::
\destruct{wxCompositeShape
}}
679 \func{}{\destruct{wxCompositeShape
}}{\void}
683 \membersection{wxCompositeShape::AddChild
}\label{wxcompositeshapeaddchild
}
685 \func{void
}{AddChild
}{\param{wxShape *
}{child
},
\param{wxShape *
}{addAfter = NULL
}}
687 Adds a child shape to the composite. If
{\it addAfter
} is non-NULL, the shape will be added
690 \membersection{wxCompositeShape::AddConstraint
}\label{wxcompositeshapeaddconstraint
}
692 \func{wxOGLConstraint *
}{AddConstraint
}{\param{wxOGLConstraint *
}{constraint
}}
694 \func{wxOGLConstraint *
}{AddConstraint
}{\param{int
}{ type
},
\param{wxShape *
}{constraining
},
\param{wxList\&
}{constrained
}}
696 \func{wxOGLConstraint *
}{AddConstraint
}{\param{int
}{ type
},
\param{wxShape *
}{constraining
},
\param{wxShape *
}{constrained
}}
698 Adds a constraint to the composite.
700 \membersection{wxCompositeShape::CalculateSize
}
702 \func{void
}{CalculateSize
}{\void}
704 Calculates the size and position of the composite based on child sizes and positions.
706 \membersection{wxCompositeShape::ContainsDivision
}
708 \func{bool
}{FindContainerImage
}{\param{wxDivisionShape *
}{division
}}
710 Returns TRUE if
{\it division
} is a descendant of this container.
712 \membersection{wxCompositeShape::DeleteConstraint
}
714 \func{void
}{DeleteConstraint
}{\param{wxOGLConstraint *
}{constraint
}}
716 Deletes constraint from composite.
718 \membersection{wxCompositeShape::DeleteConstraintsInvolvingChild
}
720 \func{void
}{DeleteConstraintsInvolvingChild
}{\param{wxShape *
}{child
}}
722 This function deletes constraints which mention the given child. Used when
723 deleting a child from the composite.
725 \membersection{wxCompositeShape::FindConstraint
}
727 \func{wxOGLConstraint *
}{FindConstraint
}{\param{long
}{ id
},
\param{wxCompositeShape **
}{actualComposite
}}
729 Finds the constraint with the given id, also returning the actual composite the constraint was in,
730 in case that composite was a descendant of this composite.
732 \membersection{wxCompositeShape::FindContainerImage
}
734 \func{wxShape *
}{FindContainerImage
}{\void}
736 Finds the image used to visualize a container. This is any child
737 of the composite that is not in the divisions list.
739 \membersection{wxCompositeShape::GetConstraints
}
741 \constfunc{wxList\&
}{GetConstraints
}{\void}
743 Returns a reference to the list of constraints.
745 \membersection{wxCompositeShape::GetDivisions
}
747 \constfunc{wxList\&
}{GetDivisions
}{\void}
749 Returns a reference to the list of divisions.
751 \membersection{wxCompositeShape::MakeContainer
}\label{wxcompositeshapemakecontainer
}
753 \func{void
}{MakeContainer
}{\void}
755 Makes this composite into a container by creating one child wxDivisionShape.
757 \membersection{wxCompositeShape::OnCreateDivision
}
759 \func{wxDivisionShape *
}{OnCreateDivision
}{\void}
761 Called when a new division shape is required. Can be overriden to allow an application
762 to use a different class of division.
764 \membersection{wxCompositeShape::Recompute
}\label{wxcompositeshaperecompute
}
766 \func{bool
}{Recompute
}{\void}
768 Recomputes any constraints associated with the object. If FALSE is returned,
769 the constraints could not be satisfied (there was an inconsistency).
771 \membersection{wxCompositeShape::RemoveChild
}
773 \func{void
}{RemoveChild
}{\param{wxShape *
}{child
}}
775 Removes the child from the composite and any constraint relationships, but does not
778 \section{\class{wxDividedShape
}}\label{wxdividedshape
}
780 A wxDividedShape is a rectangle with a number of vertical divisions. Each
781 division may have its text formatted with independent characteristics, and
782 the size of each division relative to the whole image may be specified.
784 \wxheading{Derived from
}
786 \helpref{wxRectangleShape
}{wxrectangleshape
}
790 \helpref{wxDividedShape overview
}{dividedshapeoverview
}
792 \latexignore{\rtfignore{\wxheading{Members
}}}
794 \membersection{wxDividedShape::wxDividedShape
}
796 \func{}{wxDividedShape
}{\param{double
}{ width =
0.0},
\param{double
}{ height =
0.0}}
800 \membersection{wxDividedShape::
\destruct{wxDividedShape
}}
802 \func{}{\destruct{wxDividedShape
}}{\void}
806 \membersection{wxDividedShape::EditRegions
}
808 \func{void
}{EditRegions
}{\void}
810 Edit the region colours and styles.
812 \membersection{wxDividedShape::SetRegionSizes
}
814 \func{void
}{SetRegionSizes
}{\void}
816 Set all region sizes according to proportions and
817 this object total size.
819 \section{\class{wxDivisionShape
}}\label{wxdivisionshape
}
821 A division shape is like a composite in that it can contain further objects, but is used exclusively to
822 divide another shape into regions, or divisions. A wxDivisionShape is never free-standing.
824 \wxheading{Derived from
}
826 \helpref{wxCompositeShape
}{wxcompositeshape
}
830 \helpref{wxCompositeShape overview
}{compositeshapeoverview
}
832 \latexignore{\rtfignore{\wxheading{Members
}}}
834 \membersection{wxDivisionShape::wxDivisionShape
}
836 \func{}{wxDivisionShape
}{\void}
840 \membersection{wxDivisionShape::
\destruct{wxDivisionShape
}}
842 \func{}{\destruct{wxDivisionShape
}}{\void}
846 \membersection{wxDivisionShape::AdjustBottom
}
848 \func{void
}{AdjustBottom
}{\param{double
}{ bottom
},
\param{bool
}{ test
}}
850 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
852 \membersection{wxDivisionShape::AdjustLeft
}
854 \func{void
}{AdjustLeft
}{\param{double
}{ left
},
\param{bool
}{ test
}}
856 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
858 \membersection{wxDivisionShape::AdjustRight
}
860 \func{void
}{AdjustRight
}{\param{double
}{ right
},
\param{bool
}{ test
}}
862 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
864 \membersection{wxDivisionShape::AdjustTop
}
866 \func{void
}{AdjustTop
}{\param{double
}{ top
},
\param{bool
}{ test
}}
868 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
870 \membersection{wxDivisionShape::Divide
}\label{wxdivisionshapedivide
}
872 \func{void
}{Divide
}{\param{int
}{ direction
}}
874 Divide this division into two further divisions, horizontally (
{\it direction
} is wxHORIZONTAL) or
875 vertically (
{\it direction
} is wxVERTICAL).
877 \membersection{wxDivisionShape::EditEdge
}
879 \func{void
}{EditEdge
}{\param{int
}{ side
}}
881 Interactively edit style of left or top side.
883 \membersection{wxDivisionShape::GetBottomSide
}
885 \func{wxDivisionShape *
}{GetBottomSide
}{\void}
887 Returns a pointer to the division on the bottom side of this division.
889 \membersection{wxDivisionShape::GetHandleSide
}
891 \func{int
}{GetHandleSide
}{\void}
893 Returns the side which the handle appears on (DIVISION
\_SIDE\_LEFT or DIVISION
\_SIDE\_TOP).
895 \membersection{wxDivisionShape::GetLeftSide
}
897 \func{wxDivisionShape *
}{GetLeftSide
}{\void}
899 Returns a pointer to the division on the left side of this division.
901 \membersection{wxDivisionShape::GetLeftSideColour
}
903 \func{wxString
}{GetLeftSideColour
}{\void}
905 Returns a pointer to the colour used for drawing the left side of the division.
907 \membersection{wxDivisionShape::GetLeftSidePen
}
909 \func{wxPen *
}{GetLeftSidePen
}{\void}
911 Returns a pointer to the pen used for drawing the left side of the division.
913 \membersection{wxDivisionShape::GetRightSide
}
915 \func{wxDivisionShape *
}{GetRightSide
}{\void}
917 Returns a pointer to the division on the right side of this division.
919 \membersection{wxDivisionShape::GetTopSide
}
921 \func{wxDivisionShape *
}{GetTopSide
}{\void}
923 Returns a pointer to the division on the top side of this division.
925 \membersection{wxDivisionShape::GetTopSideColour
}
927 \func{wxString
}{GetTopSideColour
}{\void}
929 Returns a pointer to the colour used for drawing the top side of the division.
931 \membersection{wxDivisionShape::GetTopSidePen
}
933 \func{wxPen *
}{GetTopSidePen
}{\void}
935 Returns a pointer to the pen used for drawing the left side of the division.
937 \membersection{wxDivisionShape::ResizeAdjoining
}
939 \func{void
}{ResizeAdjoining
}{\param{int
}{ side
},
\param{double
}{ newPos
},
\param{bool
}{ test
}}
941 Resize adjoining divisions at the given side. If
{\it test
} is TRUE,
942 just see whether it's possible for each adjoining region,
943 returning FALSE if it's not.
945 {\it side
} can be one of:
947 \begin{itemize
}\itemsep=
0pt
948 \item DIVISION
\_SIDE\_NONE
949 \item DIVISION
\_SIDE\_LEFT
950 \item DIVISION
\_SIDE\_TOP
951 \item DIVISION
\_SIDE\_RIGHT
952 \item DIVISION
\_SIDE\_BOTTOM
955 \membersection{wxDivisionShape::PopupMenu
}
957 \func{void
}{PopupMenu
}{\param{double
}{ x
},
\param{double
}{ y
}}
959 Popup the division menu.
961 \membersection{wxDivisionShape::SetBottomSide
}
963 \func{void
}{SetBottomSide
}{\param{wxDivisionShape *
}{shape
}}
965 Set the pointer to the division on the bottom side of this division.
967 \membersection{wxDivisionShape::SetHandleSide
}
969 \func{int
}{SetHandleSide
}{\void}
971 Sets the side which the handle appears on (DIVISION
\_SIDE\_LEFT or DIVISION
\_SIDE\_TOP).
973 \membersection{wxDivisionShape::SetLeftSide
}
975 \func{void
}{SetLeftSide
}{\param{wxDivisionShape *
}{shape
}}
977 Set the pointer to the division on the left side of this division.
979 \membersection{wxDivisionShape::SetLeftSideColour
}
981 \func{void
}{SetLeftSideColour
}{\param{const wxString\&
}{colour
}}
983 Sets the colour for drawing the left side of the division.
985 \membersection{wxDivisionShape::SetLeftSidePen
}
987 \func{void
}{SetLeftSidePen
}{\param{wxPen *
}{pen
}}
989 Sets the pen for drawing the left side of the division.
991 \membersection{wxDivisionShape::SetRightSide
}
993 \func{void
}{SetRightSide
}{\param{wxDivisionShape *
}{shape
}}
995 Set the pointer to the division on the right side of this division.
997 \membersection{wxDivisionShape::SetTopSide
}
999 \func{void
}{SetTopSide
}{\param{wxDivisionShape *
}{shape
}}
1001 Set the pointer to the division on the top side of this division.
1003 \membersection{wxDivisionShape::SetTopSideColour
}
1005 \func{void
}{SetTopSideColour
}{\param{const wxString\&
}{colour
}}
1007 Sets the colour for drawing the top side of the division.
1009 \membersection{wxDivisionShape::SetTopSidePen
}
1011 \func{void
}{SetTopSidePen
}{\param{wxPen *
}{pen
}}
1013 Sets the pen for drawing the top side of the division.
1015 \section{\class{wxEllipseShape
}}\label{wxellipseshape
}
1017 The wxEllipseShape behaves similarly to the wxRectangleShape but is
1020 \wxheading{Derived from
}
1022 \helpref{wxShape
}{wxshape
}
1024 \latexignore{\rtfignore{\wxheading{Members
}}}
1026 \membersection{wxEllipseShape::wxEllipseShape
}
1028 \func{}{wxEllipseShape
}{\param{double
}{ width =
0.0},
\param{double
}{ height =
0.0}}
1032 \membersection{wxEllipseShape::
\destruct{wxEllipseShape
}}
1034 \func{}{\destruct{wxEllipseShape
}}{\void}
1038 \section{\class{wxLineShape
}}\label{wxlineshape
}
1040 A wxLineShape may be attached to two nodes; it may be segmented, in which
1041 case a control point is drawn for each joint.
1043 A wxLineShape may have arrows at the beginning, end and centre.
1045 \wxheading{Derived from
}
1047 \helpref{wxShape
}{wxshape
}
1049 \latexignore{\rtfignore{\wxheading{Members
}}}
1051 \membersection{wxLineShape::wxLineShape
}
1053 \func{}{wxLineShape
}{\void}
1057 Usually you will call
\helpref{wxLineShape::MakeLineControlPoints
}{wxlineshapemakelinecontrolpoints
} to
1058 specify the number of segments in the line.
1060 \membersection{wxLineShape::
\destruct{wxLineShape
}}
1062 \func{}{\destruct{wxLineShape
}}{\void}
1066 \membersection{wxLineShape::AddArrow
}\label{wxlineshapeaddarrow
}
1068 \func{void
}{AddArrow
}{\param{WXTYPE
}{ type
},
\param{bool
}{ end = ARROW
\_POSITION\_END},
\param{double
}{ arrowSize =
10.0},
1069 \param{double
}{ xOffset =
0.0},
\param{const wxString\&
}{name = ""
},
\param{wxPseudoMetaFile *
}{mf = NULL
},
\param{long
}{ arrowId = -
1}}
1071 Adds an arrow (or annotation) to the line.
1073 {\it type
} may currently be one of:
1075 \begin{description
}\itemsep=
0pt
1076 \item[ARROW
\_HOLLOW\_CIRCLE] Hollow circle.
1077 \item[ARROW
\_FILLED\_CIRCLE] Filled circle.
1078 \item[ARROW
\_ARROW] Conventional arrowhead.
1079 \item[ARROW
\_SINGLE\_OBLIQUE] Single oblique stroke.
1080 \item[ARROW
\_DOUBLE\_OBLIQUE] Double oblique stroke.
1081 \item[ARROW
\_DOUBLE\_METAFILE] Custom arrowhead.
1084 {\it end
} may currently be one of:
1086 \begin{description
}\itemsep=
0pt
1087 \item[ARROW
\_POSITION\_END] Arrow appears at the end.
1088 \item[ARROW
\_POSITION\_START] Arrow appears at the start.
1091 {\it arrowSize
} specifies the length of the arrow.
1093 {\it xOffset
} specifies the offset from the end of the line.
1095 {\it name
} specifies a name for the arrow.
1097 {\it mf
} can be a wxPseduoMetaFile, perhaps loaded from a simple Windows metafile.
1099 {\it arrowId
} is the id for the arrow.
1101 \membersection{wxLineShape::AddArrowOrdered
}
1103 \func{void
}{AddArrowOrdered
}{\param{wxArrowHead *
}{arrow
},
\param{wxList\&
}{ referenceList
},
\param{int
}{ end
}}
1105 Add an arrowhead in the position indicated by the reference
1106 list of arrowheads, which contains all legal arrowheads for this
1107 line, in the correct order.
1111 Reference list: a b c d e
1112 Current line list: a d
1115 Add c, then line list is: a c d.
1117 If no legal arrowhead position, return FALSE. Assume reference list is
1118 for one end only, since it potentially defines the ordering for any one
1119 of the
3 positions. So we don't check the reference list for arrowhead
1122 \membersection{wxLineShape::ClearArrow
}
1124 \func{bool
}{ClearArrow
}{\param{const wxString\&
}{name
}}
1126 Delete the arrow with the given name.
1128 \membersection{wxLineShape::ClearArrowsAtPosition
}
1130 \func{void
}{ClearArrowsAtPosition
}{\param{int
}{ position = -
1}}
1132 Delete the arrows at the specified position, or at any position if
{\it position
} is -
1.
1134 \membersection{wxLineShape::DrawArrow
}
1136 \func{void
}{DrawArrow
}{\param{ArrowHead *
}{arrow
},
\param{double
}{ xOffset
},
\param{bool
}{ proportionalOffset
}}
1138 Draws the given arrowhead (or annotation).
1140 \membersection{wxLineShape::DeleteArrowHead
}
1142 \func{bool
}{DeleteArrowHead
}{\param{long
}{ arrowId
}}
1144 \func{bool
}{DeleteArrowHead
}{\param{int
}{ position
},
\param{const wxString\&
}{name
}}
1146 Delete arrowhead by id or position and name.
1148 \membersection{wxLineShape::DeleteLineControlPoint
}
1150 \func{bool
}{DeleteLineControlPoint
}{\void}
1152 Deletes an arbitary point on the line.
1154 \membersection{wxLineShape::DrawArrows
}
1156 \func{void
}{DrawArrows
}{\param{wxDC\&
}{ dc
}}
1160 \membersection{wxLineShape::DrawRegion
}
1162 \func{void
}{DrawRegion
}{\param{wxDC\&
}{ dc
},
\param{wxShapeRegion *
}{region
},
\param{double
}{ x
},
\param{double
}{ y
}}
1164 Format one region at this position.
1166 \membersection{wxLineShape::EraseRegion
}
1168 \func{void
}{EraseRegion
}{\param{wxDC\&
}{ dc
},
\param{wxShapeRegion *
}{region
},
\param{double
}{ x
},
\param{double
}{ y
}}
1170 Format one region at this position.
1172 \membersection{wxLineShape::FindArrowHead
}
1174 \func{wxArrowHead *
}{FindArrowHead
}{\param{long
}{ arrowId
}}
1176 \func{wxArrowHead *
}{FindArrowHead
}{\param{int
}{ position
},
\param{const wxString\&
}{name
}}
1178 Find arrowhead by id or position and name.
1180 \membersection{wxLineShape::FindLineEndPoints
}
1182 \func{void
}{FindLineEndPoints
}{\param{double *
}{fromX
},
\param{double *
}{fromY
},
\param{double *
}{toX
},
\param{double *
}{toY
}}
1184 Finds the x, y points at the two ends of the line. This function can be
1185 used by e.g. line-routing routines to get the actual points on the two
1186 node images where the lines will be drawn to/from.
1188 \membersection{wxLineShape::FindLinePosition
}
1190 \func{int
}{FindLinePosition
}{\param{double
}{x
},
\param{double
}{y
}}
1192 Find which position we're talking about at this x, y.
1193 Returns ARROW
\_POSITION\_START, ARROW
\_POSITION\_MIDDLE, ARROW
\_POSITION\_END.
1195 \membersection{wxLineShape::FindMinimumWidth
}
1197 \func{double
}{FindMinimumWidth
}{\void}
1199 Finds the horizontal width for drawing a line with arrows in minimum
1200 space. Assume arrows at end only.
1202 \membersection{wxLineShape::FindNth
}
1204 \func{void
}{FindNth
}{\param{wxShape *
}{image
},
\param{int *
}{nth
},
\param{int *
}{noArcs
},
\param{bool
}{ incoming
}}
1206 Finds the position of the line on the given object. Specify whether incoming or outgoing lines are
1207 being considered with
{\it incoming
}.
1209 \membersection{wxLineShape::GetAttachmentFrom
}
1211 \constfunc{int
}{GetAttachmentFrom
}{\void}
1213 Returns the attachment point on the `from' node.
1215 \membersection{wxLineShape::GetAttachmentTo
}
1217 \constfunc{int
}{GetAttachmentTo
}{\void}
1219 Returns the attachment point on the `to' node.
1221 \membersection{wxLineShape::GetEnds
}
1223 \func{void
}{GetEnds
}{\param{double *
}{x1
},
\param{double *
}{y1
},
\param{double *
}{x2
},
\param{double *
}{y2
}}
1225 Gets the visible endpoints of the lines for drawing between two objects.
1227 \membersection{wxLineShape::GetFrom
}
1229 \constfunc{wxShape *
}{GetFrom
}{\void}
1231 Gets the `from' object.
1233 \membersection{wxLineShape::GetLabelPosition
}
1235 \func{void
}{GetLabelPosition
}{\param{int
}{ position
},
\param{double *
}{x
},
\param{double *
}{y
}}
1237 Get the reference point for a label. Region x and y are offsets from this.
1238 position is
0 (middle),
1 (start),
2 (end).
1240 \membersection{wxLineShape::GetNextControlPoint
}
1242 \func{wxPoint *
}{GetNextControlPoint
}{\param{wxShape *
}{shape
}}
1244 Find the next control point in the line after the start/end point,
1245 depending on whether the shape is at the start or end.
1247 \membersection{wxLineShape::GetTo
}
1249 \func{wxShape *
}{GetTo
}{\void}
1251 Gets the `to' object.
1253 \membersection{wxLineShape::Initialise
}
1255 \func{void
}{Initialise
}{\void}
1257 Initialises the line object.
1259 \membersection{wxLineShape::InsertLineControlPoint
}
1261 \func{void
}{InsertLineControlPoint
}{\void}
1263 Inserts a control point at an arbitrary position.
1265 \membersection{wxLineShape::IsEnd
}
1267 \func{bool
}{IsEnd
}{\param{wxShape *
}{shape
}}
1269 Returns TRUE if
{\it shape
} is at the end of the line.
1271 \membersection{wxLineShape::IsSpline
}
1273 \func{bool
}{IsSpline
}{\void}
1275 Returns TRUE if a spline is drawn through the control points, and FALSE otherwise.
1277 \membersection{wxLineShape::MakeLineControlPoints
}\label{wxlineshapemakelinecontrolpoints
}
1279 \func{void
}{MakeLineControlPoints
}{\param{int
}{ n
}}
1281 Make a given number of control points (minimum of two).
1283 \membersection{wxLineShape::OnMoveLink
}
1285 \func{void
}{OnMoveLink
}{\param{wxDC\&
}{ dc
},
\param{bool
}{ moveControlPoints = TRUE
}}
1287 Called when a connected object has moved, to move the link to
1290 \membersection{wxLineShape::SetAttachmentFrom
}
1292 \func{void
}{SetAttachmentTo
}{\param{int
}{ fromAttach
}}
1294 Sets the `from' shape attachment.
1296 \membersection{wxLineShape::SetAttachments
}
1298 \func{void
}{SetAttachments
}{\param{int
}{ fromAttach
},
\param{int
}{ toAttach
}}
1300 Specifies which object attachment points should be used at each end of the line.
1302 \membersection{wxLineShape::SetAttachmentTo
}
1304 \func{void
}{SetAttachmentTo
}{\param{int
}{ toAttach
}}
1306 Sets the `to' shape attachment.
1308 \membersection{wxLineShape::SetEnds
}
1310 \func{void
}{SetEnds
}{\param{double
}{ x1
},
\param{double
}{ y1
},
\param{double
}{ x2
},
\param{double
}{ y2
}}
1312 Sets the end positions of the line.
1314 \membersection{wxLineShape::SetFrom
}
1316 \func{void
}{SetFrom
}{\param{wxShape *
}{object
}}
1318 Sets the `from' object for the line.
1320 \membersection{wxLineShape::SetIgnoreOffsets
}
1322 \func{void
}{SetIgnoreOffsets
}{\param{bool
}{ ignore
}}
1324 Tells the shape whether to ignore offsets from the end of the line when drawing.
1326 \membersection{wxLineShape::SetSpline
}
1328 \func{void
}{SetSpline
}{\param{bool
}{ spline
}}
1330 Specifies whether a spline is to be drawn through the control points (TRUE), or a line (FALSE).
1332 \membersection{wxLineShape::SetTo
}
1334 \func{void
}{SetTo
}{\param{wxShape *
}{object
}}
1336 Sets the `to' object for the line.
1338 \membersection{wxLineShape::Straighten
}
1340 \func{void
}{Straighten
}{\param{wxDC*
}{ dc = NULL
}}
1342 Straighten verticals and horizontals.
{\it dc
} is optional.
1344 \membersection{wxLineShape::Unlink
}
1346 \func{void
}{Unlink
}{\void}
1348 Unlinks the line from the nodes at either end.
1350 \section{\class{wxPolygonShape
}}\label{wxpolygonshape
}
1352 A wxPolygonShape's shape is defined by a number of points passed to the object's
1353 constructor. It can be used to create new shapes such as diamonds and triangles.
1355 \wxheading{Derived from
}
1357 \helpref{wxShape
}{wxshape
}
1359 \latexignore{\rtfignore{\wxheading{Members
}}}
1361 \membersection{wxPolygonShape::wxPolygonShape
}
1363 \func{}{wxPolygonShape
}{void
}
1365 Constructor. Call
\helpref{wxPolygonShape::Create
}{wxpolygonshapecreate
} to specify the polygon's vertices.
1367 \membersection{wxPolygonShape::
\destruct{wxPolygonShape
}}
1369 \func{}{\destruct{wxPolygonShape
}}{\void}
1373 \membersection{wxPolygonShape::Create
}\label{wxpolygonshapecreate
}
1375 \func{void
}{Create
}{\param{wxList*
}{ points
}}
1377 Takes a list of wxRealPoints; each point is an
{\it offset
} from the centre.
1378 The polygon's destructor will delete these points, so do not delete them yourself.
1380 \membersection{wxPolygonShape::AddPolygonPoint
}
1382 \func{void
}{AddPolygonPoint
}{\param{int
}{ pos =
0}}
1384 Add a control point after the given point.
1386 \membersection{wxPolygonShape::CalculatePolygonCentre
}
1388 \func{void
}{CalculatePolygonCentre
}{\void}
1390 Recalculates the centre of the polygon.
1392 \membersection{wxPolygonShape::DeletePolygonPoint
}
1394 \func{void
}{DeletePolygonPoint
}{\param{int
}{ pos =
0}}
1396 Deletes a control point.
1398 \membersection{wxPolygonShape::GetPoints
}
1400 \func{wxList *
}{GetPoints
}{\void}
1402 Returns a pointer to the internal list of polygon vertices (wxRealPoints).
1404 \membersection{wxPolygonShape::UpdateOriginalPoints
}
1406 \func{void
}{UpdateOriginalPoints
}{\void}
1408 If we've changed the shape, must make the original
1409 points match the working points with this function.
1411 \section{\class{wxRectangleShape
}}\label{wxrectangleshape
}
1413 The wxRectangleShape has rounded or square corners.
1415 \wxheading{Derived from
}
1417 \helpref{wxShape
}{wxshape
}
1419 \latexignore{\rtfignore{\wxheading{Members
}}}
1421 \membersection{wxRectangleShape::wxRectangleShape
}
1423 \func{}{wxRectangleShape
}{\param{double
}{ width =
0.0},
\param{double
}{ height =
0.0}}
1427 \membersection{wxRectangleShape::
\destruct{wxRectangleShape
}}
1429 \func{}{\destruct{wxRectangleShape
}}{\void}
1433 \membersection{wxRectangleShape::SetCornerRadius
}
1435 \func{void
}{SetCornerRadius
}{\param{double
}{ radius
}}
1437 Sets the radius of the rectangle's rounded corners. If the radius is zero, a non-rounded
1438 rectangle will be drawn. If the radius is negative, the value is the proportion of the
1439 smaller dimension of the rectangle.
1441 \section{\class{wxPseudoMetaFile
}}\label{wxpseudometafile
}
1443 A simple metafile-like class which can load data from a Windows metafile on all platforms.
1445 \wxheading{Derived from
}
1449 \section{\class{wxShape
}}\label{wxshape
}
1451 The wxShape is the top-level, abstract object that all other
1452 objects are derived from. All common functionality is represented by
1453 wxShape's members, and overriden members that appear in derived
1454 classes and have behaviour as documented for wxShape, are not
1455 documented separately.
1457 \wxheading{Derived from
}
1459 \helpref{wxShapeEvtHandler
}{wxshapeevthandler
}
1461 \latexignore{\rtfignore{\wxheading{Members
}}}
1463 \membersection{wxShape::wxShape
}
1465 \func{}{wxShape
}{\param{wxShapeCanvas*
}{ canvas = NULL
}}
1467 Constructs a new wxShape.
1469 \membersection{wxShape::
\destruct{wxShape
}}
1471 \func{}{\destruct{wxShape
}}{\void}
1475 \membersection{wxShape::AddLine
}
1477 \func{void
}{AddLine
}{\param{wxLineShape *
}{line
},
\param{wxShape *
}{other
},
\param{int
}{attachFrom =
0},
\param{int
}{ attachTo =
0},
1478 \param{int
}{ positionFrom = -
1},
\param{int
}{ positionTo = -
1}}
1480 Adds a line between the specified canvas shapes, at the specified attachment points.
1482 The position in the list of lines at each end can also be specified, so that the line will be drawn
1483 at a particular point on its attachment point.
1485 \membersection{wxShape::AddRegion
}
1487 \func{void
}{AddRegion
}{\param{wxShapeRegion*
}{ region
}}
1489 Adds a region to the shape.
1491 \membersection{wxShape::AddText
}
1493 \func{void
}{AddText
}{\param{const wxString\&
}{string
}}
1495 Adds a line of text to the shape's default text region.
1497 \membersection{wxShape::AddToCanvas
}
1499 \func{void
}{AddToCanvas
}{\param{wxShapeCanvas*
}{ theCanvas
},
\param{wxShape*
}{ addAfter=NULL
}}
1501 Adds the shape to the canvas's shape list. If
{\it addAfter
} is
1502 non-NULL, will add the shape after this one.
1504 \membersection{wxShape::AncestorSelected
}
1506 \constfunc{bool
}{AncestorSelected
}{\void}
1508 TRUE if the shape's ancestor is currently selected.
1510 \membersection{wxShape::ApplyAttachmentOrdering
}\label{wxshapeapplyattachmentordering
}
1512 \func{void
}{ApplyAttachmentOrdering
}{\param{wxList\&
}{ linesToSort
}}
1514 Applies the line ordering in
{\it linesToSort
} to the shape, to reorder the way lines are attached.
1516 \membersection{wxShape::AssignNewIds
}
1518 \func{void
}{AssignNewIds
}{\void}
1520 Assigns new ids to this image and its children.
1522 \membersection{wxShape::Attach
}\label{wxshapeattach
}
1524 \func{void
}{Attach
}{\param{wxShapeCanvas*
}{ can
}}
1526 Sets the shape's internal canvas pointer to point to the given canvas.
1528 \membersection{wxShape::AttachmentIsValid
}\label{wxshapeattachmentisvalid
}
1530 \constfunc{bool
}{AttachmentIsValid
}{\param{int
}{ attachment
}}
1532 Returns TRUE if
{\it attachment
} is a valid attachment point.
1534 \membersection{wxShape::AttachmentSortTest
}\label{wxshapeattachmentsorttest
}
1536 \constfunc{bool
}{AttachmentSortTest
}{\param{int
}{ attachment
},
\param{const wxRealPoint\&
}{ pt1
},
1537 \param{const wxRealPoint\&
}{ pt2
}}
1539 Returns TRUE if
{\it pt1
} is less than or equal to
{\it pt2
}, in the sense
1540 that one point comes before another on an edge of the shape.
{\it attachment
} is
1541 the attachment point (side) in question.
1543 This function is used in
\helpref{wxShape::MoveLineToNewAttachment
}{wxshapemovelinetonewattachment
} to
1544 determine the new line ordering.
1546 \membersection{wxShape::CalcSimpleAttachment
}\label{wxshapecalcsimpleattachment
}
1548 \func{wxRealPoint
}{CalcSimpleAttachment
}{\param{const wxRealPoint\&
}{ pt1
},
1549 \param{const wxRealPoint\&
}{ pt2
},
\param{int
}{ nth
},
\param{int
}{ noArcs
},
\param{wxLineShape*
}{ line
}}
1551 Assuming the attachment lies along a vertical or horizontal line,
1552 calculates the position on that point.
1554 \wxheading{Parameters
}
1556 \docparam{pt1
}{The first point of the line repesenting the edge of the shape.
}
1558 \docparam{pt2
}{The second point of the line representing the edge of the shape.
}
1560 \docparam{nth
}{The position on the edge (for example there may be
6 lines at this attachment point,
1561 and this may be the
2nd line.
}
1563 \docparam{noArcs
}{The number of lines at this edge.
}
1565 \docparam{line
}{The line shape.
}
1569 This function expects the line to be either vertical or horizontal, and determines which.
1571 \membersection{wxShape::CalculateSize
}
1573 \func{void
}{CalculateSize
}{\void}
1575 Called to calculate the shape's size if dependent on children sizes.
1577 \membersection{wxShape::ClearAttachments
}
1579 \func{void
}{ClearAttachments
}{\void}
1581 Clears internal custom attachment point shapes (of class wxAttachmentPoint).
1583 \membersection{wxShape::ClearRegions
}
1585 \func{void
}{ClearRegions
}{\void}
1587 Clears the wxShapeRegions from the shape.
1589 \membersection{wxShape::ClearText
}
1591 \func{void
}{ClearText
}{\param{int
}{ regionId =
0}}
1593 Clears the text from the specified text region.
1595 \membersection{wxShape::Constrain
}
1597 \func{bool
}{Constrain
}{\void}
1599 Calculates the shape's constraints (if any). Applicable
1600 only to wxCompositeShape, does nothing if the shape is of
1603 \membersection{wxShape::Copy
}\label{wxshapecopy
}
1605 \func{void
}{Copy
}{\param{wxShape\&
}{ copy
}}
1607 Copy this shape into
{\it copy
}. Every derived class must have one of these, and each Copy implementation
1608 must call the derived class's implementation to ensure everything is copied. See also
\helpref{wxShape::CreateNewCopy
}{wxshapecreatenewcopy
}.
1610 \membersection{wxShape::CreateNewCopy
}\label{wxshapecreatenewcopy
}
1612 \func{wxShape*
}{CreateNewCopy
}{\param{bool
}{ resetMapping = TRUE
},
\param{bool
}{ recompute = TRUE
}}
1614 Creates and returns a new copy of this shape (calling
\helpref{wxShape::Copy
}{wxshapecopy
}). Do not override this function.
1616 This function should always be used to create a new copy, since it must do special processing
1617 for copying constraints associated with constraints.
1619 If
{\it resetMapping
} is TRUE, a mapping table used for complex shapes is reset; this may not be desirable
1620 if the shape being copied is a child of a composite (and so the mapping table is in use).
1622 If
{\it recompute
} is TRUE,
\helpref{wxShape::Recompute
}{wxshaperecompute
} is called for the new shape.
1626 This function uses the wxWindows dynamic object creation system to create a new shape of the same
1627 type as `this', before calling Copy.
1629 If the event handler for this shape is not the same as the shape itself, the event handler is also copied
1630 using
\helpref{wxShapeEvtHandler::CreateNewCopy
}{wxshapeevthandlercreatenewcopy
}.
1632 \membersection{wxShape::DeleteControlPoints
}
1634 \func{void
}{DeleteControlPoints
}{\void}
1636 Deletes the control points (or handles) for the shape. Does not redraw
1639 \membersection{wxShape::Detach
}
1641 \func{void
}{Detach
}{\void}
1643 Disassociates the shape from its canvas by setting the internal shape
1644 canvas pointer to NULL.
1646 \membersection{wxShape::Draggable
}
1648 \func{bool
}{Draggable
}{\void}
1650 TRUE if the shape may be dragged by the user.
1652 \membersection{wxShape::Draw
}
1654 \func{void
}{Draw
}{\param{wxDC\&
}{ dc
}}
1656 Draws the whole shape and any lines attached to it.
1658 Do not override this function: override OnDraw, which is called
1661 \membersection{wxShape::DrawContents
}
1663 \func{void
}{DrawContents
}{\param{wxDC\&
}{ dc
}}
1665 Draws the internal graphic of the shape (such as
1668 Do not override this function: override OnDrawContents, which is called
1671 \membersection{wxShape::DrawLinks
}
1673 \func{void
}{DrawLinks
}{\param{wxDC\&
}{ dc
},
\param{int
}{ attachment = -
1}}
1675 Draws any lines linked to this shape.
1677 \membersection{wxShape::Erase
}
1679 \func{void
}{Erase
}{\param{wxDC\&
}{ dc
}}
1681 Erases the shape, but does not repair damage caused to other
1684 \membersection{wxShape::EraseContents
}
1686 \func{void
}{EraseContents
}{\param{wxDC\&
}{ dc
}}
1688 Erases the shape contents, that is, the area within the shape's
1689 minimum bounding box.
1691 \membersection{wxShape::EraseLinks
}
1693 \func{void
}{EraseLinks
}{\param{wxDC\&
}{ dc
},
\param{int
}{ attachment = -
1}}
1695 Erases links attached to this shape, but does not repair
1696 damage caused to other shapes.
1698 \membersection{wxShape::FindRegion
}
1700 \func{wxShape *
}{FindRegion
}{\param{const wxString\&
}{regionName
},
\param{int *
}{regionId
}}
1702 Finds the actual image (`this' if non-composite) and region id for the given
1705 \membersection{wxShape::FindRegionNames
}
1707 \func{void
}{FindRegionNames
}{\param{wxStringList\&
}{ list
}}
1709 Finds all region names for this image (composite or simple).
1710 Supply an empty string list.
1712 \membersection{wxShape::Flash
}
1714 \func{void
}{Flash
}{\void}
1718 \membersection{wxShape::FormatText
}
1720 \func{void
}{FormatText
}{\param{const wxString\&
}{s
},
\param{int
}{ i =
0}}
1722 Reformats the given text region; defaults to formatting the default region.
1724 \membersection{wxShape::GetAttachmentMode
}
1726 \constfunc{bool
}{GetAttachmentMode
}{\void}
1728 Returns the attachment mode, which is TRUE if attachments are used, FALSE otherwise (in which case
1729 lines will be drawn as if to the centre of the shape). See
\helpref{wxShape::SetAttachmentMode
}{wxshapesetattachmentmode
}.
1731 \membersection{wxShape::GetAttachmentPosition
}\label{wxshapegetattachmentposition
}
1733 \func{bool
}{GetAttachmentPosition
}{\param{int
}{ attachment
},
\param{double*
}{ x
},
\param{double*
}{ y
},
1734 \param{int
}{ nth =
0},
\param{int
}{ noArcs =
1},
\param{wxLineShape*
}{ line = NULL
}}
1736 Gets the position at which the given attachment point should be drawn.
1738 If
{\it attachment
} isn't found among the attachment points of the shape, returns FALSE.
1740 \membersection{wxShape::GetBoundingBoxMax
}
1742 \func{void
}{GetBoundingBoxMax
}{\param{double *
}{width
},
\param{double *
}{height
}}
1744 Gets the maximum bounding box for the shape, taking into
1745 account external features such as shadows.
1747 \membersection{wxShape::GetBoundingBoxMin
}
1749 \func{void
}{GetBoundingBoxMin
}{\param{double *
}{width
},
\param{double *
}{height
}}
1751 Gets the minimum bounding box for the shape, that defines
1752 the area available for drawing the contents (such as text).
1754 \membersection{wxShape::GetBrush
}
1756 \constfunc{wxBrush*
}{GetBrush
}{\void}
1758 Returns the brush used for filling the shape.
1760 \membersection{wxShape::GetCanvas
}
1762 \constfunc{wxShapeCanvas*
}{GetCanvas
}{\void}
1764 Gets the internal canvas pointer.
1766 \membersection{wxShape::GetCentreResize
}
1768 \constfunc{bool
}{GetCentreResize
}{\void}
1770 Returns TRUE if the shape is to be resized from the centre (the centre
1771 stands still), or FALSE if from the corner or side being dragged (the
1772 other corner or side stands still).
1774 \membersection{wxShape::GetChildren
}
1776 \constfunc{wxList\&
}{GetChildren
}{\void}
1778 Returns a reference to the list of children for this shape.
1780 \membersection{wxShape::GetClientData
}
1782 \func{wxObject*
}{GetClientData
}{\void}
1784 Gets the client data associated with the shape (NULL if there is
1787 \membersection{wxShape::GetDisableLabel
}
1789 \constfunc{bool
}{GetDisableLabel
}{\void}
1791 Returns TRUE if the default region will not be shown, FALSE otherwise.
1793 \membersection{wxShape::GetEventHandler
}
1795 \constfunc{wxShapeEvtHandler*
}{GetEventHandler
}{\void}
1797 Returns the event handler for this shape.
1799 \membersection{wxShape::GetFixedHeight
}
1801 \constfunc{bool
}{GetFixedHeight
}{\void}
1803 Returns TRUE if the shape cannot be resized in the vertical plane.
1805 \membersection{wxShape::GetFixedSize
}
1807 \func{void
}{GetFixedSize
}{\param{bool *
}{ x
},
\param{bool *
}{ y
}}
1809 Returns flags indicating whether the shape is of fixed size in either direction.
1811 \membersection{wxShape::GetFixedWidth
}
1813 \constfunc{bool
}{GetFixedWidth
}{\void}
1815 Returns TRUE if the shape cannot be resized in the horizontal plane.
1817 \membersection{wxShape::GetFont
}
1819 \constfunc{wxFont*
}{GetFont
}{\param{int
}{ regionId =
0}}
1821 Gets the font for the specified text region.
1823 \membersection{wxShape::GetFunctor
}
1825 \constfunc{wxString
}{GetFunctor
}{\void}
1827 Gets a string representing the type of the shape, to be used when
1828 writing out shape descriptions to a file. This is overridden by
1829 each derived shape class to provide an appropriate type string. By default,
1830 "node
\_image" is used for non-line shapes, and "arc
\_image" for lines.
1832 \membersection{wxShape::GetId
}
1834 \constfunc{long
}{GetId
}{\void}
1836 Returns the integer identifier for this shape.
1838 \membersection{wxShape::GetLinePosition
}\label{wxshapegetlineposition
}
1840 \func{int
}{GetLinePosition
}{\param{wxLineShape*
}{ line
}}
1842 Gets the zero-based position of
{\it line
} in the list of lines for this shape.
1844 \membersection{wxShape::GetLines
}
1846 \constfunc{wxList\&
}{GetLines
}{\void}
1848 Returns a reference to the list of lines connected to this shape.
1850 \membersection{wxShape::GetNumberOfAttachments
}\label{wxshapegetnumberofattachments
}
1852 \constfunc{int
}{GetNumberOfAttachments
}{\void}
1854 Gets the number of attachment points for this shape.
1856 \membersection{wxShape::GetNumberOfTextRegions
}
1858 \constfunc{int
}{GetNumberOfTextRegions
}{\void}
1860 Gets the number of text regions for this shape.
1862 \membersection{wxShape::GetParent
}
1864 \constfunc{wxShape *
}{GetParent
}{\void}
1866 Returns the parent of this shape, if it is part of a composite.
1868 \membersection{wxShape::GetPen
}
1870 \constfunc{wxPen*
}{GetPen
}{\void}
1872 Returns the pen used for drawing the shape's outline.
1874 \membersection{wxShape::GetPerimeterPoint
}
1876 \func{bool
}{GetPerimeterPoint
}{\param{double
}{ x1
},
\param{double
}{ y1
},
\param{double
}{ x2
},
\param{double
}{ y2
},
\param{double *
}{x3
},
\param{double *
}{y3
}}
1878 Gets the point at which the line from (x1, y1) to (x2, y2) hits the shape. Returns TRUE if the
1879 line hits the perimeter.
1881 \membersection{wxShape::GetRegionId
}\label{getregionid
}
1883 \func{int
}{GetRegionId
}{\param{const wxString\&
}{name
}}
1885 Gets the region's identifier by name. This is
{\it not
} unique for within an entire composite, but
1886 is unique for the image.
1888 \membersection{wxShape::GetRegionName
}\label{getregionname
}
1890 \func{wxString
}{GetRegionName
}{\param{int
}{ regionId =
0}}
1892 Gets the region's name. A region's name can be used to uniquely determine a region within
1893 an entire composite image hierarchy. See also
\helpref{wxShape::SetRegionName
}{wxshapesetregionname
}.
1895 \membersection{wxShape::GetRegions
}\label{getregions
}
1897 \func{wxList\&
}{GetRegions
}{\void}
1899 Returns the list of wxShapeRegions.
1901 \membersection{wxShape::GetRotation
}
1903 \constfunc{double
}{GetRotatation
}{\void}
1905 Returns the angle of rotation in radians.
1907 \membersection{wxShape::GetSensitivityFilter
}
1909 \constfunc{void
}{GetSensitivityFilter
}{\void}
1911 Returns the sensitivity filter, a bitlist of values. See
\helpref{wxShape::SetSensitivityFilter
}{wxshapesetsensitivityfilter
}.
1913 \membersection{wxShape::GetShadowMode
}
1915 \constfunc{int
}{SetShadowMode
}{\void}
1917 Returns the shadow mode. See
\helpref{wxShape::SetShadowMode
}{wxshapesetshadowmode
}.
1919 \membersection{wxShape::GetSpaceAttachments
}
1921 \constfunc{bool
}{GetSpaceAttachments
}{\void}
1923 Indicates whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they
1924 should join at a single point (FALSE).
1926 \membersection{wxShape::GetTextColour
}
1928 \constfunc{wxString
}{GetTextColour
}{\param{int
}{ regionId =
0}}
1930 Gets the colour for the specified text region.
1932 \membersection{wxShape::GetTopAncestor
}
1934 \constfunc{wxShape *
}{GetTopAncestor
}{\void}
1936 Returns the top-most ancestor of this shape (the root of the composite).
1938 \membersection{wxShape::GetX
}
1940 \constfunc{double
}{GetX
}{\void}
1942 Gets the x position of the centre of the shape.
1944 \membersection{wxShape::GetY
}
1946 \constfunc{double
}{GetY
}{\void}
1948 Gets the y position of the centre of the shape.
1950 \membersection{wxShape::HitTest
}
1952 \func{bool
}{HitTest
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int*
}{ attachment
},
\param{double*
}{ distance
}}
1954 Given a point on a canvas, returns TRUE if the point was on the shape, and returns
1955 the nearest attachment point and distance from the given point and target.
1957 \membersection{wxShape::Insert
}
1959 \func{void
}{InsertInCanvas
}{\param{wxShapeCanvas*
}{ canvas
}}
1961 Inserts the shape at the front of the shape list of
{\it canvas
}.
1963 \membersection{wxShape::IsHighlighted
}
1965 \constfunc{bool
}{IsHighlighted
}{\void}
1967 Returns TRUE if the shape is highlighted. Shape highlighting is unimplemented.
1969 \membersection{wxShape::IsShown
}
1971 \constfunc{bool
}{IsShown
}{\void}
1973 Returns TRUE if the shape is in a visible state, FALSE otherwise. Note
1974 that this has nothing to do with whether the window is hidden or the
1975 shape has scrolled off the canvas; it refers to the internal
1978 \membersection{wxShape::MakeControlPoints
}
1980 \func{void
}{MakeControlPoints
}{\void}
1982 Make a list of control points (draggable handles) appropriate to the shape.
1984 \membersection{wxShape::MakeMandatoryControlPoints
}
1986 \func{void
}{MakeMandatoryControlPoints
}{\void}
1988 Make the mandatory control points. For example, the control point on a dividing line should
1989 appear even if the divided rectangle shape's handles should not appear (because it is the child of
1990 a composite, and children are not resizable).
1992 \membersection{wxShape::Move
}\label{wxshapemove
}
1994 \func{void
}{Move
}{\param{wxDC\&
}{ dc
},
\param{double
}{ x1
},
\param{double
}{ y1
},
\param{bool
}{ display = TRUE
}}
1996 Move the shape to the given position, redrawing if
{\it display
} is TRUE.
1998 \membersection{wxShape::MoveLineToNewAttachment
}\label{wxshapemovelinetonewattachment
}
2000 \func{void
}{MoveLineToNewAttachment
}{\param{wxDC\&
}{ dc
},
\param{wxLineShape*
}{ toMove
},
\param{double
}{ x
},
\param{double
}{ y
}}
2002 Move the given line (which must already be attached to the shape) to
2003 a different attachment point on the shape, or a different order on the same attachment.
2005 Cals
\helpref{wxShape::AttachmentSortTest
}{wxshapeattachmentsorttest
} and then
\helpref{wxShapeEvtHandler::OnChangeAttachment
}{wxshapeevthandleronchangeattachment
}.
2007 \membersection{wxShape::MoveLinks
}
2009 \func{void
}{MoveLinks
}{\param{wxDC\&
}{ dc
}}
2011 Redraw all the lines attached to the shape.
2013 \membersection{wxShape::NameRegions
}
2015 \func{void
}{NameRegions
}{\param{const wxString\&
}{parentName = ``"
}}
2017 Make unique names for all the regions in a shape or composite shape.
2019 \membersection{wxShape::Rotate
}
2021 \func{void
}{Rotate
}{\param{double
}{x
},
\param{double
}{y
},
\param{double
}{theta
}}
2023 Rotate about the given axis by the given amount in radians (does nothing
2024 for most shapes). But even non-rotating shapes should record their
2025 notional rotation in case it's important (e.g. in dog-leg code).
2027 \membersection{wxShape::ReadConstraints
}
2029 \func{void
}{ReadConstraints
}{\param{wxExpr *
}{clause
},
\param{wxExprDatabase *
}{database
}}
2031 If the shape is a composite, it may have constraints that need to be read in in a separate pass.
2033 \membersection{wxShape::ReadAttributes
}
2035 \func{void
}{ReadAttributes
}{\param{wxExpr*
}{ clause
}}
2037 Reads the attributes (data member values) from the given expression.
2039 \membersection{wxShape::ReadRegions
}
2041 \func{void
}{ReadRegions
}{\param{wxExpr *
}{clause
}}
2043 Reads in the regions.
2045 \membersection{wxShape::Recentre
}
2047 \func{void
}{Recentre
}{\void}
2049 Does recentring (or other formatting) for all the text regions for this shape.
2051 \membersection{wxShape::RemoveFromCanvas
}
2053 \func{void
}{RemoveFromCanvas
}{\param{wxShapeCanvas*
}{ canvas
}}
2055 Removes the shape from the canvas.
2057 \membersection{wxShape::ResetControlPoints
}
2059 \func{void
}{ResetControlPoints
}{\void}
2061 Resets the positions of the control points (for instance when the
2062 shape's shape has changed).
2064 \membersection{wxShape::ResetMandatoryControlPoints
}
2066 \func{void
}{ResetMandatoryControlPoints
}{\void}
2068 Reset the mandatory control points. For example, the control point on a dividing line should
2069 appear even if the divided rectangle shape's handles should not appear (because it is the child of
2070 a composite, and children are not resizable).
2072 \membersection{wxShape::Recompute
}\label{wxshaperecompute
}
2074 \func{bool
}{Recompute
}{\void}
2076 Recomputes any constraints associated with the shape (normally
2077 applicable to wxCompositeShapes only, but harmless for other
2080 \membersection{wxShape::RemoveLine
}
2082 \func{void
}{RemoveLine
}{\param{wxLineShape*
}{ line
}}
2084 Removes the given line from the shape's list of attached lines.
2086 \membersection{wxShape::Select
}\label{wxshapeselect
}
2088 \func{void
}{Select
}{\param{bool
}{ select = TRUE
}}
2090 Selects or deselects the given shape, drawing or erasing control points
2091 (handles) as necessary.
2093 \membersection{wxShape::Selected
}\label{wxshapeselected
}
2095 \constfunc{bool
}{Selected
}{\void}
2097 TRUE if the shape is currently selected.
2099 \membersection{wxShape::SetAttachmentMode
}\label{wxshapesetattachmentmode
}
2101 \func{void
}{SetAttachmentMode
}{\param{bool
}{ flag
}}
2103 Sets the attachment mode to TRUE or FALSE. If TRUE, attachment points
2104 will be significant when drawing lines to and from this shape.
2105 If FALSE, lines will be drawn as if to the centre of the shape.
2107 \membersection{wxShape::SetBrush
}
2109 \func{void
}{SetBrush
}{\param{wxBrush *
}{brush
}}
2111 Sets the brush for filling the shape's shape.
2113 \membersection{wxShape::SetCanvas
}\label{wxshapesetcanvas
}
2115 \func{void
}{SetCanvas
}{\param{wxShapeCanvas*
}{ theCanvas
}}
2117 Identical to
\helpref{wxShape::Attach
}{wxshapesetcanvas
}.
2119 \membersection{wxShape::SetCentreResize
}
2121 \func{void
}{SetCentreResize
}{\param{bool
}{ cr
}}
2123 Specify whether the shape is to be resized from the centre (the centre stands still) or from the corner or side
2124 being dragged (the other corner or side stands still).
2126 \membersection{wxShape::SetClientData
}
2128 \func{void
}{SetClientData
}{\param{wxObject *
}{clientData
}}
2130 Sets the client data.
2132 \membersection{wxShape::SetDefaultRegionSize
}\label{setdefaultregionsize
}
2134 \func{void
}{SetDefaultRegionSize
}{\void}
2136 Set the default region to be consistent with the shape size.
2138 \membersection{wxShape::SetDisableLabel
}
2140 \func{void
}{SetDisableLabel
}{\param{bool
}{ flag
}}
2142 Set
{\it flag
} to TRUE to stop the default region being shown, FALSE otherwise.
2144 \membersection{wxShape::SetDraggable
}
2146 \func{void
}{SetDraggable
}{\param{bool
}{ drag
},
\param{bool
}{ recursive = FALSE
}}
2148 Sets the shape to be draggable or not draggable.
2150 \membersection{wxShape::SetDrawHandles
}
2152 \func{void
}{SetDrawHandles
}{\param{bool
}{ drawH
}}
2154 Sets the
{\it drawHandles
} flag for this shape and all descendants. If
{\it drawH
} is TRUE (the default),
2155 any handles (control points) will be drawn. Otherwise, the handles will not be drawn.
2157 \membersection{wxShape::SetEventHandler
}
2159 \func{void
}{GetEventHandler
}{\param{wxShapeEvtHandler *
}{handler
}}
2161 Sets the event handler for this shape.
2163 \membersection{wxShape::SetFixedSize
}
2165 \func{void
}{SetFixedSize
}{\param{bool
}{ x
},
\param{bool
}{ y
}}
2167 Sets the shape to be of the given, fixed size.
2169 \membersection{wxShape::SetFont
}
2171 \func{void
}{SetFont
}{\param{wxFont *
}{font
},
\param{int
}{ regionId =
0}}
2173 Sets the font for the specified text region.
2175 \membersection{wxShape::SetFormatMode
}\label{setformatmode
}
2177 \func{void
}{SetFormatMode
}{\param{int
}{ mode
},
\param{int
}{ regionId =
0}}
2179 Sets the format mode of the default text region. The argument can be a bit list
2182 \begin{description
}\itemsep=
0pt
2183 \item[FORMAT
\_NONE] No formatting.
2184 \item[FORMAT
\_CENTRE\_HORIZ] Horizontal centring.
2185 \item[FORMAT
\_CENTRE\_VERT] Vertical centring.
2188 \membersection{wxShape::SetHighlight
}
2190 \func{void
}{SetHighlight
}{\param{bool
}{ hi
},
\param{bool
}{ recurse = FALSE
}}
2192 Sets the highlight for a shape. Shape highlighting is unimplemented.
2194 \membersection{wxShape::SetId
}
2196 \func{void
}{SetId
}{\param{long
}{ id
}}
2198 Set the integer identifier for this shape.
2200 \membersection{wxShape::SetPen
}
2202 \func{void
}{SetPen
}{\param{wxPen *
}{pen
}}
2204 Sets the pen for drawing the shape's outline.
2206 \membersection{wxShape::SetRegionName
}\label{wxshapesetregionname
}
2208 \func{void
}{SetRegionName
}{\param{const wxString\&
}{name
},
\param{int
}{ regionId =
0}}
2210 Sets the name for this region. The name for a region is unique within the scope of the whole
2211 composite, whereas a region id is unique only for a single image.
2213 \membersection{wxShape::SetSensitivityFilter
}\label{wxshapesetsensitivityfilter
}
2215 \func{void
}{SetSensitivityFilter
}{\param{int
}{ sens=OP
\_ALL},
\param{bool
}{ recursive = FALSE
}}
2217 Sets the shape to be sensitive or insensitive to specific mouse operations.
2219 {\it sens
} is a bitlist of the following:
2221 \begin{itemize
}\itemsep=
0pt
2222 \item OP
\_CLICK\_LEFT
2223 \item OP
\_CLICK\_RIGHT
2224 \item OP
\_DRAG\_LEFT
2225 \item OP
\_DRAG\_RIGHT
2226 \item OP
\_ALL (equivalent to a combination of all the above).
2229 \membersection{wxShape::SetShadowMode
}\label{wxshapesetshadowmode
}
2231 \func{void
}{SetShadowMode
}{\param{int
}{ mode
},
\param{bool
}{ redraw = FALSE
}}
2233 Sets the shadow mode (whether a shadow is drawn or not).
{\it mode
} can be one of
2236 \begin{description
}\itemsep=
0pt
2237 \item[SHADOW
\_NONE] No shadow (the default).
2238 \item[SHADOW
\_LEFT] Shadow on the left side.
2239 \item[SHADOW
\_RIGHT] Shadow on the right side.
2242 \membersection{wxShape::SetSize
}
2244 \func{void
}{SetSize
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{bool
}{ recursive = TRUE
}}
2246 Sets the shape's size.
2248 \membersection{wxShape::SetSpaceAttachments
}
2250 \func{void
}{SetSpaceAttachments
}{\param{bool
}{ sp
}}
2252 Indicate whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they
2253 should join at a single point (FALSE).
2255 \membersection{wxShape::SetTextColour
}
2257 \func{void
}{SetTextColour
}{\param{const wxString\&
}{colour
},
\param{int
}{ regionId =
0}}
2259 Sets the colour for the specified text region.
2261 \membersection{wxShape::SetX
}
2263 \func{void
}{SetX
}{\param{double
}{ x
}}
2265 Sets the
{\it x
} position of the shape.
2267 \membersection{wxShape::SetX
}
2269 \func{void
}{SetY
}{\param{double
}{ y
}}
2271 Sets the
{\it y
} position of the shape.
2273 \membersection{wxShape::SpaceAttachments
}
2275 \func{void
}{SpaceAttachments
}{\param{bool
}{ sp
}}
2277 Sets the spacing mode: if TRUE, lines at the same attachment point will be
2278 spaced evenly across that side of the shape. If false, all lines at the
2279 same attachment point will emanate from the same point.
2281 \membersection{wxShape::Show
}
2283 \func{void
}{Show
}{\param{bool
}{ show
}}
2285 Sets a flag indicating whether the shape should be drawn.
2287 \membersection{wxShape::Unlink
}
2289 \func{void
}{Unlink
}{\void}
2291 If the shape is a line, unlinks the nodes attached to the shape, removing itself from the list of
2292 lines for each of the `to' and `from' nodes.
2294 \membersection{wxShape::WriteAttributes
}
2296 \func{void
}{WriteAttributes
}{\param{wxExpr *
}{clause
}}
2298 Writes the shape's attributes (data member values) into the given expression.
2300 \membersection{wxShape::WriteRegions
}
2302 \func{void
}{WriteRegions
}{\param{wxExpr *
}{clause
}}
2306 \section{\class{wxShapeCanvas
}}\label{wxshapecanvas
}
2308 A canvas for drawing diagrams on.
2310 \wxheading{Derived from
}
2314 \wxheading{See also
}
2316 \helpref{wxDiagram
}{wxdiagram
}
2318 \latexignore{\rtfignore{\wxheading{Members
}}}
2320 \membersection{wxShapeCanvas::wxShapeCanvas
}
2322 \func{}{wxShapeCanvas
}{\param{wxWindow*
}{ parent = NULL
},
\param{wxWindowID
}{ id = -
1},
2323 \param{const wxPoint\&
}{ pos = wxDefaultPosition
},
\param{const wxSize\&
}{ size = wxDefaultSize
},
2324 \param{long
}{ style = wxBORDER
}}
2328 \membersection{wxShapeCanvas::
\destruct{wxShapeCanvas
}}
2330 \func{}{\destruct{wxShapeCanvas
}}{\void}
2334 \membersection{wxShapeCanvas::AddShape
}
2336 \func{void
}{AddShape
}{\param{wxShape *
}{shape
},
\param{wxShape *
}{addAfter = NULL
}}
2338 Adds a shape to the diagram. If
{\it addAfter
} is non-NULL, the shape will be added after this
2341 \membersection{wxShapeCanvas::FindShape
}
2343 \func{wxShape *
}{FindShape
}{\param{double
}{ x1
},
\param{double
}{ y
},
\param{int *
}{attachment
},
\param{wxClassInfo *
}{info = NULL
},
2344 \param{wxShape *
}{notImage = NULL
}}
2346 Find a shape under this mouse click. Returns the shape (or NULL), and the nearest attachment point.
2348 If
{\it info
} is non-NULL, a shape whose class which is a descendant of the desired class is found.
2350 If
{\it notImage
} is non-NULL, shapes which are descendants of
{\it notImage
} are ignored.
2352 \membersection{wxShapeCanvas::FindFirstSensitiveShape
}
2354 \func{wxShape *
}{FindFirstSensitiveShape
}{\param{double
}{ x1
},
\param{double
}{ y
},
\param{int *
}{attachment
},
\param{int
}{ op
}}
2356 Finds the first sensitive shape whose sensitivity filter matches
{\it op
}, working up the hierarchy of composites until
2357 one (or none) is found.
2359 \membersection{wxShapeCanvas::GetDiagram
}
2361 \constfunc{wxDiagram*
}{GetDiagram
}{\void}
2363 Returns the canvas associated with this diagram.
2365 \membersection{wxShapeCanvas::GetGridSpacing
}
2367 \constfunc{double
}{GetGridSpacing
}{\void}
2369 Returns the grid spacing.
2371 \membersection{wxShapeCanvas::GetMouseTolerance
}
2373 \constfunc{int
}{GetMouseTolerance
}{\void}
2375 Returns the tolerance within which a mouse move is ignored.
2377 \membersection{wxShapeCanvas::GetShapeList
}
2379 \constfunc{wxList*
}{GetShapeList
}{\void}
2381 Returns a pointer to the internal shape list.
2383 \membersection{wxShapeCanvas::GetQuickEditMode
}
2385 \constfunc{bool
}{GetQuickEditMode
}{\void}
2387 Returns quick edit mode for the associated diagram.
2389 \membersection{wxShapeCanvas::InsertShape
}
2391 \func{void
}{InsertShape
}{\param{wxShape*
}{ shape
}}
2393 Inserts a shape at the front of the shape list.
2395 \membersection{wxShapeCanvas::OnBeginDragLeft
}\label{wxshapecanvasonbegindragleft
}
2397 \func{void
}{OnBeginDragLeft
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2399 Called when the start of a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2400 by default it does nothing.
2402 {\it keys
} is a bit list of the following:
2404 \begin{itemize
}\itemsep=
0pt
2409 See also
\helpref{wxShapeCanvas::OnDragLeft
}{wxshapecanvasondragleft
},
\helpref{wxShapeCanvas::OnEndDragLeft
}{wxshapecanvasonenddragleft
}.
2411 \membersection{wxShapeCanvas::OnBeginDragRight
}\label{wxshapecanvasonbegindragright
}
2413 \func{void
}{OnBeginDragRight
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2415 Called when the start of a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2416 by default it does nothing.
2418 {\it keys
} is a bit list of the following:
2420 \begin{itemize
}\itemsep=
0pt
2425 See also
\helpref{wxShapeCanvas::OnDragRight
}{wxshapecanvasondragright
},
\helpref{wxShapeCanvas::OnEndDragRight
}{wxshapecanvasonenddragright
}.
2427 \membersection{wxShapeCanvas::OnEndDragLeft
}\label{wxshapecanvasonenddragleft
}
2429 \func{void
}{OnEndDragLeft
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2431 Called when the end of a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2432 by default it does nothing.
2434 {\it keys
} is a bit list of the following:
2436 \begin{itemize
}\itemsep=
0pt
2441 See also
\helpref{wxShapeCanvas::OnDragLeft
}{wxshapecanvasondragleft
},
\helpref{wxShapeCanvas::OnBeginDragLeft
}{wxshapecanvasonbegindragleft
}.
2443 \membersection{wxShapeCanvas::OnEndDragRight
}\label{wxshapecanvasonenddragright
}
2445 \func{void
}{OnEndDragRight
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2447 Called when the end of a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2448 by default it does nothing.
2450 {\it keys
} is a bit list of the following:
2452 \begin{itemize
}\itemsep=
0pt
2457 See also
\helpref{wxShapeCanvas::OnDragRight
}{wxshapecanvasondragright
},
\helpref{wxShapeCanvas::OnBeginDragRight
}{wxshapecanvasonbegindragright
}.
2459 \membersection{wxShapeCanvas::OnDragLeft
}\label{wxshapecanvasondragleft
}
2461 \func{void
}{OnDragLeft
}{\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2463 Called when a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2464 by default it does nothing.
2466 {\it draw
} is alternately TRUE and FALSE, to assist drawing and erasing.
2468 {\it keys
} is a bit list of the following:
2470 \begin{itemize
}\itemsep=
0pt
2475 See also
\helpref{wxShapeCanvas::OnBeginDragLeft
}{wxshapecanvasonbegindragleft
},
\helpref{wxShapeCanvas::OnEndDragLeft
}{wxshapecanvasonenddragleft
}.
2477 \membersection{wxShapeCanvas::OnDragRight
}\label{wxshapecanvasondragright
}
2479 \func{void
}{OnDragRight
}{\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2481 Called when a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2482 by default it does nothing.
2484 {\it draw
} is alternately TRUE and FALSE, to assist drawing and erasing.
2486 {\it keys
} is a bit list of the following:
2488 \begin{itemize
}\itemsep=
0pt
2493 See also
\helpref{wxShapeCanvas::OnBeginDragRight
}{wxshapecanvasonbegindragright
},
\helpref{wxShapeCanvas::OnEndDragRight
}{wxshapecanvasonenddragright
}.
2495 \membersection{wxShapeCanvas::OnLeftClick
}\label{wxshapecanvasonleftclick
}
2497 \func{void
}{OnLeftClick
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2499 Called when a left click event on the canvas background is detected by OnEvent. You may override this member;
2500 by default it does nothing.
2502 {\it keys
} is a bit list of the following:
2504 \begin{itemize
}\itemsep=
0pt
2509 \membersection{wxShapeCanvas::OnRightClick
}\label{wxshapecanvasonrightclick
}
2511 \func{void
}{OnRightClick
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0}}
2513 Called when a right click event on the canvas background is detected by OnEvent. You may override this member;
2514 by default it does nothing.
2516 {\it keys
} is a bit list of the following:
2518 \begin{itemize
}\itemsep=
0pt
2523 \membersection{wxShapeCanvas::Redraw
}
2525 \func{void
}{Redraw
}{\void}
2527 Calls wxDiagram::Redraw.
2529 \membersection{wxShapeCanvas::RemoveShape
}
2531 \func{void
}{RemoveShape
}{\param{wxShape *
}{shape
}}
2533 Calls wxDiagram::RemoveShape.
2535 \membersection{wxShapeCanvas::SetDiagram
}
2537 \func{void
}{SetDiagram
}{\param{wxDiagram *
}{diagram
}}
2539 Sets the diagram associated with this diagram.
2541 \membersection{wxShapeCanvas::Snap
}
2543 \func{void
}{Snap
}{\param{double *
}{x
},
\param{double *
}{y
}}
2545 Calls wxDiagram::Snap.
2549 \section{\class{wxShapeEvtHandler
}}\label{wxshapeevthandler
}
2551 wxShapeEvtHandler is a class from which wxShape (and therefore all shape classes) are derived.
2552 A wxShape also contains a pointer to its current wxShapeEvtHandler. Event handlers
2553 can be swapped in and out, altering the behaviour of a shape. This allows, for example,
2554 a range of behaviours to be redefined in one class, rather than requiring
2555 each shape class to be subclassed.
2557 \wxheading{Derived from
}
2561 \latexignore{\rtfignore{\wxheading{Members
}}}
2563 \membersection{wxShapeEvtHandler::m
\_handlerShape}
2565 \member{wxShape*
}{m
\_handlerShape}
2567 Pointer to the shape associated with this handler.
2569 \membersection{wxShapeEvtHandler::m
\_previousHandler}
2571 \member{wxShapeEvtHandler*
}{m
\_previousHandler}
2573 Pointer to the previous handler.
2575 \membersection{wxShapeEvtHandler::wxShapeEvtHandler
}
2577 \func{void
}{wxShapeEvtHandler
}{\param{wxShapeEvtHandler *
}{previous = NULL
},
\param{wxShape *
}{shape = NULL
}}
2579 Constructs a new event handler.
2581 \membersection{wxShapeEvtHandler::
\destruct{wxShapeEvtHandler
}}
2583 \func{void
}{\destruct{wxShapeEvtHandler
}}{\void}
2587 \membersection{wxShapeEvtHandler::CopyData
}\label{wxshapeevthandlercopydata
}
2589 \func{void
}{CopyData
}{\param{wxShapeEvtHandler\&
}{ handler
}}
2591 A virtual function to copy the data from this object to
{\it handler
}. Override if you
2592 derive from wxShapeEvtHandler and have data to copy.
2594 \membersection{wxShapeEvtHandler::CreateNewCopy
}\label{wxshapeevthandlercreatenewcopy
}
2596 \func{wxShapeEvtHandler*
}{CreateNewCopy
}{\void}
2598 Creates a new event handler object of the same class as this object, and then
2599 calls
\helpref{wxShapeEvtHandler::CopyData
}{wxshapeevthandlercopydata
}.
2601 \membersection{wxShapeEvtHandler::GetPreviousHandler
}\label{wxshapeevthandlergetprevioushandler
}
2603 \constfunc{wxShapeEvtHandler*
}{GetPreviousHandler
}{\void}
2605 Returns the previous handler.
2607 \membersection{wxShapeEvtHandler::GetShape
}\label{wxshapeevthandlergetshape
}
2609 \constfunc{wxShape*
}{GetShape
}{\void}
2611 Returns the shape associated with this handler.
2613 \membersection{wxShapeEvtHandler::OnBeginDragLeft
}
2615 \func{void
}{OnBeginDragLeft
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2617 Called when the user is beginning to drag using the left mouse button.
2619 \membersection{wxShapeEvtHandler::OnBeginDragRight
}
2621 \func{void
}{OnBeginDragRight
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2623 Called when the user is beginning to drag using the right mouse button.
2625 \membersection{wxShapeEvtHandler::OnBeginSize
}
2627 \func{void
}{OnBeginSize
}{\param{double
}{ width
},
\param{double
}{ height
}}
2629 Called when a shape starts to be resized.
2631 \membersection{wxShapeEvtHandler::OnChangeAttachment
}\label{wxshapeevthandleronchangeattachment
}
2633 \func{void
}{OnChangeAttachment
}{\param{int
}{ attachment
},
\param{wxLineShape*
}{ line
},
\param{wxList\&
}{ ordering
}}
2635 Override this to prevent or intercept line reordering. wxShape's implementation of this function
2636 calls
\helpref{wxShape::ApplyAttachmentOrdering
}{wxshapeapplyattachmentordering
} to apply
2639 \membersection{wxShapeEvtHandler::OnDragLeft
}
2641 \func{void
}{OnDragLeft
}{\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2643 Called twice when the shape is being dragged, once to allow erasing the old
2644 image, and again to allow drawing at the new position.
2646 \membersection{wxShapeEvtHandler::OnDragRight
}
2648 \func{void
}{OnDragRight
}{\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2650 Called twice when the shape is being dragged, once to allow erasing the old
2651 image, and again to allow drawing at the new position.
2653 \membersection{wxShapeEvtHandler::OnDraw
}
2655 \func{void
}{OnDraw
}{\void}
2657 Defined for each class to draw the main graphic, but
2660 \membersection{wxShapeEvtHandler::OnDrawContents
}
2662 \func{void
}{OnDrawContents
}{\param{wxDC\&
}{ dc
}}
2664 Defined for each class to draw the contents of the
2665 shape, such as text.
2667 \membersection{wxShapeEvtHandler::OnDrawControlPoints
}
2669 \func{void
}{OnDrawControlPoints
}{\param{wxDC\&
}{ dc
}}
2671 Called when the shape's control points (handles) should
2674 \membersection{wxShapeEvtHandler::OnDrawOutline
}
2676 \func{void
}{OnDrawOutline
}{\param{wxDC\&
}{ dc
}}
2678 Called when the outline of the shape should be drawn.
2680 \membersection{wxShapeEvtHandler::OnEndDragLeft
}
2682 \func{void
}{OnEndDragLeft
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2684 Called when the user is stopping dragging using the left mouse button.
2686 \membersection{wxShapeEvtHandler::OnEndDragRight
}
2688 \func{void
}{OnEndDragRight
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2690 Called when the user is stopping dragging using the right mouse button.
2692 \membersection{wxShapeEvtHandler::OnEndSize
}
2694 \func{void
}{OnEndSize
}{\param{double
}{ width
},
\param{double
}{ height
}}
2696 Called after a shape is resized.
2698 \membersection{wxShapeEvtHandler::OnErase
}
2700 \func{void
}{OnErase
}{\param{wxDC\&
}{ dc
}}
2702 Called when the whole shape should be erased.
2704 \membersection{wxShapeEvtHandler::OnEraseContents
}
2706 \func{void
}{OnEraseContents
}{\param{wxDC\&
}{ dc
}}
2708 Called when the contents should be erased.
2710 \membersection{wxShapeEvtHandler::OnEraseControlPoints
}
2712 \func{void
}{OnEraseControlPoints
}{\param{wxDC\&
}{ dc
}}
2714 Called when the shape's control points (handles) should
2717 \membersection{wxShapeEvtHandler::OnHighlight
}
2719 \func{void
}{OnHighlight
}{\param{wxDC\&
}{ dc
}}
2721 Called when the shape should be highlighted.
2723 \membersection{wxShapeEvtHandler::OnLeftClick
}
2725 \func{void
}{OnLeftClick
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0},
\param{int
}{ attachment =
0}}
2727 Called when the shape receives a left mouse click event.
2729 \membersection{wxShapeEvtHandler::OnMoveLink
}
2731 \func{void
}{OnMoveLink
}{\param{wxDC\&
}{ dc
},
\param{bool
}{ moveControlPoints=TRUE
}}
2733 Called when the line attached to an shape need to be repositioned,
2734 because the shape has moved.
2736 \membersection{wxShapeEvtHandler::OnMoveLinks
}
2738 \func{void
}{OnMoveLinks
}{\param{wxDC\&
}{ dc
}}
2740 Called when the lines attached to an shape need to be repositioned,
2741 because the shape has moved.
2743 \membersection{wxShapeEvtHandler::OnMovePost
}
2745 \func{bool
}{OnMovePost
}{\param{wxDC\&
}{ dc
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{double
}{ oldX
},
\param{double
}{ oldY
},
\param{bool
}{ display = TRUE
}}
2747 Called just after the shape receives a move request.
2749 \membersection{wxShapeEvtHandler::OnMovePre
}
2751 \func{bool
}{OnMovePre
}{\param{wxDC\&
}{ dc
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{double
}{ oldX
},
\param{double
}{ oldY
},
\param{bool
}{ display = TRUE
}}
2753 Called just before the shape receives a move request. Returning TRUE
2754 allows the move to be processed; returning FALSE vetoes the move.
2756 \membersection{wxShapeEvtHandler::OnRightClick
}
2758 \func{void
}{OnRightClick
}{\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys =
0},
\param{int
}{ attachment =
0}}
2760 Called when the shape receives a mouse mouse click event.
2762 \membersection{wxShapeEvtHandler::OnSize
}
2764 \func{void
}{OnSize
}{\param{double
}{ x
},
\param{double
}{ y
}}
2766 Called when the shape receives a resize request.
2768 \membersection{wxShapeEvtHandler::OnSizingBeginDragLeft
}
2770 \func{void
}{OnSizingBeginDragLeft
}{\param{wxControlPoint*
}{ pt
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2772 Called when a sizing drag is beginning.
2774 \membersection{wxShapeEvtHandler::OnSizingDragLeft
}
2776 \func{void
}{OnSizingDragLeft
}{\param{wxControlPoint*
}{ pt
},
\param{bool
}{ draw
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2778 Called when a sizing drag is occurring.
2780 \membersection{wxShapeEvtHandler::OnSizingEndDragLeft
}
2782 \func{void
}{OnSizingEndDragLeft
}{\param{wxControlPoint*
}{ pt
},
\param{double
}{ x
},
\param{double
}{ y
},
\param{int
}{ keys=
0},
\param{int
}{ attachment =
0}}
2784 Called when a sizing drag is ending.
2786 \membersection{wxShapeEvtHandler::SetPreviousHandler
}\label{wxshapeevthandlersetprevioushandler
}
2788 \func{void
}{SetPreviousHandler
}{\param{wxShapeEvtHandler*
}{ handler
}}
2790 Sets the previous handler.
2792 \membersection{wxShapeEvtHandler::SetShape
}\label{wxshapeevthandlersetshape
}
2794 \func{void
}{SetShape
}{\param{wxShape*
}{ shape
}}
2796 Sets the shape for this handler.
2798 \section{\class{wxTextShape
}}\label{wxtextshape
}
2800 As wxRectangleShape, but only the text is displayed.
2802 \wxheading{Derived from
}
2804 \helpref{wxRectangleShape
}{wxrectangleshape
}
2806 \latexignore{\rtfignore{\wxheading{Members
}}}
2808 \membersection{wxTextShape::wxTextShape
}
2810 \func{void
}{wxTextShape
}{\param{double
}{ width =
0.0},
\param{double
}{ height =
0.0}}
2814 \membersection{wxTextShape::
\destruct{wxTextShape
}}
2816 \func{void
}{\destruct{wxTextShape
}}{\void}
2820 \section{Functions
}\label{functions
}
2822 These are the OGL functions.
2824 \membersection{::wxOGLInitialize
}
2826 \func{void
}{wxOGLInitialize
}{\void}
2830 \membersection{::wxOGLCleanUp
}
2832 \func{void
}{wxOGLCleanUp
}{\void}