UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sds_plus.h
1 /* sds_plus.h $Revision: 1.17 $ $Date: 2007/06/26 08:54:00 $ */
2 
3 #ifndef __sds_plus_h
4 
5 #define __sds_plus_h
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 
12 #include <zm/sdstool.h>
13 #include <zm/getcolor.h>
14 #include <mix/sds_colors.h>
15 #include <mix/Types.h>
16 #include <mix/General.h>
17 #include <ldb/dbnamedefs.h>
18 #include <ldb/dbtc.h>
19 
20 #define MTAB_NAME 'M'
21 #define SDAT_NAME 'S'
22 #define DDAT_NAME 'D'
23 #define RDAT_NAME 'R'
24 #define ODAT_NAME RDAT_NAME
25 #define OTHER_NAME '\0'
26 
27 
28 /*************************************************************
29  * Some more stuff about sdstool.
30  *************************************************************/
31 
32 int InitWarning (YType*);
33 
34 void ColorsSelect (GET_COLOR_STRUCT* p);
35 
36 void get_project(Widget parentWidget,
37  int placement,
38  const char* szDataDir,
39  int (*yCallback)(void),
40  char* szSelectedProject);
41 
42 void get_proj_name(Widget parentWidget,
43  int placement,
44  const char* szDataDir,
45  const char* szTitle,
46  const char* szFileExt,
47  const char* sz1stChars,
48  int linesCount,
49  int selectMode,
50  int (*yCallback)(int),
51  char* szSelectedProject,
52  char* szSelectedMod,
53  int* selectionCount);
54 
55 /* void YmNOut (int (*yCallback)(int), int delayCycles); */
56 int SInitParm (int argc, char** argv, char project[9],
57  char jobname[7], char imod[5], char omod[5][5]);
58 void SEndProc (int code);
59 void SWriteToLog (const char*);
60 /* int YmScrollBarSetValues (YType*); */
61 /* int YmScrollBarGetValues (YType*); */
62 
63 
64 /*************************************************************
65  * Additional functionality
66  *************************************************************/
67 
68 
77 int WhatSDSfileName (const char* szName);
78 
81 Logic CheckSDSfileName (const char* szName);
82 
83 
84 #define ANSWER_LEN 20
85 
86 /* Callback of solution: TRUE(OK, Yes) or FALSE(Cancel, No) */
87 typedef void (*cbSolution)(Logic value,
88  void* pUserData);
89 
90 /* User defined answers */
91 typedef struct
92  {
93  char szTrue[ANSWER_LEN+1];
94  char szFalse[ANSWER_LEN+1];
95 
96  } TwoAnswers;
97 
98 void ask_user (Widget wParent, /* parent widget */
99  int placeCode, /* placement of dialog */
100  const char* szTitle, /* title of dialog (NULL-yes) */
101  const char* szMessage,/* question to user */
102  const TwoAnswers* pTwoAnswers, /* NULL:"OK","Cancel" */
103  cbSolution ycbFunc, /* user's solution: TRUE or FALSE */
104  void* pUserData); /* any data (C++ useful) */
105 
106 
107 /*************************************************************
108  * Data base name selection
109  *************************************************************/
110 
111 /* Type of selection callback */
112 typedef void (*dbNameFunc)(char* szProject,
113  dbNameStruct* pSelected,
114  void* pUserData);
115 
116 /* Selection data base name dialog */
117 void get_dbt_name (Widget wParent, /* parent widget */
118  int placeCode, /* placement of dialog */
119  const char* szTitle, /* title of dialog (NULL-yes) */
120  const char* szProject, /* name of project */
121  dbNameStruct* pName, /* structured name */
122  dbNameFunc ycbFunc, /* function on selection */
123  void* pUserData); /* any data (C++ useful) */
124 
125 /* Selection data base list name dialog */
126 void get_dbt_list (Widget wParent,
127  int placeCode,
128  const char* szTitle,
129  const char* szProject,
130  dbNameStruct* pName,
131  dbNameFunc ycbFunc,
132  void* pUserData);
133 
134 /* Type of selection callback */
135 typedef void (*dbListFunc)(dbHandle dbhList, /* handle of list */
136  int lineNo, /* selected line */
137  void* pUserData);
138 
139 /* Selection data base name dialog from list of tables */
140 #define DB_SAVE 0
141 #define DB_LOAD 1
142 
143 void get_dbt_list_name (Widget wParent, /* parent widget */
144  int placeCode, /* placement of dialog */
145  int rwFlag, /* DB_LOAD, DB_SAVE */
146  const char* szTitle, /* title of window */
147  const char* szProject, /* project */
148  const char* szList, /* Type of list */
149  const dbNameStruct* pTable, /* type of element */
150  dbListFunc ycbFunc, /* function on selection */
151  void* pUserData); /* any data (C++ useful) */
152 
153 
154 #ifdef __cplusplus
155 };
156 #endif
157 
158 /* External variable, that is filled by setup() or InitSDSdirs() */
159 extern SDS_setup sds_set;
160 
161 
162 #endif /* sds_plus.h */
Definition: dbnamedefs.h:67
Definition: ymprog.h:1019
Definition: General.h:21
Definition: sds_plus.h:91
Definition: getcolor.h:8