| 1376 | } |
| 1377 | |
| 1378 | void ToolManager::UndockBar( wxPoint mp ) |
| 1379 | { |
| 1380 | #if defined(__WXMAC__) |
| 1381 | // Disable window animation |
| 1382 | wxSystemOptions::SetOption( wxMAC_WINDOW_PLAIN_TRANSITION, 1 ); |
| 1383 | #endif |
| 1384 | |
| 1385 | // Adjust the starting position |
| 1386 | mp -= mDragOffset; |
| 1387 | |
| 1388 | // Inform toolbar of change |
| 1389 | mDragBar->SetDocked( NULL, true ); |
| 1390 | mDragBar->SetPositioned(); |
| 1391 | |
| 1392 | // Construct a NEW floater |
| 1393 | wxASSERT(mParent); |
| 1394 | mDragWindow = safenew ToolFrame( mParent, this, mDragBar, mp ); |
| 1395 | mDragWindow->SetLayoutDirection(wxLayout_LeftToRight); |
| 1396 | // Make sure the ferry is visible |
| 1397 | mDragWindow->Show(); |
| 1398 | |
| 1399 | // Notify parent of change |
| 1400 | Updated(); |
| 1401 | |
| 1402 | #if defined(__WXMAC__) |
| 1403 | // Reinstate original transition |
| 1404 | wxSystemOptions::SetOption( wxMAC_WINDOW_PLAIN_TRANSITION, mTransition ); |
| 1405 | #endif |
| 1406 | } |
| 1407 | |
| 1408 | // |
| 1409 | // Transition a toolbar from float to dragging |