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

    function pr=PointerRepository(arg)
%POINTERREPOSITORY  Constructor for central store for mouse pointer icons
%
%  POINTERREPOSITORY returns a persisten store or figure mouse pointer
%  stacks.

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


persistent prI
mlock;
if ~nargin
    arg = 'create';
end

switch arg
    case 'create'
        if isempty(prI)
            prI = xregGui.PointerRepository;

            % initialise data for pointers
            a = xregresload('xregpointers.mat');
            prI.Pointers = a.ptrs;
        end
        pr = prI;
    case 'clean'
        munlock;
        clear prI;
        pr = xregGui.PointerRepository;
end