diff options
author | jofret | 2009-05-18 07:51:02 +0000 |
---|---|---|
committer | jofret | 2009-05-18 07:51:02 +0000 |
commit | abdca53e9896cfda1db0621ccc8766597f913c1c (patch) | |
tree | 87791d177532debad740d0ac49ab4648f1e92915 /macros/sci2c_gui.sci | |
parent | 74dd0a50ac4ed71220fdcbd21d905b6de3392ade (diff) | |
download | scilab2c-abdca53e9896cfda1db0621ccc8766597f913c1c.tar.gz scilab2c-abdca53e9896cfda1db0621ccc8766597f913c1c.tar.bz2 scilab2c-abdca53e9896cfda1db0621ccc8766597f913c1c.zip |
Clean GUI
Diffstat (limited to 'macros/sci2c_gui.sci')
-rw-r--r-- | macros/sci2c_gui.sci | 163 |
1 files changed, 84 insertions, 79 deletions
diff --git a/macros/sci2c_gui.sci b/macros/sci2c_gui.sci index ab541d33..cfff829f 100644 --- a/macros/sci2c_gui.sci +++ b/macros/sci2c_gui.sci @@ -1,11 +1,11 @@ // // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab -// Copyright (C) 2009 - INRIA - Vincent COUVERT -// +// Copyright (C) 2009 - INRIA - Vincent COUVERT +// // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms -// are also available at +// are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt // @@ -37,7 +37,7 @@ uimenu("parent", h, "label", gettext("Sci2c help page"), "callback", "cb_sci2c_g uimenu("parent", h, "label", gettext("About SCI2C tools..."), "callback", "cb_sci2c_gui", "tag", "about_sci2c_menu"); figw = 500; -figh = 17*margin + btnh + 7*widgeth; +figh = 15*margin + btnh + 6*widgeth; sci2cfig.axes_size = [figw figh]; sci2cfig.auto_resize = "off"; sci2cfig.visible = "off"; // to be sure that no plot can appear in the window @@ -104,7 +104,7 @@ pathslabel = uicontrol("parent", sci2cfig,... "horizontalalignment", "left",... "fontname", defaultfont,... "fontunits", "points",... - "fontsize", 12); + "fontsize", 12); pathsradiowin = uicontrol("parent", sci2cfig,... "style", "radiobutton",... "string", gettext("Windows"),... @@ -115,9 +115,8 @@ pathsradiowin = uicontrol("parent", sci2cfig,... "fontsize", 12,... "min", 0, ... "max", 1, ... - "value", 1,... "callback", "cb_sci2c_gui",... - "tag", "pathsradiowin"); + "tag", "pathsradiowin"); pathsradiounix = uicontrol("parent", sci2cfig,... "style", "radiobutton",... "string", gettext("Unix"),... @@ -128,22 +127,28 @@ pathsradiounix = uicontrol("parent", sci2cfig,... "fontsize", 12,... "min", 0, ... "max", 1, ... - "value", 0,... - "callback", "cb_sci2c_gui",... - "tag", "pathsradiounix"); -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"); + "tag", "pathsradiounix"); +if MSDOS + set(pathsradiowin, "value", 1); + set(pathsradiounix, "value", 0); +else + set(pathsradiowin, "value", 0); + set(pathsradiounix, "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 ; @@ -154,7 +159,7 @@ sciintoclabel = uicontrol("parent", sci2cfig,... "horizontalalignment", "left",... "fontname", defaultfont,... "fontunits", "points",... - "fontsize", 12); + "fontsize", 12); sciintocradioyes = uicontrol("parent", sci2cfig,... "style", "radiobutton",... "string", gettext("Yes"),... @@ -167,7 +172,7 @@ sciintocradioyes = uicontrol("parent", sci2cfig,... "max", 1, ... "value", 0,... "callback", "cb_sci2c_gui",... - "tag", "sciintocradioyes"); + "tag", "sciintocradioyes"); sciintocradiono = uicontrol("parent", sci2cfig,... "style", "radiobutton",... "string", gettext("No"),... @@ -180,7 +185,7 @@ sciintocradiono = uicontrol("parent", sci2cfig,... "max", 1, ... "value", 1,... "callback", "cb_sci2c_gui",... - "tag", "sciintocradiono"); + "tag", "sciintocradiono"); // --- Run mode option --- runy = sciintocy + margin + widgeth; @@ -191,7 +196,7 @@ runlabel = uicontrol("parent", sci2cfig,... "horizontalalignment", "left",... "fontname", defaultfont,... "fontunits", "points",... - "fontsize", 12); + "fontsize", 12); runradioall = uicontrol("parent", sci2cfig,... "style", "radiobutton",... "string", gettext("All"),... @@ -202,9 +207,9 @@ runradioall = uicontrol("parent", sci2cfig,... "fontsize", 12,... "min", 0, ... "max", 1, ... - "value", 0,... + "value", 1,... "callback", "cb_sci2c_gui",... - "tag", "runradioall"); + "tag", "runradioall"); runradiotranslate = uicontrol("parent", sci2cfig,... "style", "radiobutton",... "string", gettext("Translate"),... @@ -217,7 +222,7 @@ runradiotranslate = uicontrol("parent", sci2cfig,... "max", 1, ... "value", 0,... "callback", "cb_sci2c_gui",... - "tag", "runradiotranslate"); + "tag", "runradiotranslate"); runradiogenlib = uicontrol("parent", sci2cfig,... "style", "radiobutton",... "string", gettext("Generate library"),... @@ -228,9 +233,9 @@ runradiogenlib = uicontrol("parent", sci2cfig,... "fontsize", 12,... "min", 0, ... "max", 1, ... - "value", 1,... + "value", 0,... "callback", "cb_sci2c_gui",... - "tag", "runradiogenlib"); + "tag", "runradiogenlib"); // ------------------------ // --- Output directory --- @@ -290,59 +295,59 @@ outbtn = uicontrol("parent", sci2cfig,... // ------------------------------- // Frame outframemaxy = optframemaxy + 2*margin + widgeth + margin; -headerframe = uicontrol("parent", sci2cfig,... - "relief", "groove",... - "style", "frame",... - "units", "pixels",... - "position", [margin outframemaxy+margin figw-2*margin widgeth+2*margin],... - "fontname", defaultfont,... - "fontunits", "points",... - "fontsize", 12,... - "fontweight", "bold", ... - "horizontalalignment", "center"); -// Frame title -headertitle = uicontrol("parent", sci2cfig,... - "style", "text",... - "string", gettext("Scilab library header"),... - "units", "pixels",... - "position", [2*margin outframemaxy+margin+widgeth+2*margin-8 110 14],... - "fontname", defaultfont,... - "fontunits", "points",... - "fontsize", 11,... - "horizontalalignment", "center"); -headerlabel = uicontrol("parent", sci2cfig,... - "style", "text",... - "string", gettext("File name: "),... - "position",[2*margin outframemaxy+2*margin-1 100 widgeth],... - "horizontalalignment", "left",... - "fontname", defaultfont,... - "fontunits", "points",... - "fontsize", 12); -headeredit = uicontrol("parent", sci2cfig,... - "style", "edit",... - "string", gettext("<enter a file name>"),... - "units", "pixels",... - "position",[3*margin+100 outframemaxy+2*margin-1 figw-6*margin-100-btnw widgeth],... - "fontname", defaultfont,... - "fontunits", "points",... - "fontsize", 12, ... - "tag", "headeredit"); -headerbtn = uicontrol("parent", sci2cfig,... - "backgroundcolor", [0.8 0.8 0.8],... - "style", "pushbutton",... - "string", gettext("Browse"),... - "position",[figw-2*margin-btnw outframemaxy+2*margin btnw btnh],... - "fontname", defaultfont,... - "fontunits", "points",... - "fontsize", 12,... - "callback", "cb_sci2c_gui",... - "tag", "headerbtn"); +// headerframe = uicontrol("parent", sci2cfig,... +// "relief", "groove",... +// "style", "frame",... +// "units", "pixels",... +// "position", [margin outframemaxy+margin figw-2*margin widgeth+2*margin],... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 12,... +// "fontweight", "bold", ... +// "horizontalalignment", "center"); +// // Frame title +// headertitle = uicontrol("parent", sci2cfig,... +// "style", "text",... +// "string", gettext("Scilab library header"),... +// "units", "pixels",... +// "position", [2*margin outframemaxy+margin+widgeth+2*margin-8 110 14],... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 11,... +// "horizontalalignment", "center"); +// headerlabel = uicontrol("parent", sci2cfig,... +// "style", "text",... +// "string", gettext("File name: "),... +// "position",[2*margin outframemaxy+2*margin-1 100 widgeth],... +// "horizontalalignment", "left",... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 12); +// headeredit = uicontrol("parent", sci2cfig,... +// "style", "edit",... +// "string", gettext("<enter a file name>"),... +// "units", "pixels",... +// "position",[3*margin+100 outframemaxy+2*margin-1 figw-6*margin-100-btnw widgeth],... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 12, ... +// "tag", "headeredit"); +// headerbtn = uicontrol("parent", sci2cfig,... +// "backgroundcolor", [0.8 0.8 0.8],... +// "style", "pushbutton",... +// "string", gettext("Browse"),... +// "position",[figw-2*margin-btnw outframemaxy+2*margin btnw btnh],... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 12,... +// "callback", "cb_sci2c_gui",... +// "tag", "headerbtn"); // ------------------------- // --- File(s) selection --- // ------------------------- // Frame -headerframemaxy = outframemaxy + 2*margin + widgeth + margin; +headerframemaxy = outframemaxy //+ 2*margin + widgeth + margin; selframe = uicontrol("parent", sci2cfig,... "relief", "groove",... "style", "frame",... |