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