How to use checkbounds constrainer between siblings

basically mseg or automation implementation start and end nodes can only move verticall inbetween nodes cant move passed their order i guess if that makes sense. I dont understand checkbounds constrainer.

void constrain() {
            auto newBounds = getBounds();
            
            DBG(newBounds.toString());
            
            constrainer.checkBounds(newBounds(), , <#const Rectangle<int> &limits#>, <#bool isStretchingTop#>, <#bool isStretchingLeft#>, <#bool isStretchingBottom#>, <#bool isStretchingRight#>)
        }
        
        void mouseDown(const MouseEvent &event) override {
            

            constrain();
            
            event.get
            dragger.startDraggingComponent(this, event);
        }
        
        void mouseDrag(const MouseEvent &event) override {
            
            constrain();
            
            dragger.dragComponent(this, event, &constrainer);
        }

Okay was able to do it from other posts thanks anyways but this is gist.

        void mouseDown(const MouseEvent &event) override {
            auto p = getBoundsInParent();
            dragger.startDraggingComponent(this, event);
            auto n = getBoundsInParent();
            constrainer.checkBounds(n, p,n.withLeft(0).withRight(100), false, false, false, false);
            setBounds (n);
            constrainer.setMinimumOnscreenAmounts (getHeight(), getWidth(), getHeight(), getWidth());

        }
        
        void mouseDrag(const MouseEvent &event) override {
            auto p = getBoundsInParent();
            dragger.dragComponent(this, event, &constrainer);
            auto n = getBoundsInParent();
            constrainer.checkBounds(n, p, n.withLeft(0).withRight(100), false, false, false, false);
            setBounds (n);
            constrainer.setMinimumOnscreenAmounts (getHeight(), getWidth(), getHeight(), getWidth());
            
        }
        
        
        ComponentDragger dragger;
        ComponentBoundsConstrainer constrainer;