www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeofftblnode/creategui.m
function [mainlyt,tlb,d] = creategui(nd,info) %CREATEGUI Creates the browser GUI interface for tradeoff tables. % % [LAYOUT, TOOLBAR, DATA] = CREATEGUI(NODE, INFO) where INfO is a % structure containing the fields Figure and browserH. % Copyright 2000-2016 The MathWorks, Inc. and Ford Global Technologies, Inc. cgb = info.browserH; % Make the menus menus = cgb.createmenu(guid(nd),3); set(menus,{'Label'},{'&View';'Ta&bles';'&Inputs'}); % Create table node context menu d.Handles.NodeContextMenu = info.browserH.makeContextMenuBase; uimenu(d.Handles.NodeContextMenu , 'Label' , '&Properties' , ... 'Separator', 'on', ... 'Callback' , {@i_properties, cgb}); % Flag that tells the view method whether to completely replace the % message service's current tradeoff d.SkipViewUpdate = true; % Main GUI is entirely encapsulated d.GUI = cgtradeoffgui.tableCentricUI('Browser', cgb, ... 'Parent',info.ViewParent,... 'ViewMenu', menus(1), ... 'TablesMenu', menus(2), ... 'InputsMenu', menus(3), ... 'Visible', 'off'); mainlyt = d.GUI.Layout; tlb = d.GUI.Toolbar; setBoolPackstatus(mainlyt,true); function i_properties(src, evt, cgb) nd = cgb.CurrentNode; pT = nd.getdata; [T, ok] = propertydialog(pT.info); if ok pT.info = T; end