Home > m > gui > ltpdalauncher > ltpdalauncher.m

ltpdalauncher

PURPOSE ^

LTPDALAUNCHER presents the user with a control panel from which they can

SYNOPSIS ^

function varargout = ltpdalauncher(varargin)

DESCRIPTION ^

 LTPDALAUNCHER presents the user with a control panel from which they can
 launch other LTPDA GUIs.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: LTPDALAUNCHER presents the user with a control panel from
              which they can launch other LTPDA GUIs.

 CALL:        ltpdalauncher



 VERSION:     $Id: ltpdalauncher.html,v 1.3 2008/03/31 10:27:46 hewitson Exp $

 HISTORY: 07-03-08 M Hewitson
             Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function varargout = ltpdalauncher(varargin)
0002 
0003 % LTPDALAUNCHER presents the user with a control panel from which they can
0004 % launch other LTPDA GUIs.
0005 %
0006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0007 %
0008 % DESCRIPTION: LTPDALAUNCHER presents the user with a control panel from
0009 %              which they can launch other LTPDA GUIs.
0010 %
0011 % CALL:        ltpdalauncher
0012 %
0013 %
0014 %
0015 % VERSION:     $Id: ltpdalauncher.html,v 1.3 2008/03/31 10:27:46 hewitson Exp $
0016 %
0017 % HISTORY: 07-03-08 M Hewitson
0018 %             Creation
0019 %
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 
0022 
0023 %% Check if I exist already
0024 hs = findall(0);
0025 found = -1;
0026 for j=1:length(hs)
0027   h = hs(j);
0028   if strcmp(get(h, 'Tag'), 'LTPDAlauncher')
0029     found = h;
0030   end
0031 end
0032 if found ~= -1
0033   figure(found);
0034   return
0035 end
0036 
0037 % id = findobj('Tag', 'LTPDAlauncher');
0038 % if ~isempty(id)
0039 %   figure(id)
0040 %   return
0041 % end
0042 
0043 %% Some initial setup
0044 
0045 Gproperties.Gcol    = [240 240 240]/255;
0046 Gproperties.Gwidth  = 400;
0047 Gproperties.Gheight = 400;
0048 Gproperties.Gborder = 10;
0049 fontsize = getappdata(0, 'ltpda_repo_gui_fontsize');
0050 
0051 Gproperties.Screen   = get(0,'screensize');
0052 Gproperties.Gposition = [150 ...
0053   150 ...
0054   Gproperties.Gwidth...
0055   Gproperties.Gheight];
0056 
0057 %  Initialize and hide the GUI as it is being constructed.
0058 mainfig = figure('Name', 'LTPDA Launch Bay',...
0059   'NumberTitle', 'off',...
0060   'Visible','off',...
0061   'Position',Gproperties.Gposition,...
0062   'Color', Gproperties.Gcol,...
0063   'Toolbar', 'none',...
0064   'Resize', 'off',...
0065   'ToolBar',      'none',           ...
0066   'NextPlot',     'new',            ...
0067   'HandleVisibility', 'callback', ...
0068   'MenuBar', 'none',...
0069   'Tag', 'LTPDAlauncher');
0070 
0071 % Set mainfig callbacks
0072 set(mainfig, 'CloseRequestFcn', {'ltpda_launcher_close', mainfig});
0073 
0074 % Set Application data
0075 setappdata(mainfig, 'Gproperties', Gproperties);
0076 
0077 %% Add  Logo
0078 M = 0.01;
0079 ax   = axes('Position', [M M 1-2*M 1-2*M], 'Parent', mainfig);
0080 logo = imread('images/ltpda_blue.jpg');
0081 image(logo, 'Parent', ax) 
0082 set(ax,'Visible', 'on', 'Box', 'off', 'Xtick', [], 'Ytick', []);
0083 axis(ax, 'off');
0084 
0085 %% Add launch buttons
0086 
0087 BtnHeight = 20;
0088 BtnWidth  = Gproperties.Gwidth - 20;
0089 BtnLeft   = 10;
0090 BtnBottom = Gproperties.Gheight - BtnHeight - 10;
0091 
0092 %-- LTPDA GUI
0093 BtnBottom = BtnBottom - BtnHeight - 10;
0094 pbh = uicontrol(mainfig,'Style','pushbutton','String','LTPDA GUI',...
0095   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0096   'Tag', 'ltpda_launcher_ltpdagui'); 
0097 set(pbh, 'Callback', {'ltpda_launcher_launch_ltpdagui'});
0098 
0099 %-- LTPDA REPO GUI
0100 pos       = get(pbh, 'Position');
0101 BtnBottom = pos(2) - BtnHeight - 10;
0102 pbh = uicontrol(mainfig,'Style','pushbutton','String','LTPDA REPO GUI',...
0103   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0104   'Tag', 'ltpda_launcher_repogui');
0105 set(pbh, 'Callback', {'ltpda_launcher_launch_repogui'});
0106 
0107 %-- PZmodel helper
0108 pos       = get(pbh, 'Position');
0109 BtnBottom = pos(2) - BtnHeight - 10;
0110 pbh = uicontrol(mainfig,'Style','pushbutton','String','pzmodel helper',...
0111   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0112   'Tag', 'ltpda_launcher_pzmodel');
0113 set(pbh, 'Callback', {'ltpda_launcher_launch_pzmodel'});
0114 
0115 %-- specwin helper
0116 pos       = get(pbh, 'Position');
0117 BtnBottom = pos(2) - BtnHeight - 10;
0118 pbh = uicontrol(mainfig,'Style','pushbutton','String','specwin GUI',...
0119   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0120   'Tag', 'ltpda_launcher_specwin');
0121 set(pbh, 'Callback', {'specwin_viewer'});
0122 
0123 %-- constructor helper
0124 pos       = get(pbh, 'Position');
0125 BtnBottom = pos(2) - BtnHeight - 10;
0126 pbh = uicontrol(mainfig,'Style','pushbutton','String','Constructor Helper',...
0127   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0128   'Tag', 'ltpda_constructor_helper');
0129 set(pbh, 'Callback', {'ltpda_constructor_helper'});
0130 
0131 %-- object explorer
0132 pos       = get(pbh, 'Position');
0133 BtnBottom = pos(2) - BtnHeight - 10;
0134 pbh = uicontrol(mainfig,'Style','pushbutton','String','Object Explorer',...
0135   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0136   'Tag', 'ltpda_object_explorer');
0137 set(pbh, 'Callback', {@call_explore_ao});
0138 
0139 %-- quicklook
0140 pos       = get(pbh, 'Position');
0141 BtnBottom = pos(2) - BtnHeight - 10;
0142 pbh = uicontrol(mainfig,'Style','pushbutton','String','Quicklook',...
0143   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0144   'Tag', 'ltpdaquicklook');
0145 set(pbh, 'Callback', {'ltpdaquicklook'});
0146 
0147 
0148 %-- version string
0149 v  = ver('LTPDA');
0150 
0151 sth = uicontrol(mainfig,'Style','text',...
0152   'String',sprintf('%s %s', v.Name, v.Version),...
0153   'HorizontalAlignment', 'left', ...
0154   'BackgroundColor', [130 190 250]/255, ...
0155   'ForegroundColor', 'w', ...
0156   'Position',[10 10 120 25]);
0157 
0158 
0159 
0160 
0161 %% Start the GUI
0162 
0163 % Make the GUI visible.
0164 set(mainfig,'Visible','on')
0165  
0166 
0167   function call_explore_ao(varargin)
0168     
0169     ltpda_explorer;
0170     
0171   end
0172 
0173 end

Generated on Mon 31-Mar-2008 12:20:24 by m2html © 2003