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.2 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 = 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.2 2008/03/07 13:35:16 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   'Toolbar', 'none',...
0048   'MenuBar', 'none',...
0049   'Resize', 'off',...
0050   'Tag', 'LTPDAconstructor_helper');
0051 
0052 % Set mainfig callbacks
0053 set(mainfig, 'CloseRequestFcn', {@ltpda_constructor_helper_close, mainfig});
0054 
0055 % Set Application data
0056 setappdata(mainfig, 'Gproperties', Gproperties);
0057 
0058 
0059 %% GUI parts
0060 
0061 %--- Class selection
0062 % text field
0063 sth = uicontrol(mainfig,'Style','text',...
0064   'String','Class',...
0065   'HorizontalAlignment', 'left', ...
0066   'BackgroundColor', Gproperties.Gcol, ...
0067   'Position',[10 Gproperties.Gheight-40 50 25]);
0068 
0069 % pop-up dialog
0070 pmh = uicontrol(mainfig,'Style','popupmenu',...
0071   'String', ltpda_isuserobject,...
0072   'Value', 1, ...
0073   'BackgroundColor', Gproperties.Gcol, ...
0074   'Tag', 'LTPDA_constructor_helper_class', ...
0075   'Callback', {'ltpda_constructor_helper_class', mainfig}, ...
0076   'Position',[90 Gproperties.Gheight-40 120 25]);
0077 
0078 %--- Constructor set list
0079 
0080 
0081 % text field
0082 sth = uicontrol(mainfig,'Style','text',...
0083   'String','Sets',...
0084   'HorizontalAlignment', 'left', ...
0085   'BackgroundColor', Gproperties.Gcol, ...
0086   'Position',[10 Gproperties.Gheight-80 50 25]);
0087 
0088 % Set list
0089 lbh = uicontrol(mainfig,'Style','listbox',...
0090                 'String', '',...
0091                 'Value', 1, ...
0092                 'BackgroundColor', 'w', ...
0093                 'Tag', 'LTPDA_constructor_helper_sets', ...
0094                 'Callback', {'ltpda_constructor_helper_sets', mainfig}, ...
0095                 'Position',[10 Gproperties.Gheight-270 200 200]);
0096               
0097 % Constructor view
0098 eth = uicontrol(mainfig,'Style','edit',...
0099                 'String','',...
0100                 'BackgroundColor', 'w', ...
0101                 'Max', 100, ...
0102                 'HorizontalAlignment', 'left', ...
0103                 'FontSize', 14, ...
0104                 'Tag', 'LTPDA_constructor_helper_constructor', ...
0105                 'Position',[240 Gproperties.Gheight-210 250 200]);
0106 
0107 % Variable name
0108 sth = uicontrol(mainfig,'Style','text',...
0109   'String','Variable',...
0110   'HorizontalAlignment', 'left', ...
0111   'BackgroundColor', Gproperties.Gcol, ...
0112   'Position',[240 Gproperties.Gheight-260 50 25]);
0113 
0114 eth = uicontrol(mainfig,'Style','edit',...
0115                 'String','obj',...
0116                 'BackgroundColor', 'w', ...
0117                 'HorizontalAlignment', 'center', ...
0118                 'Tag', 'LTPDA_constructor_helper_var', ...
0119                 'Position',[300 Gproperties.Gheight-260 50 25]);
0120               
0121 
0122 %  Build btn
0123 pbh = uicontrol(mainfig,'Style','pushbutton','String','Build',...
0124   'Position',[360  Gproperties.Gheight-260 60 25],...
0125   'Tag', 'LTPDA_constructor_helper_buildBtn');
0126 set(pbh, 'Callback', {'ltpda_constructor_helper_build'});
0127 
0128 %% Start the GUI
0129 
0130 % Make the GUI visible.
0131 set(mainfig,'Visible','on')
0132 
0133 
0134 %% Callbacks
0135 
0136   %--- Close
0137   function ltpda_constructor_helper_close(varargin)
0138     disp('* Goodbye from the LTPDA Constructor Helper *')
0139     delete(varargin{end})
0140   end
0141 end
0142 
0143 
0144

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