Code covered by the BSD License  

Highlights from
HTML Indexer

image thumbnail

HTML Indexer

by

 

16 Aug 2004 (Updated )

automated multi-language html index, index for print, batch image scaling

html_index.m
% command shell for the batch image scaler and html index builder
%
% v 0.0     - 17.05.2003
% v.0.6     - 02.07.2011, better html output !!!
%             also split options edit into smaller windows
%             (html colours done, more to follow) 

%h.Main.Position = [100 650 470 50];
Position.MainWindow =  [100 650 470 50];
Position.InfoPrj = [2 20 348 15]; % to phase out
Position.InfoDest = [2 2 348 15];
h.Main.Top = figure('Position', Position.MainWindow, ...
    'MenuBar', 'none', 'NumberTitle', 'off', ...
    'Name', 'HTML Indexer 0.6', 'resize', 'off'); 

% --- some defaults ---
FileList = uConstr('fileinfo'); 
Options = uConstr('Options'); 
Dir = uConstr('Dir'); 
Nav = uConstr('nav'); 
addpath(pwd);

% ------------ generate the Project pulldown menu ---------
h.Prj.Top=uimenu(h.Main.Top,'Label','Project');

h.Prj.New=uimenu(h.Prj.Top,'Label','New Project', ...
   'Callback','ceva = ''h_prjnew_callback''; IncearcaCeva',...
   'Enable', 'on');

h.Prj.Edit=uimenu(h.Prj.Top,'Label','Edit current', ...
   'Callback','ceva = ''h_prjedit_callback''; IncearcaCeva',...
   'Enable', 'off');
h.Prj.Load=uimenu(h.Prj.Top,'Label','Load Project', ...
   'Callback','ceva = ''h_load_callback''; IncearcaCeva',...
   'Enable', 'on');
h.Prj.Save=uimenu(h.Prj.Top,'Label','Save Project', ...
   'Callback','ceva = ''h_save_callback''; IncearcaCeva',...
   'Enable', 'off');
h.Prj.SetDest=uimenu(h.Prj.Top,'Label','choose dest.dir.', ...
   'Callback','ceva = ''h_prjsetdest_callback''; IncearcaCeva');

% ------------ generate the Render pulldown menu ---------
h.Render.Top=uimenu(h.Main.Top,'Label','Render',...
   'Callback', '', ...
   'Enable', 'on');
h.Render.Smart = uimenu(h.Render.Top, 'Label', 'Render Images',...
   'Callback', 'ceva=''h_rendersmart_callback'';  IncearcaCeva', ...
   'Enable', 'on');
% h.Render.SmartToggle = uimenu(h.Render.Top,'Label','turn smart ''OFF''', ...
%    'Callback','ceva = ''h_optsmart_callback''; IncearcaCeva', ...
%    'Enable', 'on');

h.Render.Contact = uimenu(h.Render.Top,'Label','Contact Sheet',...
    'Callback', 'ceva = ''h_rendercontact_callback'';  IncearcaCeva', ...
   'Enable', 'on');

% ------------ generate the Generate menu ---------
h.Generate.Top=uimenu(h.Main.Top,'Label','Generate');
h.Generate.html=uimenu(h.Generate.Top,'Label','.html', ...
   'Callback', 'ceva = ''h_generatehtml_callback''; IncearcaCeva',...
   'Enable', 'on');
h.Generate.htmllow=uimenu(h.Generate.Top,'Label','.html low res', ...
   'Enable', 'off');

% ------------ generate the OPTIONS menu ---------
h.Opt.Top=uimenu(h.Main.Top,'Label','Options',...
   'Enable', 'on');
% h.Opt.HtmlCol = uimenu(h.Opt.Top, 'Label','Edit html colours',...
%    'Callback', 'Options.Colour = dlgHtmlColours(Options.Colour);', ...
%    'Enable', 'on');
h.Opt.Load=uimenu(h.Opt.Top,'Label','Load',...
   'Callback',' ceva= ''h_optload_callback''; IncearcaCeva', ...
   'Enable', 'off');
h.Opt.Filt=uimenu(h.Opt.Top,'Label','Turn 2D filtering ''ON''',...
   'Callback',' ceva= ''h_optfilt_callback''; IncearcaCeva', ...
   'Enable', 'off');

h.Opt.ToDefault=uimenu(h.Opt.Top,'Label','Reverse to Defaults', ...
   'Callback','Options = uConstr(Options);', ...
   'Enable', 'on');

% ------------ generate the LogFile menu ---------
h.Log=uimenu(h.Main.Top,'Label','Log', ...
   'Callback','fclose(''all''); eval([''!notepad.exe '' Dir.Dest ''/log.txt &''])', ...
   'Enable', 'off');

% ------------ generate the "Help" pulldown menu ---------
h.Help.Top=uimenu(h.Main.Top,'Label','help', ... 
   'Enable', 'on');
h.Help.Ro=uimenu(h.Help.Top,'Label','româna', ... 
   'Callback','more on; type hGeneral.txt; more off', ...    
   'Enable', 'on');
h.Help.En=uimenu(h.Help.Top,'Label','english', ...
   'Callback','more on; type hGeneral_eng.txt; more off', ...
   'Enable', 'on');
h.Help.About=uimenu(h.Help.Top,'Label','About HTML Indexer', ...
   'Callback','hAbout', ...
   'Enable', 'on');

% --------- generate the info.Prj text box --------------------
h.Info.Prj = uicontrol('Parent',h.Main.Top, ...
	'Units','points', ...
	'BackgroundColor',[0.66 0.6 0.565], ...
	'FontName','Verdana', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'units', 'normalized', 'Position', [0.01 0.52 0.98 0.47], ...
	'String', ['Prj : ' Dir.PrjName], ...
	'Style','text', ...
	 'Tag','StaticText1');
% was 'Position', Position.InfoPrj,... % was [3 21 270 15], ...

% --------- generate the info.Dest text box --------------------
h.Info.Dest = uicontrol('Parent',h.Main.Top, ...
	'Units','points', ...
	'BackgroundColor',[0.66 0.6 0.565], ...
	'FontName','Verdana', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
    'units', 'normalized', 'Position', [0.01 0.01 0.98 0.47], ...	
	'String',['Dest :' Dir.Dest], ...
	'Style','text', ...
	'Tag','StaticText1');
% was 'Position', Position.InfoDest,... % [3 3 270 15], ...
% ----------------------------------------------------------

Contact us