separate JVM start and SwingView register at scilab start in mn mode 75/18875/2
Antoine ELIAS [Thu, 12 Jan 2017 15:06:51 +0000 (16:06 +0100)]
Change-Id: I4678b387ec6c36a79877ccae9472b56ecb041348

19 files changed:
scilab/bin/scilab
scilab/modules/core/includes/InitScilab.h
scilab/modules/core/src/c/core.vcxproj
scilab/modules/core/src/cpp/InitScilab.cpp
scilab/modules/core/src/java/org/scilab/modules/core/Scilab.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/uicontrol/Uicontrol.java
scilab/modules/graphics/src/c/getHandleProperty/set_constraints_property.c
scilab/modules/gui/Makefile.am
scilab/modules/gui/Makefile.in
scilab/modules/gui/includes/InitializeGUI.h
scilab/modules/gui/src/c/gui.vcxproj
scilab/modules/gui/src/c/gui.vcxproj.filters
scilab/modules/gui/src/c/messageboxoptions.h
scilab/modules/gui/src/cpp/InitializeGUI.cpp [moved from scilab/modules/gui/src/c/InitializeGUI.c with 79% similarity]
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/CallScilabBridge.java
scilab/modules/gui/src/jni/CallScilabBridge.cpp
scilab/modules/gui/src/jni/CallScilabBridge.giws.xml
scilab/modules/gui/src/jni/CallScilabBridge.hxx
scilab/modules/startup/src/cpp/scilab.cpp

index 17e7d3e..8bcc9d7 100755 (executable)
@@ -1109,7 +1109,7 @@ if test "$rest" = "yes"; then
                     exit 5
                 fi
                 ;;
-            --parse-trace|--pretty-print|--help|--AST-trace|--no-exec|--context-dump|--exec-verbose|--timed|--AST-timed|--serialize|-quit)
+            --parse-trace|--pretty-print|--help|--AST-trace|--no-exec|--context-dump|--exec-verbose|--timed|--AST-timed|--serialize|-quit|--webmode)
            #This are Scilab6 dedicated options.
                    ;;
             --timeout)
index 88fce67..ca1ad59 100644 (file)
@@ -48,6 +48,7 @@ typedef struct
     int iForceQuit;
     int iTimeoutDelay;
     int iCodeAction;
+    int iWebMode;
     enum command_origin_t iCommandOrigin;
 } ScilabEngineInfo;
 
index 76ccfed..a1d85cb 100644 (file)
@@ -80,7 +80,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../hdf5/includes;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../hdf5/includes;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
@@ -120,7 +120,7 @@ cd ..
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../hdf5/includes;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../hdf5/includes;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
@@ -158,7 +158,7 @@ cd ..
     <ClCompile>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../hdf5/includes;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../hdf5/includes;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -203,7 +203,7 @@ cd ..
     <ClCompile>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../hdf5/includes;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../hdf5/includes;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
