[rkward-cvs] SF.net SVN: rkward: [1419] trunk/rkward/rkward/plugins

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Feb 21 13:48:34 UTC 2007


Revision: 1419
          http://svn.sourceforge.net/rkward/?rev=1419&view=rev
Author:   tfry
Date:     2007-02-21 05:48:34 -0800 (Wed, 21 Feb 2007)

Log Message:
-----------
Create embeddable color picker

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/plots/plot_options.php
    trunk/rkward/rkward/plugins/plots/plot_options.xml
    trunk/rkward/rkward/plugins/plots.pluginmap

Added Paths:
-----------
    trunk/rkward/rkward/plugins/plots/color_chooser.php
    trunk/rkward/rkward/plugins/plots/color_chooser.rkh
    trunk/rkward/rkward/plugins/plots/color_chooser.xml

Added: trunk/rkward/rkward/plugins/plots/color_chooser.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/color_chooser.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/plots/color_chooser.php	2007-02-21 13:48:34 UTC (rev 1419)
@@ -0,0 +1,18 @@
+<?
+function preprocess () {
+}
+
+function calculate () {
+}
+
+function printout () {
+	$col = getRK_val ("color");
+	if (empty ($col)) $col = getRK_val ("default_color");
+	if (!empty ($col)) $col = getRK_val ("argument") . "\"" . $col . "\"";
+
+	echo ($col);
+}
+
+function cleanup () {
+}
+?>
\ No newline at end of file

Added: trunk/rkward/rkward/plugins/plots/color_chooser.rkh
===================================================================
--- trunk/rkward/rkward/plugins/plots/color_chooser.rkh	                        (rev 0)
+++ trunk/rkward/rkward/plugins/plots/color_chooser.rkh	2007-02-21 13:48:34 UTC (rev 1419)
@@ -0,0 +1,23 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+		Simple color picker.
+	</summary>
+
+	<usage>
+		Pick a color.
+
+		This plugin is meant to be used embedded, and you should not really ever see this help page.
+	</usage>
+
+	<settings>
+		<caption id="aspectratio"/>
+		<setting id="color">The color to use.</setting>
+	</settings>
+
+	<related>
+		<ul>
+			<li><link href="rkward://rhelp/colors"/></li>
+		</ul>
+	</related>
+</document>

Added: trunk/rkward/rkward/plugins/plots/color_chooser.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/color_chooser.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/plots/color_chooser.xml	2007-02-21 13:48:34 UTC (rev 1419)
@@ -0,0 +1,86 @@
+<!DOCTYPE rkplugin>
+<document>
+	<code file="color_chooser.php" />
+	<logic>
+		<external id="argument" default=", col=" />
+		<external id="default_color" default="" />
+	</logic>
+	<dialog label="Choose color" >
+		<dropdown id="color" label="Color">
+			<option value="" label="default" checked="true" />
+			<option value="azure" label="Azure" />
+			<option value="black" label="Black" />
+			<option value="blue" label="Blue" />
+			<option value="blue1" label="Blue1" />
+			<option value="blue2" label="Blue2" />
+			<option value="blue3" label="Blue3" />
+			<option value="blue4" label="Blue4" />
+			<option value="brown" label="Brown" />
+			<option value="cyan" label="Cyan" />
+			<option value="darkviolet" label="Darkviolet" />
+			<option value="gold" label="Gold" />
+			<option value="gray" label="Gray" />
+			<option value="gray1" label="Gray1" />
+			<option value="gray2" label="Gray2" />
+			<option value="gray3" label="Gray3" />
+			<option value="gray4" label="Gray4" />
+			<option value="green" label="Green" />
+			<option value="green1" label="Green1" />
+			<option value="green2" label="Green2" />
+			<option value="green3" label="Green3" />
+			<option value="green4" label="Green4" />
+			<option value="grey" label="Grey" />
+			<option value="grey1" label="Grey1" />
+			<option value="grey2" label="Grey2" />
+			<option value="grey3" label="Grey3" />
+			<option value="grey4" label="Grey4" />
+			<option value="lawngreen" label="Lawngreen" />
+			<option value="limegreen" label="Limegreen" />
+			<option value="linen" label="Linen" />
+			<option value="magenta" label="Magenta" />
+			<option value="magenta1" label="Magenta1" />
+			<option value="magenta2" label="Magenta2" />
+			<option value="magenta3" label="Magenta3" />
+			<option value="magenta4" label="Magenta4" />
+			<option value="mintcream" label="Mintcream" />
+			<option value="mistyrose" label="Mistyrose" />
+			<option value="navajowhite" label="Navajowhite" />
+			<option value="orange" label="Orange" />
+			<option value="orchid" label="Orchid" />
+			<option value="palegreen" label="Palegreen" />
+			<option value="papayawhip" label="Papayawhip" />
+			<option value="peachpuff" label="Peachpuff" />
+			<option value="pink" label="Pink" />
+			<option value="red" label="Red" />
+			<option value="red1" label="Red1" />
+			<option value="red2" label="Red1" />
+			<option value="red3" label="Red3" />
+			<option value="red4" label="Red4" />
+			<option value="royalblue" label="Royalblue" />
+			<option value="salmon" label="Salmon" />
+			<option value="sandybrown" label="Sandybrown" />
+			<option value="seagreen" label="Seagreen" />
+			<option value="sienna" label="Sienna" />
+			<option value="skyblue" label="Skyblue" />
+			<option value="slategrey" label="Slategrey" />
+			<option value="snow" label="Snow" />
+			<option value="springgreen" label="Springgreen" />
+			<option value="steelblue" label="Steelblue" />
+			<option value="tan" label="Tan" />
+			<option value="thistle" label="Thistle" />
+			<option value="tomato" label="Tomato" />
+			<option value="violet" label="Violet" />
+			<option value="violetred1" label="Violetred1" />
+			<option value="violetred2" label="Violetred2" />
+			<option value="violetred3" label="Violetred3" />
+			<option value="violetred4" label="Violetred4" />
+			<option value="wheat" label="Wheat" />
+			<option value="yellow" label="Yellow" />
+			<option value="yellow1" label="Yellow1" />
+			<option value="yellow2" label="Yellow2" />
+			<option value="yellow3" label="Yellow3" />
+			<option value="yellow4" label="Yellow4" />
+			<option value="yellowgreen" label="Yellowgreen" />
+		</dropdown>
+	</dialog>
+</document>

