summaryrefslogtreecommitdiff
path: root/macros/sci2c_gui.sci
diff options
context:
space:
mode:
authorjofret2010-03-31 17:00:57 +0000
committerjofret2010-03-31 17:00:57 +0000
commita3b4b0e16e7952753110c81a95e46de4524b77e7 (patch)
tree9388d48463b91e9fb745b50fab373f025e1b11ac /macros/sci2c_gui.sci
parent96ee205f2f547111fd91209de835bf5c82842388 (diff)
downloadscilab2c-a3b4b0e16e7952753110c81a95e46de4524b77e7.tar.gz
scilab2c-a3b4b0e16e7952753110c81a95e46de4524b77e7.tar.bz2
scilab2c-a3b4b0e16e7952753110c81a95e46de4524b77e7.zip
Add capability to generate Makefile or Makefile.mak
Diffstat (limited to 'macros/sci2c_gui.sci')
-rw-r--r--macros/sci2c_gui.sci76
1 files changed, 32 insertions, 44 deletions
diff --git a/macros/sci2c_gui.sci b/macros/sci2c_gui.sci
index fca04fb8..aaae2ac2 100644
--- a/macros/sci2c_gui.sci
+++ b/macros/sci2c_gui.sci
@@ -13,6 +13,7 @@ function sci2c_gui()
// Sizes
widgeth = 20;
+widgetLabelWidth = 220;
btnh = 22;
btnw = 80;
defaultfont = "arial";
@@ -36,8 +37,8 @@ h = uimenu("parent", sci2cfig, "label", gettext("?"));
uimenu("parent", h, "label", gettext("Sci2c help page"), "callback", "cb_sci2c_gui", "tag", "sci2c_help_menu");
uimenu("parent", h, "label", gettext("About SCI2C tools..."), "callback", "cb_sci2c_gui", "tag", "about_sci2c_menu");
-figw = 500;
-figh = 15*margin + btnh + 6*widgeth;
+figw = 800;
+figh = 15*margin + btnh + 7*widgeth;
sci2cfig.axes_size = [figw figh];
sci2cfig.auto_resize = "off";
sci2cfig.visible = "off"; // to be sure that no plot can appear in the window
@@ -78,7 +79,7 @@ optframe = uicontrol("parent", sci2cfig,...
"relief", "groove",...
"style", "frame",...
"units", "pixels",...
- "position", [margin 2*margin+btnh figw-2*margin 4*margin+3*widgeth],...
+ "position", [margin 2*margin+btnh figw-2*margin 4*margin+4*widgeth],...
"fontname", defaultfont,...
"fontunits", "points",...
"fontsize", 12,...
@@ -89,26 +90,26 @@ opttitle = uicontrol("parent", sci2cfig,...
"style", "text",...
"string", gettext("Options"),...
"units", "pixels",...
- "position", [2*margin 2*margin+btnh+4*margin+3*widgeth-8 50 14],...
+ "position", [2*margin 2*margin+btnh+4*margin+4*widgeth-8 50 14],...
"fontname", defaultfont,...
"fontunits", "points",...
"fontsize", 11,...
"horizontalalignment", "center");
-// --- Paths style ---
-pathsy = 2*margin+btnh+margin;
-pathslabel = uicontrol("parent", sci2cfig,...
+// --- Building Tool ---
+buildtooly = 2 * margin + 2 * btnh + margin;
+buildtoollabel = uicontrol("parent", sci2cfig,...
"style", "text",...
- "string", gettext("Paths style in C code: "),...
- "position",[2*margin pathsy 160 widgeth],...
+ "string", gettext("Tool to compile generated C code: "),...
+ "position",[2*margin buildtooly widgetLabelWidth widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
"fontsize", 12);
-pathsradiowin = uicontrol("parent", sci2cfig,...
+buildtoolradiowin = uicontrol("parent", sci2cfig,...
"style", "radiobutton",...
- "string", gettext("Windows"),...
- "position",[2*margin+160 pathsy radiow widgeth],...
+ "string", gettext("nmake for Windows with Visual Studio / Visual Express"),...
+ "position",[2*margin+widgetLabelWidth buildtooly 5 * radiow widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -116,11 +117,11 @@ pathsradiowin = uicontrol("parent", sci2cfig,...
"min", 0, ...
"max", 1, ...
"callback", "cb_sci2c_gui",...
- "tag", "pathsradiowin");
-pathsradiounix = uicontrol("parent", sci2cfig,...
+ "tag", "buildtoolradiowin");
+buildtoolradiounix = uicontrol("parent", sci2cfig,...
"style", "radiobutton",...
- "string", gettext("Unix"),...
- "position",[2*margin+160+radiow pathsy radiow widgeth],...
+ "string", gettext("make for Unix / Windows with Cygwin"),...
+ "position",[2*margin+widgetLabelWidth buildtooly-widgeth 5 * radiow widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -128,34 +129,21 @@ pathsradiounix = uicontrol("parent", sci2cfig,...
"min", 0, ...
"max", 1, ...
"callback", "cb_sci2c_gui",...
- "tag", "pathsradiounix");
+ "tag", "buildtoolradiounix");
if MSDOS
- set(pathsradiowin, "value", 1);
- set(pathsradiounix, "value", 0);
+ set(buildtoolradiowin, "value", 1);
+ set(buildtoolradiounix, "value", 0);
else
- set(pathsradiowin, "value", 0);
- set(pathsradiounix, "value", 1);
+ set(buildtoolradiowin, "value", 0);
+ set(buildtoolradiounix, "value", 1);
end
-// pathsradiocygwin = uicontrol("parent", sci2cfig,...
-// "style", "radiobutton",...
-// "string", gettext("Cygwin"),...
-// "position",[2*margin+160+2*radiow pathsy radiow widgeth],...
-// "horizontalalignment", "left",...
-// "fontname", defaultfont,...
-// "fontunits", "points",...
-// "fontsize", 12,...
-// "min", 0, ...
-// "max", 1, ...
-// "value", 0,...
-// "callback", "cb_sci2c_gui",...
-// "tag", "pathsradiocygwin");
// --- Copy Scilab code into C option ---
-sciintocy = pathsy + margin + btnh ;
+sciintocy = buildtooly + margin + btnh ;
sciintoclabel = uicontrol("parent", sci2cfig,...
"style", "text",...
"string", gettext("Copy Scilab code into C: "),...
- "position",[2*margin sciintocy 160 widgeth],...
+ "position",[2*margin sciintocy widgetLabelWidth widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -163,7 +151,7 @@ sciintoclabel = uicontrol("parent", sci2cfig,...
sciintocradioyes = uicontrol("parent", sci2cfig,...
"style", "radiobutton",...
"string", gettext("Yes"),...
- "position",[2*margin+160 sciintocy radiow widgeth],...
+ "position",[2*margin+widgetLabelWidth sciintocy radiow widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -176,7 +164,7 @@ sciintocradioyes = uicontrol("parent", sci2cfig,...
sciintocradiono = uicontrol("parent", sci2cfig,...
"style", "radiobutton",...
"string", gettext("No"),...
- "position",[2*margin+160+radiow sciintocy radiow widgeth],...
+ "position",[2*margin+widgetLabelWidth+radiow sciintocy radiow widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -192,7 +180,7 @@ runy = sciintocy + margin + widgeth;
runlabel = uicontrol("parent", sci2cfig,...
"style", "text",...
"string", gettext("Run mode: "),...
- "position",[2*margin runy 160 widgeth],...
+ "position",[2*margin runy widgetLabelWidth widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -200,7 +188,7 @@ runlabel = uicontrol("parent", sci2cfig,...
runradioall = uicontrol("parent", sci2cfig,...
"style", "radiobutton",...
"string", gettext("All"),...
- "position",[2*margin+160 runy radiow widgeth],...
+ "position",[2*margin+widgetLabelWidth runy radiow widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -213,7 +201,7 @@ runradioall = uicontrol("parent", sci2cfig,...
runradiotranslate = uicontrol("parent", sci2cfig,...
"style", "radiobutton",...
"string", gettext("Translate"),...
- "position",[2*margin+160+radiow runy radiow widgeth],...
+ "position",[2*margin+widgetLabelWidth+radiow runy radiow widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -226,7 +214,7 @@ runradiotranslate = uicontrol("parent", sci2cfig,...
runradiogenlib = uicontrol("parent", sci2cfig,...
"style", "radiobutton",...
"string", gettext("Generate library"),...
- "position",[2*margin+160+2*radiow runy 120 widgeth],...
+ "position",[2*margin+widgetLabelWidth+2*radiow runy 120 widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -241,7 +229,7 @@ runradiogenlib = uicontrol("parent", sci2cfig,...
// --- Output directory ---
// ------------------------
// Frame
-optframemaxy = 2*margin+btnh + 4*margin+3*widgeth;
+optframemaxy = 2*margin+btnh + 4*margin+4*widgeth;
outframe = uicontrol("parent", sci2cfig,...
"relief", "groove",...
"style", "frame",...
@@ -272,7 +260,7 @@ outlabel = uicontrol("parent", sci2cfig,...
"fontsize", 12);
outedit = uicontrol("parent", sci2cfig,...
"style", "edit",...
- "string", pwd(),...
+ "string", TMPDIR,...
"units", "pixels",...
"position",[3*margin+100 optframemaxy+2*margin-1 figw-6*margin-100-btnw widgeth],...
"fontname", defaultfont,...