#include <stdio.h>#include <X11/IntrinsicP.h>#include <X11/StringDefs.h>#include <X11/Xaw3d/XawInit.h>#include <X11/Xaw3d/SmeP.h>#include <X11/Xaw3d/Cardinals.h>Include dependency graph for Sme.c:

Go to the source code of this file.
Defines | |
| #define | offset(field) XtOffsetOf(SmeRec, sme.field) |
| #define | SUPERCLASS (&rectObjClassRec) |
Functions | |
| static void | Unhighlight () |
| static void | Highlight () |
| static void | Notify () |
| static void | ClassPartInitialize () |
| static void | Initialize () |
| static XtGeometryResult | QueryGeometry () |
| static void | ClassPartInitialize (WidgetClass class) |
| static void | Initialize (Widget request, Widget new, ArgList args, Cardinal *num_args) |
| static void | Highlight (Widget w) |
| static void | Unhighlight (Widget w) |
| static void | Notify (Widget w) |
| static XtGeometryResult | QueryGeometry (Widget w, XtWidgetGeometry *intended, XtWidgetGeometry *return_val) |
Variables | |
| static XtResource | resources [] |
| SmeClassRec | smeClassRec |
| WidgetClass | smeObjectClass = (WidgetClass) &smeClassRec |
| static void ClassPartInitialize | ( | WidgetClass | class | ) | [static] |
Definition at line 124 of file Sme.c.
References _SmeClassPart::highlight, _SmeClassPart::notify, _SmeClassRec::rect_class, _SmeClassRec::sme_class, _SmeClassPart::unhighlight, XtInheritHighlight, XtInheritNotify, and XtInheritUnhighlight.
00126 { 00127 SmeObjectClass m_ent, superC; 00128 00129 m_ent = (SmeObjectClass) class; 00130 superC = (SmeObjectClass) m_ent->rect_class.superclass; 00131 00132 /* 00133 * We don't need to check for null super since we'll get to TextSink 00134 * eventually. 00135 */ 00136 00137 if (m_ent->sme_class.highlight == XtInheritHighlight) 00138 m_ent->sme_class.highlight = superC->sme_class.highlight; 00139 00140 if (m_ent->sme_class.unhighlight == XtInheritUnhighlight) 00141 m_ent->sme_class.unhighlight = superC->sme_class.unhighlight; 00142 00143 if (m_ent->sme_class.notify == XtInheritNotify) 00144 m_ent->sme_class.notify = superC->sme_class.notify; 00145 }
| static void ClassPartInitialize | ( | ) |
| static void Highlight | ( | Widget | w | ) | [static] |
| static void Highlight | ( | ) |
| static void Initialize | ( | Widget | request, | |
| Widget | new, | |||
| ArgList | args, | |||
| Cardinal * | num_args | |||
| ) | [static] |
| static void Initialize | ( | ) | [static] |
Definition at line 26 of file javasci_globals.c.
00027 { 00028 static char env[1024]; 00029 static char initstr[]="exec(\"SCI/etc/scilab.start\",-1);quit;"; 00030 static int iflag=-1, stacksize = 1000000, ierr=0; 00031 00032 #ifdef _MSC_VER 00033 static char JavaSciInterf[]="javasci"; 00034 static char nw[]="-nw"; 00035 static char nb[]="-nb"; 00036 #endif 00037 00038 00039 char *p1 = (char*)getenv ("SCI"); 00040 00041 00042 #ifdef _MSC_VER 00043 /* Supprime le mode windows et la baniere */ 00044 add_sci_argv(JavaSciInterf); 00045 add_sci_argv(nb); 00046 #endif 00047 00048 #ifdef _MSC_VER 00049 if ( p1== NULL ) 00050 { 00051 /* Detection Scilab path */ 00052 char modname[MAX_PATH+1]; 00053 if (!GetModuleFileName (GetModuleHandle("javasci.dll"), modname, MAX_PATH)) 00054 { 00055 MessageBox(NULL,"javasci.dll not found","Warning",MB_ICONWARNING); 00056 } 00057 else 00058 { 00059 char *p; 00060 if ((p = strrchr (modname, '\\')) == NULL) exit(1); /* remove \javasci.dll from modname */ 00061 else 00062 { 00063 *p='\0'; 00064 if ((p = strrchr (modname, '\\')) == NULL) exit(1); /* remove \bin from modname */ 00065 else 00066 { 00067 *p='\0'; 00068 set_sci_env(modname); 00069 } 00070 } 00071 } 00072 } 00073 else 00074 { 00075 char *pathSCI=(char*)MALLOC((strlen(p1)+1)*sizeof(char)); 00076 sprintf(pathSCI,"%s",p1); 00077 set_sci_env(pathSCI); 00078 if (pathSCI) {FREE(pathSCI);pathSCI=NULL;} 00079 } 00080 #else 00081 if (p1==NULL) 00082 { 00083 fprintf(stderr,"Please define SCI environment variable\n"); 00084 sprintf (env, "%s=%s", "SCI",SCI); 00085 setSCIpath(SCI); 00086 putenv (env); 00087 } 00088 #endif 00089 /* set TMPDIR */ 00090 C2F(settmpdir)(); 00091 /* Scilab Initialization */ 00092 C2F(inisci)(&iflag,&stacksize,&ierr); 00093 if ( ierr > 0 ) 00094 { 00095 fprintf(stderr,"Scilab initialization failed !\n"); 00096 exit(1); 00097 } 00098 00099 00100 /* Initialisation fenetre graphique */ 00101 #ifdef _MSC_VER 00102 InitWindowGraphDll(); 00103 #endif 00104 00105 /* pour initialisation de la primitive scilab : fromjava() */ 00106 SetFromJavaToON(); 00107 00108 /* Chargement de Scilab.start */ 00109 C2F(scirun)(initstr,(int)strlen(initstr)); 00110 00111 }
| static void Notify | ( | Widget | w | ) | [static] |
| static void Notify | ( | ) |
| static XtGeometryResult QueryGeometry | ( | Widget | w, | |
| XtWidgetGeometry * | intended, | |||
| XtWidgetGeometry * | return_val | |||
| ) | [static] |
Definition at line 222 of file Sme.c.
References mode, _SmeRec::rectangle, and width.
00225 { 00226 SmeObject entry = (SmeObject) w; 00227 Dimension width; 00228 XtGeometryResult ret_val = XtGeometryYes; 00229 XtGeometryMask mode = intended->request_mode; 00230 00231 width = 1; /* we can be really small. */ 00232 00233 if ( ((mode & CWWidth) && (intended->width != width)) || 00234 !(mode & CWWidth) ) { 00235 return_val->request_mode |= CWWidth; 00236 return_val->width = width; 00237 mode = return_val->request_mode; 00238 00239 if ( (mode & CWWidth) && (width == entry->rectangle.width) ) 00240 return(XtGeometryNo); 00241 return(XtGeometryAlmost); 00242 } 00243 return(ret_val); 00244 }
| static XtGeometryResult QueryGeometry | ( | ) | [static] |
| static void Unhighlight | ( | Widget | w | ) | [static] |
| static void Unhighlight | ( | ) | [static] |
XtResource resources[] [static] |
Initial value:
{
{XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer),
offset(callbacks), XtRCallback, (XtPointer)NULL},
{XtNinternational, XtCInternational, XtRBoolean, sizeof(Boolean),
offset(international), XtRImmediate, (XtPointer) FALSE},
}
| WidgetClass smeObjectClass = (WidgetClass) &smeClassRec |
1.5.1