PICSimLab - Programmable IC Simulator Laboratory 0.9.2
PICSimLab - API
Loading...
Searching...
No Matches
picsimlab5.h
1/* ########################################################################
2
3 PICSimLab - Programmable IC Simulator Laboratory
4
5 ########################################################################
6
7 Copyright (c) : 2010-2024 Luis Claudio GambĂ´a Lopes <lcgamboa@yahoo.com>
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23 For e-mail suggestions : lcgamboa@yahoo.com
24 ######################################################################## */
25
26#ifndef CPWINDOW5
27#define CPWINDOW5
28
29#include <lxrad.h>
30#include "lib/spareparts.h"
31
37class CPWindow5 : public CPWindow {
38public:
39 // lxrad automatic generated block start, don't edit below!
40 /*#Controls*/
41 CMenu menu1;
42 CDraw draw1;
43 CPMenu menu1_File;
44 CPMenu menu1_Inputs;
45 CPMenu menu1_Outputs;
46 CPMenu menu1_Others;
47 CPMenu menu1_Virtual;
48 CPMenu pmenu2;
49 CItemMenu pmenu2_Properties;
50 CItemMenu pmenu2_Move;
51 CItemMenu pmenu2_Rotate;
52 CItemMenu pmenu2_Delete;
53 CItemMenu pmenu2_Help;
54 CItemMenu pmenu2_About;
55 CTimer timer1;
56 CItemMenu menu1_File_Newconfiguration;
57 CItemMenu menu1_File_Saveconfiguration;
58 CItemMenu menu1_File_Loadconfiguration;
59 CItemMenu menu1_File_Savepinalias;
60 CItemMenu menu1_File_Loadpinalias;
61 CPMenu menu1_Edit;
62 CItemMenu menu1_Edit_Clearpinalias;
63 CItemMenu menu1_Edit_Togglepinalias;
64 CItemMenu menu1_Edit_Editpinalias;
65 CItemMenu menu1_Edit_Reloadpinalias;
66 CItemMenu menu1_Edit_Zoomin;
67 CItemMenu menu1_Edit_Zoomout;
68 CPMenu menu1_Help;
69 CItemMenu menu1_Help_Contents;
70 CItemMenu menu1_Help_About;
71 CFileDialog filedialog1;
72 CStatusbar statusbar1;
73 /*#Events*/
74 void _EvOnCreate(CControl* control);
75 void _EvOnShow(CControl* control);
76 void _EvOnHide(CControl* control);
77 void draw1_EvMouseMove(CControl* control, const unsigned int button, const unsigned int x, const unsigned int y,
78 const unsigned int state);
79 void draw1_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x,
80 const unsigned int y, const unsigned int state);
81 void draw1_EvMouseButtonRelease(CControl* control, const unsigned int button, const unsigned int x,
82 const unsigned int y, const unsigned int state);
83 void draw1_EvKeyboardPress(CControl* control, const unsigned int key, const unsigned int hkey,
84 const unsigned int mask);
85 void draw1_EvKeyboardRelease(CControl* control, const unsigned int key, const unsigned int hkey,
86 const unsigned int mask);
87 void draw1_EvMouseWheel(CControl* control, const int rotation);
88 void pmenu2_Properties_EvMenuActive(CControl* control);
89 void timer1_EvOnTime(CControl* control);
90 void menu1_File_Newconfiguration_EvMenuActive(CControl* control);
91 void menu1_File_Saveconfiguration_EvMenuActive(CControl* control);
92 void menu1_File_Loadconfiguration_EvMenuActive(CControl* control);
93 void menu1_File_Loadpinalias_EvMenuActive(CControl* control);
94 void menu1_File_Savepinalias_EvMenuActive(CControl* control);
95 void menu1_Edit_Clearpinalias_EvMenuActive(CControl* control);
96 void menu1_Edit_Togglepinalias_EvMenuActive(CControl* control);
97 void menu1_Edit_Editpinalias_EvMenuActive(CControl* control);
98 void menu1_Edit_Reloadpinalias_EvMenuActive(CControl* control);
99 void menu1_Edit_Zoomin_EvMenuActive(CControl* control);
100 void menu1_Edit_Zoomout_EvMenuActive(CControl* control);
101 void pmenu2_Move_EvMenuActive(CControl* control);
102 void pmenu2_Rotate_EvMenuActive(CControl* control);
103 void pmenu2_Delete_EvMenuActive(CControl* control);
104 void pmenu2_Help_EvMenuActive(CControl* control);
105 void pmenu2_About_EvMenuActive(CControl* control);
106 void menu1_Help_Contents_EvMenuActive(CControl* control);
107 void menu1_Help_About_EvMenuActive(CControl* control);
108 void filedialog1_EvOnClose(const int retId);
109
110 /*#Others*/
111 CPWindow5(void);
112 ~CPWindow5(void);
113 // lxrad automatic generated block end, don't edit above!
114 void menu1_EvMenuActive(CControl* control);
115
116 void PropButtonRelease(CControl* control, unsigned int button, unsigned int x, unsigned int y, unsigned int state);
117 void PropComboChange(CCombo* control);
118 void PropSpinChange(CSpin* control);
119 void PropClose(int tag);
120 void PartButtonEvent(CControl* control, unsigned int button, unsigned int x, unsigned int y, unsigned int state);
121 void PartKeyEvent(CControl* control, unsigned int keysm, unsigned int ukeysym, unsigned int state);
122 void PartEvent(CControl* control);
123 void DeleteParts(void);
124
125 static int OnCanvasCmd(const CanvasCmd_t cmd);
126 static int OnWindowCmd(const int id, const char* ControlName, const PICSimLabWindowAction action, const char* Value,
127 void* ReturnBuff);
128
129 CCanvas Canvas[MAX_PARTS];
130 lxBitmap* Bitmaps[MAX_PARTS * 2];
131 CPWindow* Windows[MAX_PARTS];
132
133private:
134 CItemMenu MParts[MAX_PARTS];
135 std::string PartToCreate;
136 int PartSelected;
137 int PartToMove;
138 int mdx, mdy;
139 int offsetx;
140 int offsety;
141 int mouse_scroll;
142 int need_resize;
143 int update_all;
144};
145
146extern CPWindow5 Window5;
147
148#endif /*#CPWINDOW5*/
CPWindow5 class.
Definition picsimlab5.h:37
Definition draw.h:80