Modified: trunk/rkward/rkward/plugins/plots/plot_options.php
===================================================================
--- trunk/rkward/rkward/plugins/plots/plot_options.php	2007-02-21 12:33:55 UTC (rev 1418)
+++ trunk/rkward/rkward/plugins/plots/plot_options.php	2007-02-21 13:48:34 UTC (rev 1419)
@@ -86,10 +86,7 @@
 	if (!empty ($type)) $type = ", type=\"" . $type . "\"";
 
 	//color of points / lines
-	$col = getRK_val ("pointcolor");
-	if (empty ($col)) $col = getRK_val ("default_pointcolor");
-	if (!empty ($col)) $col = ", col=\"" . $col . "\"";
-	
+	$col = getRK_val ("pointcolor.code.printout");
 
 	//add a main (on top) to the plot
 	$main = getRK_val ("main");

Modified: trunk/rkward/rkward/plugins/plots/plot_options.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/plot_options.xml	2007-02-21 12:33:55 UTC (rev 1418)
+++ trunk/rkward/rkward/plugins/plots/plot_options.xml	2007-02-21 13:48:34 UTC (rev 1419)
@@ -54,6 +54,8 @@
 		<connect client="aspectratio.visible" governor="allow_aspect"/>
 		<connect client="pointtypepage.visible" governor="allow_type"/>
 		<connect client="pointtype.string" governor="default_pointtype" />
+		
+		<connect client="pointcolor.default_color" governor="default_pointcolor" />
 	</logic>
 	<dialog label="Default plot options" >
 		<tabbook>
@@ -117,83 +119,8 @@
 					<option value="s" label="Step-function plots: the left edge defines the point" />
 					<option value="S" label="Step-function plots: the right edge defines the point" />
 				</dropdown>
