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