| 2254 | #endif |
| 2255 | |
| 2256 | void wxShape::Copy(wxShape& copy) |
| 2257 | { |
| 2258 | copy.m_id = m_id; |
| 2259 | copy.m_xpos = m_xpos; |
| 2260 | copy.m_ypos = m_ypos; |
| 2261 | copy.m_pen = m_pen; |
| 2262 | copy.m_brush = m_brush; |
| 2263 | copy.m_textColour = m_textColour; |
| 2264 | copy.m_centreResize = m_centreResize; |
| 2265 | copy.m_maintainAspectRatio = m_maintainAspectRatio; |
| 2266 | copy.m_attachmentMode = m_attachmentMode; |
| 2267 | copy.m_spaceAttachments = m_spaceAttachments; |
| 2268 | copy.m_highlighted = m_highlighted; |
| 2269 | copy.m_rotation = m_rotation; |
| 2270 | copy.m_textColourName = m_textColourName; |
| 2271 | copy.m_regionName = m_regionName; |
| 2272 | |
| 2273 | copy.m_sensitivity = m_sensitivity; |
| 2274 | copy.m_draggable = m_draggable; |
| 2275 | copy.m_fixedWidth = m_fixedWidth; |
| 2276 | copy.m_fixedHeight = m_fixedHeight; |
| 2277 | copy.m_formatMode = m_formatMode; |
| 2278 | copy.m_drawHandles = m_drawHandles; |
| 2279 | |
| 2280 | copy.m_visible = m_visible; |
| 2281 | copy.m_shadowMode = m_shadowMode; |
| 2282 | copy.m_shadowOffsetX = m_shadowOffsetX; |
| 2283 | copy.m_shadowOffsetY = m_shadowOffsetY; |
| 2284 | copy.m_shadowBrush = m_shadowBrush; |
| 2285 | |
| 2286 | copy.m_branchNeckLength = m_branchNeckLength; |
| 2287 | copy.m_branchStemLength = m_branchStemLength; |
| 2288 | copy.m_branchSpacing = m_branchSpacing; |
| 2289 | |
| 2290 | // Copy text regions |
| 2291 | copy.ClearRegions(); |
| 2292 | wxNode *node = m_regions.GetFirst(); |
| 2293 | while (node) |
| 2294 | { |
| 2295 | wxShapeRegion *region = (wxShapeRegion *)node->GetData(); |
| 2296 | wxShapeRegion *newRegion = new wxShapeRegion(*region); |
| 2297 | copy.m_regions.Append(newRegion); |
| 2298 | node = node->GetNext(); |
| 2299 | } |
| 2300 | |
| 2301 | // Copy attachments |
| 2302 | copy.ClearAttachments(); |
| 2303 | node = m_attachmentPoints.GetFirst(); |
| 2304 | while (node) |
| 2305 | { |
| 2306 | wxAttachmentPoint *point = (wxAttachmentPoint *)node->GetData(); |
| 2307 | wxAttachmentPoint *newPoint = new wxAttachmentPoint; |
| 2308 | newPoint->m_id = point->m_id; |
| 2309 | newPoint->m_x = point->m_x; |
| 2310 | newPoint->m_y = point->m_y; |
| 2311 | copy.m_attachmentPoints.Append((wxObject *)newPoint); |
| 2312 | node = node->GetNext(); |
| 2313 | } |
nothing calls this directly
no test coverage detected