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.m,v 1.5 2008/03/07 13:35:16 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.m,v 1.5 2008/03/07 13:35:16 hewitson Exp $
0016 %
0017 % HISTORY: 07-03-08 M Hewitson
0018 %             Creation
0019 %
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 
0022 
0023 %% Check if I exist already
0024 id = findobj('Tag', 'LTPDAlauncher');
0025 if ~isempty(id)
0026   figure(id)
0027   return
0028 end
0029 
0030 %% Some initial setup
0031 
0032 Gproperties.Gcol    = [240 240 240]/255;
0033 Gproperties.Gwidth  = 400;
0034 Gproperties.Gheight = 400;
0035 Gproperties.Gborder = 10;
0036 fontsize = getappdata(0, 'ltpda_repo_gui_fontsize');
0037 
0038 Gproperties.Screen   = get(0,'screensize');
0039 Gproperties.Gposition = [150 ...
0040   150 ...
0041   Gproperties.Gwidth...
0042   Gproperties.Gheight];
0043 
0044 %  Initialize and hide the GUI as it is being constructed.
0045 mainfig = figure('Name', 'LTPDA Launch Bay',...
0046   'NumberTitle', 'off',...
0047   'Visible','off',...
0048   'Position',Gproperties.Gposition,...
0049   'Color', Gproperties.Gcol,...
0050   'Toolbar', 'none',...
0051   'MenuBar', 'none',...
0052   'Resize', 'off',...
0053   'Tag', 'LTPDAlauncher');
0054 
0055 % Set mainfig callbacks
0056 set(mainfig, 'CloseRequestFcn', {'ltpda_launcher_close', mainfig});
0057 
0058 % Set Application data
0059 setappdata(mainfig, 'Gproperties', Gproperties);
0060 
0061 %% Add  Logo
0062 M = 0.01;
0063 ax   = axes('Position', [M M 1-2*M 1-2*M], 'Parent', mainfig);
0064 logo = imread('images/ltpda_blue.jpg');
0065 image(logo, 'Parent', ax) 
0066 set(ax,'Visible', 'on', 'Box', 'off', 'Xtick', [], 'Ytick', []);
0067 axis(ax, 'off');
0068 
0069 %% Add launch buttons
0070 
0071 BtnHeight = 20;
0072 BtnWidth  = Gproperties.Gwidth - 20;
0073 BtnLeft   = 10;
0074 BtnBottom = Gproperties.Gheight - BtnHeight - 10;
0075 
0076 %-- LTPDA GUI
0077 BtnBottom = BtnBottom - BtnHeight - 10;
0078 pbh = uicontrol(mainfig,'Style','pushbutton','String','LTPDA GUI',...
0079   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0080   'Tag', 'ltpda_launcher_ltpdagui'); 
0081 set(pbh, 'Callback', {'ltpda_launcher_launch_ltpdagui'});
0082 
0083 %-- LTPDA REPO GUI
0084 pos       = get(pbh, 'Position');
0085 BtnBottom = pos(2) - BtnHeight - 10;
0086 pbh = uicontrol(mainfig,'Style','pushbutton','String','LTPDA REPO GUI',...
0087   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0088   'Tag', 'ltpda_launcher_repogui');
0089 set(pbh, 'Callback', {'ltpda_launcher_launch_repogui'});
0090 
0091 %-- PZmodel helper
0092 pos       = get(pbh, 'Position');
0093 BtnBottom = pos(2) - BtnHeight - 10;
0094 pbh = uicontrol(mainfig,'Style','pushbutton','String','pzmodel helper',...
0095   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0096   'Tag', 'ltpda_launcher_pzmodel');
0097 set(pbh, 'Callback', {'ltpda_launcher_launch_pzmodel'});
0098 
0099 %-- specwin helper
0100 pos       = get(pbh, 'Position');
0101 BtnBottom = pos(2) - BtnHeight - 10;
0102 pbh = uicontrol(mainfig,'Style','pushbutton','String','specwin GUI',...
0103   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0104   'Tag', 'ltpda_launcher_specwin');
0105 set(pbh, 'Callback', {'specwin_viewer'});
0106 
0107 %-- constructor helper
0108 pos       = get(pbh, 'Position');
0109 BtnBottom = pos(2) - BtnHeight - 10;
0110 pbh = uicontrol(mainfig,'Style','pushbutton','String','Constructor Helper',...
0111   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0112   'Tag', 'ltpda_constructor_helper');
0113 set(pbh, 'Callback', {'ltpda_constructor_helper'});
0114 
0115 %-- object explorer
0116 pos       = get(pbh, 'Position');
0117 BtnBottom = pos(2) - BtnHeight - 10;
0118 pbh = uicontrol(mainfig,'Style','pushbutton','String','Object Explorer',...
0119   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0120   'Tag', 'ltpda_object_explorer');
0121 set(pbh, 'Callback', {@call_explore_ao});
0122 
0123 %-- quicklook
0124 pos       = get(pbh, 'Position');
0125 BtnBottom = pos(2) - BtnHeight - 10;
0126 pbh = uicontrol(mainfig,'Style','pushbutton','String','Quicklook',...
0127   'Position',[BtnLeft BtnBottom BtnWidth BtnHeight ],...
0128   'Tag', 'ltpdaquicklook');
0129 set(pbh, 'Callback', {'ltpdaquicklook'});
0130 
0131 
0132 %-- version string
0133 v  = ver('LTPDA');
0134 
0135 sth = uicontrol(mainfig,'Style','text',...
0136   'String',sprintf('%s %s', v.Name, v.Version),...
0137   'HorizontalAlignment', 'left', ...
0138   'BackgroundColor', [130 190 250]/255, ...
0139   'ForegroundColor', 'w', ...
0140   'Position',[10 10 120 25]);
0141 
0142 
0143 
0144 
0145 %% Start the GUI
0146 
0147 % Make the GUI visible.
0148 set(mainfig,'Visible','on')
0149  
0150 
0151   function call_explore_ao(varargin)
0152     
0153     explore_ao;
0154     
0155   end
0156 
0157 end

Generated on Fri 07-Mar-2008 15:46:43 by m2html © 2003