You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: GridFlex.m
    path of file: ./repos/erplab/studio_functions/GUI Layout Toolbox/layout/+uix
    
    the code of the file until where you have to start completion: classdef GridFlex < uix.Grid & uix.mixin.Flex
    %uix.GridFlex  Flexible grid
    %
    %  b = uix.GridFlex(p1,v1,p2,v2,...) constructs a flexible grid and
    %  sets parameter p1 to value v1, etc.
    %
    %  A grid lays out contents from top to bottom and left to right.
    %  Users can resize contents by dragging the dividers.
    %
    %  See also: 
    
function onMouseMotion( obj, source, eventData )
            %onMouseMotion  Handler for WindowMouseMotion events
            
            loc = obj.ActiveDivider;
            if loc == 0 % hovering, update pointer
                obj.updateMousePointer( source, eventData );
            elseif loc > 0 % dragging row divider
                root = groot();
                delta = root.PointerLocation(2) - obj.MousePressLocation(2);
                ih = loc;
                jh = loc + 1;
                ic = loc;
                jc = loc + 1;
                contents = obj.Contents_;
                ip = uix.getPosition( contents(ic), 'pixels' );
                jp = uix.getPosition( contents(jc), 'pixels' );
                oldPixelHeights = [ip(4); jp(4)];
                minimumHeights = obj.MinimumHeights_(ih:jh,:);
                if delta < 0 % limit to minimum distance from lower neighbor
                    delta = max( delta, minimumHeights(2) - oldPixelHeights(2) );
                else % limit to minimum distance from upper neighbor
                    delta = min( delta, oldPixelHeights(1) - minimumHeights(1) );
                end