www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@ButtonUpManager/checkButtonState.m

    function checkButtonState(obj, state)
%CHECKBUTTONSTATE Check that button is in expected state
%
%  CHECKBUTTONSTATE(OBJ, STATE) checks that the mouse button is still in
%  the state specified by STATE.  If STATE is true (pressed) but the mouse
%  button is actually up, pending button-up callbacks will be fired.

%  Copyright 2000-2014 The MathWorks, Inc. and Ford Global Technologies, Inc.


if state && ~obj.mouseButtonState
    obj.pFireCallbacks;
end