]> git.saurik.com Git - wxWidgets.git/blob - contrib/docs/latex/ogl/classes.tex
Applied patched for combo box SELECTED events (no
[wxWidgets.git] / contrib / docs / latex / ogl / classes.tex
1 \chapter{Class reference}\label{classref}
2 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
3 \setfooter{\thepage}{}{}{}{}{\thepage}
4
5 These are the main \ogl\ classes.
6
7 \section{\class{wxOGLConstraint}}\label{wxoglconstraint}
8
9 \overview{wxCompositeShape overview}{compositeshapeoverview}
10
11 An wxOGLConstraint object helps specify how child shapes are laid out with respect
12 to siblings and parents.
13
14 \wxheading{Derived from}
15
16 wxObject
17
18 \wxheading{See also}
19
20 \helpref{wxCompositeShape}{wxcompositeshape}
21
22 \latexignore{\rtfignore{\wxheading{Members}}}
23
24 \membersection{wxOGLConstraint::wxOGLConstraint}\label{wxoglconstraintconstr}
25
26 \func{}{wxOGLConstraint}{\void}
27
28 Default constructor.
29
30 \func{}{wxOGLConstraint}{\param{int}{ type}, \param{wxShape *}{constraining}, \param{wxList\& }{constrained}}
31
32 Constructor.
33
34 \wxheading{Parameters}
35
36 \docparam{constraining}{The shape which is used as the reference for positioning the {\it constrained} objects.}
37
38 \docparam{constrained}{Contains a list of wxShapes which are to be constrained (with respect
39 to {\it constraining}) using {\it type}.}
40
41 \docparam{type}{Can be one of:
42
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
46 will be the same
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
49 will be the same
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
63 constraining object
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
71 constraining object
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
100 \end{itemize}
101 }
102
103 \membersection{wxOGLConstraint::\destruct{wxOGLConstraint}}
104
105 \func{}{\destruct{wxOGLConstraint}}{\void}
106
107 Destructor.
108
109 \membersection{wxOGLConstraint::Equals}
110
111 \func{bool}{Equals}{\param{double}{ x}, \param{double}{ y}}
112
113 Returns TRUE if {\it x} and {\it y} are approximately equal (for the purposes
114 of evaluating the constraint).
115
116 \membersection{wxOGLConstraint::Evaluate}
117
118 \func{bool}{Evaluate}{\void}
119
120 Evaluates this constraint, returning TRUE if anything changed.
121
122 \membersection{wxOGLConstraint::SetSpacing}\label{wxoglconstraintsetspacing}
123
124 \func{void}{SetSpacing}{\param{double}{ x}, \param{double}{ y}}
125
126 Sets the horizontal and vertical spacing for the constraint.
127
128 \section{\class{wxBitmapShape}}\label{wxbitmapshape}
129
130 Draws a bitmap (non-resizable).
131
132 \wxheading{Derived from}
133
134 \helpref{wxRectangleShape}{wxrectangleshape}
135
136 \latexignore{\rtfignore{\wxheading{Members}}}
137
138 \membersection{wxBitmapShape::wxBitmapShape}
139
140 \func{}{wxBitmapShape}{\void}
141
142 Constructor.
143
144 \membersection{wxBitmapShape::\destruct{wxBitmapShape}}
145
146 \func{}{\destruct{wxBitmapShape}}{\void}
147
148 Destructor.
149
150 \membersection{wxBitmapShape::GetBitmap}
151
152 \constfunc{wxBitmap\&}{GetBitmap}{\void}
153
154 Returns a reference to the bitmap associated with this shape.
155
156 \membersection{wxBitmapShape::GetFilename}
157
158 \constfunc{wxString}{GetFilename}{\void}
159
160 Returns the bitmap filename.
161
162 \membersection{wxBitmapShape::SetBitmap}
163
164 \func{void}{SetBitmap}{\param{const wxBitmap\&}{ bitmap}}
165
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.
169
170 \membersection{wxBitmapShape::SetFilename}
171
172 \func{void}{SetFilename}{\param{const wxString\& }{filename}}
173
174 Sets the bitmap filename.
175
176 \section{\class{wxDiagram}}\label{wxdiagram}
177
178 Encapsulates an entire diagram, with methods for reading/writing and drawing.
179 A diagram has an associated wxShapeCanvas.
180
181 \wxheading{Derived from}
182
183 wxObject
184
185 \wxheading{See also}
186
187 \helpref{wxShapeCanvas}{wxshapecanvas}
188
189 \latexignore{\rtfignore{\wxheading{Members}}}
190
191 \membersection{wxDiagram::wxDiagram}
192
193 \func{}{wxDiagram}{\void}
194
195 Constructor.
196
197 \membersection{wxDiagram::\destruct{wxDiagram}}
198
199 \func{}{\destruct{wxDiagram}}{\void}
200
201 Destructor.
202
203 \membersection{wxDiagram::AddShape}
204
205 \func{void}{AddShape}{\param{wxShape*}{shape}, \param{wxShape *}{addAfter = NULL}}
206
207 Adds a shape to the diagram. If {\it addAfter} is non-NULL, the shape will be added after this
208 one.
209
210 \membersection{wxDiagram::Clear}
211
212 \func{void}{Clear}{\param{wxDC\&}{ dc}}
213
214 Clears the specified device context.
215
216 \membersection{wxDiagram::DeleteAllShapes}
217
218 \func{void}{DeletesAllShapes}{\void}
219
220 Removes and deletes all shapes in the diagram.
221
222 \membersection{wxDiagram::DrawOutline}
223
224 \func{void}{DrawOutline}{\param{wxDC\&}{ dc}, \param{double}{ x1}, \param{double}{ y1}, \param{double}{ x2}, \param{double}{ y2}}
225
226 Draws an outline rectangle on the current device context.
227
228 \membersection{wxDiagram::FindShape}\label{wxdiagramfindshape}
229
230 \constfunc{wxShape*}{FindShape}{\param{long}{ id}}
231
232 Returns the shape for the given identifier.
233
234 \membersection{wxDiagram::GetCanvas}
235
236 \constfunc{wxShapeCanvas*}{GetCanvas}{\void}
237
238 Returns the shape canvas associated with this diagram.
239
240 \membersection{wxDiagram::GetCount}\label{wxdiagramgetcount}
241
242 \constfunc{int}{GetCount}{\void}
243
244 Returns the number of shapes in the diagram.
245
246 \membersection{wxDiagram::GetGridSpacing}
247
248 \constfunc{double}{GetGridSpacing}{\void}
249
250 Returns the grid spacing.
251
252 \membersection{wxDiagram::GetMouseTolerance}
253
254 \func{int}{GetMouseTolerance}{\void}
255
256 Returns the tolerance within which a mouse move is ignored.
257
258 \membersection{wxDiagram::GetShapeList}
259
260 \constfunc{wxList*}{GetShapeList}{\void}
261
262 Returns a pointer to the internal shape list.
263
264 \membersection{wxDiagram::GetQuickEditMode}
265
266 \constfunc{bool}{GetQuickEditMode}{\void}
267
268 Returns quick edit mode.
269
270 \membersection{wxDiagram::GetSnapToGrid}
271
272 \constfunc{bool}{GetSnapToGrid}{\void}
273
274 Returns snap-to-grid mode.
275
276 \membersection{wxDiagram::InsertShape}
277
278 \func{void}{InsertShape}{\param{wxShape *}{shape}}
279
280 Inserts a shape at the front of the shape list.
281
282 \membersection{wxDiagram::LoadFile}
283
284 \func{bool}{LoadFile}{\param{const wxString\& }{filename}}
285
286 Loads the diagram from a file.
287
288 \membersection{wxDiagram::OnDatabaseLoad}
289
290 \func{void}{OnDatabaseLoad}{\param{wxExprDatabase\&}{ database}}
291
292 Called just after the nodes and lines have been read from the wxExprDatabase. You may override this;
293 the default member does nothing.
294
295 \membersection{wxDiagram::OnDatabaseSave}
296
297 \func{void}{OnDatabaseSave}{\param{wxExprDatabase\&}{ database}}
298
299 Called just after the nodes and lines have been written to the wxExprDatabase. You may override this;
300 the default member does nothing.
301
302 \membersection{wxDiagram::OnHeaderLoad}
303
304 \func{bool}{OnHeaderLoad}{\param{wxExprDatabase\&}{ database}, \param{wxExpr\&}{ expr}}
305
306 Called to allow the `diagram' header object to be read. The default member reads no further information.
307 You may wish to override this to read version information, author name, etc.
308
309 \membersection{wxDiagram::OnHeaderSave}
310
311 \func{bool}{OnHeaderSave}{\param{wxExprDatabase\&}{ database}, \param{wxExpr\&}{ expr}}
312
313 Called to allow instantiation of the `diagram' header object. The default member writes no further information.
314 You may wish to override this to include version information, author name, etc.
315
316 \membersection{wxDiagram::OnShapeLoad}
317
318 \func{bool}{OnShapeLoad}{\param{wxExprDatabase\&}{ database}, \param{wxShape\&}{ shape}, \param{wxExpr\&}{ expr}}
319
320 Called to read the shape from the {\it expr}. You may override this, but call this function first.
321 The default member calls ReadAttributes for the shape.
322
323 \membersection{wxDiagram::OnShapeSave}
324
325 \func{bool}{OnShapeSave}{\param{wxExprDatabase\&}{ database}, \param{wxShape\&}{ shape}, \param{wxExpr\&}{ expr}}
326
327 Called to save the shape to the {\it expr} and {\it database}. You may override this, but call this function first.
328 The default member calls WriteAttributes for the shape, appends the shape to the database, and of the shape
329 is a composite, recursively calls OnShapeSave for its children.
330
331 \membersection{wxDiagram::ReadContainerGeometry}
332
333 \func{void}{ReadContainerGeometry}{\param{wxExprDatabase\&}{ database}}
334
335 Reads container geometry from a wxExprDatabase, linking up nodes which
336 are part of a composite. You probably won't need to redefine this.
337
338 \membersection{wxDiagram::ReadLines}
339
340 \func{void}{ReadLines}{\param{wxExprDatabase\&}{ database}}
341
342 Reads lines from a wxExprDatabase. You probably won't need to redefine this.
343
344 \membersection{wxDiagram::ReadNodes}
345
346 \func{void}{ReadNodes}{\param{wxExprDatabase\&}{ database}}
347
348 Reads nodes from a wxExprDatabase. You probably won't need to redefine this.
349
350 \membersection{wxDiagram::RecentreAll}
351
352 \func{void}{RecentreAll}{\param{wxDC\&}{ dc}}
353
354 Make sure all text that should be centred, is centred.
355
356 \membersection{wxDiagram::Redraw}
357
358 \func{void}{Redraw}{\param{wxDC\&}{ dc}}
359
360 Draws the shapes in the diagram on the specified device context.
361
362 \membersection{wxDiagram::RemoveAllShapes}
363
364 \func{void}{RemoveAllShapes}{\void}
365
366 Removes all shapes from the diagram but does not delete the shapes.
367
368 \membersection{wxDiagram::RemoveShape}
369
370 \func{void}{RemoveShape}{\param{wxShape*}{ shape}}
371
372 Removes the shape from the diagram (non-recursively) but does not delete it.
373
374 \membersection{wxDiagram::SaveFile}
375
376 \func{bool}{SaveFile}{\param{const wxString\& }{filename}}
377
378 Saves the diagram in a file.
379
380 \membersection{wxDiagram::SetCanvas}\label{wxdiagramsetcanvas}
381
382 \func{void}{SetCanvas}{\param{wxShapeCanvas*}{ canvas}}
383
384 Sets the canvas associated with this diagram.
385
386 \membersection{wxDiagram::SetGridSpacing}
387
388 \func{void}{SetGridSpacing}{\param{double}{ spacing}}
389
390 Sets the grid spacing. The default is 5.
391
392 \membersection{wxDiagram::SetMouseTolerance}
393
394 \func{void}{SetMouseTolerance}{\param{int}{ tolerance}}
395
396 Sets the tolerance within which a mouse move is ignored. The default is 3 pixels.
397
398 \membersection{wxDiagram::SetQuickEditMode}
399
400 \func{void}{SetQuickEditMode}{\param{bool}{ mode}}
401
402 Sets quick-edit-mode on or off. In this mode, refreshes are minimized, but the
403 diagram may need manual refreshing occasionally.
404
405 \membersection{wxDiagram::SetSnapToGrid}
406
407 \func{void}{SetSnapToGrid}{\param{bool}{ snap}}
408
409 Sets snap-to-grid mode on or off. The default is on.
410
411 \membersection{wxDiagram::ShowAll}
412
413 \func{void}{ShowAll}{\param{bool}{ show}}
414
415 Calls Show for each shape in the diagram.
416
417 \membersection{wxDiagram::Snap}
418
419 \func{void}{Snap}{\param{double *}{x}, \param{double *}{y}}
420
421 `Snaps' the coordinate to the nearest grid position, if snap-to-grid is on.
422
423 \section{\class{wxDrawnShape}}\label{wxdrawnshape}
424
425 Draws a pseduo-metafile shape, which can be loaded from a simple Windows metafile.
426
427 wxDrawnShape allows you to specify a different shape for each of four orientations (North, West,
428 South and East). It also provides a set of drawing functions for programmatic drawing of a shape,
429 so that during construction of the shape you can draw into it as if it were a device context.
430
431 \wxheading{Derived from}
432
433 \helpref{wxRectangleShape}{wxrectangleshape}
434
435 See also \helpref{wxRectangleShape}{wxrectangleshape}.
436
437 \latexignore{\rtfignore{\wxheading{Members}}}
438
439 \membersection{wxDrawnShape::wxDrawnShape}
440
441 \func{}{wxDrawnShape}{\void}
442
443 Constructor.
444
445 \membersection{wxDrawnShape::\destruct{wxDrawnShape}}
446
447 \func{}{\destruct{wxDrawnShape}}{\void}
448
449 Destructor.
450
451 \membersection{wxDrawnShape::CalculateSize}
452
453 \func{void}{CalculateSize}{\void}
454
455 Calculates the wxDrawnShape size from the current metafile. Call this after you have drawn
456 into the shape.
457
458 \membersection{wxDrawnShape::DestroyClippingRect}\label{wxdrawnshapedestroyclippingrect}
459
460 \func{void}{DestroyClippingRect}{\void}
461
462 Destroys the clipping rectangle. See also \helpref{wxDrawnShape::SetClippingRect}{wxdrawnshapesetclippingrect}.
463
464 \membersection{wxDrawnShape::DrawArc}\label{wxdrawnshapedrawarc}
465
466 \func{void}{DrawArc}{\param{const wxPoint\&}{ centrePoint}, \param{const wxPoint\&}{ startPoint},
467 \param{const wxPoint\&}{ endPoint}}
468
469 Draws an arc (see wxWindows documentation for details).
470
471 \membersection{wxDrawnShape::DrawAtAngle}\label{wxdrawnshapedrawatangle}
472
473 \func{void}{DrawAtAngle}{\param{int}{ angle}}
474
475 Sets the metafile for the given orientation, which can be one of:
476
477 \begin{itemize}\itemsep=0pt
478 \item oglDRAWN\_ANGLE\_0
479 \item oglDRAWN\_ANGLE\_90
480 \item oglDRAWN\_ANGLE\_180
481 \item oglDRAWN\_ANGLE\_270
482 \end{itemize}
483
484 See also \helpref{wxDrawnShape::GetAngle}{wxdrawnshapegetangle}.
485
486 \membersection{wxDrawnShape::DrawEllipticArc}\label{wxdrawnshapedrawellipticarc}
487
488 \func{void}{DrawEllipticArc}{\param{const wxRect\&}{ rect}, \param{double}{ startAngle}, \param{double}{ endAngle}}
489
490 Draws an elliptic arc (see wxWindows documentation for details).
491
492 \membersection{wxDrawnShape::DrawLine}\label{wxdrawnshapedrawline}
493
494 \func{void}{DrawLine}{\param{const wxPoint\&}{ point1}, \param{const wxPoint\&}{ point2}}
495
496 Draws a line from {\it point1} to {\it point2}.
497
498 \membersection{wxDrawnShape::DrawLines}\label{wxdrawnshapedrawlines}
499
500 \func{void}{DrawLines}{\param{int}{ n}, \param{wxPoint\&}{ points[]}}
501
502 Draws {\it n} lines.
503
504 \membersection{wxDrawnShape::DrawPoint}\label{wxdrawnshapedrawpoint}
505
506 \func{void}{DrawPoint}{\param{const wxPoint\&}{ point}}
507
508 Draws a point.
509
510 \membersection{wxDrawnShape::DrawPolygon}\label{wxdrawnshapedrawpolygon}
511
512 \func{void}{DrawPolygon}{\param{int}{ n}, \param{wxPoint\&}{ points[]}, \param{int}{ flags = 0}}
513
514 Draws a polygon. {\it flags} can be one or more of {\bf oglMETAFLAGS\_OUTLINE} (use this polygon for the drag outline)
515 and {\bf oglMETAFLAGS\_ATTACHMENTS} (use the vertices of this polygon for attachments).
516
517 \membersection{wxDrawnShape::DrawRectangle}\label{wxdrawnshapedrawrectangle}
518
519 \func{void}{DrawRectangle}{\param{const wxRect\&}{ rect}}
520
521 Draws a rectangle.
522
523 \membersection{wxDrawnShape::DrawRoundedRectangle}\label{wxdrawnshapedrawroundedrectangle}
524
525 \func{void}{DrawRoundedRectangle}{\param{const wxRect\&}{ rect}, \param{double}{ radius}}
526
527 Draws a rounded rectangle. {\it radius} is the corner radius. If {\it radius} is negative,
528 it expresses the radius as a proportion of the smallest dimension of the rectangle.
529
530 \membersection{wxDrawnShape::DrawSpline}\label{wxdrawnshapedrawspline}
531
532 \func{void}{DrawSpline}{\param{int}{ n}, \param{wxPoint\&}{ points[]}}
533
534 Draws a spline curve.
535
536 \membersection{wxDrawnShape::DrawText}\label{wxdrawnshapedrawtext}
537
538 \func{void}{DrawText}{\param{const wxString\&}{ text}, \param{const wxPoint\&}{ point}}
539
540 Draws text at the given point.
541
542 \membersection{wxDrawnShape::GetAngle}\label{wxdrawnshapegetangle}
543
544 \constfunc{int}{GetAngle}{\void}
545
546 Returns the current orientation, which can be one of:
547
548 \begin{itemize}\itemsep=0pt
549 \item oglDRAWN\_ANGLE\_0
550 \item oglDRAWN\_ANGLE\_90
551 \item oglDRAWN\_ANGLE\_180
552 \item oglDRAWN\_ANGLE\_270
553 \end{itemize}
554
555 See also \helpref{wxDrawnShape::DrawAtAngle}{wxdrawnshapedrawatangle}.
556
557 \membersection{wxDrawnShape::GetMetaFile}
558
559 \constfunc{wxPseudoMetaFile\& }{GetMetaFile}{\void}
560
561 Returns a reference to the internal `pseudo-metafile'.
562
563 \membersection{wxDrawnShape::GetRotation}\label{wxdrawnshapegetrotation}
564
565 \constfunc{double}{GetRotation}{\void}
566
567 Returns the current rotation of the shape in radians.
568
569 \membersection{wxDrawnShape::LoadFromMetaFile}
570
571 \func{bool}{LoadFromMetaFile}{\param{const wxString\& }{filename}}
572
573 Loads a (very simple) Windows metafile, created for example by Top Draw, the Windows shareware graphics package.
574
575 \membersection{wxDrawnShape::Rotate}
576
577 \func{void}{Rotate}{\param{double }{x}, \param{double }{y}, \param{double }{theta}}
578
579 Rotate about the given axis by the given amount in radians.
580
581 \membersection{wxDrawnShape::SetClippingRect}\label{wxdrawnshapesetclippingrect}
582
583 \func{void}{SetClippingRect}{\param{const wxRect\&}{ rect}}
584
585 Sets the clipping rectangle. See also \helpref{wxDrawnShape::DestroyClippingRect}{wxdrawnshapedestroyclippingrect}.
586
587 \membersection{wxDrawnShape::SetDrawnBackgroundColour}\label{wxdrawnshapesetdrawnbackgroundcolour}
588
589 \func{void}{SetDrawnBackgroundColour}{\param{const wxColour\&}{ colour}}
590
591 Sets the current background colour for the current metafile.
592
593 \membersection{wxDrawnShape::SetDrawnBackgroundMode}\label{wxdrawnshapesetdrawnbackgroundmode}
594
595 \func{void}{SetDrawnBackgroundMode}{\param{int}{ mode}}
596
597 Sets the current background mode for the current metafile.
598
599 \membersection{wxDrawnShape::SetDrawnBrush}\label{wxdrawnshapesetdrawnbrush}
600
601 \func{void}{SetDrawnBrush}{\param{wxPen*}{ pen}, \param{bool}{ isOutline = FALSE}}
602
603 Sets the pen for this metafile. If {\it isOutline} is TRUE, this pen is taken to indicate the outline
604 (and if the outline pen is changed for the whole shape, the pen will be replaced with the outline pen).
605
606 \membersection{wxDrawnShape::SetDrawnFont}\label{wxdrawnshapesetdrawnfont}
607
608 \func{void}{SetDrawnFont}{\param{wxFont*}{ font}}
609
610 Sets the current font for the current metafile.
611
612 \membersection{wxDrawnShape::SetDrawnPen}\label{wxdrawnshapesetdrawnpen}
613
614 \func{void}{SetDrawnPen}{\param{wxPen*}{ pen}, \param{bool}{ isOutline = FALSE}}
615
616 Sets the pen for this metafile. If {\it isOutline} is TRUE, this pen is taken to indicate the outline
617 (and if the outline pen is changed for the whole shape, the pen will be replaced with the outline pen).
618
619 \membersection{wxDrawnShape::SetDrawnTextColour}\label{wxdrawnshapesetdrawntextcolour}
620
621 \func{void}{SetDrawnTextColour}{\param{const wxColour\&}{ colour}}
622
623 Sets the current text colour for the current metafile.
624
625 \membersection{wxDrawnShape::Scale}
626
627 \func{void}{Scale}{\param{double }{sx}, \param{double }{sy}}
628
629 Scales the shape by the given amount.
630
631 \membersection{wxDrawnShape::SetSaveToFile}
632
633 \func{void}{SetSaveToFile}{\param{bool }{save}}
634
635 If {\it save} is TRUE, the image will be saved along with the shape's other attributes. The reason
636 why this might not be desirable is that if there are many shapes with the same image, it would be
637 more efficient for the application to save one copy, and not duplicate the information for every
638 shape. The default is TRUE.
639
640 \membersection{wxDrawnShape::Translate}
641
642 \func{void}{Translate}{\param{double }{x}, \param{double }{y}}
643
644 Translates the shape by the given amount.
645
646 \section{\class{wxCircleShape}}\label{wxcircleshape}
647
648 An wxEllipseShape whose width and height are the same.
649
650 \wxheading{Derived from}
651
652 \helpref{wxEllipseShape}{wxellipseshape}.
653
654 \latexignore{\rtfignore{\wxheading{Members}}}
655
656 \membersection{wxCircleShape::wxCircleShape}
657
658 \func{}{wxCircleShape}{\param{double}{ width = 0.0}}
659
660 Constructor.
661
662 \membersection{wxCircleShape::\destruct{wxCircleShape}}
663
664 \func{}{\destruct{wxCircleShape}}{\void}
665
666 Destructor.
667
668 \section{\class{wxCompositeShape}}\label{wxcompositeshape}
669
670 This is an object with a list of child objects, and a list of size
671 and positioning constraints between the children.
672
673 \wxheading{Derived from}
674
675 \helpref{wxRectangleShape}{wxrectangleshape}
676
677 \wxheading{See also}
678
679 \helpref{wxCompositeShape overview}{compositeshapeoverview}
680
681 \latexignore{\rtfignore{\wxheading{Members}}}
682
683 \membersection{wxCompositeShape::wxCompositeShape}
684
685 \func{}{wxCompositeShape}{\void}
686
687 Constructor.
688
689 \membersection{wxCompositeShape::\destruct{wxCompositeShape}}
690
691 \func{}{\destruct{wxCompositeShape}}{\void}
692
693 Destructor.
694
695 \membersection{wxCompositeShape::AddChild}\label{wxcompositeshapeaddchild}
696
697 \func{void}{AddChild}{\param{wxShape *}{child}, \param{wxShape *}{addAfter = NULL}}
698
699 Adds a child shape to the composite. If {\it addAfter} is non-NULL, the shape will be added
700 after this shape.
701
702 \membersection{wxCompositeShape::AddConstraint}\label{wxcompositeshapeaddconstraint}
703
704 \func{wxOGLConstraint *}{AddConstraint}{\param{wxOGLConstraint *}{constraint}}
705
706 \func{wxOGLConstraint *}{AddConstraint}{\param{int}{ type}, \param{wxShape *}{constraining}, \param{wxList\&}{constrained}}
707
708 \func{wxOGLConstraint *}{AddConstraint}{\param{int}{ type}, \param{wxShape *}{constraining}, \param{wxShape *}{constrained}}
709
710 Adds a constraint to the composite.
711
712 \membersection{wxCompositeShape::CalculateSize}
713
714 \func{void}{CalculateSize}{\void}
715
716 Calculates the size and position of the composite based on child sizes and positions.
717
718 \membersection{wxCompositeShape::ContainsDivision}
719
720 \func{bool}{FindContainerImage}{\param{wxDivisionShape *}{division}}
721
722 Returns TRUE if {\it division} is a descendant of this container.
723
724 \membersection{wxCompositeShape::DeleteConstraint}
725
726 \func{void}{DeleteConstraint}{\param{wxOGLConstraint *}{constraint}}
727
728 Deletes constraint from composite.
729
730 \membersection{wxCompositeShape::DeleteConstraintsInvolvingChild}
731
732 \func{void}{DeleteConstraintsInvolvingChild}{\param{wxShape *}{child}}
733
734 This function deletes constraints which mention the given child. Used when
735 deleting a child from the composite.
736
737 \membersection{wxCompositeShape::FindConstraint}
738
739 \func{wxOGLConstraint *}{FindConstraint}{\param{long}{ id}, \param{wxCompositeShape **}{actualComposite}}
740
741 Finds the constraint with the given id, also returning the actual composite the constraint was in,
742 in case that composite was a descendant of this composite.
743
744 \membersection{wxCompositeShape::FindContainerImage}
745
746 \func{wxShape *}{FindContainerImage}{\void}
747
748 Finds the image used to visualize a container. This is any child
749 of the composite that is not in the divisions list.
750
751 \membersection{wxCompositeShape::GetConstraints}
752
753 \constfunc{wxList\&}{GetConstraints}{\void}
754
755 Returns a reference to the list of constraints.
756
757 \membersection{wxCompositeShape::GetDivisions}
758
759 \constfunc{wxList\&}{GetDivisions}{\void}
760
761 Returns a reference to the list of divisions.
762
763 \membersection{wxCompositeShape::MakeContainer}\label{wxcompositeshapemakecontainer}
764
765 \func{void}{MakeContainer}{\void}
766
767 Makes this composite into a container by creating one child wxDivisionShape.
768
769 \membersection{wxCompositeShape::OnCreateDivision}
770
771 \func{wxDivisionShape *}{OnCreateDivision}{\void}
772
773 Called when a new division shape is required. Can be overriden to allow an application
774 to use a different class of division.
775
776 \membersection{wxCompositeShape::Recompute}\label{wxcompositeshaperecompute}
777
778 \func{bool}{Recompute}{\void}
779
780 Recomputes any constraints associated with the object. If FALSE is returned,
781 the constraints could not be satisfied (there was an inconsistency).
782
783 \membersection{wxCompositeShape::RemoveChild}
784
785 \func{void}{RemoveChild}{\param{wxShape *}{child}}
786
787 Removes the child from the composite and any constraint relationships, but does not
788 delete the child.
789
790 \section{\class{wxDividedShape}}\label{wxdividedshape}
791
792 A wxDividedShape is a rectangle with a number of vertical divisions. Each
793 division may have its text formatted with independent characteristics, and
794 the size of each division relative to the whole image may be specified.
795
796 \wxheading{Derived from}
797
798 \helpref{wxRectangleShape}{wxrectangleshape}
799
800 \wxheading{See also}
801
802 \helpref{wxDividedShape overview}{dividedshapeoverview}
803
804 \latexignore{\rtfignore{\wxheading{Members}}}
805
806 \membersection{wxDividedShape::wxDividedShape}
807
808 \func{}{wxDividedShape}{\param{double}{ width = 0.0}, \param{double}{ height = 0.0}}
809
810 Constructor.
811
812 \membersection{wxDividedShape::\destruct{wxDividedShape}}
813
814 \func{}{\destruct{wxDividedShape}}{\void}
815
816 Destructor.
817
818 \membersection{wxDividedShape::EditRegions}
819
820 \func{void}{EditRegions}{\void}
821
822 Edit the region colours and styles.
823
824 \membersection{wxDividedShape::SetRegionSizes}
825
826 \func{void}{SetRegionSizes}{\void}
827
828 Set all region sizes according to proportions and
829 this object total size.
830
831 \section{\class{wxDivisionShape}}\label{wxdivisionshape}
832
833 A division shape is like a composite in that it can contain further objects, but is used exclusively to
834 divide another shape into regions, or divisions. A wxDivisionShape is never free-standing.
835
836 \wxheading{Derived from}
837
838 \helpref{wxCompositeShape}{wxcompositeshape}
839
840 \wxheading{See also}
841
842 \helpref{wxCompositeShape overview}{compositeshapeoverview}
843
844 \latexignore{\rtfignore{\wxheading{Members}}}
845
846 \membersection{wxDivisionShape::wxDivisionShape}
847
848 \func{}{wxDivisionShape}{\void}
849
850 Constructor.
851
852 \membersection{wxDivisionShape::\destruct{wxDivisionShape}}
853
854 \func{}{\destruct{wxDivisionShape}}{\void}
855
856 Destructor.
857
858 \membersection{wxDivisionShape::AdjustBottom}
859
860 \func{void}{AdjustBottom}{\param{double}{ bottom}, \param{bool}{ test}}
861
862 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
863
864 \membersection{wxDivisionShape::AdjustLeft}
865
866 \func{void}{AdjustLeft}{\param{double}{ left}, \param{bool}{ test}}
867
868 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
869
870 \membersection{wxDivisionShape::AdjustRight}
871
872 \func{void}{AdjustRight}{\param{double}{ right}, \param{bool}{ test}}
873
874 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
875
876 \membersection{wxDivisionShape::AdjustTop}
877
878 \func{void}{AdjustTop}{\param{double}{ top}, \param{bool}{ test}}
879
880 Adjust a side, returning FALSE if it's not physically possible to adjust it to this point.
881
882 \membersection{wxDivisionShape::Divide}\label{wxdivisionshapedivide}
883
884 \func{void}{Divide}{\param{int}{ direction}}
885
886 Divide this division into two further divisions, horizontally ({\it direction} is wxHORIZONTAL) or
887 vertically ({\it direction} is wxVERTICAL).
888
889 \membersection{wxDivisionShape::EditEdge}
890
891 \func{void}{EditEdge}{\param{int}{ side}}
892
893 Interactively edit style of left or top side.
894
895 \membersection{wxDivisionShape::GetBottomSide}
896
897 \func{wxDivisionShape *}{GetBottomSide}{\void}
898
899 Returns a pointer to the division on the bottom side of this division.
900
901 \membersection{wxDivisionShape::GetHandleSide}
902
903 \func{int}{GetHandleSide}{\void}
904
905 Returns the side which the handle appears on (DIVISION\_SIDE\_LEFT or DIVISION\_SIDE\_TOP).
906
907 \membersection{wxDivisionShape::GetLeftSide}
908
909 \func{wxDivisionShape *}{GetLeftSide}{\void}
910
911 Returns a pointer to the division on the left side of this division.
912
913 \membersection{wxDivisionShape::GetLeftSideColour}
914
915 \func{wxString}{GetLeftSideColour}{\void}
916
917 Returns a pointer to the colour used for drawing the left side of the division.
918
919 \membersection{wxDivisionShape::GetLeftSidePen}
920
921 \func{wxPen *}{GetLeftSidePen}{\void}
922
923 Returns a pointer to the pen used for drawing the left side of the division.
924
925 \membersection{wxDivisionShape::GetRightSide}
926
927 \func{wxDivisionShape *}{GetRightSide}{\void}
928
929 Returns a pointer to the division on the right side of this division.
930
931 \membersection{wxDivisionShape::GetTopSide}
932
933 \func{wxDivisionShape *}{GetTopSide}{\void}
934
935 Returns a pointer to the division on the top side of this division.
936
937 \membersection{wxDivisionShape::GetTopSideColour}
938
939 \func{wxString}{GetTopSideColour}{\void}
940
941 Returns a pointer to the colour used for drawing the top side of the division.
942
943 \membersection{wxDivisionShape::GetTopSidePen}
944
945 \func{wxPen *}{GetTopSidePen}{\void}
946
947 Returns a pointer to the pen used for drawing the left side of the division.
948
949 \membersection{wxDivisionShape::ResizeAdjoining}
950
951 \func{void}{ResizeAdjoining}{\param{int}{ side}, \param{double}{ newPos}, \param{bool}{ test}}
952
953 Resize adjoining divisions at the given side. If {\it test} is TRUE,
954 just see whether it's possible for each adjoining region,
955 returning FALSE if it's not.
956
957 {\it side} can be one of:
958
959 \begin{itemize}\itemsep=0pt
960 \item DIVISION\_SIDE\_NONE
961 \item DIVISION\_SIDE\_LEFT
962 \item DIVISION\_SIDE\_TOP
963 \item DIVISION\_SIDE\_RIGHT
964 \item DIVISION\_SIDE\_BOTTOM
965 \end{itemize}
966
967 \membersection{wxDivisionShape::PopupMenu}
968
969 \func{void}{PopupMenu}{\param{double}{ x}, \param{double}{ y}}
970
971 Popup the division menu.
972
973 \membersection{wxDivisionShape::SetBottomSide}
974
975 \func{void}{SetBottomSide}{\param{wxDivisionShape *}{shape}}
976
977 Set the pointer to the division on the bottom side of this division.
978
979 \membersection{wxDivisionShape::SetHandleSide}
980
981 \func{int}{SetHandleSide}{\void}
982
983 Sets the side which the handle appears on (DIVISION\_SIDE\_LEFT or DIVISION\_SIDE\_TOP).
984
985 \membersection{wxDivisionShape::SetLeftSide}
986
987 \func{void}{SetLeftSide}{\param{wxDivisionShape *}{shape}}
988
989 Set the pointer to the division on the left side of this division.
990
991 \membersection{wxDivisionShape::SetLeftSideColour}
992
993 \func{void}{SetLeftSideColour}{\param{const wxString\& }{colour}}
994
995 Sets the colour for drawing the left side of the division.
996
997 \membersection{wxDivisionShape::SetLeftSidePen}
998
999 \func{void}{SetLeftSidePen}{\param{wxPen *}{pen}}
1000
1001 Sets the pen for drawing the left side of the division.
1002
1003 \membersection{wxDivisionShape::SetRightSide}
1004
1005 \func{void}{SetRightSide}{\param{wxDivisionShape *}{shape}}
1006
1007 Set the pointer to the division on the right side of this division.
1008
1009 \membersection{wxDivisionShape::SetTopSide}
1010
1011 \func{void}{SetTopSide}{\param{wxDivisionShape *}{shape}}
1012
1013 Set the pointer to the division on the top side of this division.
1014
1015 \membersection{wxDivisionShape::SetTopSideColour}
1016
1017 \func{void}{SetTopSideColour}{\param{const wxString\& }{colour}}
1018
1019 Sets the colour for drawing the top side of the division.
1020
1021 \membersection{wxDivisionShape::SetTopSidePen}
1022
1023 \func{void}{SetTopSidePen}{\param{wxPen *}{pen}}
1024
1025 Sets the pen for drawing the top side of the division.
1026
1027 \section{\class{wxEllipseShape}}\label{wxellipseshape}
1028
1029 The wxEllipseShape behaves similarly to the wxRectangleShape but is
1030 elliptical.
1031
1032 \wxheading{Derived from}
1033
1034 \helpref{wxShape}{wxshape}
1035
1036 \latexignore{\rtfignore{\wxheading{Members}}}
1037
1038 \membersection{wxEllipseShape::wxEllipseShape}
1039
1040 \func{}{wxEllipseShape}{\param{double}{ width = 0.0}, \param{double}{ height = 0.0}}
1041
1042 Constructor.
1043
1044 \membersection{wxEllipseShape::\destruct{wxEllipseShape}}
1045
1046 \func{}{\destruct{wxEllipseShape}}{\void}
1047
1048 Destructor.
1049
1050 \section{\class{wxLineShape}}\label{wxlineshape}
1051
1052 A wxLineShape may be attached to two nodes; it may be segmented, in which
1053 case a control point is drawn for each joint.
1054
1055 A wxLineShape may have arrows at the beginning, end and centre.
1056
1057 \wxheading{Derived from}
1058
1059 \helpref{wxShape}{wxshape}
1060
1061 \latexignore{\rtfignore{\wxheading{Members}}}
1062
1063 \membersection{wxLineShape::wxLineShape}
1064
1065 \func{}{wxLineShape}{\void}
1066
1067 Constructor.
1068
1069 Usually you will call \helpref{wxLineShape::MakeLineControlPoints}{wxlineshapemakelinecontrolpoints} to
1070 specify the number of segments in the line.
1071
1072 \membersection{wxLineShape::\destruct{wxLineShape}}
1073
1074 \func{}{\destruct{wxLineShape}}{\void}
1075
1076 Destructor.
1077
1078 \membersection{wxLineShape::AddArrow}\label{wxlineshapeaddarrow}
1079
1080 \func{void}{AddArrow}{\param{WXTYPE}{ type}, \param{bool}{ end = ARROW\_POSITION\_END}, \param{double}{ arrowSize = 10.0},
1081 \param{double}{ xOffset = 0.0}, \param{const wxString\& }{name = ""}, \param{wxPseudoMetaFile *}{mf = NULL}, \param{long}{ arrowId = -1}}
1082
1083 Adds an arrow (or annotation) to the line.
1084
1085 {\it type} may currently be one of:
1086
1087 \begin{description}\itemsep=0pt
1088 \item[ARROW\_HOLLOW\_CIRCLE] Hollow circle.
1089 \item[ARROW\_FILLED\_CIRCLE] Filled circle.
1090 \item[ARROW\_ARROW] Conventional arrowhead.
1091 \item[ARROW\_SINGLE\_OBLIQUE] Single oblique stroke.
1092 \item[ARROW\_DOUBLE\_OBLIQUE] Double oblique stroke.
1093 \item[ARROW\_DOUBLE\_METAFILE] Custom arrowhead.
1094 \end{description}
1095
1096 {\it end} may currently be one of:
1097
1098 \begin{description}\itemsep=0pt
1099 \item[ARROW\_POSITION\_END] Arrow appears at the end.
1100 \item[ARROW\_POSITION\_START] Arrow appears at the start.
1101 \end{description}
1102
1103 {\it arrowSize} specifies the length of the arrow.
1104
1105 {\it xOffset} specifies the offset from the end of the line.
1106
1107 {\it name} specifies a name for the arrow.
1108
1109 {\it mf} can be a wxPseduoMetaFile, perhaps loaded from a simple Windows metafile.
1110
1111 {\it arrowId} is the id for the arrow.
1112
1113 \membersection{wxLineShape::AddArrowOrdered}
1114
1115 \func{void}{AddArrowOrdered}{\param{wxArrowHead *}{arrow}, \param{wxList\&}{ referenceList}, \param{int}{ end}}
1116
1117 Add an arrowhead in the position indicated by the reference
1118 list of arrowheads, which contains all legal arrowheads for this
1119 line, in the correct order.
1120 E.g.
1121
1122 \begin{verbatim}
1123 Reference list: a b c d e
1124 Current line list: a d
1125 \end{verbatim}
1126
1127 Add c, then line list is: a c d.
1128
1129 If no legal arrowhead position, return FALSE. Assume reference list is
1130 for one end only, since it potentially defines the ordering for any one
1131 of the 3 positions. So we don't check the reference list for arrowhead
1132 position.
1133
1134 \membersection{wxLineShape::ClearArrow}
1135
1136 \func{bool}{ClearArrow}{\param{const wxString\& }{name}}
1137
1138 Delete the arrow with the given name.
1139
1140 \membersection{wxLineShape::ClearArrowsAtPosition}
1141
1142 \func{void}{ClearArrowsAtPosition}{\param{int}{ position = -1}}
1143
1144 Delete the arrows at the specified position, or at any position if {\it position} is -1.
1145
1146 \membersection{wxLineShape::DrawArrow}
1147
1148 \func{void}{DrawArrow}{\param{ArrowHead *}{arrow}, \param{double}{ xOffset}, \param{bool}{ proportionalOffset}}
1149
1150 Draws the given arrowhead (or annotation).
1151
1152 \membersection{wxLineShape::DeleteArrowHead}
1153
1154 \func{bool}{DeleteArrowHead}{\param{long}{ arrowId}}
1155
1156 \func{bool}{DeleteArrowHead}{\param{int}{ position}, \param{const wxString\& }{name}}
1157
1158 Delete arrowhead by id or position and name.
1159
1160 \membersection{wxLineShape::DeleteLineControlPoint}
1161
1162 \func{bool}{DeleteLineControlPoint}{\void}
1163
1164 Deletes an arbitary point on the line.
1165
1166 \membersection{wxLineShape::DrawArrows}
1167
1168 \func{void}{DrawArrows}{\param{wxDC\&}{ dc}}
1169
1170 Draws all arrows.
1171
1172 \membersection{wxLineShape::DrawRegion}
1173
1174 \func{void}{DrawRegion}{\param{wxDC\&}{ dc}, \param{wxShapeRegion *}{region}, \param{double}{ x}, \param{double}{ y}}
1175
1176 Format one region at this position.
1177
1178 \membersection{wxLineShape::EraseRegion}
1179
1180 \func{void}{EraseRegion}{\param{wxDC\&}{ dc}, \param{wxShapeRegion *}{region}, \param{double}{ x}, \param{double}{ y}}
1181
1182 Format one region at this position.
1183
1184 \membersection{wxLineShape::FindArrowHead}
1185
1186 \func{wxArrowHead *}{FindArrowHead}{\param{long}{ arrowId}}
1187
1188 \func{wxArrowHead *}{FindArrowHead}{\param{int}{ position}, \param{const wxString\& }{name}}
1189
1190 Find arrowhead by id or position and name.
1191
1192 \membersection{wxLineShape::FindLineEndPoints}
1193
1194 \func{void}{FindLineEndPoints}{\param{double *}{fromX}, \param{double *}{fromY}, \param{double *}{toX}, \param{double *}{toY}}
1195
1196 Finds the x, y points at the two ends of the line. This function can be
1197 used by e.g. line-routing routines to get the actual points on the two
1198 node images where the lines will be drawn to/from.
1199
1200 \membersection{wxLineShape::FindLinePosition}
1201
1202 \func{int}{FindLinePosition}{\param{double }{x}, \param{double }{y}}
1203
1204 Find which position we're talking about at this x, y.
1205 Returns ARROW\_POSITION\_START, ARROW\_POSITION\_MIDDLE, ARROW\_POSITION\_END.
1206
1207 \membersection{wxLineShape::FindMinimumWidth}
1208
1209 \func{double}{FindMinimumWidth}{\void}
1210
1211 Finds the horizontal width for drawing a line with arrows in minimum
1212 space. Assume arrows at end only.
1213
1214 \membersection{wxLineShape::FindNth}
1215
1216 \func{void}{FindNth}{\param{wxShape *}{image}, \param{int *}{nth}, \param{int *}{noArcs}, \param{bool}{ incoming}}
1217
1218 Finds the position of the line on the given object. Specify whether incoming or outgoing lines are
1219 being considered with {\it incoming}.
1220
1221 \membersection{wxLineShape::GetAttachmentFrom}
1222
1223 \constfunc{int}{GetAttachmentFrom}{\void}
1224
1225 Returns the attachment point on the `from' node.
1226
1227 \membersection{wxLineShape::GetAttachmentTo}
1228
1229 \constfunc{int}{GetAttachmentTo}{\void}
1230
1231 Returns the attachment point on the `to' node.
1232
1233 \membersection{wxLineShape::GetEnds}
1234
1235 \func{void}{GetEnds}{\param{double *}{x1}, \param{double *}{y1}, \param{double *}{x2}, \param{double *}{y2}}
1236
1237 Gets the visible endpoints of the lines for drawing between two objects.
1238
1239 \membersection{wxLineShape::GetFrom}
1240
1241 \constfunc{wxShape *}{GetFrom}{\void}
1242
1243 Gets the `from' object.
1244
1245 \membersection{wxLineShape::GetLabelPosition}
1246
1247 \func{void}{GetLabelPosition}{\param{int}{ position}, \param{double *}{x}, \param{double *}{y}}
1248
1249 Get the reference point for a label. Region x and y are offsets from this.
1250 position is 0 (middle), 1 (start), 2 (end).
1251
1252 \membersection{wxLineShape::GetNextControlPoint}
1253
1254 \func{wxPoint *}{GetNextControlPoint}{\param{wxShape *}{shape}}
1255
1256 Find the next control point in the line after the start/end point,
1257 depending on whether the shape is at the start or end.
1258
1259 \membersection{wxLineShape::GetTo}
1260
1261 \func{wxShape *}{GetTo}{\void}
1262
1263 Gets the `to' object.
1264
1265 \membersection{wxLineShape::Initialise}
1266
1267 \func{void}{Initialise}{\void}
1268
1269 Initialises the line object.
1270
1271 \membersection{wxLineShape::InsertLineControlPoint}
1272
1273 \func{void}{InsertLineControlPoint}{\void}
1274
1275 Inserts a control point at an arbitrary position.
1276
1277 \membersection{wxLineShape::IsEnd}
1278
1279 \func{bool}{IsEnd}{\param{wxShape *}{shape}}
1280
1281 Returns TRUE if {\it shape} is at the end of the line.
1282
1283 \membersection{wxLineShape::IsSpline}
1284
1285 \func{bool}{IsSpline}{\void}
1286
1287 Returns TRUE if a spline is drawn through the control points, and FALSE otherwise.
1288
1289 \membersection{wxLineShape::MakeLineControlPoints}\label{wxlineshapemakelinecontrolpoints}
1290
1291 \func{void}{MakeLineControlPoints}{\param{int}{ n}}
1292
1293 Make a given number of control points (minimum of two).
1294
1295 \membersection{wxLineShape::OnMoveLink}
1296
1297 \func{void}{OnMoveLink}{\param{wxDC\&}{ dc}, \param{bool}{ moveControlPoints = TRUE}}
1298
1299 Called when a connected object has moved, to move the link to
1300 correct position.
1301
1302 \membersection{wxLineShape::SetAttachmentFrom}
1303
1304 \func{void}{SetAttachmentTo}{\param{int}{ fromAttach}}
1305
1306 Sets the `from' shape attachment.
1307
1308 \membersection{wxLineShape::SetAttachments}
1309
1310 \func{void}{SetAttachments}{\param{int}{ fromAttach}, \param{int}{ toAttach}}
1311
1312 Specifies which object attachment points should be used at each end of the line.
1313
1314 \membersection{wxLineShape::SetAttachmentTo}
1315
1316 \func{void}{SetAttachmentTo}{\param{int}{ toAttach}}
1317
1318 Sets the `to' shape attachment.
1319
1320 \membersection{wxLineShape::SetEnds}
1321
1322 \func{void}{SetEnds}{\param{double}{ x1}, \param{double}{ y1}, \param{double}{ x2}, \param{double}{ y2}}
1323
1324 Sets the end positions of the line.
1325
1326 \membersection{wxLineShape::SetFrom}
1327
1328 \func{void}{SetFrom}{\param{wxShape *}{object}}
1329
1330 Sets the `from' object for the line.
1331
1332 \membersection{wxLineShape::SetIgnoreOffsets}
1333
1334 \func{void}{SetIgnoreOffsets}{\param{bool}{ ignore}}
1335
1336 Tells the shape whether to ignore offsets from the end of the line when drawing.
1337
1338 \membersection{wxLineShape::SetSpline}
1339
1340 \func{void}{SetSpline}{\param{bool}{ spline}}
1341
1342 Specifies whether a spline is to be drawn through the control points (TRUE), or a line (FALSE).
1343
1344 \membersection{wxLineShape::SetTo}
1345
1346 \func{void}{SetTo}{\param{wxShape *}{object}}
1347
1348 Sets the `to' object for the line.
1349
1350 \membersection{wxLineShape::Straighten}
1351
1352 \func{void}{Straighten}{\param{wxDC*}{ dc = NULL}}
1353
1354 Straighten verticals and horizontals. {\it dc} is optional.
1355
1356 \membersection{wxLineShape::Unlink}
1357
1358 \func{void}{Unlink}{\void}
1359
1360 Unlinks the line from the nodes at either end.
1361
1362 \section{\class{wxPolygonShape}}\label{wxpolygonshape}
1363
1364 A wxPolygonShape's shape is defined by a number of points passed to the object's
1365 constructor. It can be used to create new shapes such as diamonds and triangles.
1366
1367 \wxheading{Derived from}
1368
1369 \helpref{wxShape}{wxshape}
1370
1371 \latexignore{\rtfignore{\wxheading{Members}}}
1372
1373 \membersection{wxPolygonShape::wxPolygonShape}
1374
1375 \func{}{wxPolygonShape}{void}
1376
1377 Constructor. Call \helpref{wxPolygonShape::Create}{wxpolygonshapecreate} to specify the polygon's vertices.
1378
1379 \membersection{wxPolygonShape::\destruct{wxPolygonShape}}
1380
1381 \func{}{\destruct{wxPolygonShape}}{\void}
1382
1383 Destructor.
1384
1385 \membersection{wxPolygonShape::Create}\label{wxpolygonshapecreate}
1386
1387 \func{void}{Create}{\param{wxList*}{ points}}
1388
1389 Takes a list of wxRealPoints; each point is an {\it offset} from the centre.
1390 The polygon's destructor will delete these points, so do not delete them yourself.
1391
1392 \membersection{wxPolygonShape::AddPolygonPoint}
1393
1394 \func{void}{AddPolygonPoint}{\param{int}{ pos = 0}}
1395
1396 Add a control point after the given point.
1397
1398 \membersection{wxPolygonShape::CalculatePolygonCentre}
1399
1400 \func{void}{CalculatePolygonCentre}{\void}
1401
1402 Recalculates the centre of the polygon.
1403
1404 \membersection{wxPolygonShape::DeletePolygonPoint}
1405
1406 \func{void}{DeletePolygonPoint}{\param{int}{ pos = 0}}
1407
1408 Deletes a control point.
1409
1410 \membersection{wxPolygonShape::GetPoints}
1411
1412 \func{wxList *}{GetPoints}{\void}
1413
1414 Returns a pointer to the internal list of polygon vertices (wxRealPoints).
1415
1416 \membersection{wxPolygonShape::UpdateOriginalPoints}
1417
1418 \func{void}{UpdateOriginalPoints}{\void}
1419
1420 If we've changed the shape, must make the original
1421 points match the working points with this function.
1422
1423 \section{\class{wxRectangleShape}}\label{wxrectangleshape}
1424
1425 The wxRectangleShape has rounded or square corners.
1426
1427 \wxheading{Derived from}
1428
1429 \helpref{wxShape}{wxshape}
1430
1431 \latexignore{\rtfignore{\wxheading{Members}}}
1432
1433 \membersection{wxRectangleShape::wxRectangleShape}
1434
1435 \func{}{wxRectangleShape}{\param{double}{ width = 0.0}, \param{double}{ height = 0.0}}
1436
1437 Constructor.
1438
1439 \membersection{wxRectangleShape::\destruct{wxRectangleShape}}
1440
1441 \func{}{\destruct{wxRectangleShape}}{\void}
1442
1443 Destructor.
1444
1445 \membersection{wxRectangleShape::SetCornerRadius}
1446
1447 \func{void}{SetCornerRadius}{\param{double}{ radius}}
1448
1449 Sets the radius of the rectangle's rounded corners. If the radius is zero, a non-rounded
1450 rectangle will be drawn. If the radius is negative, the value is the proportion of the
1451 smaller dimension of the rectangle.
1452
1453 \section{\class{wxPseudoMetaFile}}\label{wxpseudometafile}
1454
1455 A simple metafile-like class which can load data from a Windows metafile on all platforms.
1456
1457 \wxheading{Derived from}
1458
1459 wxObject
1460
1461 \section{\class{wxShape}}\label{wxshape}
1462
1463 The wxShape is the top-level, abstract object that all other
1464 objects are derived from. All common functionality is represented by
1465 wxShape's members, and overriden members that appear in derived
1466 classes and have behaviour as documented for wxShape, are not
1467 documented separately.
1468
1469 \wxheading{Derived from}
1470
1471 \helpref{wxShapeEvtHandler}{wxshapeevthandler}
1472
1473 \latexignore{\rtfignore{\wxheading{Members}}}
1474
1475 \membersection{wxShape::wxShape}
1476
1477 \func{}{wxShape}{\param{wxShapeCanvas*}{ canvas = NULL}}
1478
1479 Constructs a new wxShape.
1480
1481 \membersection{wxShape::\destruct{wxShape}}
1482
1483 \func{}{\destruct{wxShape}}{\void}
1484
1485 Destructor.
1486
1487 \membersection{wxShape::AddLine}
1488
1489 \func{void}{AddLine}{\param{wxLineShape*}{ line}, \param{wxShape*}{ other}, \param{int}{ attachFrom = 0}, \param{int}{ attachTo = 0},
1490 \param{int}{ positionFrom = -1}, \param{int}{ positionTo = -1}}
1491
1492 Adds a line between the specified canvas shapes, at the specified attachment points.
1493
1494 The position in the list of lines at each end can also be specified, so that the line will be drawn
1495 at a particular point on its attachment point.
1496
1497 \membersection{wxShape::AddRegion}
1498
1499 \func{void}{AddRegion}{\param{wxShapeRegion*}{ region}}
1500
1501 Adds a region to the shape.
1502
1503 \membersection{wxShape::AddText}
1504
1505 \func{void}{AddText}{\param{const wxString\& }{string}}
1506
1507 Adds a line of text to the shape's default text region.
1508
1509 \membersection{wxShape::AddToCanvas}
1510
1511 \func{void}{AddToCanvas}{\param{wxShapeCanvas*}{ theCanvas}, \param{wxShape*}{ addAfter=NULL}}
1512
1513 Adds the shape to the canvas's shape list. If {\it addAfter} is
1514 non-NULL, will add the shape after this one.
1515
1516 \membersection{wxShape::AncestorSelected}
1517
1518 \constfunc{bool}{AncestorSelected}{\void}
1519
1520 TRUE if the shape's ancestor is currently selected.
1521
1522 \membersection{wxShape::ApplyAttachmentOrdering}\label{wxshapeapplyattachmentordering}
1523
1524 \func{void}{ApplyAttachmentOrdering}{\param{wxList\&}{ linesToSort}}
1525
1526 Applies the line ordering in {\it linesToSort} to the shape, to reorder the way lines are attached.
1527
1528 \membersection{wxShape::AssignNewIds}
1529
1530 \func{void}{AssignNewIds}{\void}
1531
1532 Assigns new ids to this image and its children.
1533
1534 \membersection{wxShape::Attach}\label{wxshapeattach}
1535
1536 \func{void}{Attach}{\param{wxShapeCanvas*}{ can}}
1537
1538 Sets the shape's internal canvas pointer to point to the given canvas.
1539
1540 \membersection{wxShape::AttachmentIsValid}\label{wxshapeattachmentisvalid}
1541
1542 \constfunc{bool}{AttachmentIsValid}{\param{int}{ attachment}}
1543
1544 Returns TRUE if {\it attachment} is a valid attachment point.
1545
1546 \membersection{wxShape::AttachmentSortTest}\label{wxshapeattachmentsorttest}
1547
1548 \constfunc{bool}{AttachmentSortTest}{\param{int}{ attachment}, \param{const wxRealPoint\&}{ pt1},
1549 \param{const wxRealPoint\&}{ pt2}}
1550
1551 Returns TRUE if {\it pt1} is less than or equal to {\it pt2}, in the sense
1552 that one point comes before another on an edge of the shape. {\it attachment} is
1553 the attachment point (side) in question.
1554
1555 This function is used in \helpref{wxShape::MoveLineToNewAttachment}{wxshapemovelinetonewattachment} to
1556 determine the new line ordering.
1557
1558 \membersection{wxShape::CalcSimpleAttachment}\label{wxshapecalcsimpleattachment}
1559
1560 \func{wxRealPoint}{CalcSimpleAttachment}{\param{const wxRealPoint\&}{ pt1},
1561 \param{const wxRealPoint\&}{ pt2}, \param{int}{ nth}, \param{int}{ noArcs}, \param{wxLineShape*}{ line}}
1562
1563 Assuming the attachment lies along a vertical or horizontal line,
1564 calculates the position on that point.
1565
1566 \wxheading{Parameters}
1567
1568 \docparam{pt1}{The first point of the line repesenting the edge of the shape.}
1569
1570 \docparam{pt2}{The second point of the line representing the edge of the shape.}
1571
1572 \docparam{nth}{The position on the edge (for example there may be 6 lines at this attachment point,
1573 and this may be the 2nd line.}
1574
1575 \docparam{noArcs}{The number of lines at this edge.}
1576
1577 \docparam{line}{The line shape.}
1578
1579 \wxheading{Remarks}
1580
1581 This function expects the line to be either vertical or horizontal, and determines which.
1582
1583 \membersection{wxShape::CalculateSize}
1584
1585 \func{void}{CalculateSize}{\void}
1586
1587 Called to calculate the shape's size if dependent on children sizes.
1588
1589 \membersection{wxShape::ClearAttachments}
1590
1591 \func{void}{ClearAttachments}{\void}
1592
1593 Clears internal custom attachment point shapes (of class wxAttachmentPoint).
1594
1595 \membersection{wxShape::ClearRegions}
1596
1597 \func{void}{ClearRegions}{\void}
1598
1599 Clears the wxShapeRegions from the shape.
1600
1601 \membersection{wxShape::ClearText}
1602
1603 \func{void}{ClearText}{\param{int}{ regionId = 0}}
1604
1605 Clears the text from the specified text region.
1606
1607 \membersection{wxShape::Constrain}
1608
1609 \func{bool}{Constrain}{\void}
1610
1611 Calculates the shape's constraints (if any). Applicable
1612 only to wxCompositeShape, does nothing if the shape is of
1613 a different class.
1614
1615 \membersection{wxShape::Copy}\label{wxshapecopy}
1616
1617 \func{void}{Copy}{\param{wxShape\&}{ copy}}
1618
1619 Copy this shape into {\it copy}. Every derived class must have one of these, and each Copy implementation
1620 must call the derived class's implementation to ensure everything is copied. See also \helpref{wxShape::CreateNewCopy}{wxshapecreatenewcopy}.
1621
1622 \membersection{wxShape::CreateNewCopy}\label{wxshapecreatenewcopy}
1623
1624 \func{wxShape* }{CreateNewCopy}{\param{bool}{ resetMapping = TRUE}, \param{bool}{ recompute = TRUE}}
1625
1626 Creates and returns a new copy of this shape (calling \helpref{wxShape::Copy}{wxshapecopy}). Do not override this function.
1627
1628 This function should always be used to create a new copy, since it must do special processing
1629 for copying constraints associated with constraints.
1630
1631 If {\it resetMapping} is TRUE, a mapping table used for complex shapes is reset; this may not be desirable
1632 if the shape being copied is a child of a composite (and so the mapping table is in use).
1633
1634 If {\it recompute} is TRUE, \helpref{wxShape::Recompute}{wxshaperecompute} is called for the new shape.
1635
1636 \wxheading{Remarks}
1637
1638 This function uses the wxWindows dynamic object creation system to create a new shape of the same
1639 type as `this', before calling Copy.
1640
1641 If the event handler for this shape is not the same as the shape itself, the event handler is also copied
1642 using \helpref{wxShapeEvtHandler::CreateNewCopy}{wxshapeevthandlercreatenewcopy}.
1643
1644 \membersection{wxShape::DeleteControlPoints}
1645
1646 \func{void}{DeleteControlPoints}{\void}
1647
1648 Deletes the control points (or handles) for the shape. Does not redraw
1649 the shape.
1650
1651 \membersection{wxShape::Detach}
1652
1653 \func{void}{Detach}{\void}
1654
1655 Disassociates the shape from its canvas by setting the internal shape
1656 canvas pointer to NULL.
1657
1658 \membersection{wxShape::Draggable}
1659
1660 \func{bool}{Draggable}{\void}
1661
1662 TRUE if the shape may be dragged by the user.
1663
1664 \membersection{wxShape::Draw}
1665
1666 \func{void}{Draw}{\param{wxDC\&}{ dc}}
1667
1668 Draws the whole shape and any lines attached to it.
1669
1670 Do not override this function: override OnDraw, which is called
1671 by this function.
1672
1673 \membersection{wxShape::DrawContents}
1674
1675 \func{void}{DrawContents}{\param{wxDC\&}{ dc}}
1676
1677 Draws the internal graphic of the shape (such as
1678 text).
1679
1680 Do not override this function: override OnDrawContents, which is called
1681 by this function.
1682
1683 \membersection{wxShape::DrawLinks}
1684
1685 \func{void}{DrawLinks}{\param{wxDC\&}{ dc}, \param{int}{ attachment = -1}}
1686
1687 Draws any lines linked to this shape.
1688
1689 \membersection{wxShape::Erase}
1690
1691 \func{void}{Erase}{\param{wxDC\&}{ dc}}
1692
1693 Erases the shape, but does not repair damage caused to other
1694 shapes.
1695
1696 \membersection{wxShape::EraseContents}
1697
1698 \func{void}{EraseContents}{\param{wxDC\&}{ dc}}
1699
1700 Erases the shape contents, that is, the area within the shape's
1701 minimum bounding box.
1702
1703 \membersection{wxShape::EraseLinks}
1704
1705 \func{void}{EraseLinks}{\param{wxDC\&}{ dc}, \param{int}{ attachment = -1}}
1706
1707 Erases links attached to this shape, but does not repair
1708 damage caused to other shapes.
1709
1710 \membersection{wxShape::FindRegion}
1711
1712 \func{wxShape *}{FindRegion}{\param{const wxString\& }{regionName}, \param{int *}{regionId}}
1713
1714 Finds the actual image (`this' if non-composite) and region id for the given
1715 region name.
1716
1717 \membersection{wxShape::FindRegionNames}
1718
1719 \func{void}{FindRegionNames}{\param{wxStringList\&}{ list}}
1720
1721 Finds all region names for this image (composite or simple).
1722 Supply an empty string list.
1723
1724 \membersection{wxShape::Flash}
1725
1726 \func{void}{Flash}{\void}
1727
1728 Flashes the shape.
1729
1730 \membersection{wxShape::FormatText}
1731
1732 \func{void}{FormatText}{\param{const wxString\& }{s}, \param{int}{ i = 0}}
1733
1734 Reformats the given text region; defaults to formatting the default region.
1735
1736 \membersection{wxShape::GetAttachmentMode}
1737
1738 \constfunc{bool}{GetAttachmentMode}{\void}
1739
1740 Returns the attachment mode, which is TRUE if attachments are used, FALSE otherwise (in which case
1741 lines will be drawn as if to the centre of the shape). See \helpref{wxShape::SetAttachmentMode}{wxshapesetattachmentmode}.
1742
1743 \membersection{wxShape::GetAttachmentPosition}\label{wxshapegetattachmentposition}
1744
1745 \func{bool}{GetAttachmentPosition}{\param{int}{ attachment}, \param{double*}{ x}, \param{double*}{ y},
1746 \param{int}{ nth = 0}, \param{int}{ noArcs = 1}, \param{wxLineShape*}{ line = NULL}}
1747
1748 Gets the position at which the given attachment point should be drawn.
1749
1750 If {\it attachment} isn't found among the attachment points of the shape, returns FALSE.
1751
1752 \membersection{wxShape::GetBoundingBoxMax}
1753
1754 \func{void}{GetBoundingBoxMax}{\param{double *}{width}, \param{double *}{height}}
1755
1756 Gets the maximum bounding box for the shape, taking into
1757 account external features such as shadows.
1758
1759 \membersection{wxShape::GetBoundingBoxMin}
1760
1761 \func{void}{GetBoundingBoxMin}{\param{double *}{width}, \param{double *}{height}}
1762
1763 Gets the minimum bounding box for the shape, that defines
1764 the area available for drawing the contents (such as text).
1765
1766 \membersection{wxShape::GetBrush}
1767
1768 \constfunc{wxBrush*}{GetBrush}{\void}
1769
1770 Returns the brush used for filling the shape.
1771
1772 \membersection{wxShape::GetCanvas}
1773
1774 \constfunc{wxShapeCanvas*}{GetCanvas}{\void}
1775
1776 Gets the internal canvas pointer.
1777
1778 \membersection{wxShape::GetCentreResize}
1779
1780 \constfunc{bool}{GetCentreResize}{\void}
1781
1782 Returns TRUE if the shape is to be resized from the centre (the centre
1783 stands still), or FALSE if from the corner or side being dragged (the
1784 other corner or side stands still).
1785
1786 \membersection{wxShape::GetChildren}
1787
1788 \constfunc{wxList\&}{GetChildren}{\void}
1789
1790 Returns a reference to the list of children for this shape.
1791
1792 \membersection{wxShape::GetClientData}
1793
1794 \func{wxObject*}{GetClientData}{\void}
1795
1796 Gets the client data associated with the shape (NULL if there is
1797 none).
1798
1799 \membersection{wxShape::GetDisableLabel}
1800
1801 \constfunc{bool}{GetDisableLabel}{\void}
1802
1803 Returns TRUE if the default region will not be shown, FALSE otherwise.
1804
1805 \membersection{wxShape::GetEventHandler}
1806
1807 \constfunc{wxShapeEvtHandler*}{GetEventHandler}{\void}
1808
1809 Returns the event handler for this shape.
1810
1811 \membersection{wxShape::GetFixedHeight}
1812
1813 \constfunc{bool}{GetFixedHeight}{\void}
1814
1815 Returns TRUE if the shape cannot be resized in the vertical plane.
1816
1817 \membersection{wxShape::GetFixedSize}
1818
1819 \func{void}{GetFixedSize}{\param{bool *}{ x}, \param{bool *}{ y}}
1820
1821 Returns flags indicating whether the shape is of fixed size in either direction.
1822
1823 \membersection{wxShape::GetFixedWidth}
1824
1825 \constfunc{bool}{GetFixedWidth}{\void}
1826
1827 Returns TRUE if the shape cannot be resized in the horizontal plane.
1828
1829 \membersection{wxShape::GetFont}
1830
1831 \constfunc{wxFont*}{GetFont}{\param{int}{ regionId = 0}}
1832
1833 Gets the font for the specified text region.
1834
1835 \membersection{wxShape::GetFunctor}
1836
1837 \constfunc{wxString}{GetFunctor}{\void}
1838
1839 Gets a string representing the type of the shape, to be used when
1840 writing out shape descriptions to a file. This is overridden by
1841 each derived shape class to provide an appropriate type string. By default,
1842 "node\_image" is used for non-line shapes, and "arc\_image" for lines.
1843
1844 \membersection{wxShape::GetId}
1845
1846 \constfunc{long}{GetId}{\void}
1847
1848 Returns the integer identifier for this shape.
1849
1850 \membersection{wxShape::GetLinePosition}\label{wxshapegetlineposition}
1851
1852 \func{int}{GetLinePosition}{\param{wxLineShape*}{ line}}
1853
1854 Gets the zero-based position of {\it line} in the list of lines for this shape.
1855
1856 \membersection{wxShape::GetLines}
1857
1858 \constfunc{wxList\&}{GetLines}{\void}
1859
1860 Returns a reference to the list of lines connected to this shape.
1861
1862 \membersection{wxShape::GetMaintainAspectRatio}\label{wxshapegetmaintainaspectratio}
1863
1864 \constfunc{bool}{GetMaintainAspectRatio}{\void}
1865
1866 If returns TRUE, resizing the shape will not change the aspect ratio
1867 (width and height will be in the original proportion).
1868
1869 \membersection{wxShape::GetNumberOfAttachments}\label{wxshapegetnumberofattachments}
1870
1871 \constfunc{int}{GetNumberOfAttachments}{\void}
1872
1873 Gets the number of attachment points for this shape.
1874
1875 \membersection{wxShape::GetNumberOfTextRegions}
1876
1877 \constfunc{int}{GetNumberOfTextRegions}{\void}
1878
1879 Gets the number of text regions for this shape.
1880
1881 \membersection{wxShape::GetParent}
1882
1883 \constfunc{wxShape *}{GetParent}{\void}
1884
1885 Returns the parent of this shape, if it is part of a composite.
1886
1887 \membersection{wxShape::GetPen}
1888
1889 \constfunc{wxPen*}{GetPen}{\void}
1890
1891 Returns the pen used for drawing the shape's outline.
1892
1893 \membersection{wxShape::GetPerimeterPoint}
1894
1895 \func{bool}{GetPerimeterPoint}{\param{double}{ x1}, \param{double}{ y1}, \param{double}{ x2}, \param{double}{ y2}, \param{double *}{x3}, \param{double *}{y3}}
1896
1897 Gets the point at which the line from (x1, y1) to (x2, y2) hits the shape. Returns TRUE if the
1898 line hits the perimeter.
1899
1900 \membersection{wxShape::GetRegionId}\label{getregionid}
1901
1902 \func{int}{GetRegionId}{\param{const wxString\& }{name}}
1903
1904 Gets the region's identifier by name. This is {\it not} unique for within an entire composite, but
1905 is unique for the image.
1906
1907 \membersection{wxShape::GetRegionName}\label{getregionname}
1908
1909 \func{wxString}{GetRegionName}{\param{int}{ regionId = 0}}
1910
1911 Gets the region's name. A region's name can be used to uniquely determine a region within
1912 an entire composite image hierarchy. See also \helpref{wxShape::SetRegionName}{wxshapesetregionname}.
1913
1914 \membersection{wxShape::GetRegions}\label{getregions}
1915
1916 \func{wxList\&}{GetRegions}{\void}
1917
1918 Returns the list of wxShapeRegions.
1919
1920 \membersection{wxShape::GetRotation}
1921
1922 \constfunc{double}{GetRotatation}{\void}
1923
1924 Returns the angle of rotation in radians.
1925
1926 \membersection{wxShape::GetSensitivityFilter}
1927
1928 \constfunc{void}{GetSensitivityFilter}{\void}
1929
1930 Returns the sensitivity filter, a bitlist of values. See \helpref{wxShape::SetSensitivityFilter}{wxshapesetsensitivityfilter}.
1931
1932 \membersection{wxShape::GetShadowMode}
1933
1934 \constfunc{int}{SetShadowMode}{\void}
1935
1936 Returns the shadow mode. See \helpref{wxShape::SetShadowMode}{wxshapesetshadowmode}.
1937
1938 \membersection{wxShape::GetSpaceAttachments}
1939
1940 \constfunc{bool}{GetSpaceAttachments}{\void}
1941
1942 Indicates whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they
1943 should join at a single point (FALSE).
1944
1945 \membersection{wxShape::GetTextColour}
1946
1947 \constfunc{wxString}{GetTextColour}{\param{int}{ regionId = 0}}
1948
1949 Gets the colour for the specified text region.
1950
1951 \membersection{wxShape::GetTopAncestor}
1952
1953 \constfunc{wxShape *}{GetTopAncestor}{\void}
1954
1955 Returns the top-most ancestor of this shape (the root of the composite).
1956
1957 \membersection{wxShape::GetX}
1958
1959 \constfunc{double}{GetX}{\void}
1960
1961 Gets the x position of the centre of the shape.
1962
1963 \membersection{wxShape::GetY}
1964
1965 \constfunc{double}{GetY}{\void}
1966
1967 Gets the y position of the centre of the shape.
1968
1969 \membersection{wxShape::HitTest}
1970
1971 \func{bool}{HitTest}{\param{double}{ x}, \param{double}{ y}, \param{int*}{ attachment}, \param{double*}{ distance}}
1972
1973 Given a point on a canvas, returns TRUE if the point was on the shape, and returns
1974 the nearest attachment point and distance from the given point and target.
1975
1976 \membersection{wxShape::Insert}
1977
1978 \func{void}{InsertInCanvas}{\param{wxShapeCanvas*}{ canvas}}
1979
1980 Inserts the shape at the front of the shape list of {\it canvas}.
1981
1982 \membersection{wxShape::IsHighlighted}
1983
1984 \constfunc{bool}{IsHighlighted}{\void}
1985
1986 Returns TRUE if the shape is highlighted. Shape highlighting is unimplemented.
1987
1988 \membersection{wxShape::IsShown}
1989
1990 \constfunc{bool}{IsShown}{\void}
1991
1992 Returns TRUE if the shape is in a visible state, FALSE otherwise. Note
1993 that this has nothing to do with whether the window is hidden or the
1994 shape has scrolled off the canvas; it refers to the internal
1995 visibility flag.
1996
1997 \membersection{wxShape::MakeControlPoints}
1998
1999 \func{void}{MakeControlPoints}{\void}
2000
2001 Make a list of control points (draggable handles) appropriate to the shape.
2002
2003 \membersection{wxShape::MakeMandatoryControlPoints}
2004
2005 \func{void}{MakeMandatoryControlPoints}{\void}
2006
2007 Make the mandatory control points. For example, the control point on a dividing line should
2008 appear even if the divided rectangle shape's handles should not appear (because it is the child of
2009 a composite, and children are not resizable).
2010
2011 \membersection{wxShape::Move}\label{wxshapemove}
2012
2013 \func{void}{Move}{\param{wxDC\&}{ dc}, \param{double}{ x1}, \param{double}{ y1}, \param{bool}{ display = TRUE}}
2014
2015 Move the shape to the given position, redrawing if {\it display} is TRUE.
2016
2017 \membersection{wxShape::MoveLineToNewAttachment}\label{wxshapemovelinetonewattachment}
2018
2019 \func{void}{MoveLineToNewAttachment}{\param{wxDC\&}{ dc}, \param{wxLineShape*}{ toMove}, \param{double}{ x}, \param{double}{ y}}
2020
2021 Move the given line (which must already be attached to the shape) to
2022 a different attachment point on the shape, or a different order on the same attachment.
2023
2024 Cals \helpref{wxShape::AttachmentSortTest}{wxshapeattachmentsorttest} and then \helpref{wxShapeEvtHandler::OnChangeAttachment}{wxshapeevthandleronchangeattachment}.
2025
2026 \membersection{wxShape::MoveLinks}
2027
2028 \func{void}{MoveLinks}{\param{wxDC\&}{ dc}}
2029
2030 Redraw all the lines attached to the shape.
2031
2032 \membersection{wxShape::NameRegions}
2033
2034 \func{void}{NameRegions}{\param{const wxString\& }{parentName = ``"}}
2035
2036 Make unique names for all the regions in a shape or composite shape.
2037
2038 \membersection{wxShape::Rotate}
2039
2040 \func{void}{Rotate}{\param{double }{x}, \param{double }{y}, \param{double }{theta}}
2041
2042 Rotate about the given axis by the given amount in radians (does nothing
2043 for most shapes). But even non-rotating shapes should record their
2044 notional rotation in case it's important (e.g. in dog-leg code).
2045
2046 \membersection{wxShape::ReadConstraints}
2047
2048 \func{void}{ReadConstraints}{\param{wxExpr *}{clause}, \param{wxExprDatabase *}{database}}
2049
2050 If the shape is a composite, it may have constraints that need to be read in in a separate pass.
2051
2052 \membersection{wxShape::ReadAttributes}
2053
2054 \func{void}{ReadAttributes}{\param{wxExpr*}{ clause}}
2055
2056 Reads the attributes (data member values) from the given expression.
2057
2058 \membersection{wxShape::ReadRegions}
2059
2060 \func{void}{ReadRegions}{\param{wxExpr *}{clause}}
2061
2062 Reads in the regions.
2063
2064 \membersection{wxShape::Recentre}
2065
2066 \func{void}{Recentre}{\void}
2067
2068 Does recentring (or other formatting) for all the text regions for this shape.
2069
2070 \membersection{wxShape::RemoveFromCanvas}
2071
2072 \func{void}{RemoveFromCanvas}{\param{wxShapeCanvas*}{ canvas}}
2073
2074 Removes the shape from the canvas.
2075
2076 \membersection{wxShape::ResetControlPoints}
2077
2078 \func{void}{ResetControlPoints}{\void}
2079
2080 Resets the positions of the control points (for instance when the
2081 shape's shape has changed).
2082
2083 \membersection{wxShape::ResetMandatoryControlPoints}
2084
2085 \func{void}{ResetMandatoryControlPoints}{\void}
2086
2087 Reset the mandatory control points. For example, the control point on a dividing line should
2088 appear even if the divided rectangle shape's handles should not appear (because it is the child of
2089 a composite, and children are not resizable).
2090
2091 \membersection{wxShape::Recompute}\label{wxshaperecompute}
2092
2093 \func{bool}{Recompute}{\void}
2094
2095 Recomputes any constraints associated with the shape (normally
2096 applicable to wxCompositeShapes only, but harmless for other
2097 classes of shape).
2098
2099 \membersection{wxShape::RemoveLine}
2100
2101 \func{void}{RemoveLine}{\param{wxLineShape*}{ line}}
2102
2103 Removes the given line from the shape's list of attached lines.
2104
2105 \membersection{wxShape::Select}\label{wxshapeselect}
2106
2107 \func{void}{Select}{\param{bool}{ select = TRUE}}
2108
2109 Selects or deselects the given shape, drawing or erasing control points
2110 (handles) as necessary.
2111
2112 \membersection{wxShape::Selected}\label{wxshapeselected}
2113
2114 \constfunc{bool}{Selected}{\void}
2115
2116 TRUE if the shape is currently selected.
2117
2118 \membersection{wxShape::SetAttachmentMode}\label{wxshapesetattachmentmode}
2119
2120 \func{void}{SetAttachmentMode}{\param{bool}{ flag}}
2121
2122 Sets the attachment mode to TRUE or FALSE. If TRUE, attachment points
2123 will be significant when drawing lines to and from this shape.
2124 If FALSE, lines will be drawn as if to the centre of the shape.
2125
2126 \membersection{wxShape::SetBrush}
2127
2128 \func{void}{SetBrush}{\param{wxBrush *}{brush}}
2129
2130 Sets the brush for filling the shape's shape.
2131
2132 \membersection{wxShape::SetCanvas}\label{wxshapesetcanvas}
2133
2134 \func{void}{SetCanvas}{\param{wxShapeCanvas*}{ theCanvas}}
2135
2136 Identical to \helpref{wxShape::Attach}{wxshapesetcanvas}.
2137
2138 \membersection{wxShape::SetCentreResize}
2139
2140 \func{void}{SetCentreResize}{\param{bool}{ cr}}
2141
2142 Specify whether the shape is to be resized from the centre (the centre stands still) or from the corner or side
2143 being dragged (the other corner or side stands still).
2144
2145 \membersection{wxShape::SetClientData}
2146
2147 \func{void}{SetClientData}{\param{wxObject *}{clientData}}
2148
2149 Sets the client data.
2150
2151 \membersection{wxShape::SetDefaultRegionSize}\label{setdefaultregionsize}
2152
2153 \func{void}{SetDefaultRegionSize}{\void}
2154
2155 Set the default region to be consistent with the shape size.
2156
2157 \membersection{wxShape::SetDisableLabel}
2158
2159 \func{void}{SetDisableLabel}{\param{bool}{ flag}}
2160
2161 Set {\it flag} to TRUE to stop the default region being shown, FALSE otherwise.
2162
2163 \membersection{wxShape::SetDraggable}
2164
2165 \func{void}{SetDraggable}{\param{bool}{ drag}, \param{bool}{ recursive = FALSE}}
2166
2167 Sets the shape to be draggable or not draggable.
2168
2169 \membersection{wxShape::SetDrawHandles}
2170
2171 \func{void}{SetDrawHandles}{\param{bool}{ drawH}}
2172
2173 Sets the {\it drawHandles} flag for this shape and all descendants. If {\it drawH} is TRUE (the default),
2174 any handles (control points) will be drawn. Otherwise, the handles will not be drawn.
2175
2176 \membersection{wxShape::SetEventHandler}
2177
2178 \func{void}{GetEventHandler}{\param{wxShapeEvtHandler *}{handler}}
2179
2180 Sets the event handler for this shape.
2181
2182 \membersection{wxShape::SetFixedSize}
2183
2184 \func{void}{SetFixedSize}{\param{bool}{ x}, \param{bool}{ y}}
2185
2186 Sets the shape to be of the given, fixed size.
2187
2188 \membersection{wxShape::SetFont}
2189
2190 \func{void}{SetFont}{\param{wxFont *}{font}, \param{int}{ regionId = 0}}
2191
2192 Sets the font for the specified text region.
2193
2194 \membersection{wxShape::SetFormatMode}\label{setformatmode}
2195
2196 \func{void}{SetFormatMode}{\param{int}{ mode}, \param{int}{ regionId = 0}}
2197
2198 Sets the format mode of the default text region. The argument can be a bit list
2199 of the following:
2200
2201 \begin{description}\itemsep=0pt
2202 \item[FORMAT\_NONE] No formatting.
2203 \item[FORMAT\_CENTRE\_HORIZ] Horizontal centring.
2204 \item[FORMAT\_CENTRE\_VERT] Vertical centring.
2205 \end{description}
2206
2207 \membersection{wxShape::SetHighlight}
2208
2209 \func{void}{SetHighlight}{\param{bool}{ hi}, \param{bool}{ recurse = FALSE}}
2210
2211 Sets the highlight for a shape. Shape highlighting is unimplemented.
2212
2213 \membersection{wxShape::SetId}
2214
2215 \func{void}{SetId}{\param{long}{ id}}
2216
2217 Set the integer identifier for this shape.
2218
2219 \membersection{wxShape::SetMaintainAspectRatio}\label{wxshapesetmaintainaspectratio}
2220
2221 \func{void}{SetMaintainAspectRatio}{\param{bool}{ flag}}
2222
2223 If the argument is TRUE, tells the shape that resizes should not change the aspect ratio
2224 (width and height should be in the original proportion).
2225
2226 \membersection{wxShape::SetPen}
2227
2228 \func{void}{SetPen}{\param{wxPen *}{pen}}
2229
2230 Sets the pen for drawing the shape's outline.
2231
2232 \membersection{wxShape::SetRegionName}\label{wxshapesetregionname}
2233
2234 \func{void}{SetRegionName}{\param{const wxString\& }{name}, \param{int}{ regionId = 0}}
2235
2236 Sets the name for this region. The name for a region is unique within the scope of the whole
2237 composite, whereas a region id is unique only for a single image.
2238
2239 \membersection{wxShape::SetSensitivityFilter}\label{wxshapesetsensitivityfilter}
2240
2241 \func{void}{SetSensitivityFilter}{\param{int}{ sens=OP\_ALL}, \param{bool}{ recursive = FALSE}}
2242
2243 Sets the shape to be sensitive or insensitive to specific mouse operations.
2244
2245 {\it sens} is a bitlist of the following:
2246
2247 \begin{itemize}\itemsep=0pt
2248 \item OP\_CLICK\_LEFT
2249 \item OP\_CLICK\_RIGHT
2250 \item OP\_DRAG\_LEFT
2251 \item OP\_DRAG\_RIGHT
2252 \item OP\_ALL (equivalent to a combination of all the above).
2253 \end{itemize}
2254
2255 \membersection{wxShape::SetShadowMode}\label{wxshapesetshadowmode}
2256
2257 \func{void}{SetShadowMode}{\param{int}{ mode}, \param{bool}{ redraw = FALSE}}
2258
2259 Sets the shadow mode (whether a shadow is drawn or not). {\it mode} can be one of
2260 the following:
2261
2262 \begin{description}\itemsep=0pt
2263 \item[SHADOW\_NONE] No shadow (the default).
2264 \item[SHADOW\_LEFT] Shadow on the left side.
2265 \item[SHADOW\_RIGHT] Shadow on the right side.
2266 \end{description}
2267
2268 \membersection{wxShape::SetSize}
2269
2270 \func{void}{SetSize}{\param{double}{ x}, \param{double}{ y}, \param{bool}{ recursive = TRUE}}
2271
2272 Sets the shape's size.
2273
2274 \membersection{wxShape::SetSpaceAttachments}
2275
2276 \func{void}{SetSpaceAttachments}{\param{bool}{ sp}}
2277
2278 Indicate whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they
2279 should join at a single point (FALSE).
2280
2281 \membersection{wxShape::SetTextColour}
2282
2283 \func{void}{SetTextColour}{\param{const wxString\& }{colour}, \param{int}{ regionId = 0}}
2284
2285 Sets the colour for the specified text region.
2286
2287 \membersection{wxShape::SetX}
2288
2289 \func{void}{SetX}{\param{double}{ x}}
2290
2291 Sets the {\it x} position of the shape.
2292
2293 \membersection{wxShape::SetX}
2294
2295 \func{void}{SetY}{\param{double}{ y}}
2296
2297 Sets the {\it y} position of the shape.
2298
2299 \membersection{wxShape::SpaceAttachments}
2300
2301 \func{void}{SpaceAttachments}{\param{bool}{ sp}}
2302
2303 Sets the spacing mode: if TRUE, lines at the same attachment point will be
2304 spaced evenly across that side of the shape. If false, all lines at the
2305 same attachment point will emanate from the same point.
2306
2307 \membersection{wxShape::Show}
2308
2309 \func{void}{Show}{\param{bool}{ show}}
2310
2311 Sets a flag indicating whether the shape should be drawn.
2312
2313 \membersection{wxShape::Unlink}
2314
2315 \func{void}{Unlink}{\void}
2316
2317 If the shape is a line, unlinks the nodes attached to the shape, removing itself from the list of
2318 lines for each of the `to' and `from' nodes.
2319
2320 \membersection{wxShape::WriteAttributes}
2321
2322 \func{void}{WriteAttributes}{\param{wxExpr *}{clause}}
2323
2324 Writes the shape's attributes (data member values) into the given expression.
2325
2326 \membersection{wxShape::WriteRegions}
2327
2328 \func{void}{WriteRegions}{\param{wxExpr *}{clause}}
2329
2330 Writes the regions.
2331
2332 \section{\class{wxShapeCanvas}}\label{wxshapecanvas}
2333
2334 A canvas for drawing diagrams on.
2335
2336 \wxheading{Derived from}
2337
2338 wxScrolledWindow
2339
2340 \wxheading{See also}
2341
2342 \helpref{wxDiagram}{wxdiagram}
2343
2344 \latexignore{\rtfignore{\wxheading{Members}}}
2345
2346 \membersection{wxShapeCanvas::wxShapeCanvas}
2347
2348 \func{}{wxShapeCanvas}{\param{wxWindow*}{ parent = NULL}, \param{wxWindowID}{ id = -1},
2349 \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},
2350 \param{long}{ style = wxBORDER}}
2351
2352 Constructor.
2353
2354 \membersection{wxShapeCanvas::\destruct{wxShapeCanvas}}
2355
2356 \func{}{\destruct{wxShapeCanvas}}{\void}
2357
2358 Destructor.
2359
2360 \membersection{wxShapeCanvas::AddShape}
2361
2362 \func{void}{AddShape}{\param{wxShape *}{shape}, \param{wxShape *}{addAfter = NULL}}
2363
2364 Adds a shape to the diagram. If {\it addAfter} is non-NULL, the shape will be added after this
2365 one.
2366
2367 \membersection{wxShapeCanvas::FindShape}
2368
2369 \func{wxShape *}{FindShape}{\param{double}{ x1}, \param{double}{ y}, \param{int *}{attachment}, \param{wxClassInfo *}{info = NULL},
2370 \param{wxShape *}{notImage = NULL}}
2371
2372 Find a shape under this mouse click. Returns the shape (or NULL), and the nearest attachment point.
2373
2374 If {\it info} is non-NULL, a shape whose class which is a descendant of the desired class is found.
2375
2376 If {\it notImage} is non-NULL, shapes which are descendants of {\it notImage} are ignored.
2377
2378 \membersection{wxShapeCanvas::FindFirstSensitiveShape}
2379
2380 \func{wxShape *}{FindFirstSensitiveShape}{\param{double}{ x1}, \param{double}{ y}, \param{int *}{attachment}, \param{int}{ op}}
2381
2382 Finds the first sensitive shape whose sensitivity filter matches {\it op}, working up the hierarchy of composites until
2383 one (or none) is found.
2384
2385 \membersection{wxShapeCanvas::GetDiagram}
2386
2387 \constfunc{wxDiagram*}{GetDiagram}{\void}
2388
2389 Returns the canvas associated with this diagram.
2390
2391 \membersection{wxShapeCanvas::GetGridSpacing}
2392
2393 \constfunc{double}{GetGridSpacing}{\void}
2394
2395 Returns the grid spacing.
2396
2397 \membersection{wxShapeCanvas::GetMouseTolerance}
2398
2399 \constfunc{int}{GetMouseTolerance}{\void}
2400
2401 Returns the tolerance within which a mouse move is ignored.
2402
2403 \membersection{wxShapeCanvas::GetShapeList}
2404
2405 \constfunc{wxList*}{GetShapeList}{\void}
2406
2407 Returns a pointer to the internal shape list.
2408
2409 \membersection{wxShapeCanvas::GetQuickEditMode}
2410
2411 \constfunc{bool}{GetQuickEditMode}{\void}
2412
2413 Returns quick edit mode for the associated diagram.
2414
2415 \membersection{wxShapeCanvas::InsertShape}
2416
2417 \func{void}{InsertShape}{\param{wxShape*}{ shape}}
2418
2419 Inserts a shape at the front of the shape list.
2420
2421 \membersection{wxShapeCanvas::OnBeginDragLeft}\label{wxshapecanvasonbegindragleft}
2422
2423 \func{void}{OnBeginDragLeft}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys = 0}}
2424
2425 Called when the start of a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2426 by default it does nothing.
2427
2428 {\it keys} is a bit list of the following:
2429
2430 \begin{itemize}\itemsep=0pt
2431 \item KEY\_SHIFT
2432 \item KEY\_CTRL
2433 \end{itemize}
2434
2435 See also \helpref{wxShapeCanvas::OnDragLeft}{wxshapecanvasondragleft}, \helpref{wxShapeCanvas::OnEndDragLeft}{wxshapecanvasonenddragleft}.
2436
2437 \membersection{wxShapeCanvas::OnBeginDragRight}\label{wxshapecanvasonbegindragright}
2438
2439 \func{void}{OnBeginDragRight}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys = 0}}
2440
2441 Called when the start of a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2442 by default it does nothing.
2443
2444 {\it keys} is a bit list of the following:
2445
2446 \begin{itemize}\itemsep=0pt
2447 \item KEY\_SHIFT
2448 \item KEY\_CTRL
2449 \end{itemize}
2450
2451 See also \helpref{wxShapeCanvas::OnDragRight}{wxshapecanvasondragright}, \helpref{wxShapeCanvas::OnEndDragRight}{wxshapecanvasonenddragright}.
2452
2453 \membersection{wxShapeCanvas::OnEndDragLeft}\label{wxshapecanvasonenddragleft}
2454
2455 \func{void}{OnEndDragLeft}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys = 0}}
2456
2457 Called when the end of a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2458 by default it does nothing.
2459
2460 {\it keys} is a bit list of the following:
2461
2462 \begin{itemize}\itemsep=0pt
2463 \item KEY\_SHIFT
2464 \item KEY\_CTRL
2465 \end{itemize}
2466
2467 See also \helpref{wxShapeCanvas::OnDragLeft}{wxshapecanvasondragleft}, \helpref{wxShapeCanvas::OnBeginDragLeft}{wxshapecanvasonbegindragleft}.
2468
2469 \membersection{wxShapeCanvas::OnEndDragRight}\label{wxshapecanvasonenddragright}
2470
2471 \func{void}{OnEndDragRight}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys = 0}}
2472
2473 Called when the end of a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2474 by default it does nothing.
2475
2476 {\it keys} is a bit list of the following:
2477
2478 \begin{itemize}\itemsep=0pt
2479 \item KEY\_SHIFT
2480 \item KEY\_CTRL
2481 \end{itemize}
2482
2483 See also \helpref{wxShapeCanvas::OnDragRight}{wxshapecanvasondragright}, \helpref{wxShapeCanvas::OnBeginDragRight}{wxshapecanvasonbegindragright}.
2484
2485 \membersection{wxShapeCanvas::OnDragLeft}\label{wxshapecanvasondragleft}
2486
2487 \func{void}{OnDragLeft}{\param{bool}{ draw}, \param{double}{ x}, \param{double}{ y}, \param{int}{ keys = 0}}
2488
2489 Called when a left-button drag event on the canvas background is detected by OnEvent. You may override this member;
2490 by default it does nothing.
2491
2492 {\it draw} is alternately TRUE and FALSE, to assist drawing and erasing.
2493
2494 {\it keys} is a bit list of the following:
2495
2496 \begin{itemize}\itemsep=0pt
2497 \item KEY\_SHIFT
2498 \item KEY\_CTRL
2499 \end{itemize}
2500
2501 See also \helpref{wxShapeCanvas::OnBeginDragLeft}{wxshapecanvasonbegindragleft}, \helpref{wxShapeCanvas::OnEndDragLeft}{wxshapecanvasonenddragleft}.
2502
2503 \membersection{wxShapeCanvas::OnDragRight}\label{wxshapecanvasondragright}
2504
2505 \func{void}{OnDragRight}{\param{bool}{ draw}, \param{double}{ x}, \param{double}{ y}, \param{int}{ keys = 0}}
2506
2507 Called when a right-button drag event on the canvas background is detected by OnEvent. You may override this member;
2508 by default it does nothing.
2509
2510 {\it draw} is alternately TRUE and FALSE, to assist drawing and erasing.
2511
2512 {\it keys} is a bit list of the following:
2513
2514 \begin{itemize}\itemsep=0pt
2515 \item KEY\_SHIFT
2516 \item KEY\_CTRL
2517 \end{itemize}
2518
2519 See also \helpref{wxShapeCanvas::OnBeginDragRight}{wxshapecanvasonbegindragright}, \helpref{wxShapeCanvas::OnEndDragRight}{wxshapecanvasonenddragright}.
2520
2521 \membersection{wxShapeCanvas::OnLeftClick}\label{wxshapecanvasonleftclick}
2522
2523 \func{void}{OnLeftClick}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys = 0}}
2524
2525 Called when a left click event on the canvas background is detected by OnEvent. You may override this member;
2526 by default it does nothing.
2527
2528 {\it keys} is a bit list of the following:
2529
2530 \begin{itemize}\itemsep=0pt
2531 \item KEY\_SHIFT
2532 \item KEY\_CTRL
2533 \end{itemize}
2534
2535 \membersection{wxShapeCanvas::OnRightClick}\label{wxshapecanvasonrightclick}
2536
2537 \func{void}{OnRightClick}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys = 0}}
2538
2539 Called when a right click event on the canvas background is detected by OnEvent. You may override this member;
2540 by default it does nothing.
2541
2542 {\it keys} is a bit list of the following:
2543
2544 \begin{itemize}\itemsep=0pt
2545 \item KEY\_SHIFT
2546 \item KEY\_CTRL
2547 \end{itemize}
2548
2549 \membersection{wxShapeCanvas::Redraw}
2550
2551 \func{void}{Redraw}{\void}
2552
2553 Calls wxDiagram::Redraw.
2554
2555 \membersection{wxShapeCanvas::RemoveShape}
2556
2557 \func{void}{RemoveShape}{\param{wxShape *}{shape}}
2558
2559 Calls wxDiagram::RemoveShape.
2560
2561 \membersection{wxShapeCanvas::SetDiagram}
2562
2563 \func{void}{SetDiagram}{\param{wxDiagram *}{diagram}}
2564
2565 Sets the diagram associated with this diagram.
2566
2567 \membersection{wxShapeCanvas::Snap}
2568
2569 \func{void}{Snap}{\param{double *}{x}, \param{double *}{y}}
2570
2571 Calls wxDiagram::Snap.
2572
2573
2574
2575 \section{\class{wxShapeEvtHandler}}\label{wxshapeevthandler}
2576
2577 wxShapeEvtHandler is a class from which wxShape (and therefore all shape classes) are derived.
2578 A wxShape also contains a pointer to its current wxShapeEvtHandler. Event handlers
2579 can be swapped in and out, altering the behaviour of a shape. This allows, for example,
2580 a range of behaviours to be redefined in one class, rather than requiring
2581 each shape class to be subclassed.
2582
2583 \wxheading{Derived from}
2584
2585 wxObject
2586
2587 \latexignore{\rtfignore{\wxheading{Members}}}
2588
2589 \membersection{wxShapeEvtHandler::m\_handlerShape}
2590
2591 \member{wxShape*}{m\_handlerShape}
2592
2593 Pointer to the shape associated with this handler.
2594
2595 \membersection{wxShapeEvtHandler::m\_previousHandler}
2596
2597 \member{wxShapeEvtHandler*}{m\_previousHandler}
2598
2599 Pointer to the previous handler.
2600
2601 \membersection{wxShapeEvtHandler::wxShapeEvtHandler}
2602
2603 \func{void}{wxShapeEvtHandler}{\param{wxShapeEvtHandler *}{previous = NULL}, \param{wxShape *}{shape = NULL}}
2604
2605 Constructs a new event handler.
2606
2607 \membersection{wxShapeEvtHandler::\destruct{wxShapeEvtHandler}}
2608
2609 \func{void}{\destruct{wxShapeEvtHandler}}{\void}
2610
2611 Destructor.
2612
2613 \membersection{wxShapeEvtHandler::CopyData}\label{wxshapeevthandlercopydata}
2614
2615 \func{void}{CopyData}{\param{wxShapeEvtHandler\&}{ handler}}
2616
2617 A virtual function to copy the data from this object to {\it handler}. Override if you
2618 derive from wxShapeEvtHandler and have data to copy.
2619
2620 \membersection{wxShapeEvtHandler::CreateNewCopy}\label{wxshapeevthandlercreatenewcopy}
2621
2622 \func{wxShapeEvtHandler*}{CreateNewCopy}{\void}
2623
2624 Creates a new event handler object of the same class as this object, and then
2625 calls \helpref{wxShapeEvtHandler::CopyData}{wxshapeevthandlercopydata}.
2626
2627 \membersection{wxShapeEvtHandler::GetPreviousHandler}\label{wxshapeevthandlergetprevioushandler}
2628
2629 \constfunc{wxShapeEvtHandler*}{GetPreviousHandler}{\void}
2630
2631 Returns the previous handler.
2632
2633 \membersection{wxShapeEvtHandler::GetShape}\label{wxshapeevthandlergetshape}
2634
2635 \constfunc{wxShape*}{GetShape}{\void}
2636
2637 Returns the shape associated with this handler.
2638
2639 \membersection{wxShapeEvtHandler::OnBeginDragLeft}
2640
2641 \func{void}{OnBeginDragLeft}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}}
2642
2643 Called when the user is beginning to drag using the left mouse button.
2644
2645 \membersection{wxShapeEvtHandler::OnBeginDragRight}
2646
2647 \func{void}{OnBeginDragRight}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}}
2648
2649 Called when the user is beginning to drag using the right mouse button.
2650
2651 \membersection{wxShapeEvtHandler::OnBeginSize}
2652
2653 \func{void}{OnBeginSize}{\param{double}{ width}, \param{double}{ height}}
2654
2655 Called when a shape starts to be resized.
2656
2657 \membersection{wxShapeEvtHandler::OnChangeAttachment}\label{wxshapeevthandleronchangeattachment}
2658
2659 \func{void}{OnChangeAttachment}{\param{int}{ attachment}, \param{wxLineShape*}{ line}, \param{wxList\&}{ ordering}}
2660
2661 Override this to prevent or intercept line reordering. wxShape's implementation of this function
2662 calls \helpref{wxShape::ApplyAttachmentOrdering}{wxshapeapplyattachmentordering} to apply
2663 the new ordering.
2664
2665 \membersection{wxShapeEvtHandler::OnDragLeft}
2666
2667 \func{void}{OnDragLeft}{\param{bool}{ draw}, \param{double}{ x}, \param{double}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}}
2668
2669 Called twice when the shape is being dragged, once to allow erasing the old
2670 image, and again to allow drawing at the new position.
2671
2672 \membersection{wxShapeEvtHandler::OnDragRight}
2673
2674 \func{void}{OnDragRight}{\param{bool}{ draw}, \param{double}{ x}, \param{double}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}}
2675
2676 Called twice when the shape is being dragged, once to allow erasing the old
2677 image, and again to allow drawing at the new position.
2678
2679 \membersection{wxShapeEvtHandler::OnDraw}
2680
2681 \func{void}{OnDraw}{\param{wxDC\&}{ dc}}
2682
2683 Defined for each class to draw the main graphic, but
2684 not the contents.
2685
2686 \membersection{wxShapeEvtHandler::OnDrawContents}
2687
2688 \func{void}{OnDrawContents}{\param{wxDC\&}{ dc}}
2689
2690 Defined for each class to draw the contents of the
2691 shape, such as text.
2692
2693 \membersection{wxShapeEvtHandler::OnDrawControlPoints}
2694
2695 \func{void}{OnDrawControlPoints}{\param{wxDC\&}{ dc}}
2696
2697 Called when the shape's control points (handles) should
2698 be drawn.
2699
2700 \membersection{wxShapeEvtHandler::OnDrawOutline}
2701
2702 \func{void}{OnDrawOutline}{\param{wxDC\&}{ dc}}
2703
2704 Called when the outline of the shape should be drawn.
2705
2706 \membersection{wxShapeEvtHandler::OnEndDragLeft}
2707
2708 \func{void}{OnEndDragLeft}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}}
2709
2710 Called when the user is stopping dragging using the left mouse button.
2711
2712 \membersection{wxShapeEvtHandler::OnEndDragRight}
2713
2714 \func{void}{OnEndDragRight}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}}
2715
2716 Called when the user is stopping dragging using the right mouse button.
2717
2718 \membersection{wxShapeEvtHandler::OnEndSize}
2719
2720 \func{void}{OnEndSize}{\param{double}{ width}, \param{double}{ height}}
2721
2722 Called after a shape is resized.
2723
2724 \membersection{wxShapeEvtHandler::OnErase}
2725
2726 \func{void}{OnErase}{\param{wxDC\&}{ dc}}
2727
2728 Called when the whole shape should be erased.
2729
2730 \membersection{wxShapeEvtHandler::OnEraseContents}
2731
2732 \func{void}{OnEraseContents}{\param{wxDC\&}{ dc}}
2733
2734 Called when the contents should be erased.
2735
2736 \membersection{wxShapeEvtHandler::OnEraseControlPoints}
2737
2738 \func{void}{OnEraseControlPoints}{\param{wxDC\&}{ dc}}
2739
2740 Called when the shape's control points (handles) should
2741 be erased.
2742
2743 \membersection{wxShapeEvtHandler::OnHighlight}
2744
2745 \func{void}{OnHighlight}{\param{wxDC\&}{ dc}}
2746
2747 Called when the shape should be highlighted.
2748
2749 \membersection{wxShapeEvtHandler::OnLeftClick}
2750
2751 \func{void}{OnLeftClick}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys =0}, \param{int}{ attachment = 0}}
2752
2753 Called when the shape receives a left mouse click event.
2754
2755 \membersection{wxShapeEvtHandler::OnMoveLink}
2756
2757 \func{void}{OnMoveLink}{\param{wxDC\&}{ dc}, \param{bool}{ moveControlPoints=TRUE}}
2758
2759 Called when the line attached to an shape need to be repositioned,
2760 because the shape has moved.
2761
2762 \membersection{wxShapeEvtHandler::OnMoveLinks}
2763
2764 \func{void}{OnMoveLinks}{\param{wxDC\&}{ dc}}
2765
2766 Called when the lines attached to an shape need to be repositioned,
2767 because the shape has moved.
2768
2769 \membersection{wxShapeEvtHandler::OnMovePost}
2770
2771 \func{bool}{OnMovePost}{\param{wxDC\&}{ dc}, \param{double}{ x}, \param{double}{ y}, \param{double}{ oldX}, \param{double}{ oldY}, \param{bool}{ display = TRUE}}
2772
2773 Called just after the shape receives a move request.
2774
2775 \membersection{wxShapeEvtHandler::OnMovePre}
2776
2777 \func{bool}{OnMovePre}{\param{wxDC\&}{ dc}, \param{double}{ x}, \param{double}{ y}, \param{double}{ oldX}, \param{double}{ oldY}, \param{bool}{ display = TRUE}}
2778
2779 Called just before the shape receives a move request. Returning TRUE
2780 allows the move to be processed; returning FALSE vetoes the move.
2781
2782 \membersection{wxShapeEvtHandler::OnRightClick}
2783
2784 \func{void}{OnRightClick}{\param{double}{ x}, \param{double}{ y}, \param{int}{ keys = 0}, \param{int}{ attachment = 0}}
2785
2786 Called when the shape receives a mouse mouse click event.
2787
2788 \membersection{wxShapeEvtHandler::OnSize}
2789
2790 \func{void}{OnSize}{\param{double}{ x}, \param{double}{ y}}
2791
2792 Called when the shape receives a resize request.
2793
2794 \membersection{wxShapeEvtHandler::OnSizingBeginDragLeft}
2795
2796 \func{void}{OnSizingBeginDragLeft}{\param{wxControlPoint*}{ pt}, \param{double}{ x}, \param{double}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}}
2797
2798 Called when a sizing drag is beginning.
2799
2800 \membersection{wxShapeEvtHandler::OnSizingDragLeft}
2801
2802 \func{void}{OnSizingDragLeft}{\param{wxControlPoint*}{ pt}, \param{bool}{ draw}, \param{double}{ x}, \param{double}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}}
2803
2804 Called when a sizing drag is occurring.
2805
2806 \membersection{wxShapeEvtHandler::OnSizingEndDragLeft}
2807
2808 \func{void}{OnSizingEndDragLeft}{\param{wxControlPoint*}{ pt}, \param{double}{ x}, \param{double}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}}
2809
2810 Called when a sizing drag is ending.
2811
2812 \membersection{wxShapeEvtHandler::SetPreviousHandler}\label{wxshapeevthandlersetprevioushandler}
2813
2814 \func{void}{SetPreviousHandler}{\param{wxShapeEvtHandler*}{ handler}}
2815
2816 Sets the previous handler.
2817
2818 \membersection{wxShapeEvtHandler::SetShape}\label{wxshapeevthandlersetshape}
2819
2820 \func{void}{SetShape}{\param{wxShape*}{ shape}}
2821
2822 Sets the shape for this handler.
2823
2824 \section{\class{wxTextShape}}\label{wxtextshape}
2825
2826 As wxRectangleShape, but only the text is displayed.
2827
2828 \wxheading{Derived from}
2829
2830 \helpref{wxRectangleShape}{wxrectangleshape}
2831
2832 \latexignore{\rtfignore{\wxheading{Members}}}
2833
2834 \membersection{wxTextShape::wxTextShape}
2835
2836 \func{void}{wxTextShape}{\param{double}{ width = 0.0}, \param{double}{ height = 0.0}}
2837
2838 Constructor.
2839
2840 \membersection{wxTextShape::\destruct{wxTextShape}}
2841
2842 \func{void}{\destruct{wxTextShape}}{\void}
2843
2844 Destructor.
2845
2846 \section{Functions}\label{functions}
2847
2848 These are the OGL functions.
2849
2850 \membersection{::wxOGLInitialize}
2851
2852 \func{void}{wxOGLInitialize}{\void}
2853
2854 Initializes OGL.
2855
2856 \membersection{::wxOGLCleanUp}
2857
2858 \func{void}{wxOGLCleanUp}{\void}
2859
2860 Cleans up OGL.
2861