forked from wrcad/xictools
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcvrt.h
154 lines (128 loc) · 6.54 KB
/
cvrt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*========================================================================*
* *
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA *
* http://wrcad.com *
* Copyright (C) 2017 Whiteley Research Inc., all rights reserved. *
* Author: Stephen R. Whiteley, except as indicated. *
* *
* As fully as possible recognizing licensing terms and conditions *
* imposed by earlier work from which this work was derived, if any, *
* this work is released under the Apache License, Version 2.0 (the *
* "License"). You may not use this file except in compliance with *
* the License, and compliance with inherited licenses which are *
* specified in a sub-header below this one if applicable. A copy *
* of the License is provided with this distribution, or you may *
* obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* See the License for the specific language governing permissions *
* and limitations under the License. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- *
* INFRINGEMENT. IN NO EVENT SHALL WHITELEY RESEARCH INCORPORATED *
* OR STEPHEN R. WHITELEY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* *
*========================================================================*
* XicTools Integrated Circuit Design System *
* *
* Xic Integrated Circuit Layout and Schematic Editor *
* *
*========================================================================*
$Id:$
*========================================================================*/
#ifndef CVRT_H
#define CVRT_H
#include "cvrt_variables.h"
struct CmdDesc;
struct mitem_t;
inline class cConvert *Cvt();
class cConvert
{
static cConvert *ptr()
{
if (!instancePtr)
on_null_ptr();
return (instancePtr);
}
static void on_null_ptr();
public:
friend inline cConvert *Cvt() { return (cConvert::ptr()); }
// Arg to PopUpConvert.
enum { cvDefault, cvLayoutFile, cvChdName, cvChdFile, cvNativeDir };
// Notebook pages in Convert pop-up.
enum { cvGds, cvOas, cvCif, cvCgx, cvXic, cvTxt, cvChd, cvCgd };
// High bits of int passed to Conversion panel callback.
enum { CVlayoutFile, CVgdsText, CVchdName, CVchdFile, CVnativeDir };
// cvrt.cc
cConvert();
void UpdatePopUps();
void CheckEmpties(bool);
bool Export(const char*, bool);
void ReadIntoCurrent(const char*, const char*, bool, FIOreadPrms*);
void MergeHier(CDs*, CDs*, const char*, const char*);
void CutWindowExec(CmdDesc*);
void SetConvertFilename(const char*);
void SetupConvertCut(const BBox*);
void SetWriteFilename(const char*);
void SetupWriteCut(const BBox*);
const char *ConvertFilename() { return (cvt_cv_filename); }
const char *WriteFilename() { return (cvt_wr_filename); }
FILE *LogFp() { return (cvt_log_fp); }
void SetLogFp(FILE *fp) { cvt_log_fp = fp; }
bool ShowLog() { return (cvt_show_log); }
void SetShowLog(bool b) { cvt_show_log = b; }
// graphics
void PopUpFiles(GRobject, ShowMode);
void PopUpLibraries(GRobject, ShowMode);
void PopUpAssemble(GRobject, ShowMode);
void PopUpCompare(GRobject, ShowMode);
void PopUpPropertyFilter(GRobject, ShowMode);
void PopUpExport(GRobject, ShowMode, bool(*)(FileType, bool, void*), void*);
void PopUpImport(GRobject, ShowMode, bool(*)(int, void*), void*);
void PopUpConvert(GRobject, ShowMode, int, bool(*)(int, void*), void*);
void PopUpOasAdv(GRobject, ShowMode, int, int);
void PopUpHierarchies(GRobject, ShowMode);
void PopUpChdOpen(GRobject, ShowMode, const char*, const char*, int, int,
bool(*)(const char*, const char*, int, void*), void*);
void PopUpCgdOpen(GRobject, ShowMode, const char*, const char*, int, int,
bool(*)(const char*, const char*, int, void*), void*);
void PopUpChdSave(GRobject, ShowMode, const char*, int, int,
bool(*)(const char*, bool, void*), void*);
void PopUpChdConfig(GRobject, ShowMode, const char*, int, int);
void PopUpDisplayWindow(GRobject, ShowMode, const BBox*,
bool(*)(bool, const BBox*, void*), void*);
void PopUpAuxTab(GRobject, ShowMode);
void PopUpGeometries(GRobject, ShowMode);
bool PopUpMergeControl(ShowMode, mitem_t*);
void PopUpEmpties(stringlist*);
private:
// cvrt.cc
void mergeHier_rc(CDcellName, CDcellName, const char*, const char*,
ptrtab_t*);
// cvrt_setif.cc
void setupInterface();
// cvrt_variables.cc
void setupVariables();
// funcs_cvrt.cc
void load_funcs_cvrt();
FILE *cvt_log_fp; // Conversion log file pointer.
bool cvt_show_log; // Conversion log display flag.
char *cvt_cv_filename; // Pushed file name for Convert
BBox cvt_cv_aoi; // Pushed AOI name for Convert
bool cvt_cv_win; // Pushed UseWindow name for Convert
bool cvt_cv_clip; // Pushed Clip name for Convert
bool cvt_cv_flat; // Pushed Flaten name for Convert
char *cvt_wr_filename; // Pushed file name for Write
BBox cvt_wr_aoi; // Pushed AOI name for Write
bool cvt_wr_win; // Pushed UseWindow name for Write
bool cvt_wr_clip; // Pushed Clip name for Write
bool cvt_wr_flat; // Pushed Flaten name for Write
static cConvert *instancePtr;
};
#endif