index cad16c2..086cc6f 100644 (file)
@@ -248,7 +248,7 @@ int StartScilabEngine(ScilabEngineInfo* _pSEI)
     {
         InitializeTclTk();
         InitializeJVM();
-        InitializeGUI();
+        InitializeGUI(_pSEI->iWebMode == 0 ? TRUE : FALSE);
 
         /* create needed data structure if not already created */
         loadGraphicModule();
index 7bbf96c..5e790a9 100644 (file)
@@ -125,7 +125,10 @@ public class Scilab {
          * they must be set before creating GUI
          */
         setJOGLFlags();
-        SwingView.registerSwingView();
+        /* Mode GUI */
+        if(mode == 2) {
+            SwingView.registerSwingView();
+        }
 
         /*
          * if not API mode
index 79dac44..a4aa7b5 100644 (file)
@@ -434,6 +434,13 @@ public class Uicontrol extends GraphicObject {
     protected static final String DEFAULT_FONTANGLE = "normal";
     private static final String STRING_SEPARATOR = "|";
 
+    /*default font properties*/
+    private static String defaultFontName = "";
+    private static String defaultFontWeight = "";
+    private static double defaultFontSize = 0;
+    private static String defaultFontAngle = "";
+    private static String defaultFontUnits = "";
+    
     private UicontrolStyle style;
     private Double[] backgroundColor = { -1.0, -1.0, -1.0};
     private Boolean enable = true;
@@ -1730,19 +1737,42 @@ public class Uicontrol extends GraphicObject {
             return;
         }
 
-        setFontName(font.getName());
-        setFontSize(font.getSize());
-
-        if (font.isItalic()) {
-            setFontAngle("italic");
+        if(getDefaultFontName().equals("")) {
+            setFontName(font.getName());
         } else {
-            setFontAngle("normal");
+            setFontName(getDefaultFontName());
         }
-
-        if (font.isBold()) {
-            setFontWeight("bold");
+        
+        if(getDefaultFontSize() == 0) {
+            setFontSize(font.getSize());
+        } else {
+            setFontSize(getDefaultFontSize());
+        }
+        
+        
+        if(getDefaultFontAngle().equals("")) {
+            if (font.isItalic()) {
+                setFontAngle("italic");
+            } else {
+                setFontAngle("normal");
+            }
         } else {
-            setFontWeight("normal");
+            setFontAngle(getDefaultFontAngle());
+        }
+        
+        
+        if(getDefaultFontWeight().equals("")) {
+            if (font.isBold()) {
+                setFontWeight("bold");
+            } else {
+                setFontWeight("normal");
+            }
+        } else {
+            setFontWeight(getDefaultFontWeight());
+        }
+        
+        if(getDefaultFontUnits().equals("") == false) {
+            setFontUnits(getDefaultFontUnits());
         }
     }
 
@@ -1777,4 +1807,60 @@ public class Uicontrol extends GraphicObject {
 
     public void accept(Visitor visitor) {
     }
+
+    /*
+    private static String defaultFontName = "";
+    */
+    public static void setDefaultFontName(String name) {
+        defaultFontName = name;
+    }
+
+    public static String getDefaultFontName() {
+        return defaultFontName;
+    }
+
+    /*
+    private static String defaultFontWeight = "";
+    */
+    public static void setDefaultFontWeight(String weight) {
+        defaultFontWeight = weight;
+    }
+
+    public static String getDefaultFontWeight() {
+        return defaultFontWeight;
+    }
+
+    /*
+    private static double defaultFontSize = 0;
+    */
+    public static void setDefaultFontSize(double size) {
+        defaultFontSize = size;
+    }
+
+    public static double getDefaultFontSize() {
+        return defaultFontSize;
+    }
+
+    /*
+    private static String defaultFontAngle = "";
+    */
+    public static void setDefaultFontAngle(String angle) {
+        defaultFontAngle = angle;
+    }
+
+    public static String getDefaultFontAngle() {
+        return defaultFontAngle;
+    }
+
+    /*
+    private static String defaultFontUnits = "";
+    */
+    public static void setDefaultFontUnits(String units) {
+        defaultFontUnits = units;
+    }
+
+    public static String getDefaultFontUnits() {
+        return defaultFontUnits;
+    }
+
 }
index 30190d9..0bd6299 100644 (file)
@@ -155,8 +155,8 @@ int set_constraints_property(void* _pvCtx, int iObjUID, void* _pvData, int value
             piPreferredSize[0] = (int)pdblPreferredSize[0];
             piPreferredSize[1] = (int)pdblPreferredSize[1];
 
-            setGraphicObjectProperty(iObjUID, __GO_UI_BORDER_POSITION__, &iPos, jni_int, 1);
             setGraphicObjectProperty(iObjUID, __GO_UI_BORDER_PREFERREDSIZE__, piPreferredSize, jni_int_vector, 2);
+            setGraphicObjectProperty(iObjUID, __GO_UI_BORDER_POSITION__, &iPos, jni_int, 1);
         }
         else if (strcmp(pstType, "GridConstraints") == 0)
         {
@@ -358,12 +358,12 @@ int set_constraints_property(void* _pvCtx, int iObjUID, void* _pvData, int value
             piPreferredSize[0] = (int)pdblPreferredSize[0];
             piPreferredSize[1] = (int)pdblPreferredSize[1];
 
-            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_GRID__, piGrid, jni_int_vector, 4);
-            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_WEIGHT__, pdblWeight, jni_double_vector, 2);
-            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_FILL__, &iFill, jni_int, 1);
-            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_ANCHOR__, &iAnchor, jni_int, 1);
-            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_PADDING__, piPadding, jni_int_vector, 2);
             setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_PREFERREDSIZE__, piPreferredSize, jni_int_vector, 2);