-				<dropdown id="pointcolor" label="Color of points/lines">
-					<option value="" label="default" checked="true" />
-					<option value="azure" label="Azure" />
-					<option value="black" label="Black" />
-					<option value="blue" label="Blue" />
-					<option value="blue1" label="Blue1" />
-					<option value="blue2" label="Blue2" />
-					<option value="blue3" label="Blue3" />
-					<option value="blue4" label="Blue4" />
-					<option value="brown" label="Brown" />
-					<option value="cyan" label="Cyan" />
-					<option value="darkviolet" label="Darkviolet" />
-					<option value="gold" label="Gold" />
-					<option value="gray" label="Gray" />
-					<option value="gray1" label="Gray1" />
-					<option value="gray2" label="Gray2" />
-					<option value="gray3" label="Gray3" />
-					<option value="gray4" label="Gray4" />
-					<option value="green" label="Green" />
-					<option value="green1" label="Green1" />
-					<option value="green2" label="Green2" />
-					<option value="green3" label="Green3" />
-					<option value="green4" label="Green4" />
-					<option value="grey" label="Grey" />
-					<option value="grey1" label="Grey1" />
-					<option value="grey2" label="Grey2" />
-					<option value="grey3" label="Grey3" />
-					<option value="grey4" label="Grey4" />
-					<option value="lawngreen" label="Lawngreen" />
-					<option value="limegreen" label="Limegreen" />
-					<option value="linen" label="Linen" />
-					<option value="magenta" label="Magenta" />
-					<option value="magenta1" label="Magenta1" />
-					<option value="magenta2" label="Magenta2" />
-					<option value="magenta3" label="Magenta3" />
-					<option value="magenta4" label="Magenta4" />
-					<option value="mintcream" label="Mintcream" />
-					<option value="mistyrose" label="Mistyrose" />
-					<option value="navajowhite" label="Navajowhite" />
-					<option value="orange" label="Orange" />
-					<option value="orchid" label="Orchid" />
-					<option value="palegreen" label="Palegreen" />
-					<option value="papayawhip" label="Papayawhip" />
-					<option value="peachpuff" label="Peachpuff" />
-					<option value="pink" label="Pink" />
-					<option value="red" label="Red" />
-					<option value="red1" label="Red1" />
-					<option value="red2" label="Red1" />
-					<option value="red3" label="Red3" />
-					<option value="red4" label="Red4" />
-					<option value="royalblue" label="Royalblue" />
-					<option value="salmon" label="Salmon" />
-					<option value="sandybrown" label="Sandybrown" />
-					<option value="seagreen" label="Seagreen" />
-					<option value="sienna" label="Sienna" />
-					<option value="skyblue" label="Skyblue" />
-					<option value="slategrey" label="Slategrey" />
-					<option value="snow" label="Snow" />
-					<option value="springgreen" label="Springgreen" />
-					<option value="steelblue" label="Steelblue" />
-					<option value="tan" label="Tan" />
-					<option value="thistle" label="Thistle" />
-					<option value="tomato" label="Tomato" />
-					<option value="violet" label="Violet" />
-					<option value="violetred1" label="Violetred1" />
-					<option value="violetred2" label="Violetred2" />
-					<option value="violetred3" label="Violetred3" />
-					<option value="violetred4" label="Violetred4" />
-					<option value="wheat" label="Wheat" />
-					<option value="yellow" label="Yellow" />
-					<option value="yellow1" label="Yellow1" />
-					<option value="yellow2" label="Yellow2" />
-					<option value="yellow3" label="Yellow3" />
-					<option value="yellow4" label="Yellow4" />
-					<option value="yellowgreen" label="Yellowgreen" />
-				</dropdown>
-			<stretch/>
+				<embed id="pointcolor" component="rkward::color_chooser" label="Color" />
+				<stretch/>
 			</tab>
 			<tab id="aspectratio" label="Aspect ratio y/x">
 				<column>

Modified: trunk/rkward/rkward/plugins/plots.pluginmap
===================================================================
--- trunk/rkward/rkward/plugins/plots.pluginmap	2007-02-21 12:33:55 UTC (rev 1418)
+++ trunk/rkward/rkward/plugins/plots.pluginmap	2007-02-21 13:48:34 UTC (rev 1419)
@@ -10,7 +10,9 @@
 		<component type="standard" id="scatterplot" file="scatterplot.xml" label="Scatterplot" />
 		<component type="standard" id="scatterplot_matrix" file="scatterplot_matrix.xml" label="Scatterplot Matrix" />
 		<component type="standard" id="stripchart" file="stripchart_plot.xml" label="Stripchart" />
+
 		<component type="standard" id="plot_options" file="plot_options.xml" label="Plot Options" />
+		<component type="standard" id="color_chooser" file="color_chooser.xml" label="Color Chooser" />
 	</components>
 
 	<hierarchy>


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




More information about the rkward-tracker mailing list