gCAD3D 2.35
gui_gtk3/gtk_dlg_files.h File Reference

Go to the source code of this file.

Functions

void * GUI_file_get ()
 
int GUI_file_open__ (char *filNam, int fSiz, char *dirNam, int dSiz, char *filterO, void *dirLst, char *title, char *filterI)
 
int GUI_file_save__ (char *filNam, int fSiz, char *dirNam, int dSiz, void *getDirLst, char *title, char *filter)
 

Function Documentation

void* GUI_file_get ( )
int GUI_file_open__ ( char *  filNam,
int  fSiz,
char *  dirNam,
int  dSiz,
char *  filterO,
void *  dirLst,
char *  title,
char *  filterI 
)
GUI_File_open open file, waiting.
Input:
fSiz max size of filNam in bytes
dSiz max size of dirNam in bytes
dirNam directory or "." (active directory)
dirLst NULL or filename with "symbol directory"-lines (Button DIR-SYM)
filterI NULL or filtertext; eg "*.c";
Output:
filNam
dirNam
filterO modified filtertext or NULL
retCode 0=OK, -1=Cancel, -2=fSiz/dSiz too small
Example:
char s1[204], s2[204]; int irc;
strcpy(s2, ".");
irc = GUI_file_open__ (s1, 200, s2, 200, NULL, NULL, "open", "*.c");
if(irc) return irc;
printf(" open |%s|%s|\n",s1,s2);
TODO: case-insensitivity of filter ..
GUI_File_open open file, waiting.
Input:
fSiz max size of filNam in bytes
dSiz max size of dirNam in bytes
dirNam directory or "." (active directory)
dirLst NULL or filename with "symbol directory"-lines (Button DIR-SYM)
filterI NULL or filtertext; eg "*.c";
Output:
filNam
dirNam
filterO modified filtertext or NULL
retCode 0=OK, -1=Cancel, -2=fSiz/dSiz too small
Example:
char s1[204], s2[204]; int irc;
strcpy(s2, ".");
irc = GUI_file_open__ (s1, 200, s2, 200, NULL, NULL, "open", "*.c");
if(irc) return irc;
printf(" open |%s|%s|\n",s1,s2);
TODO: case-insensitivity of filter ..
int GUI_file_save__ ( char *  filNam,
int  fSiz,
char *  dirNam,
int  dSiz,
void *  getDirLst,
char *  title,
char *  filter 
)
GUI_File_save save file
Input:
filNam file to save
fSiz size of filNam in chars
dirNam directory or "." (active directory)
dSiz size of dirNam in chars
dirLst NULL or filename with "symbol directory"-lines (Button DIR-SYM)
filter NULL or filtertext; eg "*.c"
Output:
filNam
dirNam
retCode 0=OK, -1=Cancel, -2=fSiz/dSiz too small, -3=file does not exist
TODO: case-insensitivity of filter ..
GUI_File_save save file
Input:
filNam file to save
fSiz size of filNam in chars
dirNam directory or "." (active directory)
dSiz size of dirNam in chars
dirLst NULL or filename with "symbol directory"-lines (Button DIR-SYM)
filter NULL or filtertext; eg "*.c"
Output:
filNam
dirNam
retCode 0=OK, -1=Cancel, -2=fSiz/dSiz too small, -3=file does not exist
TODO: case-insensitivity of filter ..