1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Limit access to internal methods.

This commit is contained in:
Bartosz Taudul 2022-09-03 23:17:57 +02:00
parent 5cbf06ba31
commit 8e713e6366
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 8 additions and 6 deletions

View File

@ -18,9 +18,6 @@ public:
virtual ~TimelineItem() = default;
void Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax );
virtual bool DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) = 0;
virtual bool IsEmpty() const { return false; }
void VisibilityCheckbox();
void SetVisible( bool visible ) { m_visible = visible; }
@ -37,6 +34,10 @@ protected:
virtual int64_t RangeBegin() const = 0;
virtual int64_t RangeEnd() const = 0;
virtual bool DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) = 0;
virtual bool IsEmpty() const { return false; }
private:
void AdjustThreadHeight( bool firstFrame, int oldOffset, int& offset );
float AdjustThreadPosition( float wy, int& offset );

View File

@ -12,9 +12,6 @@ class TimelineItemPlot final : public TimelineItem
public:
TimelineItemPlot( View& view, Worker& worker, PlotData* plot );
bool DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) override;
bool IsEmpty() const override;
protected:
uint32_t HeaderColor() const override { return 0xFF44DDDD; }
uint32_t HeaderColorInactive() const override { return 0xFF226E6E; }
@ -27,6 +24,10 @@ protected:
void HeaderTooltip( const char* label ) const override;
void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, bool hover ) override;
bool DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) override;
bool IsEmpty() const override;
private:
PlotData* m_plot;
};