www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcmultiview/@MultiViewPanel/pGetLayoutStructure.m
function struc = pGetLayoutStructure(obj) %PGETLAYOUTSTRUCTURE Create a structure that defines the current layout % % STRUC = PGETLAYOUTSTRUCTURE(OBJ) creates a data structure that contains % the information required to recreate the current setup of views in the % object. % Copyright 2005 The MathWorks, Inc. and Ford Global Technologies, Inc. el = get(obj.hTopLayout, 'elements'); struc = i_getviewdata(el{1}); function s = i_getviewdata(hL) if isa(hL, 'xregsplitlayout') s = struct('Type', 'split', ... 'Split', get(hL, 'split'), ... 'Orientation', get(hL, 'orientation'), .... 'Left', i_getviewdata(get(hL, 'left')), ... 'Right', i_getviewdata(get(hL, 'right'))); else hV = hL.View; data = hL.MVP_Data; s = struct('Type', 'view', ... 'ViewLabel', data.ConstructorLabel, ... 'ViewClass', class(hV), ... 'ViewData', hV.serializeView); end