+            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_PADDING__, piPadding, jni_int_vector, 2);
+            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_ANCHOR__, &iAnchor, jni_int, 1);
+            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_FILL__, &iFill, jni_int, 1);
+            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_WEIGHT__, pdblWeight, jni_double_vector, 2);
+            setGraphicObjectProperty(iObjUID, __GO_UI_GRIDBAG_GRID__, piGrid, jni_int_vector, 4);
         }
         else
         {
index 187e32e..2a06ddd 100644 (file)
@@ -53,7 +53,6 @@ MACROSDIRSEXT = macros/tree
 GUI_C_SOURCES = \
     src/c/buildMainWindowTitle.c \
     src/c/getMainWindowTitle.c \
-    src/c/InitializeGUI.c \
     src/c/setMainWindowTitle.c \
     src/c/addmenu.c \
     src/c/CreateUimenu.c \
@@ -63,6 +62,7 @@ GUI_C_SOURCES = \
     src/jni/ScilabTermination_wrap.c
 
 GUI_CXX_SOURCES = \
+    src/cpp/InitializeGUI.cpp \
     src/cpp/InitUIMenu.cpp \
     src/jni/CallScilabBridge.cpp \
     src/cpp/CreateUIControl.cpp \
index b32fa27..790b74b 100644 (file)
@@ -186,7 +186,6 @@ libscigui_algo_la_LIBADD =
 am__dirstamp = $(am__leading_dot)dirstamp
 am__objects_1 = src/c/libscigui_algo_la-buildMainWindowTitle.lo \
        src/c/libscigui_algo_la-getMainWindowTitle.lo \
-       src/c/libscigui_algo_la-InitializeGUI.lo \
        src/c/libscigui_algo_la-setMainWindowTitle.lo \
        src/c/libscigui_algo_la-addmenu.lo \
        src/c/libscigui_algo_la-CreateUimenu.lo \
@@ -194,7 +193,8 @@ am__objects_1 = src/c/libscigui_algo_la-buildMainWindowTitle.lo \
        src/c/libscigui_algo_la-messageboxoptions.lo \
        src/c/libscigui_algo_la-ScilabTermination.lo \
        src/jni/libscigui_algo_la-ScilabTermination_wrap.lo
-am__objects_2 = src/cpp/libscigui_algo_la-InitUIMenu.lo \
+am__objects_2 = src/cpp/libscigui_algo_la-InitializeGUI.lo \
+       src/cpp/libscigui_algo_la-InitUIMenu.lo \
        src/jni/libscigui_algo_la-CallScilabBridge.lo \
        src/cpp/libscigui_algo_la-CreateUIControl.lo \
        src/jni/libscigui_algo_la-Jxclick.lo \
@@ -708,6 +708,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -753,7 +754,6 @@ MACROSDIRSEXT = macros/tree
 GUI_C_SOURCES = \
     src/c/buildMainWindowTitle.c \
     src/c/getMainWindowTitle.c \
-    src/c/InitializeGUI.c \
     src/c/setMainWindowTitle.c \
     src/c/addmenu.c \
     src/c/CreateUimenu.c \
@@ -763,6 +763,7 @@ GUI_C_SOURCES = \
     src/jni/ScilabTermination_wrap.c
 
 GUI_CXX_SOURCES = \
+    src/cpp/InitializeGUI.cpp \
     src/cpp/InitUIMenu.cpp \
     src/jni/CallScilabBridge.cpp \
     src/cpp/CreateUIControl.cpp \
@@ -1281,8 +1282,6 @@ src/c/libscigui_algo_la-buildMainWindowTitle.lo:  \
        src/c/$(am__dirstamp) src/c/$(DEPDIR)/$(am__dirstamp)
 src/c/libscigui_algo_la-getMainWindowTitle.lo: src/c/$(am__dirstamp) \
        src/c/$(DEPDIR)/$(am__dirstamp)
-src/c/libscigui_algo_la-InitializeGUI.lo: src/c/$(am__dirstamp) \
-       src/c/$(DEPDIR)/$(am__dirstamp)
 src/c/libscigui_algo_la-setMainWindowTitle.lo: src/c/$(am__dirstamp) \
        src/c/$(DEPDIR)/$(am__dirstamp)
 src/c/libscigui_algo_la-addmenu.lo: src/c/$(am__dirstamp) \
@@ -1309,6 +1308,8 @@ src/cpp/$(am__dirstamp):
 src/cpp/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) src/cpp/$(DEPDIR)
        @: > src/cpp/$(DEPDIR)/$(am__dirstamp)
