[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] SF.net SVN: supercollider:[8102] trunk/build



Revision: 8102
          http://supercollider.svn.sourceforge.net/supercollider/?rev=8102&view=rev
Author:   jmfuo
Date:     2008-12-11 14:26:25 +0000 (Thu, 11 Dec 2008)

Log Message:
-----------
Added Help/GUI/stubs directory

Added the stub template and the stub generator

Added Paths:
-----------
    trunk/build/Help/GUI/stubs/
    trunk/build/Help/GUI/stubs/StubTemplate.html
    trunk/build/SCClassLibrary/Common/GUI/PlusGUI/Core/HelperPlus.sc

Added: trunk/build/Help/GUI/stubs/StubTemplate.html
===================================================================
--- trunk/build/Help/GUI/stubs/StubTemplate.html	                        (rev 0)
+++ trunk/build/Help/GUI/stubs/StubTemplate.html	2008-12-11 14:26:25 UTC (rev 8102)
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd";>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<title></title>
+<meta name="Generator" content="Cocoa HTML Writer">
+<meta name="CocoaVersion" content="949.35">
+<style type="text/css">
+p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
+p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
+p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #001ee6}
+p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
+p.p5 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
+p.p6 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica}
+p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Times}
+p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco}
+p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; color: #bf0000}
+span.s1 {font: 18.0px Helvetica}
+span.s2 {color: #000000}
+span.s3 {text-decoration: underline}
+span.s4 {color: #0c2eee}
+span.s5 {color: #0000bf}
+span.Apple-tab-span {white-space:pre}
+</style>
+</head>
+<body>
+<p class="p1"><span class="s1"><b>%<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></b></span><b>a cross-platform redirector for a GUI widget</b><span class="s1"><b><span class="Apple-tab-span">	</span></b></span></p>
+<p class="p2"><br></p>
+<p class="p3"><span class="s2"><b>Inherits from: </b><a href="../../Core/Object.html"><b>Object</b></a><b> : </b><a href="../ViewRedirecter.html"><b>ViewRedirecter</b></a></span></p>
+<p class="p4"><br></p>
+<p class="p1">A Cross-platform redirect class for a %. This class will create and return the platform/editor specific version of a %.<span class="Apple-converted-space"> </span></p>
+<p class="p2"><br></p>
+<p class="p3"><span class="s2"><b>See also:</b> <a href="../GUI.html"><span class="s3">GUI</span></a>, <a href="../GUI Classes.html"><span class="s3">GUI Classes</span></a>, <a href="../GUI Overview.html"><span class="s3">GUI Overview</span></a></span></p>
+<p class="p5"><br></p>
+<p class="p6"><b>Platform Specific Examples and Documentation:</b></p>
+<p class="p7">%%</p>
+<p class="p1">Some of the<span class="Apple-converted-space">  </span>links above might not work, if the help files for the listed kit are not included in your setup.</p>
+<p class="p1">If you do not see your GUI kit listed in the help redirect stubs, then execute the following code to regenerate the GUI stubs.</p>
+<p class="p1">Your kit must be registered with GUI in order to be listed in the redirecter stubs. See <a href="../GUI.html"><span class="s4">GUI</span></a><span class="Apple-converted-space">  </span>on how to do this.</p>
+<p class="p2"><span class="Apple-tab-span">	</span></p>
+<p class="p8"><span class="Apple-tab-span">	</span>(</p>
+<p class="p9"><span class="s2"><span class="Apple-tab-span">	</span></span><span class="s5">Helper</span><span class="s2">.updateRedirectStubs; </span>// this may take a moment to complete</p>
+<p class="p9"><span class="s2"><span class="Apple-tab-span">	</span></span><span class="s5">Document</span><span class="s2">.current.close; </span>// will close this document when the update is complete</p>
+<p class="p8"><span class="s2"><span class="Apple-tab-span">	</span></span>)</p>
+<p class="p4"><br></p>
+</body>
+</html>

Added: trunk/build/SCClassLibrary/Common/GUI/PlusGUI/Core/HelperPlus.sc
===================================================================
--- trunk/build/SCClassLibrary/Common/GUI/PlusGUI/Core/HelperPlus.sc	                        (rev 0)
+++ trunk/build/SCClassLibrary/Common/GUI/PlusGUI/Core/HelperPlus.sc	2008-12-11 14:26:25 UTC (rev 8102)
@@ -0,0 +1,52 @@
++ Helper{
+
+*updateRedirectStubs {
+	var template, tfile, classesArray, path;
+	path= path ? "Help/GUI/stubs/";
+	
+	tfile=File(path++"StubTemplate.html","r");  // read the html tmaplat file
+	template=tfile.readAllString;
+	tfile.close;
+	
+	classesArray = classesArray ?  ViewRedirecter.allSubclasses; 
+	
+	classesArray.do {arg class;
+		var file, name, string, links="";
+		
+		(path++class.name.asString++".html").postln;
+		
+		file=File(path++class.name.asString++".html", "w"); //create the stub file
+		
+		GUI.schemes.do{arg scheme;  // for each registerd schme
+			var nm, helpFilePath="";
+			try{  // if this fails, then there is no gui class in the kit for this redirect.
+			
+				nm=scheme.perform(class.key).name.asString;  //Get the kit-specific class name
+			
+				{ helpFilePath=nm.findHelpFile
+					.asRelativePath(Platform.helpDir++"/GUI/stubs")}.try({helpFilePath=nm++".html"});
+					//if you can't find the helpfile path, then just create a file name
+			
+				links=links++(("<p class=\"p1\"><b>%:<span class=\"Apple-tab-span\">     </span>"
+					 ++"</b><a href=\"%\">%</a></p><p class=\"p1\"></p>")
+					.format(scheme ,helpFilePath,nm)); // create the html link
+			};
+		};
+		
+		name=class.key.asString; 
+		name[0]=name[0].toUpper; // The class name from the key
+		
+		string=template.replace("%%",links); //Insert the list of  links into the template
+		
+		string=string.replace("%",name); // Insert the class name into the template
+
+		file.write(string);
+		file.close;
+	
+	}
+		
+
+}
+
+
+}
\ No newline at end of file


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/