#include "DragnDrop.h"Include dependency graph for DragnDrop.c:

Go to the source code of this file.
Functions | |
| void | GetCurrentPrompt (char *CurrentPrompt) |
| int | StoreCommand (char *command) |
| BOOL | IsToThePrompt (void) |
| BOOL | LaunchFilebyExtension (char *File) |
| void | DragFunc (LPTW lptw, HDROP hdrop) |
| void DragFunc | ( | LPTW | lptw, | |
| HDROP | hdrop | |||
| ) |
Definition at line 13 of file DragnDrop.c.
References tagTW::bGetCh, FALSE, i, LaunchFilebyExtension(), MAX_PATH, and NULL.
Referenced by ON_WND_CONSOLE_WM_DROPFILES(), ON_WND_GRAPH_WM_DROPFILES(), and ON_WND_PARENTGRAPH_WM_DROPFILES().
00014 { 00015 static char szFile[MAX_PATH]; 00016 int i, cFiles; 00017 00018 cFiles = DragQueryFile (hdrop, 0xffffffff, (LPSTR) NULL, 0); 00019 00020 lptw->bGetCh =FALSE; 00021 00022 for (i = 0; i < cFiles; i++) 00023 { 00024 DragQueryFile (hdrop, i, szFile, MAX_PATH); 00025 LaunchFilebyExtension(szFile); 00026 } 00027 DragFinish (hdrop); 00028 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void GetCurrentPrompt | ( | char * | CurrentPrompt | ) |
Definition at line 23 of file prompt.c.
00024 { 00025 if (CurrentPrompt) 00026 { 00027 strcpy(CurrentPrompt,Sci_Prompt); 00028 } 00029 }
| BOOL IsToThePrompt | ( | void | ) |
Definition at line 1974 of file wtext.c.
Referenced by Callback_GETCWD(), Callback_HELP(), Callback_OPEN(), Callback_SCIPAD(), LaunchFilebyExtension(), SendCTRLandAKey(), and StoreCommand1().
01975 { 01976 BOOL retour=FALSE; 01977 LPTW lptw=GetTextWinScilab(); 01978 01979 if (( ( C2F (ismenu) () == 1 ) || ( lptw->bGetCh == FALSE ) ) && (!get_is_reading()) ) retour=FALSE; 01980 else retour=TRUE; 01981 01982 return retour; 01983 }
Here is the caller graph for this function:

| BOOL LaunchFilebyExtension | ( | char * | File | ) |
Definition at line 30 of file DragnDrop.c.
References FALSE, FREE, GetCurrentPrompt(), IsToThePrompt(), MALLOC, NULL, save_prompt, StoreCommand(), and TRUE.
Referenced by DragFunc().
00031 { 00032 BOOL bOK=FALSE; 00033 char save_prompt[10]; 00034 char *CommandLine=NULL; 00035 char *ExtensionFilename=NULL; 00036 00037 ExtensionFilename=PathFindExtension(File); 00038 GetCurrentPrompt(save_prompt); 00039 00040 if ( (_stricmp(ExtensionFilename,".bin")==0) || (_stricmp(ExtensionFilename,".sav")==0) ) 00041 { 00042 bOK=TRUE; 00043 CommandLine=(char*)MALLOC( (strlen(File)+strlen("load('%s');printf('\n%s');")+strlen(save_prompt))*sizeof(char) ); 00044 if (IsToThePrompt()) 00045 wsprintf(CommandLine,"load('%s');printf('\n%s');",File,save_prompt); 00046 else 00047 wsprintf(CommandLine,"load('%s');",File); 00048 } 00049 else 00050 if ( (_stricmp(ExtensionFilename,".graph")==0) || (_stricmp(ExtensionFilename,".graphb")==0) ) 00051 { 00052 bOK=TRUE; 00053 CommandLine=(char*)MALLOC( (strlen(File)+strlen("edit_graph('%s');printf('\n%s');")+strlen(save_prompt))*sizeof(char) ); 00054 if (IsToThePrompt()) 00055 wsprintf(CommandLine,"edit_graph('%s');printf('\n%s');",File,save_prompt); 00056 else 00057 wsprintf(CommandLine,"edit_graph('%s');",File); 00058 } 00059 else 00060 if ( (_stricmp(ExtensionFilename,".cos")==0) || (_stricmp(ExtensionFilename,".cosf")==0) ) 00061 { 00062 bOK=TRUE; 00063 CommandLine=(char*)MALLOC( (strlen(File)+strlen("scicos('%s');printf('\n%s');")+strlen(save_prompt))*sizeof(char) ); 00064 if (IsToThePrompt()) 00065 wsprintf(CommandLine,"scicos('%s');printf('\n%s');",File,save_prompt); 00066 else 00067 wsprintf(CommandLine,"scicos('%s');printf('%s');",File); 00068 } 00069 else 00070 if (_stricmp(ExtensionFilename,".sci")==0) 00071 { 00072 bOK=TRUE; 00073 CommandLine=(char*)MALLOC( (strlen(File)+strlen("getf('%s');printf('\n%s');")+strlen(save_prompt))*sizeof(char) ); 00074 if (IsToThePrompt()) 00075 wsprintf(CommandLine,"getf('%s');printf('\n%s');",File,save_prompt); 00076 else 00077 wsprintf(CommandLine,"getf('%s');",File); 00078 } 00079 else 00080 if ( (_stricmp(ExtensionFilename,".sce")==0) || (_stricmp(ExtensionFilename,".tst")==0) || (_stricmp(ExtensionFilename,".dem")==0) ) 00081 { 00082 bOK=TRUE; 00083 CommandLine=(char*)MALLOC( (strlen(File)+strlen("exec('%s');printf('\n%s');")+strlen(save_prompt))*sizeof(char) ); 00084 if (IsToThePrompt()) 00085 wsprintf(CommandLine,"exec('%s');printf('\n%s');",File,save_prompt); 00086 else 00087 wsprintf(CommandLine,"exec('%s');",File); 00088 } 00089 else 00090 if (_stricmp(ExtensionFilename,".scg")==0) 00091 { 00092 bOK=TRUE; 00093 CommandLine=(char*)MALLOC( (strlen(File)+strlen("xload('%s');printf('\n%s');")+strlen(save_prompt))*sizeof(char) ); 00094 if (IsToThePrompt()) 00095 wsprintf(CommandLine,"xload('%s');printf('\n%s');",File,save_prompt); 00096 else 00097 wsprintf(CommandLine,"xload('%s');",File); 00098 } 00099 else 00100 { 00101 CommandLine=(char*)MALLOC( (strlen(File)+strlen("disp('unknown file type : %s\n');printf('%s');")+strlen(save_prompt))*sizeof(char) ); 00102 if (IsToThePrompt()) 00103 wsprintf(CommandLine,"disp('unknown file type : %s\n');printf('%s');",ExtensionFilename,save_prompt); 00104 else 00105 wsprintf(CommandLine,"disp('unknown file type : %s\n');",ExtensionFilename); 00106 00107 bOK=FALSE; 00108 } 00109 00110 StoreCommand(CommandLine); 00111 if (CommandLine) {FREE(CommandLine);CommandLine=NULL;} 00112 00113 FREE(ExtensionFilename); 00114 return bOK; 00115 00116 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int StoreCommand | ( | char * | command | ) |
Definition at line 82 of file dynamic_menus.c.
00083 { 00084 return (StoreCommand1 (command, 0)); /* jpc 1->0 */ 00085 }
1.5.1