Add the source level tracing
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / SourcesWin.h
diff --git a/src/debugger/SourcesWin.h b/src/debugger/SourcesWin.h
new file mode 100644 (file)
index 0000000..300c58c
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// SourcesWin.h: Sources tracing window
+//
+// JPM = Jean-Paul Mari <djipi.mari@gmail.com>
+//
+// Who  When        What
+// ---  ----------  -------------------------------------------------------------
+// JPM  08/23/2019  Created this file
+//
+
+#ifndef __SOURCESWIN_H__
+#define __SOURCESWIN_H__
+
+#include <QtWidgets>
+//#include <stdint.h>
+
+class SourceCWindow;
+
+class SourcesWindow : public QWidget
+{
+       Q_OBJECT
+
+       typedef struct S_SOURCESINFOS
+       {
+               int IndexTab;
+               char *Filename;
+               char **SourceText;
+               size_t NbLinesText[2];
+               size_t *NumLinesUsed;
+               size_t Language;
+               SourceCWindow *sourceCtab;
+               int CurrentNumLineSrc;
+       }
+       SourcesInfos;
+
+public:
+       SourcesWindow(QWidget * parent = 0);
+       void Init(void);
+       void Close(void);
+       void Reset(void);
+       bool GetTraceStatus(void);
+       bool CheckChangeLine(void);
+
+public slots:
+       void RefreshContents(void);
+       void SelectTab(const int);
+       void CloseTab(const int);
+
+protected:
+       void keyPressEvent(QKeyEvent * e);
+       void CloseCurrentTab(void);
+
+private:
+       QVBoxLayout *layout;
+       QTabWidget *sourcestabWidget;
+       SourcesInfos *sourcesinfostab;
+       size_t NbSourcesInfos;
+       size_t CurrentTab;
+       size_t OldCurrentNumLineSrc;
+       size_t OldCurrentTab;
+       int indexErrorTab;
+       SourceCWindow *sourceErrorTab;
+};
+
+#endif // __SOURCESWIN_H__