wgmenu.c File Reference

#include "wgmenu.h"
#include "Messages.h"
#include "Warnings.h"
#include "Errors.h"
#include "WindowList.h"
#include "Actions.h"
#include "periScreen.h"
#include "MALLOC.h"

Include dependency graph for wgmenu.c:

Go to the source code of this file.

Defines

#define FILEGRAPHMENUFRENCH   "wgscilabF.mnu"
#define FILEGRAPHMENUENGLISH   "wgscilabE.mnu"
#define lenStringMenu   64
#define lenStringMenu   64

Functions

void scig_savesg (int win_num, char *filename)
BOOL IsWindowInterface ()
void Write_Scilab_Console (char *buf)
void Write_Scilab_Window (char *buf)
void ResetMenu (void)
void HideGraphToolBar (struct BCG *ScilabGC)
void ShowGraphToolBar (struct BCG *ScilabGC)
void SaveCurrentLine (BOOL RewriteLineAtPrompt)
void ExportBMP (struct BCG *ScilabGC, char *pszflname)
void ExportEMF (struct BCG *ScilabGC, char *pszflname)
HDC GetPrinterDC (void)
char GetPrinterOrientation (void)
void SavePs (struct BCG *ScilabGC)
void PrintPs (struct BCG *ScilabGC)
char * GetScilabDirectory (BOOL UnixStyle)
void Callback_PRINTSETUP (void)
LPTW GetTextWinScilab (void)
void ModifyEntityPickerToolbar (struct BCG *ScilabGC, BOOL Pressed)
void SendGraphMacro (struct BCG *ScilabGC, UINT m)
void ScilabMenuAction (char *buf)
void write_scilab (char *buf)
void CallTranslateMacroGraphicWindow (char *string)
static void TranslateMacro (char *string)
void LoadGraphMacros (struct BCG *ScilabGC)
int WGFindMenuPos (BYTE **macros)
void CloseGraphMacros (struct BCG *ScilabGC)
static void ExploreMenu (HMENU hmen, BYTE **hmacro)
int C2F() setmen (integer *win_num, char *button_name, integer *entries, integer *ptrentries, integer *ne, integer *ierr)
int C2F() unsmen (integer *win_num, char *button_name, integer *entries, integer *ptrentries, integer *ne, integer *ierr)
static void SciSetMenu (HMENU hmen, char *name, int num, int flag)
int C2F() chmenu (integer *win_num, char *old_name, char *new_name)
static void SciChMenu (LPMW lpmw, char *name, char *new_name)
int C2F() delbtn (integer *win_num, char *button_name)
static void SciDelMenu (LPMW lpmw, char *name)
void AddMenu (integer *win_num, char *button_name, char **entries, integer *ne, integer *typ, char *fname, integer *ierr)
int C2F() addmen (integer *win_num, char *button_name, integer *entries, integer *ptrentries, integer *ne, integer *typ, char *fname, integer *ierr)
static void scig_command_scilabgc (int number, void f(struct BCG *))
void scig_h_copyclip (integer number)
void scig_h_copyclip1 (integer number)
void scig_print (integer number)
void scig_export (integer number)
void UpdateFileGraphNameMenu (struct BCG *ScilabGC)
void NewFigure (struct BCG *ScilabGC)
int FindFreeGraphicWindow (struct BCG *ScilabGC)
void RefreshMenus (struct BCG *ScilabGC)
void CreateGedMenus (struct BCG *ScilabGC)
BOOL SendMacroEntityPicker (struct BCG *ScilabGC, int id)
BOOL IsEntityPickerMenu (struct BCG *ScilabGC, int id)

Variables

HINSTANCE hdllInstance


Define Documentation

#define FILEGRAPHMENUENGLISH   "wgscilabE.mnu"

Referenced by UpdateFileGraphNameMenu().

#define FILEGRAPHMENUFRENCH   "wgscilabF.mnu"

Referenced by UpdateFileGraphNameMenu().

#define lenStringMenu   64

#define lenStringMenu   64

Referenced by IsEntityPickerMenu().


Function Documentation

int C2F() addmen ( integer win_num,
char *  button_name,
integer entries,
integer ptrentries,
integer ne,
integer typ,
char *  fname,
integer ierr 
)

Definition at line 879 of file wgmenu.c.

References AddMenu(), ierr, ResetMenu(), and ScilabMStr2CM().

00882 {
00883   char **menu_entries;
00884   menu_entries=NULL;
00885   *ierr = 0;
00886   if (*ne != 0)
00887     {
00888       ScilabMStr2CM (entries, ne, ptrentries, &menu_entries, ierr);
00889       if (*ierr == 1)
00890         return (0);
00891     }
00892   /* Modification Allan CORNET */
00893   /* Réinitialisation Menu Console Principale */
00894   if ( (strcmp(button_name,"RESETMENU")==0) && (*win_num==-1) )
00895     {
00896       ResetMenu();      
00897     }
00898   else AddMenu (win_num, button_name, menu_entries, ne, typ, fname, ierr);
00899   return (0);
00900 }

Here is the call graph for this function:

void AddMenu ( integer win_num,
char *  button_name,
char **  entries,
integer ne,
integer typ,
char *  fname,
integer ierr 
)

Definition at line 751 of file wgmenu.c.

References getWindowXgcNumber(), tagMW::hMenu, tagTW::hWndParent, i, j, tagTW::lpmw, tagMW::macro, MF_SEPARATOR, MSG_WARNING10, MSG_WARNING11, MSG_WARNING12, MSG_WARNING13, MSG_WARNING14, number, NUMMENU, sciprint(), textwin, UINT, and WGFindMenuPos().

00753 {
00754   BYTE *macroptr;
00755   struct BCG *ScilabGC;
00756   HWND hwnd;
00757   LPMW lpmw;
00758   int number, nCountMenu;
00759   number = *win_num;
00760   if (*win_num == -1)
00761   {
00762       lpmw = textwin.lpmw;
00763       hwnd = textwin.hWndParent;
00764       nCountMenu = WGFindMenuPos (lpmw->macro);
00765       if (nCountMenu >= NUMMENU)
00766                         {
00767                                 sciprint (MSG_WARNING10);
00768                                 return;
00769                         }
00770   }
00771   else
00772   {
00773      ScilabGC = getWindowXgcNumber (*win_num);
00774      if (ScilabGC != (struct BCG *) 0)
00775                 {
00776                         lpmw = &(ScilabGC->lpmw);
00777                         hwnd = ScilabGC->hWndParent;
00778                         nCountMenu = WGFindMenuPos (lpmw->macro);
00779                         if (nCountMenu >= NUMMENU)
00780             {
00781               sciprint (MSG_WARNING11,*win_num);
00782               return;
00783             }
00784                 }
00785                 else    return;
00786   }
00787 
00788   if (*ne == 0)
00789   {
00790     AppendMenu (lpmw->hMenu, MF_STRING, nCountMenu, button_name);
00791     if ((macroptr = LocalAlloc (LPTR, lstrlen ("@%dexecstr(%s_%d(%d))")+ lstrlen (fname) + 1)) != (BYTE *) NULL)
00792                 {
00793                         if (*win_num < 0)
00794                                 if (*typ==0) 
00795                                         sprintf ((char *) macroptr, "@%dexecstr(%s(%d))", *typ, fname, 1);
00796                                 else 
00797                                         if (*typ==2) sprintf ((char *) macroptr, "@0%s(%d,%d)",fname, 1,*win_num);
00798                                         else sprintf ((char *) macroptr, "@%dexecstr(%s(%d))", *typ,fname, 1);
00799                         else 
00800                                 if (*typ==0) sprintf ((char *) macroptr, "@0execstr(%s_%d(%d))",fname, *win_num, 1);
00801                                 else
00802                                         if (*typ==2) sprintf ((char *) macroptr, "@0%s(%d,%d)",fname, 1,*win_num);
00803                                         else sprintf ((char *) macroptr, "@%dexecstr(%s_%d(%d))", *typ,fname, *win_num, 1);
00804                 }
00805     else
00806                 {
00807                         sciprint (MSG_WARNING12);
00808                         return;
00809                 }
00810 
00811     lpmw->macro[nCountMenu] = macroptr;
00812   }
00813   else
00814   {
00815                 int i=0;
00816                 int j=0;
00817     HMENU hMenu;
00818     hMenu = CreateMenu ();
00819                 
00820 
00821     AppendMenu (lpmw->hMenu, MF_STRING | MF_POPUP, (UINT) hMenu, button_name);
00822     for (i = 0; i < *ne; i++)
00823                 {
00824                         
00825                         nCountMenu = WGFindMenuPos (lpmw->macro);
00826                         if (nCountMenu >= NUMMENU)
00827             {
00828               sciprint (MSG_WARNING13);
00829               return;
00830             }
00831                         if ( strcmp("[--]",entries[i])==0 )
00832                         {
00833                                 AppendMenu (hMenu, MF_SEPARATOR, 0, (LPSTR) NULL);
00834                         }
00835                         else
00836                         {
00837                                 AppendMenu (hMenu, MF_STRING, nCountMenu, entries[i]);
00838                                 if ((macroptr = LocalAlloc (LPTR, lstrlen ("@%dexecstr(%s_%d(%d))")+ lstrlen (fname) + 1)) != (BYTE *) NULL)
00839                                 {
00840                                         if (*win_num < 0)
00841                                                 if (*typ==0) 
00842                                                         sprintf ((char *) macroptr, "@%dexecstr(%s(%d))", *typ, fname, j + 1);
00843                                                 else
00844                                                         if (*typ==2) sprintf ((char *) macroptr, "@0%s(%d)",fname, j + 1);
00845                                                         else sprintf ((char *) macroptr, "@%dexecstr(%s(%d))", *typ,fname, j + 1);
00846                                         else
00847                                                 if (*typ==0) sprintf ((char *) macroptr, "@0execstr(%s_%d(%d))",fname, *win_num, j + 1);
00848                                                 else
00849                                                         if (*typ==2) sprintf ((char *) macroptr, "@0%s(%d,%d)",fname, j + 1,*win_num);
00850                                                         else sprintf ((char *) macroptr, "@%dexecstr(%s_%d(%d))", *typ,fname, *win_num, j + 1);
00851                                         j++;
00852                                 }
00853                                 else
00854                                 {
00855                                         sciprint (MSG_WARNING14);
00856                                         return;
00857                                 }
00858                                 lpmw->macro[nCountMenu] = macroptr;
00859                         }
00860                 }
00861   }
00862   DrawMenuBar (hwnd);
00863 }

Here is the call graph for this function:

void Callback_PRINTSETUP ( void   ) 

Definition at line 351 of file wmenu.c.

Referenced by SendGraphMacro(), and SendMacro().

00352 {
00353         ConfigurePrinterDialogBox();
00354 }

Here is the caller graph for this function:

void CallTranslateMacroGraphicWindow ( char *  string  ) 

Definition at line 281 of file wgmenu.c.

References TranslateMacro().

Referenced by SavePs().

00282 {
00283         TranslateMacro(string);
00284 }

Here is the call graph for this function:

Here is the caller graph for this function:

int C2F() chmenu ( integer win_num,
char *  old_name,
char *  new_name 
)

Definition at line 618 of file wgmenu.c.

References getWindowXgcNumber(), tagTW::hWndParent, tagTW::lpmw, SciChMenu(), and textwin.

Referenced by MenuFixCurrentWin().

00619 {
00620   struct BCG *ScilabGC;
00621   if (*win_num == -1)
00622     {
00623       SciChMenu (textwin.lpmw, old_name, new_name);
00624       DrawMenuBar (textwin.hWndParent);
00625     }
00626   else
00627     {
00628       ScilabGC = getWindowXgcNumber (*win_num);
00629       if (ScilabGC != (struct BCG *) 0)
00630         {
00631           SciChMenu (&(ScilabGC->lpmw), old_name, new_name);
00632           DrawMenuBar (ScilabGC->hWndParent);
00633         }
00634     }
00635   return (0);
00636 }

Here is the call graph for this function:

Here is the caller graph for this function:

void CloseGraphMacros ( struct BCG ScilabGC  ) 

Definition at line 480 of file wgmenu.c.

References i, and NUMMENU.

00481 {
00482   int i;
00483   HGLOBAL hglobal;
00484   if (ScilabGC->lpmw.macro != (BYTE **) NULL)
00485     {
00486       hglobal = GlobalHandle (ScilabGC->lpmw.macro);
00487       if (hglobal)
00488         {
00489           for (i = 0; i < NUMMENU; i++)
00490             if (ScilabGC->lpmw.macro[i] != (BYTE *) 0)
00491               {
00492                 LocalFree (ScilabGC->lpmw.macro[i]);
00493                 ScilabGC->lpmw.macro[i] = (BYTE *) 0;
00494               }
00495           GlobalUnlock (hglobal);
00496           GlobalFree (hglobal);
00497           ScilabGC->lpmw.macro = (BYTE **) NULL;
00498         }
00499     }
00500 
00501     if ( ScilabGC->lpmw.szMenuName != NULL )
00502     {
00503       FREE( ScilabGC->lpmw.szMenuName ) ;
00504       ScilabGC->lpmw.szMenuName = NULL ;
00505     }
00506 }

void CreateGedMenus ( struct BCG ScilabGC  ) 

Definition at line 1035 of file wgmenu.c.

References AddMenu(), BCG::CurWindow, ierr, LoadGraphMacros(), MSG_SCIMSG116, MSG_SCIMSG117, MSG_SCIMSG118, MSG_SCIMSG119, and UpdateFileGraphNameMenu().

01036 {
01037   int WinNum=ScilabGC->CurWindow;
01038 
01039 
01040   /*
01041   for new menus
01042   ScilabXgc->hMenuRoot=CreateMenu();
01043   ScilabXgc->IDM_Count=1;
01044 
01045   SetMenu(ScilabXgc->hWndParent,ScilabXgc->hMenuRoot); 
01046   */
01047 #ifdef WITH_TK
01048   integer ne=14, menutyp=2, ierr;
01049   char *EditMenusE[]={"&Select figure as current","&Redraw figure","&Erase figure","[--]","&Copy object","&Paste object","Move object","Delete object","[--]","Figure properties","Current &axes properties","[--]",MSG_SCIMSG116,MSG_SCIMSG117};
01050   char *EditMenusF[]={"&Selectionner figure comme courante","&Redessiner figure","[--]","&Effacer figure","Copier objet","Coller objet","Déplacer objet","Détruire objet","[--]","Propriétés de la &figure","Propriétés des &axes courants","[--]",MSG_SCIMSG118,MSG_SCIMSG119};
01051 
01052   /* Disable Double Arrow */
01053   integer ni=/*7*/6;
01054   char *InsertMenusE[]={"&Line","&Polyline","&Arrow",/*"&Double Arrow",*/"&Text","&Rectangle","&Circle"};
01055   char *InsertMenusF[]={"&Ligne","L&igne brisée","&Fleche",/*"&Double Fleche",*/"&Texte","&Rectangle","&Cercle"};
01056 #else
01057   integer ne=3, menutyp=2, ierr;
01058   char *EditMenusE[]={"&Select figure","&Redraw figure","&Erase figure"};
01059   char *EditMenusF[]={"&Selectionner figure","&Redessiner figure","&Effacer figure"};
01060 #endif
01061 
01062   UpdateFileGraphNameMenu(ScilabGC);
01063   LoadGraphMacros(ScilabGC);
01064 
01065   switch( ScilabGC->lpmw.CodeLanguage)
01066   {
01067   case 1:
01068     AddMenu(&WinNum,"&Editer", EditMenusF, &ne, &menutyp, "ged", &ierr);
01069 #ifdef WITH_TK
01070     /*AddMenu(&WinNum,"&Inserer", InsertMenusF, &ni, &menutyp, "ged_insert", &ierr);*/
01071 #endif
01072     break;
01073   default:
01074     AddMenu(&WinNum,"&Edit", EditMenusE, &ne, &menutyp, "ged", &ierr);
01075 #ifdef WITH_TK
01076     /*AddMenu(&WinNum,"&Insert", InsertMenusE, &ni, &menutyp, "ged_insert", &ierr);*/
01077 #endif
01078     break;
01079   }
01080 
01081 }

Here is the call graph for this function:

int C2F() delbtn ( integer win_num,
char *  button_name 
)

Definition at line 658 of file wgmenu.c.

References getWindowXgcNumber(), tagTW::hWndParent, tagTW::lpmw, SciDelMenu(), and textwin.

00659 {
00660   struct BCG *ScilabGC;
00661   if (*win_num == -1)
00662     {
00663       SciDelMenu (textwin.lpmw, button_name);
00664       DrawMenuBar (textwin.hWndParent);
00665     }
00666   else
00667     {
00668       ScilabGC = getWindowXgcNumber (*win_num);
00669       if (ScilabGC != (struct BCG *) 0)
00670         {
00671           SciDelMenu (&(ScilabGC->lpmw), button_name);
00672           DrawMenuBar (ScilabGC->hWndParent);
00673         }
00674     }
00675   return (0);
00676 }

Here is the call graph for this function:

static void ExploreMenu ( HMENU  hmen,
BYTE **  hmacro 
) [static]

Definition at line 512 of file wgmenu.c.

References buf, i, id, is, and sciprint().

00513 {
00514   int i, is, id, Nums = GetMenuItemCount (hmen);
00515   sciprint ("Nombre d'Items %d\r\n", Nums);
00516   for (i = 0; i < Nums; i++)
00517     {
00518       char buf[256];
00519       HMENU hSubMenu;
00520       hSubMenu = GetSubMenu (hmen, i);
00521       is = GetMenuString (hmen, i, buf, 256, MF_BYPOSITION);
00522       buf[is] = '\0';
00523       sciprint (" submenu %d, [%s]", i, buf);
00524       id = GetMenuItemID (hmen, i);
00525       sciprint (" ID %d\r\n", is);
00526       if (id >= 0 && is != 0)
00527         sciprint ("String %d %s\r\n", id, (char *) hmacro[id]);
00528       if (hSubMenu != NULL)
00529         {
00530           ExploreMenu (hSubMenu, hmacro);
00531         }
00532     }
00533 }

Here is the call graph for this function:

void ExportBMP ( struct BCG ScilabGC,
char *  pszflname 
)

Definition at line 332 of file ExportBmpEmf.c.

References BCG::CurWindow, BCG::CWindow, BCG::CWindowHeight, BCG::CWindowWidth, FALSE, GetCurrentFigureWindows(), hdc, HdcToBmpFile(), MSG_ERROR20, MSG_ERROR36, NULL, scig_replay_hdc(), SetCurrentFigureWindows(), Setscig_buzyState(), SW_SHOWNORMAL, TRUE, and TryToGetDC().

Referenced by Interface_XS2BMP(), and SavePs().