+src/cpp/libscigui_algo_la-InitializeGUI.lo: src/cpp/$(am__dirstamp) \
+       src/cpp/$(DEPDIR)/$(am__dirstamp)
 src/cpp/libscigui_algo_la-InitUIMenu.lo: src/cpp/$(am__dirstamp) \
        src/cpp/$(DEPDIR)/$(am__dirstamp)
 src/jni/libscigui_algo_la-CallScilabBridge.lo:  \
@@ -1728,7 +1729,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_x_dialog.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_x_mdialog.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscigui_algo_la-CreateUimenu.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscigui_algo_la-InitializeGUI.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscigui_algo_la-ScilabTermination.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscigui_algo_la-addmenu.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscigui_algo_la-buildMainWindowTitle.Plo@am__quote@
@@ -1773,6 +1773,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libscigui_algo_la-GetUiobjectEnable.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libscigui_algo_la-GetUiobjectForegroundColor.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libscigui_algo_la-InitUIMenu.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libscigui_algo_la-InitializeGUI.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libscigui_algo_la-SetConsoleShowHiddenHandles.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libscigui_algo_la-SetUicontrolBackgroundColor.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libscigui_algo_la-SetUicontrolFontAngle.Plo@am__quote@
@@ -1858,13 +1859,6 @@ src/c/libscigui_algo_la-getMainWindowTitle.lo: src/c/getMainWindowTitle.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscigui_algo_la-getMainWindowTitle.lo `test -f 'src/c/getMainWindowTitle.c' || echo '$(srcdir)/'`src/c/getMainWindowTitle.c
 
-src/c/libscigui_algo_la-InitializeGUI.lo: src/c/InitializeGUI.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscigui_algo_la-InitializeGUI.lo -MD -MP -MF src/c/$(DEPDIR)/libscigui_algo_la-InitializeGUI.Tpo -c -o src/c/libscigui_algo_la-InitializeGUI.lo `test -f 'src/c/InitializeGUI.c' || echo '$(srcdir)/'`src/c/InitializeGUI.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscigui_algo_la-InitializeGUI.Tpo src/c/$(DEPDIR)/libscigui_algo_la-InitializeGUI.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/c/InitializeGUI.c' object='src/c/libscigui_algo_la-InitializeGUI.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscigui_algo_la-InitializeGUI.lo `test -f 'src/c/InitializeGUI.c' || echo '$(srcdir)/'`src/c/InitializeGUI.c
-
 src/c/libscigui_algo_la-setMainWindowTitle.lo: src/c/setMainWindowTitle.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscigui_algo_la-setMainWindowTitle.lo -MD -MP -MF src/c/$(DEPDIR)/libscigui_algo_la-setMainWindowTitle.Tpo -c -o src/c/libscigui_algo_la-setMainWindowTitle.lo `test -f 'src/c/setMainWindowTitle.c' || echo '$(srcdir)/'`src/c/setMainWindowTitle.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscigui_algo_la-setMainWindowTitle.Tpo src/c/$(DEPDIR)/libscigui_algo_la-setMainWindowTitle.Plo
@@ -2064,6 +2058,13 @@ sci_gateway/c/libscigui_la-sci_figure.lo: sci_gateway/c/sci_figure.c
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
+src/cpp/libscigui_algo_la-InitializeGUI.lo: src/cpp/InitializeGUI.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libscigui_algo_la-InitializeGUI.lo -MD -MP -MF src/cpp/$(DEPDIR)/libscigui_algo_la-InitializeGUI.Tpo -c -o src/cpp/libscigui_algo_la-InitializeGUI.lo `test -f 'src/cpp/InitializeGUI.cpp' || echo '$(srcdir)/'`src/cpp/InitializeGUI.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libscigui_algo_la-InitializeGUI.Tpo src/cpp/$(DEPDIR)/libscigui_algo_la-InitializeGUI.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/InitializeGUI.cpp' object='src/cpp/libscigui_algo_la-InitializeGUI.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libscigui_algo_la-InitializeGUI.lo `test -f 'src/cpp/InitializeGUI.cpp' || echo '$(srcdir)/'`src/cpp/InitializeGUI.cpp
+
 src/cpp/libscigui_algo_la-InitUIMenu.lo: src/cpp/InitUIMenu.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libscigui_algo_la-InitUIMenu.lo -MD -MP -MF src/cpp/$(DEPDIR)/libscigui_algo_la-InitUIMenu.Tpo -c -o src/cpp/libscigui_algo_la-InitUIMenu.lo `test -f 'src/cpp/InitUIMenu.cpp' || echo '$(srcdir)/'`src/cpp/InitUIMenu.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libscigui_algo_la-InitUIMenu.Tpo src/cpp/$(DEPDIR)/libscigui_algo_la-InitUIMenu.Plo
