MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / OnDoubleClickSash

Method OnDoubleClickSash

src/AppFrame.cpp:2606–2631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2604
2605
2606void 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
2633void AppFrame::OnUnSplit(wxSplitterEvent& event)
2634{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected