1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Replace source file viewer with one that actually works.

This is much simpler, custom implementation of a text file viewer. It is
able to perform these two tasks as intended:
- center source view on the selected line,
- highlight that line.
This commit is contained in:
Bartosz Taudul
2020-03-22 20:53:59 +01:00
parent 57e14c9e5c
commit 9672dba765
10 changed files with 180 additions and 3623 deletions
+4 -6
View File
@@ -28,7 +28,7 @@ namespace tracy
struct MemoryPage;
struct QueueItem;
class FileRead;
class TextEditor;
class SourceView;
struct ZoneTimeData;
class View
@@ -108,7 +108,7 @@ private:
uint64_t mem;
};
void InitTextEditor();
void InitTextEditor( ImFont* font );
const char* ShortenNamespace( const char* name ) const;
@@ -380,10 +380,8 @@ private:
Vector<const ZoneEvent*> m_zoneInfoStack;
Vector<const GpuEvent*> m_gpuInfoStack;
std::unique_ptr<TextEditor> m_textEditor;
const char* m_textEditorFile;
ImFont* m_textEditorFont;
bool m_textEditorWhitespace = true;
std::unique_ptr<SourceView> m_sourceView;
const char* m_sourceViewFile;
ImFont* m_smallFont;
ImFont* m_bigFont;