index 0f18848..46b259b 100644 (file)
@@ -18,7 +18,7 @@
 #include "BOOL.h"
 #include "dynlib_gui.h"
 
-GUI_IMPEXP BOOL InitializeGUI(void);
+GUI_IMPEXP BOOL InitializeGUI(BOOL);
 
 #endif /* __INTIALIZEGUI_H__ */
 /*--------------------------------------------------------------------------*/
index 483f7dd..b70aeb3 100755 (executable)
     <ClCompile Include="..\cpp\GetConsoleShowHiddenHandles.cpp" />
     <ClCompile Include="..\cpp\GetUicontrolIcon.cpp" />
     <ClCompile Include="..\cpp\GetUicontrolTooltipString.cpp" />
+    <ClCompile Include="..\cpp\InitializeGUI.cpp" />
     <ClCompile Include="..\cpp\SetConsoleShowHiddenHandles.cpp" />
     <ClCompile Include="..\cpp\SetUicontrolIcon.cpp" />
     <ClCompile Include="..\jni\DatatipCreate.cpp" />
     <ClCompile Include="..\cpp\GetUiobjectEnable.cpp" />
     <ClCompile Include="..\cpp\GetUiobjectForegroundColor.cpp" />
     <ClCompile Include="iconifyMainWindow.c" />
-    <ClCompile Include="InitializeGUI.c" />
     <ClCompile Include="..\cpp\InitUIMenu.cpp" />
     <ClCompile Include="..\jni\Juigetfile.cpp" />
     <ClCompile Include="..\jni\Jxclick.cpp" />
index 1389cc3..d25bcc0 100755 (executable)
     <ClCompile Include="iconifyMainWindow.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="InitializeGUI.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\cpp\InitUIMenu.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\sci_gateway\cpp\sci_helpbrowser.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\cpp\InitializeGUI.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="core_import.def">
index 904d2cb..c0385b5 100644 (file)
 #ifndef __MESSAGEBOXOPTIONS_H__
 #define __MESSAGEBOXOPTIONS_H__
 
+#include "dynlib_gui.h"
 /**
  * Verify the argument string is "modal" or "non-modal"
  *
  * @param option the string to test
  * @return 1 is the string matches "modal" or "non-modal"
  */
-int isModalOption(char *option);
+GUI_IMPEXP int isModalOption(char *option);
 
 /**
  * Verify the argument string is an icon name
@@ -31,6 +32,6 @@ int isModalOption(char *option);
  * @param option the string to test
  * @return 1 is the string matches an icon name
  */
-int isIconName(char *name);
+GUI_IMPEXP int isIconName(char *name);
 
 #endif /* ! __MESSAGEBOXOPTIONS_H__ */
similarity index 79%
rename from scilab/modules/gui/src/c/InitializeGUI.c
rename to scilab/modules/gui/src/cpp/InitializeGUI.cpp
index 4668466..fab212e 100644 (file)
  *
  */
 
-#include <stdlib.h>
+#include "CallScilabBridge.hxx"
+
+extern "C"
+{
 #include "InitializeGUI.h"
 #include "configvariable_interface.h"
-#include "setMainWindowTitle.h"
-#include "sci_malloc.h"
-#include "buildMainWindowTitle.h"
+#include "getScilabJavaVM.h"
 #ifdef _MSC_VER
 #include "WindowShow.h"
 #endif
-
+}
 /*--------------------------------------------------------------------------*/
