Home > m > gui > constructor_helper > ltpda_constructor_helper.m

ltpda_constructor_helper

PURPOSE ^

LTPDA_CONSTRUCTOR_HELPER allows the user to explore object constructors.

SYNOPSIS ^

function varargout = ltpda_constructor_helper(varargin)

DESCRIPTION ^

 LTPDA_CONSTRUCTOR_HELPER allows the user to explore object constructors.

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

 DESCRIPTION: LTPDA_CONSTRUCTOR_HELPER allows the user to explore object constructors.

 CALL:        ltpda_constructor_helper


 VERSION:     $Id: ltpda_constructor_helper.m,v 1.4 2008/06/20 10:51:55 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 = ltpda_constructor_helper(varargin)
0002 
0003 % LTPDA_CONSTRUCTOR_HELPER allows the user to explore object constructors.
0004 %
0005 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0006 %
0007 % DESCRIPTION: LTPDA_CONSTRUCTOR_HELPER allows the user to explore object constructors.
0008 %
0009 % CALL:        ltpda_constructor_helper
0010 %
0011 %
0012 % VERSION:     $Id: ltpda_constructor_helper.m,v 1.4 2008/06/20 10:51:55 hewitson Exp $
0013 %
0014 % HISTORY: 07-03-08 M Hewitson
0015 %             Creation
0016 %
0017 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0018 
0019 
0020 %% Check if I exist already
0021 id = findobj('Tag', 'LTPDAconstructor_helper');
0022 if ~isempty(id)
0023   figure(id)
0024   return
0025 end
0026 
0027 %% Some initial setup
0028 
0029 Gproperties.Gcol    = [240 240 240]/255;
0030 Gproperties.Gwidth  = 500;
0031 Gproperties.Gheight = 300;
0032 Gproperties.Gborder = 10;
0033 fontsize = getappdata(0, 'ltpda_repo_gui_fontsize');
0034 
0035 Gproperties.Screen   = get(0,'screensize');
0036 Gproperties.Gposition = [150 ...
0037   150 ...
0038   Gproperties.Gwidth...
0039   Gproperties.Gheight];
0040 
0041 %  Initialize and hide the GUI as it is being constructed.
0042 mainfig = figure('Name', 'LTPDA Constructor Helper',...
0043   'NumberTitle', 'off',...
0044   'Visible','off',...
0045   'Position',Gproperties.Gposition,...
0046   'Color', Gproperties.Gcol,...
0047   'Resize', 'off',...
0048   'ToolBar',      'none',           ...
0049   'NextPlot',     'new',            ...
0050   'MenuBar', 'none',...
0051   'Tag', 'LTPDAconstructor_helper');
0052 
0053 % Set mainfig callbacks
0054 set(mainfig, 'CloseRequestFcn', {@ltpda_constructor_helper_close, mainfig});
0055 
0056 % Set Application data
0057 setappdata(mainfig, 'Gproperties', Gproperties);
0058 
0059 
0060 %% GUI parts
0061 
0062 %--- Class selection
0063 % text field
0064 sth = uicontrol(mainfig,'Style','text',...
0065   'String','Class',...
0066   'HorizontalAlignment', 'left', ...
0067   'BackgroundColor', Gproperties.Gcol, ...
0068   'Position',[10 Gproperties.Gheight-40 50 25]);
0069 
0070 % pop-up dialog
0071 pmh = uicontrol(mainfig,'Style','popupmenu',...
0072   'String', utils.helper.ltpda_userclasses,...
0073   'Value', 1, ...
0074   'BackgroundColor', Gproperties.Gcol, ...
0075   'Tag', 'LTPDA_constructor_helper_class', ...
0076   'Callback', {'ltpda_constructor_helper_class', mainfig}, ...
0077   'Position',[90 Gproperties.Gheight-40 120 25]);
0078 
0079 %--- Constructor set list
0080 
0081 
0082 % text field
0083 sth = uicontrol(mainfig,'Style','text',...
0084   'String','Sets',...
0085   'HorizontalAlignment', 'left', ...
0086   'BackgroundColor', Gproperties.Gcol, ...
0087   'Position',[10 Gproperties.Gheight-80 50 25]);
0088 
0089 % Set list
0090 lbh = uicontrol(mainfig,'Style','listbox',...
0091                 'String', '',...
0092                 'Value', 1, ...
0093                 'BackgroundColor', 'w', ...
0094                 'Tag', 'LTPDA_constructor_helper_sets', ...
0095                 'Callback', {'ltpda_constructor_helper_sets', mainfig}, ...
0096                 'Position',[10 Gproperties.Gheight-270 200 200]);
0097               
0098 % Constructor view
0099 eth = uicontrol(mainfig,'Style','edit',...
0100                 'String','',...
0101                 'BackgroundColor', 'w', ...
0102                 'Max', 100, ...
0103                 'HorizontalAlignment', 'left', ...
0104                 'FontSize', 14, ...
0105                 'Tag', 'LTPDA_constructor_helper_constructor', ...
0106                 'Position',[240 Gproperties.Gheight-210 250 200]);
0107 
0108 % Variable name
0109 sth = uicontrol(mainfig,'Style','text',...
0110   'String','Variable',...
0111   'HorizontalAlignment', 'left', ...
0112   'BackgroundColor', Gproperties.Gcol, ...
0113   'Position',[240 Gproperties.Gheight-260 50 25]);
0114 
0115 eth = uicontrol(mainfig,'Style','edit',...
0116                 'String','obj',...
0117                 'BackgroundColor', 'w', ...
0118                 'HorizontalAlignment', 'center', ...
0119                 'Tag', 'LTPDA_constructor_helper_var', ...
0120                 'Position',[300 Gproperties.Gheight-260 50 25]);
0121               
0122 
0123 %  Build btn
0124 pbh = uicontrol(mainfig,'Style','pushbutton','String','Build',...
0125   'Position',[360  Gproperties.Gheight-260 60 25],...
0126   'Tag', 'LTPDA_constructor_helper_buildBtn');
0127 set(pbh, 'Callback', {'ltpda_constructor_helper_build'});
0128 
0129 %% Start the GUI
0130 
0131 % Make the GUI visible.
0132 set(mainfig,'Visible','on')
0133 
0134 
0135 %% Callbacks
0136 
0137   %--- Close
0138   function ltpda_constructor_helper_close(varargin)
0139     disp('* Goodbye from the LTPDA Constructor Helper *')
0140     delete(varargin{end})
0141   end
0142 end
0143 
0144 
0145

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003