| 2604 | |
| 2605 | |
| 2606 | void AppFrame::OnDoubleClickSash(wxSplitterEvent& event) |
| 2607 | { |
| 2608 | wxWindow *a, *b; |
| 2609 | wxSplitterWindow *w = nullptr; |
| 2610 | float g = 0.5; |
| 2611 | |
| 2612 | if (event.GetId() == wxID_MAIN_SPLITTER) { |
| 2613 | w = mainSplitter; |
| 2614 | g = 10.0f/37.0f; |
| 2615 | } else if (event.GetId() == wxID_VIS_SPLITTER) { |
| 2616 | w = mainVisSplitter; |
| 2617 | g = 6.0f/25.0f; |
| 2618 | } |
| 2619 | |
| 2620 | if (w != nullptr) { |
| 2621 | a = w->GetWindow1(); |
| 2622 | b = w->GetWindow2(); |
| 2623 | w->Unsplit(); |
| 2624 | w->SetSashGravity(g); |
| 2625 | wxSize s = w->GetSize(); |
| 2626 | |
| 2627 | w->SplitHorizontally(a, b, int(float(s.GetHeight()) * g)); |
| 2628 | } |
| 2629 | |
| 2630 | event.Veto(); |
| 2631 | } |
| 2632 | |
| 2633 | void AppFrame::OnUnSplit(wxSplitterEvent& event) |
| 2634 | { |
nothing calls this directly
no outgoing calls
no test coverage detected