1CPWindow5::CPWindow5(
void) {
4 SetClass(lxT(
"CPWindow"));
5 SetName(lxT(
"window5"));
14 SetColor(lxT(
"#000001"));
16 SetTitle(lxT(
"PICSimLab - Spare parts"));
17 SetOverrideRedirect(0);
18 EvOnCreate = EVONCREATE & CPWindow5::_EvOnCreate;
19 EvOnShow = EVONSHOW & CPWindow5::_EvOnShow;
20 EvOnHide = EVONHIDE & CPWindow5::_EvOnHide;
22 menu1.SetFOwner(
this);
23 menu1.SetClass(lxT(
"CMenu"));
24 menu1.SetName(lxT(
"menu1"));
26 menu1.SetMenuItems(lxT(
"File,Edit,Inputs,Outputs,Others,Virtual,Help,"));
29 draw1.SetFOwner(
this);
30 draw1.SetClass(lxT(
"CDraw"));
31 draw1.SetName(lxT(
"draw1"));
37 draw1.SetHint(lxT(
""));
40 draw1.SetColor(lxT(
"#000001"));
41 draw1.SetPopupMenu(NULL);
42 draw1.EvMouseMove = EVMOUSEMOVE & CPWindow5::draw1_EvMouseMove;
43 draw1.EvMouseButtonPress = EVMOUSEBUTTONPRESS & CPWindow5::draw1_EvMouseButtonPress;
44 draw1.EvMouseButtonRelease = EVMOUSEBUTTONRELEASE & CPWindow5::draw1_EvMouseButtonRelease;
45 draw1.EvKeyboardPress = EVKEYBOARDPRESS & CPWindow5::draw1_EvKeyboardPress;
46 draw1.EvKeyboardRelease = EVKEYBOARDRELEASE & CPWindow5::draw1_EvKeyboardRelease;
47 draw1.EvMouseWheel = EVMOUSEWHEEL & CPWindow5::draw1_EvMouseWheel;
48 draw1.SetTransparent(0);
49 draw1.SetImgFileName(lxT(
""));
52 menu1_File.SetFOwner(
this);
53 menu1_File.SetClass(lxT(
"CPMenu"));
54 menu1_File.SetName(lxT(
"menu1_File"));
56 menu1_File.SetText(lxT(
"File"));
57 menu1_File.SetMenuItems(lxT(
"Save configuration,Load configuration,Save pin alias,Load pin alias,"));
58 menu1.CreateChild(&menu1_File);
60 menu1_Edit.SetFOwner(
this);
61 menu1_Edit.SetClass(lxT(
"CPMenu"));
62 menu1_Edit.SetName(lxT(
"menu1_Edit"));
64 menu1_Edit.SetText(lxT(
"Edit"));
65 menu1_Edit.SetMenuItems(lxT(
"Clear pin alias,Toggle pin alias,Edit pin alias,Reload pin alias,Zoom in,Zoom out,"));
66 menu1.CreateChild(&menu1_Edit);
68 menu1_Inputs.SetFOwner(
this);
69 menu1_Inputs.SetClass(lxT(
"CPMenu"));
70 menu1_Inputs.SetName(lxT(
"menu1_Inputs"));
71 menu1_Inputs.SetTag(0);
72 menu1_Inputs.SetText(lxT(
"Inputs"));
73 menu1_Inputs.SetMenuItems(lxT(
""));
74 menu1.CreateChild(&menu1_Inputs);
76 menu1_Outputs.SetFOwner(
this);
77 menu1_Outputs.SetClass(lxT(
"CPMenu"));
78 menu1_Outputs.SetName(lxT(
"menu1_Outputs"));
79 menu1_Outputs.SetTag(0);
80 menu1_Outputs.SetText(lxT(
"Outputs"));
81 menu1_Outputs.SetMenuItems(lxT(
""));
82 menu1.CreateChild(&menu1_Outputs);
84 menu1_Others.SetFOwner(
this);
85 menu1_Others.SetClass(lxT(
"CPMenu"));
86 menu1_Others.SetName(lxT(
"menu1_Others"));
87 menu1_Others.SetTag(0);
88 menu1_Others.SetText(lxT(
"Others"));
89 menu1_Others.SetMenuItems(lxT(
""));
90 menu1.CreateChild(&menu1_Others);
92 menu1_Virtual.SetFOwner(
this);
93 menu1_Virtual.SetClass(lxT(
"CPMenu"));
94 menu1_Virtual.SetName(lxT(
"menu1_Virtual"));
95 menu1_Virtual.SetTag(0);
96 menu1_Virtual.SetText(lxT(
"Virtual"));
97 menu1_Virtual.SetMenuItems(lxT(
""));
98 menu1.CreateChild(&menu1_Virtual);
100 pmenu2.SetFOwner(
this);
101 pmenu2.SetClass(lxT(
"CPMenu"));
102 pmenu2.SetName(lxT(
"pmenu2"));
104 pmenu2.SetText(lxT(
""));
105 pmenu2.SetMenuItems(lxT(
"Properties,Move,Delete,Help,About,"));
106 CreateChild(&pmenu2);
108 pmenu2_Properties.SetFOwner(
this);
109 pmenu2_Properties.SetClass(lxT(
"CItemMenu"));
110 pmenu2_Properties.SetName(lxT(
"pmenu2_Properties"));
111 pmenu2_Properties.SetTag(0);
112 pmenu2_Properties.SetText(lxT(
"Properties"));
113 pmenu2_Properties.SetSubMenu(NULL);
114 pmenu2_Properties.EvMenuActive = EVMENUACTIVE & CPWindow5::pmenu2_Properties_EvMenuActive;
115 pmenu2.CreateChild(&pmenu2_Properties);
117 timer1.SetFOwner(
this);
118 timer1.SetClass(lxT(
"CTimer"));
119 timer1.SetName(lxT(
"timer1"));
121 timer1.SetTime(BASETIMER);
122 timer1.SetRunState(0);
123 timer1.EvOnTime = EVONTIME & CPWindow5::timer1_EvOnTime;
124 CreateChild(&timer1);
126 menu1_File_Newconfiguration.SetFOwner(
this);
127 menu1_File_Newconfiguration.SetClass(lxT(
"CItemMenu"));
128 menu1_File_Newconfiguration.SetName(lxT(
"menu1_File_Newconfiguration"));
129 menu1_File_Newconfiguration.SetTag(0);
130 menu1_File_Newconfiguration.SetText(lxT(
"New configuration"));
131 menu1_File_Newconfiguration.SetSubMenu(NULL);
132 menu1_File_Newconfiguration.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_File_Newconfiguration_EvMenuActive;
133 menu1_File.CreateChild(&menu1_File_Newconfiguration);
135 menu1_File_Saveconfiguration.SetFOwner(
this);
136 menu1_File_Saveconfiguration.SetClass(lxT(
"CItemMenu"));
137 menu1_File_Saveconfiguration.SetName(lxT(
"menu1_File_Saveconfiguration"));
138 menu1_File_Saveconfiguration.SetTag(0);
139 menu1_File_Saveconfiguration.SetText(lxT(
"Save configuration"));
140 menu1_File_Saveconfiguration.SetSubMenu(NULL);
141 menu1_File_Saveconfiguration.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_File_Saveconfiguration_EvMenuActive;
142 menu1_File.CreateChild(&menu1_File_Saveconfiguration);
144 menu1_File_Loadconfiguration.SetFOwner(
this);
145 menu1_File_Loadconfiguration.SetClass(lxT(
"CItemMenu"));
146 menu1_File_Loadconfiguration.SetName(lxT(
"menu1_File_Loadconfiguration"));
147 menu1_File_Loadconfiguration.SetTag(0);
148 menu1_File_Loadconfiguration.SetText(lxT(
"Load configuration"));
149 menu1_File_Loadconfiguration.SetSubMenu(NULL);
150 menu1_File_Loadconfiguration.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_File_Loadconfiguration_EvMenuActive;
151 menu1_File.CreateChild(&menu1_File_Loadconfiguration);
153 menu1_File_Savepinalias.SetFOwner(
this);
154 menu1_File_Savepinalias.SetClass(lxT(
"CItemMenu"));
155 menu1_File_Savepinalias.SetName(lxT(
"menu1_File_Savepinalias"));
156 menu1_File_Savepinalias.SetTag(0);
157 menu1_File_Savepinalias.SetText(lxT(
"Save pin alias"));
158 menu1_File_Savepinalias.SetSubMenu(NULL);
159 menu1_File_Savepinalias.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_File_Savepinalias_EvMenuActive;
160 menu1_File.CreateChild(&menu1_File_Savepinalias);
162 menu1_File_Loadpinalias.SetFOwner(
this);
163 menu1_File_Loadpinalias.SetClass(lxT(
"CItemMenu"));
164 menu1_File_Loadpinalias.SetName(lxT(
"menu1_File_Loadpinalias"));
165 menu1_File_Loadpinalias.SetTag(0);
166 menu1_File_Loadpinalias.SetText(lxT(
"Load pin alias"));
167 menu1_File_Loadpinalias.SetSubMenu(NULL);
168 menu1_File_Loadpinalias.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_File_Loadpinalias_EvMenuActive;
169 menu1_File.CreateChild(&menu1_File_Loadpinalias);
171 menu1_Edit_Clearpinalias.SetFOwner(
this);
172 menu1_Edit_Clearpinalias.SetClass(lxT(
"CItemMenu"));
173 menu1_Edit_Clearpinalias.SetName(lxT(
"menu1_Edit_Clearpinalias"));
174 menu1_Edit_Clearpinalias.SetTag(0);
175 menu1_Edit_Clearpinalias.SetText(lxT(
"Clear pin alias"));
176 menu1_Edit_Clearpinalias.SetSubMenu(NULL);
177 menu1_Edit_Clearpinalias.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_Edit_Clearpinalias_EvMenuActive;
178 menu1_Edit.CreateChild(&menu1_Edit_Clearpinalias);
180 menu1_Edit_Togglepinalias.SetFOwner(
this);
181 menu1_Edit_Togglepinalias.SetClass(lxT(
"CItemMenu"));
182 menu1_Edit_Togglepinalias.SetName(lxT(
"menu1_Edit_Togglepinalias"));
183 menu1_Edit_Togglepinalias.SetTag(0);
184 menu1_Edit_Togglepinalias.SetText(lxT(
"Toggle pin alias"));
185 menu1_Edit_Togglepinalias.SetSubMenu(NULL);
186 menu1_Edit_Togglepinalias.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_Edit_Togglepinalias_EvMenuActive;
187 menu1_Edit.CreateChild(&menu1_Edit_Togglepinalias);
189 menu1_Edit_Editpinalias.SetFOwner(
this);
190 menu1_Edit_Editpinalias.SetClass(lxT(
"CItemMenu"));
191 menu1_Edit_Editpinalias.SetName(lxT(
"menu1_Edit_Editpinalias"));
192 menu1_Edit_Editpinalias.SetTag(0);
193 menu1_Edit_Editpinalias.SetText(lxT(
"Edit pin alias"));
194 menu1_Edit_Editpinalias.SetSubMenu(NULL);
195 menu1_Edit_Editpinalias.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_Edit_Editpinalias_EvMenuActive;
196 menu1_Edit.CreateChild(&menu1_Edit_Editpinalias);
198 menu1_Edit_Reloadpinalias.SetFOwner(
this);
199 menu1_Edit_Reloadpinalias.SetClass(lxT(
"CItemMenu"));
200 menu1_Edit_Reloadpinalias.SetName(lxT(
"menu1_Edit_Reloadpinalias"));
201 menu1_Edit_Reloadpinalias.SetTag(0);
202 menu1_Edit_Reloadpinalias.SetText(lxT(
"Reload pin alias"));
203 menu1_Edit_Reloadpinalias.SetSubMenu(NULL);
204 menu1_Edit_Reloadpinalias.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_Edit_Reloadpinalias_EvMenuActive;
205 menu1_Edit.CreateChild(&menu1_Edit_Reloadpinalias);
207 menu1_Edit_Zoomin.SetFOwner(
this);
208 menu1_Edit_Zoomin.SetClass(lxT(
"CItemMenu"));
209 menu1_Edit_Zoomin.SetName(lxT(
"menu1_Edit_Zoomin"));
210 menu1_Edit_Zoomin.SetTag(0);
211 menu1_Edit_Zoomin.SetText(lxT(
"Zoom in"));
212 menu1_Edit_Zoomin.SetSubMenu(NULL);
213 menu1_Edit_Zoomin.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_Edit_Zoomin_EvMenuActive;
214 menu1_Edit.CreateChild(&menu1_Edit_Zoomin);
216 menu1_Edit_Zoomout.SetFOwner(
this);
217 menu1_Edit_Zoomout.SetClass(lxT(
"CItemMenu"));
218 menu1_Edit_Zoomout.SetName(lxT(
"menu1_Edit_Zoomout"));
219 menu1_Edit_Zoomout.SetTag(0);
220 menu1_Edit_Zoomout.SetText(lxT(
"Zoom out"));
221 menu1_Edit_Zoomout.SetSubMenu(NULL);
222 menu1_Edit_Zoomout.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_Edit_Zoomout_EvMenuActive;
223 menu1_Edit.CreateChild(&menu1_Edit_Zoomout);
225 pmenu2_Move.SetFOwner(
this);
226 pmenu2_Move.SetClass(lxT(
"CItemMenu"));
227 pmenu2_Move.SetName(lxT(
"pmenu2_Move"));
228 pmenu2_Move.SetTag(0);
229 pmenu2_Move.SetText(lxT(
"Move"));
230 pmenu2_Move.SetSubMenu(NULL);
231 pmenu2_Move.EvMenuActive = EVMENUACTIVE & CPWindow5::pmenu2_Move_EvMenuActive;
232 pmenu2.CreateChild(&pmenu2_Move);
234 pmenu2_Rotate.SetFOwner(
this);
235 pmenu2_Rotate.SetClass(lxT(
"CItemMenu"));
236 pmenu2_Rotate.SetName(lxT(
"pmenu2_Rotate"));
237 pmenu2_Rotate.SetTag(0);
238 pmenu2_Rotate.SetText(lxT(
"Rotate"));
239 pmenu2_Rotate.SetSubMenu(NULL);
240 pmenu2_Rotate.EvMenuActive = EVMENUACTIVE & CPWindow5::pmenu2_Rotate_EvMenuActive;
241 pmenu2.CreateChild(&pmenu2_Rotate);
243 pmenu2_Delete.SetFOwner(
this);
244 pmenu2_Delete.SetClass(lxT(
"CItemMenu"));
245 pmenu2_Delete.SetName(lxT(
"pmenu2_Delete"));
246 pmenu2_Delete.SetTag(0);
247 pmenu2_Delete.SetText(lxT(
"Delete"));
248 pmenu2_Delete.SetSubMenu(NULL);
249 pmenu2_Delete.EvMenuActive = EVMENUACTIVE & CPWindow5::pmenu2_Delete_EvMenuActive;
250 pmenu2.CreateChild(&pmenu2_Delete);
252 pmenu2_Help.SetFOwner(
this);
253 pmenu2_Help.SetClass(lxT(
"CItemMenu"));
254 pmenu2_Help.SetName(lxT(
"pmenu2_Help"));
255 pmenu2_Help.SetTag(0);
256 pmenu2_Help.SetText(lxT(
"Help"));
257 pmenu2_Help.SetSubMenu(NULL);
258 pmenu2_Help.EvMenuActive = EVMENUACTIVE & CPWindow5::pmenu2_Help_EvMenuActive;
259 pmenu2.CreateChild(&pmenu2_Help);
261 pmenu2_About.SetFOwner(
this);
262 pmenu2_About.SetClass(lxT(
"CItemMenu"));
263 pmenu2_About.SetName(lxT(
"pmenu2_About"));
264 pmenu2_About.SetTag(0);
265 pmenu2_About.SetText(lxT(
"About"));
266 pmenu2_About.SetSubMenu(NULL);
267 pmenu2_About.EvMenuActive = EVMENUACTIVE & CPWindow5::pmenu2_About_EvMenuActive;
268 pmenu2.CreateChild(&pmenu2_About);
270 menu1_Help.SetFOwner(
this);
271 menu1_Help.SetClass(lxT(
"CPMenu"));
272 menu1_Help.SetName(lxT(
"menu1_Help"));
273 menu1_Help.SetTag(0);
274 menu1_Help.SetText(lxT(
"Help"));
275 menu1_Help.SetMenuItems(lxT(
"Contents,About,"));
276 menu1.CreateChild(&menu1_Help);
278 menu1_Help_Contents.SetFOwner(
this);
279 menu1_Help_Contents.SetClass(lxT(
"CItemMenu"));
280 menu1_Help_Contents.SetName(lxT(
"menu1_Help_Contents"));
281 menu1_Help_Contents.SetTag(0);
282 menu1_Help_Contents.SetText(lxT(
"Contents"));
283 menu1_Help_Contents.SetSubMenu(NULL);
284 menu1_Help_Contents.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_Help_Contents_EvMenuActive;
285 menu1_Help.CreateChild(&menu1_Help_Contents);
287 menu1_Help_About.SetFOwner(
this);
288 menu1_Help_About.SetClass(lxT(
"CItemMenu"));
289 menu1_Help_About.SetName(lxT(
"menu1_Help_About"));
290 menu1_Help_About.SetTag(0);
291 menu1_Help_About.SetText(lxT(
"About"));
292 menu1_Help_About.SetSubMenu(NULL);
293 menu1_Help_About.EvMenuActive = EVMENUACTIVE & CPWindow5::menu1_Help_About_EvMenuActive;
294 menu1_Help.CreateChild(&menu1_Help_About);
296 filedialog1.SetFOwner(
this);
297 filedialog1.SetClass(lxT(
"CFileDialog"));
298 filedialog1.SetName(lxT(
"filedialog1"));
299 filedialog1.SetTag(0);
300 filedialog1.SetFileName(lxT(
"untitled.pcf"));
301 filedialog1.SetFilter(lxT(
"PICSimLab Config. (*.pcf)|*.pcf"));
302 filedialog1.SetType(129);
303 filedialog1.EvOnClose = EVONCLOSE & CPWindow5::filedialog1_EvOnClose;
304 CreateChild(&filedialog1);
306 statusbar1.SetFOwner(
this);
307 statusbar1.SetClass(lxT(
"CStatusbar"));
308 statusbar1.SetName(lxT(
"statusbar1"));
309 statusbar1.SetTag(0);
310 statusbar1.SetFields(lxT(
"alias,scale,offset,"));
311 CreateChild(&statusbar1);
326 memset(Bitmaps, 0,
sizeof(Bitmaps));
327 memset(Windows, 0,
sizeof(Windows));
329 Windows[PW_MAIN] =
this;
330 Windows[PW_WPROP] =
new CPWindow;
331 Windows[PW_WPROP]->SetCanDestroy(
false);