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