-BOOL InitializeGUI(void)
+BOOL InitializeGUI(BOOL swingView)
 {
     if (getScilabMode() == SCILAB_STD)
     {
 
-        // TODO why this line since already done above
-        // createSwingView();
 #ifdef _MSC_VER
         WindowShow();
 #endif
     }
     else
     {
+        if (swingView)
+        {
+            org_scilab_modules_gui_bridge::CallScilabBridge::registerSwingView(getScilabJavaVM());
+        }
         return TRUE;
     }
 
index 3dc32c4..8daddd9 100644 (file)
@@ -1360,4 +1360,8 @@ public class CallScilabBridge {
         SwingScilabDockablePanel parentTab = (SwingScilabDockablePanel) SwingView.getFromId(figUID);
         ClosingOperationsManager.removeFromDunnoList(parentTab);
     }
+    
+    public static void registerSwingView() {
+        SwingView.registerSwingView();
+    }
 }
index f114460..7008269 100644 (file)
@@ -9,14 +9,31 @@ This is generated code.
 This software is a computer program whose purpose is to hide the complexity
 of accessing Java objects/methods from C++ code.
 
-Copyright (C) 2012 - 2016 - Scilab Enterprises
-
-This file is hereby licensed under the terms of the GNU GPL v2.0,
-pursuant to article 5.3.4 of the CeCILL v.2.1.
-This file was originally licensed under the terms of the CeCILL v2.1,
-and continues to be available under such terms.
-For more information, see the COPYING file which you should have received
-along with this program.
+This software is governed by the CeCILL-B license under French law and
+abiding by the rules of distribution of free software.  You can  use,
+modify and/ or redistribute the software under the terms of the CeCILL-B
+license as circulated by CEA, CNRS and INRIA at the following URL
+"http://www.cecill.info".
+
+As a counterpart to the access to the source code and  rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty  and the software's author,  the holder of the
+economic rights,  and the successive licensors  have only  limited
+liability.
+
+In this respect, the user's attention is drawn to the risks associated
+with loading,  using,  modifying and/or developing or reproducing the
+software by the user in light of its specific status of free software,
+that may mean  that it is complicated to manipulate,  and  that  also
+therefore means  that it is reserved for developers  and  experienced
+professionals having in-depth computer knowledge. Users are therefore
+encouraged to load and test the software's suitability as regards their
+requirements in conditions enabling the security of their systems and/or
+data to be ensured and,  more generally, to use and operate it in the
+same conditions as regards security.
+
+The fact that you are presently reading this means that you have had
+knowledge of the CeCILL-B license and that you accept its terms.
 */
 
 namespace org_scilab_modules_gui_bridge {
@@ -77,7 +94,7 @@ localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ;
 if(localInstance == NULL){
 throw GiwsException::JniObjectCreationException(curEnv, this->className());
 }
+
 this->instance = curEnv->NewGlobalRef(localInstance) ;
 if(this->instance == NULL){
 throw GiwsException::JniObjectCreationException(curEnv, this->className());
@@ -147,6 +164,7 @@ voiduseCanvasForDisplayjbooleanbooleanID=NULL;
 jbooleanuseCanvasForDisplayID=NULL;
 voidscilabAboutBoxID=NULL;
 voidfireClosingFinishedjintintID=NULL;
+voidregisterSwingViewID=NULL;
 
 
 }
@@ -230,6 +248,7 @@ voiduseCanvasForDisplayjbooleanbooleanID=NULL;
 jbooleanuseCanvasForDisplayID=NULL;
 voidscilabAboutBoxID=NULL;
 voidfireClosingFinishedjintintID=NULL;
+voidregisterSwingViewID=NULL;
 
 
 }
@@ -366,7 +385,7 @@ delete[] myStringBuffer;
                                 throw GiwsException::JniCallMethodException(curEnv);
 }
 return myStringBuffer;
- } else { 
+ } else {
 curEnv->DeleteLocalRef(res);
 return NULL;
 }
@@ -733,7 +752,7 @@ delete[] arrayOfString;
 }
 curEnv->DeleteLocalRef(res);
 return arrayOfString;
- } else { 
+ } else {
 curEnv->DeleteLocalRef(res);
 return NULL;
 }
@@ -1308,7 +1327,7 @@ delete[] myStringBuffer;
                                 throw GiwsException::JniCallMethodException(curEnv);
 }
 return myStringBuffer;
- } else { 
+ } else {
 curEnv->DeleteLocalRef(res);
 return NULL;
 }
@@ -1551,7 +1570,7 @@ delete[] myStringBuffer;
                                 throw GiwsException::JniCallMethodException(curEnv);
 }
 return myStringBuffer;
- } else { 
+ } else {
 curEnv->DeleteLocalRef(res);
 return NULL;
 }
