New Java Help Browser for Scilab.
[scilab.git] / scilab / modules / gui / sci_gateway / c / gw_gui.c
1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2006 - INRIA - Allan CORNET
4  * Copyright (C) 2008 - INRIA - Vincent COUVERT
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  */
13
14 #include <string.h>
15 #include "gw_gui.h"
16 #include "stack-c.h"
17 #include "scilabmode.h"
18 #include "callFunctionFromGateway.h"
19 #include "localization.h"
20 #include "Scierror.h"
21 /*--------------------------------------------------------------------------*/
22 static gw_generic_table Tab[]=
23 {
24         {C2F(sci_x_dialog),"x_dialog"},
25         {C2F(sci_x_choose),"x_choose"},
26         {C2F(sci_x_mdialog),"x_mdialog"},
27         {C2F(sci_x_choice),"xchoicesi"},
28         {sci_delmenu,"delmenu"},
29         {sci_setmenu,"setmenu"},
30         {sci_unsetmenu,"unsetmenu"},
31         {C2F(sci_xgetfile),"xgetfile"},
32         {C2F(sci_raise_window),"raise_window"},
33         {C2F(sci_getlookandfeel),"getlookandfeel"},
34         {C2F(sci_getinstalledlookandfeels),"getinstalledlookandfeels"},
35         {C2F(sci_setlookandfeel),"setlookandfeel"},
36         {C2F(sci_ClipBoard),"ClipBoard"},
37         {sci_toolbar,"toolbar"},
38         {sci_uigetdir,"uigetdir"},
39         {sci_uicontrol,"uicontrol"},
40         {sci_uimenu,"uimenu"},
41         {sci_mpopup,"uipopup"},
42         {C2F(sci_x_choose_modeless),"x_choose_modeless"},
43         {sci_uicontextmenu,"uicontextmenu"},
44         {sci_uiwait,"uiwait"},
45         {sci_messagebox,"messagebox"},
46         {sci_waitbar,"waitbar"},
47         {sci_progressionbar,"progressionbar"},
48         {sci_help,"jhelp"}
49 };
50 /*--------------------------------------------------------------------------*/
51 int gw_gui(void)
52 {  
53         Rhs = Max(0, Rhs);
54
55         if ( getScilabMode() == SCILAB_NWNI)
56         {
57                 Scierror(999,_("Scilab graphic module disabled -nogui or -nwni mode."));
58                 return 0;
59         }
60
61         callFunctionFromGateway(Tab);
62
63         return 0;
64 }
65 /*--------------------------------------------------------------------------*/