00333 {
00334         LPGW lpgw;
00335         HBITMAP hBitmap;
00336         HDC hmemDC=NULL;
00337         HWND hwnd;
00338         HDC hdc=NULL;
00339         integer SaveCurrentWindow=0;
00340 
00341 
00342         Setscig_buzyState(TRUE);
00343 
00344         SaveCurrentWindow=GetCurrentFigureWindows();
00345         SetCurrentFigureWindows (ScilabGC->CurWindow);
00346 
00347         /* view the window */
00348         lpgw = ScilabGC->lpgw;
00349         hwnd = ScilabGC->CWindow;
00350 
00351         if (IsIconic (hwnd)) ShowWindow (hwnd, SW_SHOWNORMAL);
00352         BringWindowToTop (hwnd);
00353         UpdateWindow (hwnd);
00354 
00355         SetActiveWindow(ScilabGC->hWndParent);      
00356         
00357         /* get the context */
00358         hdc = TryToGetDC (hwnd);
00359 
00360         /* make a bitmap and copy it there */
00361         if (hdc)
00362         {
00364                         scig_replay_hdc ('C', ScilabGC->CurWindow, hdc,ScilabGC->CWindowWidth,ScilabGC->CWindowHeight, 1);
00365                         ReleaseDC (hwnd, hdc);
00366 
00367                         hmemDC = CreateCompatibleDC (hdc);
00368                         hBitmap = CreateCompatibleBitmap (hdc,ScilabGC->CWindowWidth,ScilabGC->CWindowHeight);
00369 
00370                         if (hBitmap)
00371                         {
00372                                 POINT DCSize;
00373                                 SelectBitmap (hmemDC, hBitmap);
00374                                 scig_replay_hdc ('C', ScilabGC->CurWindow, hmemDC,ScilabGC->CWindowWidth,ScilabGC->CWindowHeight, 1);
00375                                 DCSize.x=ScilabGC->CWindowWidth;
00376                                 DCSize.y=ScilabGC->CWindowHeight;
00377 
00378                                 HdcToBmpFile(hmemDC,pszflname,DCSize);
00379 
00380                                 DeleteDC(hmemDC);
00381                                 DeleteBitmap(hBitmap);
00382                         }
00383         }
00384         else
00385         {
00386                 MessageBox(NULL,MSG_ERROR36,MSG_ERROR20,MB_ICONWARNING);
00387         }
00388 
00389         SetCurrentFigureWindows (SaveCurrentWindow);
00390 
00391         Setscig_buzyState(FALSE);
00392 
00393 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ExportEMF ( struct BCG ScilabGC,
char *  pszflname 
)

Definition at line 395 of file ExportBmpEmf.c.

References BCG::CurWindow, BCG::CWindow, BCG::CWindowHeight, BCG::CWindowWidth, FALSE, GetCurrentFigureWindows(), hdc, NULL, scig_replay_hdc(), SetCurrentFigureWindows(), Setscig_buzyState(), SW_SHOWNORMAL, TRUE, and TryToGetDC().

Referenced by Interface_XS2EMF(), and SavePs().

00396 {    
00397         RECT rect;
00398         HWND hwnd;
00399         HDC hdc;
00400         HDC hdcTmp;
00401         HENHMETAFILE metafile;
00402 
00403         integer SaveCurrentFigure=0; 
00404 
00405         Setscig_buzyState(TRUE);
00406 
00407         SaveCurrentFigure=GetCurrentFigureWindows();
00408         SetCurrentFigureWindows (ScilabGC->CurWindow);
00409 
00410         hwnd = ScilabGC->CWindow;
00411 
00412         /* view the window */
00413         if (IsIconic (hwnd)) ShowWindow (hwnd, SW_SHOWNORMAL);
00414         BringWindowToTop (hwnd);
00415         UpdateWindow (hwnd);
00416 
00417         /* get the context */
00418         hdcTmp=TryToGetDC (hwnd);
00419         hdc = CreateEnhMetaFile (hdcTmp, pszflname, NULL, "Scilab Graphics");
00420 
00421         GetClientRect (hwnd, &rect);
00422         SetMapMode (hdc, MM_TEXT);
00423         SetTextAlign (hdc, TA_LEFT | TA_BOTTOM);
00424         
00425         SetWindowExtEx (hdc,ScilabGC->CWindowWidth,ScilabGC->CWindowHeight, (LPSIZE) NULL);
00426         Rectangle (hdc, 0, 0,ScilabGC->CWindowWidth,ScilabGC->CWindowHeight);
00427 
00430         scig_replay_hdc ('C', ScilabGC->CurWindow,hdcTmp,ScilabGC->CWindowWidth,ScilabGC->CWindowHeight, 1);
00431         ReleaseDC(hwnd,hdcTmp);
00432 
00433         scig_replay_hdc ('C', ScilabGC->CurWindow,hdc,ScilabGC->CWindowWidth,ScilabGC->CWindowHeight, 1);
00434 
00435         metafile = CloseEnhMetaFile(hdc);
00436         DeleteDC(hdc);
00437         DeleteEnhMetaFile( metafile );
00438 
00439         SetCurrentFigureWindows (SaveCurrentFigure);
00440 
00441         Setscig_buzyState(FALSE);
00442         return;
00443 }

Here is the call graph for this function:

Here is the caller graph for this function:

int FindFreeGraphicWindow ( struct BCG ScilabGC  ) 

Definition at line 985 of file wgmenu.c.

References FREE, getWins(), i, ids, iflag, MALLOC, and num.

Referenced by NewFigure().

00986 {
00987   int FreeNumber=-1;
00988   integer iflag =0,ids,num,un=1;
00989 
00990   integer *tab=NULL;
00991   int sizetab=0;
00992   int i=0;
00993 
00994   iflag = 0; 
00995   getWins(&num,&ids ,&iflag);
00996   sizetab=num;
00997 
00998   tab=(integer*)MALLOC(sizeof(integer)*sizetab);
00999   for(i=0;i<sizetab;i++) tab[i]=0;
01000 
01001   iflag = 1; 
01002   getWins(&num,tab,&iflag);
01003 
01004   for(i=0;i<sizetab;i++)
01005   {
01006     if(FreeNumber<tab[i]) FreeNumber=tab[i];    
01007   }
01008   FreeNumber=FreeNumber+1;
01009   FREE(tab);
01010   return FreeNumber;
01011 }

Here is the call graph for this function:

Here is the caller graph for this function:

HDC GetPrinterDC ( void   ) 

Definition at line 554 of file TextToPrint.c.

Referenced by CopyPrint(), PrintFile(), PrintPs(), and PrintString().

00555 {
00556         if (PrinterHDC == NULL)
00557         {
00558                 PRINTDLG pd;
00559                 LPDEVNAMES lpDev=NULL;
00560                 LPDEVMODE lpDevMode=NULL;
00561                 LPCTSTR lpszDevice=NULL;
00562 
00563                 int   failed = 0;       
00564 
00565                 // Reset printdlg struct 
00566                 memset( &pd, 0, sizeof(PRINTDLG) ); 
00567                 pd.Flags = PD_RETURNDEFAULT | PD_RETURNDC; 
00568                 pd.lStructSize = sizeof( PRINTDLG ); 
00569 
00570 
00571                 failed = ( ! PrintDlg( &pd ) ); 
00572                 if (failed)
00573                 {
00574                         ConfigurePrinterDialogBox();
00575                 }
00576 
00577                 lpDev = (LPDEVNAMES)GlobalLock(pd.hDevNames);
00578                 lpDevMode = (LPDEVMODE)GlobalLock(pd.hDevMode);
00579                 lpszDevice = (LPCTSTR)lpDev + lpDev->wDeviceOffset;
00580 
00581                 wsprintf(PrinterName,"%s",lpszDevice);
00582                 GlobalUnlock(pd.hDevNames);
00583 
00584                 if (lpDevMode->dmOrientation==DMORIENT_PORTRAIT ) PrinterOrientation='p';
00585                 else PrinterOrientation='l';
00586                 GlobalUnlock(pd.hDevMode);
00587 
00588                 if (PrinterHDC) {DeleteDC(PrinterHDC);PrinterHDC=NULL;}
00589                 PrinterHDC=pd.hDC;
00590 
00591         }
00592 
00593         return PrinterHDC;
00594 }

Here is the caller graph for this function:

char GetPrinterOrientation ( void   ) 

Definition at line 596 of file TextToPrint.c.

References PrinterOrientation.

00597 {
00598         return PrinterOrientation;
00599 }

char* GetScilabDirectory ( BOOL  UnixStyle  ) 

Definition at line 64 of file SciEnv.c.

00065 {
00066         LPSTR ScilabModuleName=NULL;
00067         char drive[_MAX_DRIVE];
00068         char dir[_MAX_DIR];
00069         char fname[_MAX_FNAME];
00070         char ext[_MAX_EXT];
00071 
00072         char *SciPathName=NULL;
00073         char *DirTmp=NULL;
00074 
00075         ScilabModuleName = (LPSTR) MALLOC (MAXSTR + 1);
00076 
00077         if (!GetModuleFileName ((HINSTANCE)GetModuleHandle(MSG_SCIMSG9), (LPSTR) ScilabModuleName, MAXSTR))
00078         {
00079                 if (ScilabModuleName) {FREE(ScilabModuleName);ScilabModuleName=NULL;}
00080                 return NULL;
00081         }
00082 
00083         _splitpath(ScilabModuleName,drive,dir,fname,ext);
00084         if (ScilabModuleName) {FREE(ScilabModuleName);ScilabModuleName=NULL;}
00085         if (dir[strlen(dir)-1] == '\\') dir[strlen(dir)-1] = '\0';
00086 
00087         DirTmp=strrchr (dir, '\\');
00088         if (strlen(dir)-strlen(DirTmp)>0)
00089         {
00090                 dir[strlen(dir)-strlen(DirTmp)] = '\0';
00091         }
00092         else return NULL;
00093 
00094         SciPathName=(char*)MALLOC((int)(strlen(drive)+strlen(dir)+5)*sizeof(char));
00095         
00096         _makepath(SciPathName,drive,dir,NULL,NULL);
00097 
00098         if ( UnixStyle )
00099         {       
00100                 int i=0;
00101                 for (i=0;i<(int)strlen(SciPathName);i++)
00102                 {
00103                         if (SciPathName[i]=='\\') SciPathName[i]='/';
00104                 }
00105         }
00106         SciPathName[strlen(SciPathName)-1]='\0';
00107         setSCIpath(SciPathName);
00108         return SciPathName;
00109 }

LPTW GetTextWinScilab ( void   ) 

Definition at line 10 of file TextWindows.c.

00011 {
00012         return &textwin;
00013 }

void HideGraphToolBar ( struct BCG ScilabGC  ) 

Definition at line 23 of file Toolbar.c.

00024 {
00025         int i=0;
00026         ScilabGC->lpmw.ShowToolBar=FALSE;
00027 
00028         for (i=0;i<ScilabGC->lpmw.nButton;i++)
00029         {
00030                 ShowWindow(ScilabGC->lpmw.hButton[i],SW_HIDE);
00031         }
00032 }

BOOL IsEntityPickerMenu ( struct BCG ScilabGC,
int  id 
)

Definition at line 1110 of file wgmenu.c.

References FALSE, lenStringMenu, MSG_SCIMSG116, MSG_SCIMSG117, MSG_SCIMSG118, MSG_SCIMSG119, and TRUE.

Referenced by SendMacroEntityPicker().

01111 {
01112         BOOL bOK=FALSE;
01113         if (id == 23)
01114         {
01115                 #define lenStringMenu 64
01116                 char CurrentStringMenu[lenStringMenu];
01117                 GetMenuString(ScilabGC->lpmw.hMenu,id,CurrentStringMenu,lenStringMenu-1,MF_BYCOMMAND);
01118                 switch (ScilabGC->lpmw.CodeLanguage)
01119                 {
01120                         case 1:
01121                                 if (strcmp(CurrentStringMenu,MSG_SCIMSG118)==0) bOK=TRUE;
01122                         break;
01123 
01124                         case 0: default:
01125                                 if (strcmp(CurrentStringMenu,MSG_SCIMSG116)==0) bOK=TRUE;
01126                         break;
01127                 }
01128         }
01129 
01130         if (id == 24)
01131         {
01132                 #define lenStringMenu 64
01133                 char CurrentStringMenu[lenStringMenu];
01134                 GetMenuString(ScilabGC->lpmw.hMenu,id,CurrentStringMenu,lenStringMenu-1,MF_BYCOMMAND);
01135                 switch (ScilabGC->lpmw.CodeLanguage)
01136                 {
01137                         case 1:
01138                                 if (strcmp(CurrentStringMenu,MSG_SCIMSG119)==0) bOK=TRUE;
01139                         break;
01140 
01141                         case 0: default:
01142                                 if (strcmp(CurrentStringMenu,MSG_SCIMSG117)==0) bOK=TRUE;
01143                         break;
01144                 }
01145         }
01146 
01147         return bOK;
01148 }

Here is the caller graph for this function:

BOOL IsWindowInterface (  ) 

Definition at line 127 of file WinConsole.c.

00128 {
00129         return WindowMode;
00130 }

void LoadGraphMacros ( struct BCG ScilabGC  ) 

Definition at line 308 of file wgmenu.c.

References buf, BUGGOTOCLEAN, cleanup(), GetLine(), Gfopen(), i, LeftJustify(), MAXSTR, MENUDEPTH, MF_SEPARATOR, MSG_ERROR77, MSG_WARNING5, MSG_WARNING6, MSG_WARNING7, MSG_WARNING8, MSG_WARNING9, NULL, NUMMENU, TranslateMacro(), UINT, and WGFindMenuPos().

00309 {
00310   GFILE *menufile;
00311   BYTE *macroptr;
00312   char *buf;
00313   HMENU hMenu[MENUDEPTH + 1];
00314   int nLine = 1, nInc, i, nMenuLevel, nCountMenu;
00315   HGLOBAL hmacro;
00316   /* mark all buffers and menu file as unused */
00317   buf = (char *) NULL;
00318   hmacro = 0;
00319   ScilabGC->lpmw.macro = (BYTE **) NULL;
00320   menufile = (GFILE *) NULL;
00321 
00322   /* open menu file */
00323   if ((menufile = Gfopen (ScilabGC->lpgw->szMenuName, OF_READ)) == (GFILE *) NULL)
00324     goto errorcleanup;
00325 
00326   /* allocate buffers */
00327   if ((buf = LocalAlloc (LPTR, MAXSTR)) == (char *) NULL)
00328     goto nomemory;
00329   hmacro = GlobalAlloc (GHND, (NUMMENU) * sizeof (BYTE *));
00330   if ((ScilabGC->lpmw.macro = (BYTE **) GlobalLock (hmacro)) == (BYTE **) NULL)
00331     goto nomemory;
00332 
00333   /* Initialize macro array * */
00334   for (i = 0; i < NUMMENU; i++)
00335     {
00336       ScilabGC->lpmw.macro[i] = (BYTE *) 0;
00337     }
00340   ScilabGC->lpmw.nCountMenu = 0;
00341   ScilabGC->lpmw.nButton = 0;
00342   ScilabGC->lpmw.hMenu = hMenu[0] = CreateMenu ();
00343   nMenuLevel = 0;
00344 
00345   while ((nInc = GetLine (buf, MAXSTR, menufile)) != 0)
00346     {
00347       nLine += nInc;
00348       LeftJustify (buf, buf);
00349       if (buf[0] == '\0')
00350         {
00351           /* ignore blank lines */
00352         }
00353       else if (!lstrcmpi (buf, "[Menu]"))
00354         {
00355           /* new menu */
00356           if (!(nInc = GetLine (buf, MAXSTR, menufile)))
00357             {
00358               nLine += nInc;
00359               BUGGOTOCLEAN (MSG_WARNING5);
00360             }
00361           LeftJustify (buf, buf);
00362           if (nMenuLevel < MENUDEPTH)
00363             {
00364               nMenuLevel++;
00365             }
00366           else
00367             {
00368               BUGGOTOCLEAN (MSG_WARNING6);
00369             }
00370           hMenu[nMenuLevel] = CreateMenu ();
00371           AppendMenu (hMenu[nMenuLevel > 0 ? nMenuLevel - 1 : 0],
00372                       MF_STRING | MF_POPUP, (UINT) hMenu[nMenuLevel],
00373                       (LPCSTR) buf);
00374         }
00375       else if (!lstrcmpi (buf, "[EndMenu]"))
00376         {
00377           if (nMenuLevel > 0)
00378             nMenuLevel--;       /* back up one menu */
00379         }
00380       else
00381         {
00382           nCountMenu = WGFindMenuPos (ScilabGC->lpmw.macro);
00383           /* menu item */
00384           if (nCountMenu >= NUMMENU)
00385             {
00386               BUGGOTOCLEAN ( MSG_WARNING7 );
00387             }
00388           LeftJustify (buf, buf);
00389           if (buf[0] == '-')
00390             {
00391               if (nMenuLevel == 0)
00392                 AppendMenu (hMenu[0], MF_MENUBREAK, 0, (LPSTR) NULL);
00393               else
00394                 AppendMenu (hMenu[nMenuLevel], MF_SEPARATOR, 0, (LPSTR) NULL);
00395             }
00396           else if (buf[0] == '|')
00397             {
00398               AppendMenu (hMenu[nMenuLevel], MF_MENUBARBREAK, 0, (LPSTR) NULL);
00399             }
00400           else
00401             {
00402               AppendMenu (hMenu[nMenuLevel], MF_STRING, nCountMenu, (LPSTR) buf);
00403               ScilabGC->lpmw.nCountMenu++;
00404               if (!(nInc = GetLine (buf, MAXSTR, menufile)))
00405                 {
00406                   nLine += nInc;
00407                   BUGGOTOCLEAN (MSG_WARNING8);
00408                 }
00409               LeftJustify (buf, buf);
00410               TranslateMacro (buf);
00411               if ((macroptr = LocalAlloc (LPTR, lstrlen (buf) + 1)) != (BYTE *) NULL)
00412                 {
00413                   lstrcpy ((char *) macroptr, buf);
00414                 }
00415               else
00416                 {
00417                   BUGGOTOCLEAN (MSG_WARNING9);
00418                 }
00419               ScilabGC->lpmw.macro[nCountMenu] = macroptr;
00420             }
00421         }
00422     }
00423   nCountMenu = WGFindMenuPos (ScilabGC->lpmw.macro);
00424   if ((nCountMenu - ScilabGC->lpmw.nButton) > 0)
00425     {
00426       /* we have a menu bar so put it on the window */
00427       SetMenu (ScilabGC->hWndParent, ScilabGC->lpmw.hMenu);
00428       DrawMenuBar (ScilabGC->hWndParent);
00429     }
00430 
00431   goto cleanup;
00432 
00433  nomemory:
00434   MessageBox (ScilabGC->hWndParent, MSG_ERROR77,
00435               ScilabGC->lpgw->Title, MB_ICONEXCLAMATION);
00436 
00437  errorcleanup:
00438   if (hmacro)
00439     {
00440       for (i = 0; i < NUMMENU; i++)
00441         {
00442           if (ScilabGC->lpmw.macro[i] != (BYTE *) 0)
00443             {
00444               LocalFree (ScilabGC->lpmw.macro[i]);
00445               ScilabGC->lpmw.macro[i] = (BYTE *) 0;
00446             }
00447         }
00448       GlobalUnlock (hmacro);
00449       GlobalFree (hmacro);
00450       ScilabGC->lpmw.macro = (BYTE **) NULL;
00451     }
00452 
00453  cleanup:
00454   if (buf != (char *) NULL)
00455     LocalFree (buf);
00456   if (menufile != (GFILE *) NULL)
00457     Gfclose (menufile);
00458   return;
00459 }

Here is the call graph for this function:

void ModifyEntityPickerToolbar ( struct BCG ScilabGC,
BOOL  Pressed 
)

Definition at line 355 of file Toolbar.c.

References BCG::CWindow, NULL, TOOLBAR_PICKER, and UINT.

Referenced by SendMacroEntityPicker().

00356 {
00357         HWND hwndPicker=NULL;
00358         hwndPicker=GetDlgItem(ScilabGC->CWindow,TOOLBAR_PICKER);
00359 
00360         if (Pressed)
00361         {
00362                 SendMessage(hwndPicker,(UINT) BM_SETCHECK,BST_CHECKED,0);
00363         }
00364         else
00365         {
00366                 SendMessage(hwndPicker,(UINT) BM_SETCHECK,BST_UNCHECKED,0);  
00367         }
00368 }

Here is the caller graph for this function:

void NewFigure ( struct BCG ScilabGC  ) 

Definition at line 971 of file wgmenu.c.

References FindFreeGraphicWindow(), MAX_PATH, and StoreCommand1().

Referenced by SendGraphMacro().

00972 {
00973         
00974   char Command[MAX_PATH];
00975   int FreeWindow=0;
00976 
00977   FreeWindow=FindFreeGraphicWindow(ScilabGC);
00978   wsprintf(Command,"xset(\"window\",%d);",FreeWindow);
00979   StoreCommand1(Command,0);
00980         
00981 }

Here is the call graph for this function:

Here is the caller graph for this function:

void PrintPs ( struct BCG ScilabGC  ) 

Definition at line 153 of file FigureToPrint.c.

References tagLS::colored, BCG::CurWindow, dos2win32(), FALSE, filename, filename1, getenv(), GetPrinterDC(), GetPrinterOrientation(), gp_printfile(), hdllInstance, ls, MSG_ERROR78, MSG_WARNING15, NULL, scig_toPs(), ScilabPsToEps(), sciprint(), and tagLS::use_printer.

Referenced by FigureToPrint(), scig_print(), and SendGraphMacro().

00154 {
00155         HDC hPrinterDC=NULL;
00156         char *p1;
00157         char ori;
00159         ls.use_printer = 1;
00160         ls.colored = 1;
00161 
00162         hPrinterDC=GetPrinterDC(); // Just to Configure Printer
00163         if (hPrinterDC) {DeleteDC(hPrinterDC);hPrinterDC=NULL;}
00164 
00166         if ((p1 = getenv ("TMPDIR")) == (char *) 0)
00167         {
00168                 sciprint (MSG_WARNING15);
00169                 return;
00170         }
00171         sprintf (filename, "%s/scilab-%d", p1, (int) ScilabGC->CurWindow);
00172 
00173         dos2win32 (filename, filename1);
00174 
00175         scig_toPs (ScilabGC->CurWindow, ls.colored, filename1, "Pos");
00176 
00177         ori =GetPrinterOrientation();
00178 
00179         if (ScilabPsToEps (ori, filename1, filename) == 0)
00180         {
00181                 if (gp_printfile (hdllInstance, ScilabGC->hWndParent, filename,(char *) 0) == FALSE)    sciprint (MSG_ERROR78);
00182         }
00185 }

Here is the call graph for this function:

Here is the caller graph for this function:

void RefreshMenus ( struct BCG ScilabGC  ) 

Definition at line 1013 of file wgmenu.c.

References CloseGraphMacros(), CreateGedMenus(), and BCG::CurWindow.

01014 {
01015 
01016         int WinNum=ScilabGC->CurWindow;
01017         BOOL LockToolBar=ScilabGC->lpmw.LockToolBar;
01018         int nButton=ScilabGC->lpmw.nButton;
01019         BOOL StateToolBar=ScilabGC->lpmw.ShowToolBar;
01020 
01021         DestroyMenu(GetMenu(ScilabGC->hWndParent));
01022         ScilabGC->hMenuRoot=NULL;
01023         ScilabGC->IDM_Count=1;
01024         SetMenu(ScilabGC->hWndParent,NULL);
01025 
01026         CloseGraphMacros (ScilabGC);
01027         CreateGedMenus(ScilabGC);
01028 
01029         ScilabGC->lpmw.nButton=nButton;
01030         ScilabGC->lpmw.ShowToolBar=StateToolBar;
01031         ScilabGC->lpmw.LockToolBar=LockToolBar;
01032 
01033 }

Here is the call graph for this function:

void ResetMenu ( void   ) 

Definition at line 1894 of file wmenu.c.

Referenced by addmen(), and ON_WND_TEXT_WM_KEY().

01895 {
01896         LPTW lptw=GetTextWinScilab();
01897         ReLoadMenus(lptw);
01898 }   

Here is the caller graph for this function:

void SaveCurrentLine ( BOOL  RewriteLineAtPrompt  ) 

Definition at line 145 of file x_zzledt.c.

Referenced by ON_WND_CONSOLE_WM_ENTERSIZEMOVE(), ON_WND_TEXT_WM_COMMAND(), SendGraphMacro(), and SendMacro().

00146 {
00147         extern char cur_line[1024];
00148 
00149         if ( (get_is_reading ()) && (PutLineInBuffer == FALSE) )
00150         {
00151                 strcpy(copycur_line,cur_line);
00152                 if (RewriteLineAtPrompt) PutLineInBuffer=TRUE;
00153         }
00154 }

Here is the caller graph for this function:

void SavePs ( struct BCG ScilabGC  ) 

Definition at line 20 of file FigureToFile.c.

References CallTranslateMacroGraphicWindow(), tagLS::colored, dos2win32(), ExportBMP(), ExportEMF(), ExportStyle(), FALSE, filename, filename1, ierr, tagLS::land, ls, MAXSTR, ModifyFilenameExtension(), MSG_SCIMSG100, MSG_SCIMSG101, MSG_SCIMSG102, MSG_SCIMSG103, MSG_SCIMSG104, MSG_SCIMSG96, MSG_SCIMSG97, MSG_SCIMSG98, MSG_SCIMSG99, NULL, tagLS::ps_type, s, scig_toPs(), ScilabPsToEps(), ScilabPsToTeX(), SciOpenSave(), str, TRUE, tagLS::use_printer, and wininfo().

Referenced by AddNewWin(), scig_export(), and SendGraphMacro().

00021 {
00022   char *d, ori;
00023   char filename[MAXSTR],filename1[MAXSTR];
00024   BYTE *s;
00025   char str[1024];
00026   char formatmacro[]= "[SAVESCG]Export to %s[EOS]%s[EOS]";
00027   int flag, ierr = 0;
00029   ls.use_printer = 0;
00030   if (ExportStyle (ScilabGC) == FALSE) return;
00031 
00033   d = filename;
00034 
00035   switch (ls.ps_type)
00036   {
00037     case 0:
00038                 {
00039                         wsprintf(str,formatmacro,"Postscript","*.eps");
00040                         CallTranslateMacroGraphicWindow(str);
00041                         s = str;
00042                         flag = SciOpenSave (ScilabGC->hWndParent, &s,TRUE,&d, &ierr);
00043                         if (flag == 0 || ierr == 1) return;
00044                         *d = '\0';
00045 
00046                         ModifyFilenameExtension(filename,".pos");
00047 
00049                         SetCursor (LoadCursor (NULL, IDC_WAIT));
00050                         wininfo (MSG_SCIMSG96);
00051                         dos2win32 (filename, filename1);
00052                         scig_toPs (ScilabGC->CurWindow, ls.colored, filename1, "Pos");
00053                         ori = (ls.land == 1) ? 'l' : 'p';
00054                         ScilabPsToEps (ori, filename1, filename);
00055                         wininfo (MSG_SCIMSG97);
00056                         SetCursor (LoadCursor (NULL, IDC_CROSS));
00057                 }
00058                 break;
00059     case 1:
00060                 {
00061                         wsprintf(str,formatmacro,"Postscript No Preamble","*.ps");
00062 
00063                         CallTranslateMacroGraphicWindow(str);
00064                         s = str;
00065                         flag = SciOpenSave (ScilabGC->hWndParent, &s,TRUE,&d, &ierr);
00066                         if (flag == 0 || ierr == 1) return;
00067                         *d = '\0';
00068 
00069                         ModifyFilenameExtension(filename,".ps");
00070 
00071                         SetCursor (LoadCursor (NULL, IDC_WAIT));
00072                         scig_toPs (ScilabGC->CurWindow, ls.colored, filename, "Pos");
00073                         wininfo (MSG_SCIMSG98);
00074                         SetCursor (LoadCursor (NULL, IDC_CROSS));
00075                 }
00076                 break;
00077 
00078     case 2:
00079                 {
00080                         wsprintf(str,formatmacro,"Postscript-Latex","*.tex");
00081 
00082                         CallTranslateMacroGraphicWindow(str);
00083                         s = str;
00084                         flag = SciOpenSave (ScilabGC->hWndParent, &s,TRUE,&d, &ierr);
00085                         if (flag == 0 || ierr == 1) return;
00086                         *d = '\0';
00087 
00088                         ModifyFilenameExtension(filename,".tex");
00089 
00091                         SetCursor (LoadCursor (NULL, IDC_WAIT));
00092                         wininfo (MSG_SCIMSG99);
00093                         dos2win32 (filename, filename1);
00094                         scig_toPs (ScilabGC->CurWindow, ls.colored, filename1, "Pos");
00095                         ori = (ls.land == 1) ? 'l' : 'p';
00096                         ScilabPsToTeX (ori, filename1, filename, 1.0, 1.0);
00097                         wininfo (MSG_SCIMSG100);
00098                         SetCursor (LoadCursor (NULL, IDC_CROSS));
00099                 }
00100     break;
00101     case 3:
00102                 {
00103                         wsprintf(str,formatmacro,"Xfig","*.fig");
00104                         CallTranslateMacroGraphicWindow(str);
00105                         s = str;
00106                         flag = SciOpenSave (ScilabGC->hWndParent, &s,TRUE,&d, &ierr);
00107                         if (flag == 0 || ierr == 1) return;
00108                         *d = '\0';
00109 
00110                         ModifyFilenameExtension(filename,".fig");
00111 
00112                         SetCursor (LoadCursor (NULL, IDC_WAIT));
00113                         scig_toPs (ScilabGC->CurWindow, ls.colored, filename, "Fig");
00114                         wininfo (MSG_SCIMSG101);
00115                         SetCursor (LoadCursor (NULL, IDC_CROSS));
00116                 }
00117                 break;
00118     case 4:
00119                 {
00120                         wsprintf(str,formatmacro,"gif","*.gif");
00121                         CallTranslateMacroGraphicWindow(str);
00122                         s = str;
00123                         flag = SciOpenSave (ScilabGC->hWndParent, &s,TRUE,&d, &ierr);
00124                         if (flag == 0 || ierr == 1) return;
00125                         *d = '\0';
00126 
00127                         ModifyFilenameExtension(filename,".gif");
00128 
00129                         SetCursor (LoadCursor (NULL, IDC_WAIT));
00130                         scig_toPs (ScilabGC->CurWindow, ls.colored, filename, "GIF");
00131                         wininfo (MSG_SCIMSG102);
00132                         SetCursor (LoadCursor (NULL, IDC_CROSS));
00133                 }
00134                 break;
00135     case 5:
00136                 {
00137                         wsprintf(str,formatmacro,"PPM","*.ppm");
00138                         CallTranslateMacroGraphicWindow(str);
00139                         s = str;
00140                         flag = SciOpenSave (ScilabGC->hWndParent, &s,TRUE,&d, &ierr);
00141                         if (flag == 0 || ierr == 1) return;
00142                         *d = '\0';
00143 
00144                         ModifyFilenameExtension(filename,".ppm");
00145 
00146                         SetCursor (LoadCursor (NULL, IDC_WAIT));
00147                         scig_toPs (ScilabGC->CurWindow, ls.colored, filename, "PPM");
00148                         wininfo (MSG_SCIMSG103);
00149                         SetCursor (LoadCursor (NULL, IDC_CROSS));
00150                 }
00151     break;
00152     case 6:
00153                 {
00154                         wsprintf(str,formatmacro,"Bmp","*.bmp");
00155                         CallTranslateMacroGraphicWindow(str);
00156                         s = str;
00157                         flag = SciOpenSave (ScilabGC->hWndParent, &s,TRUE,&d, &ierr);
00158                         if (flag == 0 || ierr == 1) return;
00159                         *d = '\0';
00160 
00161                         ModifyFilenameExtension(filename,".bmp");
00162 
00163                         SetCursor (LoadCursor (NULL, IDC_WAIT));
00164                         ExportBMP(ScilabGC,filename);
00165                         wininfo (MSG_SCIMSG104);
00166                         SetCursor (LoadCursor (NULL, IDC_CROSS));
00167                 }
00168     break;
00169     case 7:
00170                 {
00171                         wsprintf(str,formatmacro,"Enhanced Metafile","*.emf");
00172                         CallTranslateMacroGraphicWindow(str);
00173                         s = str;
00174                         flag = SciOpenSave (ScilabGC->hWndParent, &s,TRUE,&d, &ierr);
00175                         if (flag == 0 || ierr == 1) return;
00176                         *d = '\0';
00177 
00178                         ModifyFilenameExtension(filename,".emf");
00179 
00180                         SetCursor (LoadCursor (NULL, IDC_WAIT));
00181                         ExportEMF(ScilabGC,filename);
00182                         wininfo (MSG_SCIMSG104);
00183                         SetCursor (LoadCursor (NULL, IDC_CROSS));
00184                 }
00185     break;
00186   }
00187         
00188 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void SciChMenu ( LPMW  lpmw,
char *  name,
char *  new_name 
) [static]

Definition at line 638 of file wgmenu.c.

References buf, tagMW::hMenu, i, id, and is.

Referenced by chmenu().

00639 {
00640   int i, is, id, Nums = GetMenuItemCount (lpmw->hMenu);
00641   for (i = 0; i < Nums; i++)
00642     {
00643       char buf[256];
00644       is = GetMenuString (lpmw->hMenu, i, buf, 256, MF_BYPOSITION);
00645       buf[is] = '\0';
00646       if (strcmp (buf, name) == 0)
00647         {
00648           id = GetMenuItemID (lpmw->hMenu, i);
00649           ModifyMenu (lpmw->hMenu, i, MF_BYPOSITION | MF_STRING, id, new_name);
00650         }
00651     }
00652 }

Here is the caller graph for this function:

static void SciDelMenu ( LPMW  lpmw,
char *  name 
) [static]

Definition at line 678 of file wgmenu.c.

References buf, tagMW::hMenu, i, id, is, j, and tagMW::macro.

Referenced by delbtn().

00679 {
00680   int i, is, id, Nums = GetMenuItemCount (lpmw->hMenu);
00681   for (i = 0; i < Nums; i++)
00682     {
00683       char buf[256];
00684       is = GetMenuString (lpmw->hMenu, i, buf, 256, MF_BYPOSITION);
00685       buf[is] = '\0';
00686       if (strcmp (buf, name) == 0)
00687         {
00688           int j, Nums1;
00689           HMENU hSubMenu;
00690           hSubMenu = GetSubMenu (lpmw->hMenu, i);
00691           if (hSubMenu != NULL)
00692             {
00693               Nums1 = GetMenuItemCount (hSubMenu);
00694               for (j = 0; j < Nums1; j++)
00695                 {
00696                   id = GetMenuItemID (hSubMenu, j);
00698                   if (id < 0 || is == 0)
00699                     continue;
00707                   if (lpmw->macro[id] != (BYTE *) 0)
00708                     {
00709                       LocalFree (lpmw->macro[id]);
00710                       lpmw->macro[id] = (BYTE *) 0;
00711                     }
00712                 }
00713             }
00714           else
00715             {
00716               id = GetMenuItemID (lpmw->hMenu, i);
00718               if (id < 0 || is == 0)
00719                 continue;
00727               if (lpmw->macro[id] != (BYTE *) 0)
00728                 {
00729                   LocalFree (lpmw->macro[id]);
00730                   lpmw->macro[id] = (BYTE *) 0;
00731                 }
00732             }
00733           DeleteMenu (lpmw->hMenu, i, MF_BYPOSITION);
00734           return;
00735         }
00736     }
00737 }

Here is the caller graph for this function:

static void scig_command_scilabgc ( int  number,
void   f(struct BCG *) 
) [static]

Definition at line 904 of file wgmenu.c.

References BCG::CWindow, f(), and getWindowXgcNumber().

Referenced by scig_export(), scig_h_copyclip(), scig_h_copyclip1(), and scig_print().

00905 {
00906   struct BCG *ScilabGC = getWindowXgcNumber (number);
00907   if (ScilabGC != NULL && ScilabGC->CWindow && IsWindow (ScilabGC->CWindow))
00908     f (ScilabGC);
00909 }

Here is the call graph for this function:

Here is the caller graph for this function:

void scig_export ( integer  number  ) 

Definition at line 926 of file wgmenu.c.

00927 {
00928   scig_command_scilabgc (number, SavePs);
00929 }

void scig_h_copyclip ( integer  number  ) 

Definition at line 911 of file wgmenu.c.

References CopyToClipboardEMF(), and scig_command_scilabgc().

Here is the call graph for this function:

void scig_h_copyclip1 ( integer  number  ) 

Definition at line 916 of file wgmenu.c.

References CopyToClipboardBitmap(), and scig_command_scilabgc().

Here is the call graph for this function:

void scig_print ( integer  number  ) 

Definition at line 921 of file wgmenu.c.

00922 {
00923   scig_command_scilabgc (number, PrintPs);
00924 }

void scig_savesg ( int  win_num,
char *  filename 
)

Definition at line 225 of file Actions.c.

References C2F, FREE, GET_NB_DIGITS, MALLOC, NULL, and syncexec().

Referenced by SendGraphMacro().

00226 {
00227   integer ierr ;
00228   integer seq = 1 ;
00229   char * macroCall = NULL ;
00230 
00231   /* the sting is "xsave('(1)',(2))" where (1) is filemame and (2) the string */
00232   /* corresponding of win_num. Consequently we have 10 fixed character and two variable strings. */
00233   int macroCallLength = 10 + strlen(filename) + GET_NB_DIGITS(win_num) ;
00234 
00235   macroCall = MALLOC( (macroCallLength+1) * sizeof(char) ) ; /* +1 for the \0 terminating character */
00236 
00237   sprintf( macroCall, "xsave('%s',%d)", filename, win_num ) ; /* call xsave macro */
00238   C2F(syncexec)(macroCall,&macroCallLength,&ierr,&seq, macroCallLength );
00239   FREE( macroCall ) ;
00240 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ScilabMenuAction ( char *  buf  ) 

Definition at line 197 of file wgmenu.c.

References C2F, F2C(), fbutn(), FREE, MALLOC, NULL, rep, setfbutn(), StoreCommand1(), and strchr().

00198 {
00199         if (strlen (buf) > 2 && buf[0] == '@')
00200         {
00202             if (buf[1] == '0')
00203                 {
00204                   /* Interpreted mode : we store the action on a queue */
00205                   StoreCommand1 (buf + 2, 0);
00206                 }
00207             else
00208                 {
00209                         /* hard coded mode */
00210                         int rep, win, entry;
00211                         char *tmp=NULL;
00212                         char *LocalBuf=(char*)MALLOC((strlen(buf)+1)*sizeof(char));
00213                         char *FunctionName=(char*)MALLOC((strlen(buf)+1)*sizeof(char));
00214                         wsprintf(LocalBuf,"%s",buf+strlen("@1")+strlen("execstr("));
00215                         /*remove last char ')' */
00216                         LocalBuf[strlen(LocalBuf)-1]='\0';
00217 
00218                         if ( ( tmp = strchr (LocalBuf, '_') ) != NULL )
00219                         {
00220                                 sscanf (tmp + 1, "%d(%d)", &win, &entry);
00221                                 entry--;
00222                                 strncpy(FunctionName,LocalBuf,strlen(LocalBuf)-strlen(tmp));
00223                                 *tmp = '\0';
00224                         }
00225                         else
00226                         {
00227                                 win = -1;
00228                                 if ((tmp = strchr (LocalBuf, '(')) != NULL)
00229                                 {
00230                                         char *tmpbis=NULL;
00231                                         sscanf (tmp, "(%d)", &entry);
00232                                         
00233                                         if ( ( tmpbis = strchr (LocalBuf, '(') ) != NULL )
00234                                         {
00235                                                 strncpy(FunctionName,LocalBuf,strlen(LocalBuf)-strlen(tmpbis));
00236                                         }
00237 
00238                                         entry--;
00239                                         *tmp = '\0';
00240                                 }
00241                         }
00242 
00243                         C2F (setfbutn) (FunctionName, &rep);
00244                         if (rep == 0)
00245                         {
00246                                 F2C (fbutn) (FunctionName, &(win), &(entry));
00247                         }
00248 
00249                         if (FunctionName) {FREE(FunctionName);FunctionName=NULL;}
00250                         if (LocalBuf) {FREE(LocalBuf);LocalBuf=NULL;}
00251                 }
00252         }
00253         else 
00254         {
00255                 if (buf[0] != '\0')
00256                 {
00258                         if (strlen (buf) == 1 && buf[0] <= 31 && buf[0] >= 1) 
00259                         {
00260                                 StoreCommand1 (buf, 0);
00261                         }
00262                         else
00263                         {
00264                                 StoreCommand1 (buf, 1);
00265                         }
00266                 }
00267         }
00268 }

Here is the call graph for this function:

static void SciSetMenu ( HMENU  hmen,
char *  name,
int  num,
int  flag 
) [static]

Definition at line 584 of file wgmenu.c.

References buf, i, and is.

Referenced by setmen(), and unsmen().

00585 {
00586   int i, is, Nums = GetMenuItemCount (hmen);
00587   for (i = 0; i < Nums; i++)
00588     {
00589       char buf[256], *ptr;
00590       is = GetMenuString (hmen, i, buf, 256, MF_BYPOSITION);
00591       buf[is] = '\0';
00593       if ((ptr = strstr (buf, "&")) != NULL)
00594         lstrcpy (ptr, ptr + 1);
00595       if (strcmp (buf, name) == 0)
00596         {
00597           if (num == 0)
00598             EnableMenuItem (hmen, i, flag | MF_BYPOSITION);
00599           else
00600             {
00601               HMENU hSubMenu;
00602               hSubMenu = GetSubMenu (hmen, i);
00603               if (hSubMenu != NULL)
00604                 {
00605                   EnableMenuItem (hSubMenu, num - 1, flag | MF_BYPOSITION);
00606                 }
00607             }
00608         }
00609     }
00610 }

Here is the caller graph for this function:

void SendGraphMacro ( struct BCG ScilabGC,
UINT  m 
)

Definition at line 38 of file wgmenu.c.

References buf, C2F, Callback_PRINTSETUP(), CLEARWG, CLOSE, CMDMAX, CMDMIN, COPYCLIP, COPYCLIP1, CopyPrint(), CopyToClipboardBitmap(), CopyToClipboardEMF(), BCG::CurWindow, BCG::CWindow, deletewin(), FALSE, free(), HideGraphToolBar(), ierr, L, LOADSCG, M_WRITEINI, MAXSTR, NEWFIG, NewFigure(), NULL, NUMMENU, PrintPs(), PRINTSETUP, REDRAW, ROT3D, s, SaveCurrentLine(), SavePs(), SAVESCG, scig_2dzoom(), scig_3drot(), scig_erase(), scig_loadsg(), scig_replay(), scig_savesg(), scig_sel(), scig_unzoom(), SCIGSEL, ScilabMenuAction(), SciOpenSave(), SCIPR, SCIPS, ShowGraphToolBar(), TOOLBARGRAPH, TRUE, UNZOOM, UPDINI, wininfo(), and ZOOM.

00039 {
00040   BYTE *s;
00041   char *d;
00042   char *buf;
00043   BOOL flag = TRUE;
00044   wininfo (" ");
00045   if ((buf = LocalAlloc (LPTR, MAXSTR + 1)) == (char *) NULL)
00046     return;
00047   if (m >= NUMMENU || (int)m < 0)
00048     return;
00049   s = ScilabGC->lpmw.macro[m];
00050   d = buf;
00051   *d = '\0';
00052   while (s && *s && (d - buf < MAXSTR))
00053     {
00054       if (*s >= CMDMIN && *s <= CMDMAX)
00055         {
00056           int ierr = 0;
00057           
00059           switch (*s)
00060             {
00061             case TOOLBARGRAPH:
00062               if (ScilabGC->lpmw.LockToolBar == FALSE)
00063                 {
00064                   if (ScilabGC->lpmw.ShowToolBar)       HideGraphToolBar(ScilabGC);
00065                   else ShowGraphToolBar(ScilabGC);
00066                 }
00067               s++;
00068               break;
00069             case NEWFIG:
00070               SaveCurrentLine(TRUE);
00071               NewFigure(ScilabGC);
00072               s++;
00073               break;
00074             case ZOOM:
00075               scig_2dzoom (ScilabGC->CurWindow);
00076                   
00077               s++;
00078               break;
00079             case UNZOOM:
00080               scig_unzoom (ScilabGC->CurWindow);
00081                   
00082               s++;
00083               break;
00084             case ROT3D:
00085               scig_3drot (ScilabGC->CurWindow);
00086                   
00087               s++;
00088               break;
00089                 case PRINTSETUP:
00090                         Callback_PRINTSETUP();
00091                         s++;
00092                         break;
00093             case PRINT:
00094               CopyPrint (ScilabGC);
00095               s++;
00096               break;
00097             case COPYCLIP:
00098               {
00099                 CopyToClipboardEMF (ScilabGC);
00100                 s++;
00101               }
00102               break;
00103             case COPYCLIP1:
00104               CopyToClipboardBitmap (ScilabGC);
00105               s++;
00106               break;
00107             case REDRAW:
00108               scig_replay (ScilabGC->CurWindow);
00109               s++;
00110               break;
00111             case CLEARWG:
00112               scig_erase (ScilabGC->CurWindow);
00113               s++;
00114               break;
00115             case SCIPS:
00116                 {
00117                         char *SaveCurrentPath=NULL;
00118                         SaveCurrentPath=_getcwd( NULL, 0 );
00119                         SavePs (ScilabGC);
00120                         if (SaveCurrentPath)
00121                         {
00122                                 _chdir(SaveCurrentPath);
00123                                 free(SaveCurrentPath); /* here must be a "little" free with _getcwd*/
00124                                 SaveCurrentPath=NULL;
00125                         }
00126                         s++;
00127                 }
00128               break;
00129             case SCIPR:
00130               PrintPs (ScilabGC);
00131               s++;
00132               break;
00133             case SCIGSEL:
00134               scig_sel (ScilabGC->CurWindow);
00135               s++;
00136               break;
00137             case LOADSCG:
00138               flag = SciOpenSave (ScilabGC->hWndParent, &s,FALSE,&d, &ierr);
00139               if (flag == 0 || ierr == 1)
00140                 {
00141                   LocalFree (buf);
00142                   return;
00143                 }
00144               *d = '\0';
00145               scig_loadsg (ScilabGC->CurWindow, buf);
00146               break;
00147             case SAVESCG:
00148               flag = SciOpenSave (ScilabGC->hWndParent, &s,TRUE,&d, &ierr);
00149               if (flag == 0 || ierr == 1)
00150                 {
00151                   LocalFree (buf);
00152                   return;
00153                 }
00154               *d = '\0';
00155               /*C2F (xsaveplots) (&(ScilabGC->CurWindow), buf, 0L);*/
00156               scig_savesg( ScilabGC->CurWindow, buf ) ;
00157               break;
00158             case UPDINI:
00159               SendMessage (ScilabGC->CWindow, WM_COMMAND, M_WRITEINI, 0L);
00160               s++;
00161               break;
00162             case CLOSE:
00163               C2F (deletewin) (&(ScilabGC->CurWindow));
00164               s++;
00165               break;
00166             default:
00167               s++;
00168               break;
00169             }
00173           d = buf;
00174           s = (BYTE *) "";
00175         }
00176       else
00177         {
00178           *d++ = *s++;
00179         }
00180     }
00181   *d = '\0';
00186   ScilabMenuAction (buf);
00187   LocalFree (buf);
00188 
00189 }

Here is the call graph for this function:

BOOL SendMacroEntityPicker ( struct BCG ScilabGC,
int  id 
)

Definition at line 1083 of file wgmenu.c.

References command, BCG::CurWindow, FALSE, IsEntityPickerMenu(), ModifyEntityPickerToolbar(), StoreCommand(), and TRUE.

Referenced by ON_WND_GRAPH_WM_COMMAND().

01084 {
01085         BOOL bOK=FALSE;
01086         char command[1024];
01087         
01088         if (IsEntityPickerMenu(ScilabGC,id))
01089         {
01090                 if (id == 23)
01091                 {
01092                         wsprintf(command,"ged(10,%d);",ScilabGC->CurWindow); /* Start */
01093                         ModifyEntityPickerToolbar(ScilabGC,TRUE);
01094                         StoreCommand(command);
01095                         bOK=TRUE;
01096                 }
01097 
01098                 if (id == 24)
01099                 {
01100                         wsprintf(command,"ged(11,%d);",ScilabGC->CurWindow); /* Stop */
01101                         ModifyEntityPickerToolbar(ScilabGC,FALSE);
01102                         StoreCommand(command);
01103                         bOK=TRUE;
01104                 }
01105         }
01106         
01107         return bOK;
01108 }

Here is the call graph for this function:

Here is the caller graph for this function:

int C2F() setmen ( integer win_num,
char *  button_name,
integer entries,
integer ptrentries,
integer ne,
integer ierr 
)

Definition at line 541 of file wgmenu.c.

00544 {
00545   struct BCG *ScilabGC;
00546   if (*win_num == -1)
00547     {
00548       SciSetMenu (textwin.lpmw->hMenu, button_name, *ne, MF_ENABLED);
00549       DrawMenuBar (textwin.hWndParent);
00550     }
00551   else
00552     {
00553       ScilabGC = getWindowXgcNumber (*win_num);
00554       if (ScilabGC != (struct BCG *) 0)
00555         {
00556           SciSetMenu (ScilabGC->lpmw.hMenu, button_name, *ne, MF_ENABLED);
00557           DrawMenuBar (ScilabGC->hWndParent);
00558         }
00559     }
00560   return (0);
00561 }

void ShowGraphToolBar ( struct BCG ScilabGC  ) 

Definition at line 34 of file Toolbar.c.

00035 {
00036         int i=0;
00037 
00038         ScilabGC->lpmw.ShowToolBar=TRUE;
00039         for (i=0;i<ScilabGC->lpmw.nButton;i++)
00040         {
00041                 ShowWindow(ScilabGC->lpmw.hButton[i],SW_SHOWNORMAL);
00042         }
00043 }

static void TranslateMacro ( char *  string  )  [static]

Definition at line 289 of file wgmenu.c.

References i, keyeq, keyword, len, and NULL.

Referenced by CallTranslateMacroGraphicWindow(), LoadGraphMacros(), and LoadMacros().

00290 {
00291   int i, len;
00292   LPSTR ptr;
00293   for (i = 0; keyword[i] != (char *) NULL; i++)
00294     {
00295       if ((ptr = strstr (string, keyword[i])) != NULL)
00296         {
00297           len = lstrlen (keyword[i]);
00298           *ptr = keyeq[i];
00299           lstrcpy (ptr + 1, ptr + len);
00300           i--;                  /* allows for more than one occurrence of keyword */
00301         }
00302     }
00303 }

Here is the caller graph for this function:

int C2F() unsmen ( integer win_num,
char *  button_name,
integer entries,
integer ptrentries,
integer ne,
integer ierr 
)

Definition at line 563 of file wgmenu.c.

00565 {
00566   struct BCG *ScilabGC;
00567   if (*win_num == -1)
00568     {
00569       SciSetMenu (textwin.lpmw->hMenu, button_name, *ne, MF_GRAYED);
00570       DrawMenuBar (textwin.hWndParent);
00571     }
00572   else
00573     {
00574       ScilabGC = getWindowXgcNumber (*win_num);
00575       if (ScilabGC != (struct BCG *) 0)
00576         {
00577           SciSetMenu (ScilabGC->lpmw.hMenu, button_name, *ne, MF_GRAYED);
00578           DrawMenuBar (ScilabGC->hWndParent);
00579         }
00580     }
00581   return (0);
00582 }

void UpdateFileGraphNameMenu ( struct BCG ScilabGC  ) 

Definition at line 931 of file wgmenu.c.

References tagMW::CodeLanguage, FALSE, FILEGRAPHMENUENGLISH, FILEGRAPHMENUFRENCH, FREE, GetScilabDirectory(), GetTextWinScilab(), IsWindowInterface(), tagTW::lpmw, MALLOC, MAX_PATH, and ScilexWindowName.

00932 {
00933 #define FILEGRAPHMENUFRENCH "wgscilabF.mnu"
00934 #define FILEGRAPHMENUENGLISH "wgscilabE.mnu"
00935   extern char ScilexWindowName[MAX_PATH];
00936   char *ScilabDirectory=NULL;
00937 
00938   HWND hWndTmpScilex=FindWindow(NULL,ScilexWindowName);
00939   int LangCode=0; /*English*/
00940 
00941   if (IsWindowInterface())
00942     {
00943       if (hWndTmpScilex)
00944         {
00945           LPTW lptw=GetTextWinScilab();
00946           LangCode=lptw->lpmw->CodeLanguage;
00947         }
00948       else LangCode=0;
00949     }
00950   else LangCode=0;
00951   ScilabGC->lpmw.CodeLanguage=LangCode;
00952 
00953   ScilabDirectory=GetScilabDirectory(FALSE);
00954         
00955   if (ScilabGC->lpgw->szMenuName!=NULL) FREE(ScilabGC->lpgw->szMenuName);
00956   ScilabGC->lpgw->szMenuName = (LPSTR) MALLOC (strlen (ScilabDirectory) +strlen("\\bin\\")+ strlen (FILEGRAPHMENUENGLISH) + 1);
00957         
00958   switch (LangCode)
00959   {
00960     case 1:
00961           wsprintf(ScilabGC->lpgw->szMenuName,"%s\\bin\\%s",ScilabDirectory, FILEGRAPHMENUFRENCH);
00962       break;
00963     default : case 0:
00964           wsprintf(ScilabGC->lpgw->szMenuName,"%s\\bin\\%s",ScilabDirectory, FILEGRAPHMENUENGLISH);
00965       break;
00966   }
00967 
00968   if (ScilabDirectory){FREE(ScilabDirectory);ScilabDirectory=NULL;}     
00969 }

Here is the call graph for this function:

int WGFindMenuPos ( BYTE **  macros  ) 

Definition at line 465 of file wgmenu.c.

References i, and NUMMENU.

00466 {
00467   int i;
00468   for (i = 0; i < NUMMENU; i++)
00469     {
00470       if (macros[i] == (BYTE *) 0)
00471         return (i);
00472     }
00473   return (NUMMENU);
00474 }

void write_scilab ( char *  buf  ) 

Definition at line 274 of file wgmenu.c.

00275 {
00276   if ( IsWindowInterface() ) Write_Scilab_Window(buf);
00277   else Write_Scilab_Console(buf);
00278   
00279 }

void Write_Scilab_Console ( char *  buf  ) 

Referenced by write_scilab().

Here is the caller graph for this function:

void Write_Scilab_Window ( char *  buf  ) 

Definition at line 124 of file readline.c.

References buffer, clear_line(), copy_line(), GetCurrentPrompt(), tagTW::hWndText, IsWindowInterface(), L, prompt, and textwin.

Referenced by write_scilab().

00126 {
00127         if (IsWindowInterface())
00128         {
00129                 char *d;
00130                 char buffer[1024];
00131                 if ( ( buf[strlen(buf)-1] != '\n' ) && ( buf[strlen(buf)-1] != '\r' ) )
00132                 {
00133                         strcpy(buffer,buf);
00134                         strcat(buffer,"\n");
00135                 }
00136                 else
00137                 {
00138                         strcpy(buffer,buf);
00139                 }
00140         
00141                 if (buffer[0] != '\0')
00142                 {
00143                         d       = buffer;
00144                         while (*d)
00145                         {
00146                                 SendMessage (textwin.hWndText, WM_CHAR, *d, 1L);
00147                                 d++;
00148                         }
00149                 }
00150         }
00151         else
00152         {
00153                 char prompt[10];
00154                 GetCurrentPrompt(prompt);
00155                 clear_line (prompt);
00156                 copy_line (buf);
00157         }
00158 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

HINSTANCE hdllInstance

Definition at line 88 of file wtext.c.


Generated on Sun Mar 4 15:58:45 2007 for Scilab [trunk] by  doxygen 1.5.1