@@ -1993,4 +2012,24 @@ throw GiwsException::JniCallMethodException(curEnv);
 }
 }
 
+void CallScilabBridge::registerSwingView (JavaVM * jvm_){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = initClass(curEnv);
+if ( cls == NULL) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+
+static jmethodID voidregisterSwingViewID = curEnv->GetStaticMethodID(cls, "registerSwingView", "()V" ) ;
+if (voidregisterSwingViewID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "registerSwingView");
+}
+
+                         curEnv->CallStaticVoidMethod(cls, voidregisterSwingViewID );
+                        if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+}
+
 }
index 578aa3c..1af7307 100644 (file)
         <method name="fireClosingFinished" returnType="void" modifier="static">
             <parameter type="int" name="figUID"/>
         </method>
+        <method name="registerSwingView" returnType="void" modifier="static">
+        </method>
     </object>
 </package>
index 8221ed4..53d91aa 100644 (file)
@@ -8,14 +8,31 @@ This is generated code.
 This software is a computer program whose purpose is to hide the complexity
 of accessing Java objects/methods from C++ code.
 
-Copyright (C) 2012 - 2016 - Scilab Enterprises
-
-This file is hereby licensed under the terms of the GNU GPL v2.0,
-pursuant to article 5.3.4 of the CeCILL v.2.1.
-This file was originally licensed under the terms of the CeCILL v2.1,
-and continues to be available under such terms.
-For more information, see the COPYING file which you should have received
-along with this program.
+This software is governed by the CeCILL-B license under French law and
+abiding by the rules of distribution of free software.  You can  use,
+modify and/ or redistribute the software under the terms of the CeCILL-B
+license as circulated by CEA, CNRS and INRIA at the following URL
+"http://www.cecill.info".
+
+As a counterpart to the access to the source code and  rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty  and the software's author,  the holder of the
+economic rights,  and the successive licensors  have only  limited
+liability.
+
+In this respect, the user's attention is drawn to the risks associated
+with loading,  using,  modifying and/or developing or reproducing the
+software by the user in light of its specific status of free software,
+that may mean  that it is complicated to manipulate,  and  that  also
+therefore means  that it is reserved for developers  and  experienced
+professionals having in-depth computer knowledge. Users are therefore
+encouraged to load and test the software's suitability as regards their
+requirements in conditions enabling the security of their systems and/or
+data to be ensured and,  more generally, to use and operate it in the
+same conditions as regards security.
+
+The fact that you are presently reading this means that you have had
+knowledge of the CeCILL-B license and that you accept its terms.
 */
 
 
@@ -121,13 +138,14 @@ jmethodID voiduseCanvasForDisplayjbooleanbooleanID; // cache method id
 jmethodID jbooleanuseCanvasForDisplayID; // cache method id
 jmethodID voidscilabAboutBoxID; // cache method id
 jmethodID voidfireClosingFinishedjintintID; // cache method id
+jmethodID voidregisterSwingViewID; // cache method id
 
 
 
 jobject instance;
 jclass instanceClass; // cache class
 
-                       
+
 // Caching (if any)
 
 
@@ -154,9 +172,9 @@ CallScilabBridge(JavaVM * jvm_);
 CallScilabBridge(JavaVM * jvm_, jobject JObj);
 
 
-/** 
+/**
 * This is a fake constructor to avoid the constructor
-* chaining when dealing with extended giws classes 
+* chaining when dealing with extended giws classes
 */
 #ifdef FAKEGIWSDATATYPE
 CallScilabBridge(fakeGiwsDataType::fakeGiwsDataType /* unused */) {}
@@ -302,6 +320,8 @@ static void scilabAboutBox(JavaVM * jvm_);
 
 static void fireClosingFinished(JavaVM * jvm_, int figUID);
 
+static void registerSwingView(JavaVM * jvm_);
+
 
                         /**
                         * Get class name to use for static methods
index 4f00597..694c349 100644 (file)
@@ -296,6 +296,10 @@ static int get_option(const int argc, char *argv[], ScilabEngineInfo* _pSEI)
         {
             _pSEI->iKeepConsole = 1;
         }
+        else if (!strcmp("--webmode", argv[i]))
+        {
+            _pSEI->iWebMode = 1;
+        }
     }
 
     ConfigVariable::setCommandLineArgs(argc, argv);