74 CFileDialog filedialog1;
82 CPMenu menu1_Microcontroller;
86 CItemMenu menu1_File_LoadHex;
87 CItemMenu menu1_File_ReloadLast;
88 CItemMenu menu1_File_SaveHex;
89 CItemMenu menu1_File_Configure;
90 CItemMenu menu1_File_SaveWorkspace;
91 CItemMenu menu1_File_LoadWorkspace;
92 CItemMenu menu1_File_LoadBoardDemo;
93 CItemMenu menu1_File_Exit;
94 CItemMenu menu1_Modules_Oscilloscope;
95 CItemMenu menu1_Modules_Spareparts;
96 CItemMenu menu1_Tools_SerialTerm;
97 CItemMenu menu1_Tools_SerialRemoteTank;
98 CItemMenu menu1_Tools_Esp8266ModemSimulator;
99 CItemMenu menu1_Tools_ArduinoBootloader;
100 CItemMenu menu1_Tools_MPLABXDebuggerPlugin;
101 CItemMenu menu1_Tools_PinViewer;
102 CItemMenu menu1_Help_Contents;
103 CItemMenu menu1_Help_Board;
104 CItemMenu menu1_Help_Examples;
105 CItemMenu menu1_Help_About_Board;
106 CItemMenu menu1_Help_About_PICSimLab;
107 CStatusbar statusbar1;
108 CToggleButton togglebutton1;
109 CFileDialog filedialog2;
111 void _EvOnCreate(CControl* control);
112 void _EvOnDestroy(CControl* control);
113 void _EvOnShow(CControl* control);
114 void _EvOnDropFile(CControl* control,
const std::string fname);
115 void timer1_EvOnTime(CControl* control);
116 void timer2_EvOnTime(CControl* control);
117 void filedialog1_EvOnClose(
const int retId);
118 void draw1_EvMouseMove(CControl* control,
const unsigned int button,
const unsigned int x,
const unsigned int y,
119 const unsigned int state);
120 void draw1_EvMouseButtonPress(CControl* control,
const unsigned int button,
const unsigned int x,
121 const unsigned int y,
const unsigned int state);
122 void draw1_EvMouseButtonRelease(CControl* control,
const unsigned int button,
const unsigned int x,
123 const unsigned int y,
const unsigned int state);
124 void draw1_EvKeyboardPress(CControl* control,
const unsigned int key,
const unsigned int hkey,
125 const unsigned int mask);
126 void draw1_EvKeyboardRelease(CControl* control,
const unsigned int key,
const unsigned int hkey,
127 const unsigned int mask);
128 void combo1_EvOnComboChange(CControl* control);
129 void menu1_File_LoadHex_EvMenuActive(CControl* control);
130 void menu1_File_ReloadLast_EvMenuActive(CControl* control);
131 void menu1_File_SaveHex_EvMenuActive(CControl* control);
132 void menu1_File_Configure_EvMenuActive(CControl* control);
133 void menu1_File_SaveWorkspace_EvMenuActive(CControl* control);
134 void menu1_File_LoadWorkspace_EvMenuActive(CControl* control);
135 void menu1_File_LoadBoardDemo_EvMenuActive(CControl* control);
136 void menu1_File_Exit_EvMenuActive(CControl* control);
137 void menu1_Modules_Oscilloscope_EvMenuActive(CControl* control);
138 void menu1_Modules_Spareparts_EvMenuActive(CControl* control);
139 void menu1_Tools_SerialTerm_EvMenuActive(CControl* control);
140 void menu1_Tools_SerialRemoteTank_EvMenuActive(CControl* control);
141 void menu1_Tools_Esp8266ModemSimulator_EvMenuActive(CControl* control);
142 void menu1_Tools_ArduinoBootloader_EvMenuActive(CControl* control);
143 void menu1_Tools_MPLABXDebuggerPlugin_EvMenuActive(CControl* control);
144 void menu1_Tools_PinViewer_EvMenuActive(CControl* control);
145 void menu1_Help_Contents_EvMenuActive(CControl* control);
146 void menu1_Help_Examples_EvMenuActive(CControl* control);
147 void menu1_Help_Board_EvMenuActive(CControl* control);
148 void menu1_Help_About_Board_EvMenuActive(CControl* control);
149 void menu1_Help_About_PICSimLab_EvMenuActive(CControl* control);
150 void togglebutton1_EvOnToggleButton(CControl* control);
151 void filedialog2_EvOnClose(
const int retId);
159 void board_Event(CControl* control);
160 void board_ButtonEvent(CControl* control,
unsigned int button,
unsigned int x,
unsigned int y,
unsigned int state);
161 void thread1_EvThreadRun(CControl* control);
162 void thread2_EvThreadRun(CControl* control);
163 void thread3_EvThreadRun(CControl* control);
165 void menu1_EvBoard(CControl* control);
166 void menu1_EvMicrocontroller(CControl* control);
167 void DrawBoard(
void);
168 static void OnUpdateStatus(
const int field,
const std::string msg);
169 static void OnConfigure(
void);
170 static void OnClockSet(
const float clk,
const int update);
171 static void OnReadPreferences(
const char* name,
const char* value,
const int create);
172 static void OnSavePrefs(
void);
173 static void OnLoadHexFile(
const std::string fname);
174 static void OnOpenLoadHexFileDialog(
void);
175 static void OnEndSimulation(
void);
176 static void* OnUpdateGUI(
const int id,
const PICSimlabGUIType type,
const PICSimlabGUIAction action,
178 static void OnConfigMenuGUI(
const PICSimlabGUIMenu type);
180 static int OnWindowCmd(
const int id,
const char* ControlName,
const PICSimLabWindowAction action,
const char* Value,
182 static int OnSystemCmd(
const PICSimLabSystemCmd cmd,
const char* Arg,
void* ReturnBuff);
184 void Configure(
void);
185 int GetNeedClkUpdate(
void) {
return need_clkupdate; };
186 void SetNeedClkUpdate(
const int ncu) { need_clkupdate = ncu; };
188 lxBitmap* Bitmaps[BITMAPS_MAX];
189 CPWindow* Windows[BOARDS_MAX];
190 lxMutex* Mutexs[MUTEX_MAX];
191 lxaudio* AudioChannels[MAX_AUDIO];
193 int WinCmd(CControl* ctrl,
const PICSimLabWindowAction action,
const char* Value,
void* ReturnBuff);
196 CItemMenu MBoard[BOARDS_MAX];
197 CItemMenu MMicro[MAX_MIC];
209 std::mutex cpu_mutex;
210 std::condition_variable cpu_cond;