diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /sp/src/public/vgui_controls/GraphPanel.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/public/vgui_controls/GraphPanel.h')
| -rw-r--r-- | sp/src/public/vgui_controls/GraphPanel.h | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/sp/src/public/vgui_controls/GraphPanel.h b/sp/src/public/vgui_controls/GraphPanel.h index fbb1dc3e..e2c2bfe4 100644 --- a/sp/src/public/vgui_controls/GraphPanel.h +++ b/sp/src/public/vgui_controls/GraphPanel.h @@ -1,81 +1,81 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#ifndef GRAPHPANEL_H
-#define GRAPHPANEL_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include <vgui_controls/Panel.h>
-#include "utllinkedlist.h"
-#include "utlvector.h"
-
-namespace vgui
-{
-
-//-----------------------------------------------------------------------------
-// Purpose: Holds and displays a chart
-//-----------------------------------------------------------------------------
-class GraphPanel : public Panel
-{
- DECLARE_CLASS_SIMPLE( GraphPanel, Panel );
-
-public:
- GraphPanel(Panel *parent, const char *name);
-
- // domain settings (x-axis settings)
- // sets the window of samples to display
- void SetDisplayDomainSize(float size);
- // sets the range of samples the graph should keep
- // should be set to the max you would set the display domain size
- void SetMaxDomainSize(float size);
- // sets the minimum domain that will be displayed; used to collapse samples
- void SetMinDomainSize(float size);
-
- // range settings (y-axis settings)
- void SetUseFixedRange(float lowRange, float highRange);
- void SetUseDynamicRange(float *rangeList, int numRanges);
- void GetDisplayedRange(float &lowRange, float &highRange);
-
- // adds an item to the end of the list
- // sampleEnd is assumed to be the trailing edge of the sample
- // assumes that the samples are fairly evenly spaced (not much more work to do to fix this though)
- void AddItem(float sampleEnd, float sampleValue);
-
-protected:
- virtual void Paint();
- virtual void PerformLayout();
- virtual void ApplySchemeSettings(IScheme *pScheme);
-
-private:
- int GetVisibleItemCount();
-
- struct Sample_t
- {
- float sampleEnd;
- float value;
- };
- CUtlLinkedList<Sample_t, int> m_Samples;
-
- // the window to show
- float m_flDomainSize;
- float m_flMaxDomainSize, m_flMinDomainSize;
- bool m_bMaxDomainSizeSet;
-
- // range
- float m_flLowRange, m_flHighRange;
- bool m_bUseDynamicRange;
- CUtlVector<float> m_RangeList;
-
- // rendering
- int m_iGraphBarWidth;
- int m_iGraphBarGapWidth;
-};
-
-} // namespace vgui
-
-#endif // GRAPHPANEL_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef GRAPHPANEL_H +#define GRAPHPANEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui_controls/Panel.h> +#include "utllinkedlist.h" +#include "utlvector.h" + +namespace vgui +{ + +//----------------------------------------------------------------------------- +// Purpose: Holds and displays a chart +//----------------------------------------------------------------------------- +class GraphPanel : public Panel +{ + DECLARE_CLASS_SIMPLE( GraphPanel, Panel ); + +public: + GraphPanel(Panel *parent, const char *name); + + // domain settings (x-axis settings) + // sets the window of samples to display + void SetDisplayDomainSize(float size); + // sets the range of samples the graph should keep + // should be set to the max you would set the display domain size + void SetMaxDomainSize(float size); + // sets the minimum domain that will be displayed; used to collapse samples + void SetMinDomainSize(float size); + + // range settings (y-axis settings) + void SetUseFixedRange(float lowRange, float highRange); + void SetUseDynamicRange(float *rangeList, int numRanges); + void GetDisplayedRange(float &lowRange, float &highRange); + + // adds an item to the end of the list + // sampleEnd is assumed to be the trailing edge of the sample + // assumes that the samples are fairly evenly spaced (not much more work to do to fix this though) + void AddItem(float sampleEnd, float sampleValue); + +protected: + virtual void Paint(); + virtual void PerformLayout(); + virtual void ApplySchemeSettings(IScheme *pScheme); + +private: + int GetVisibleItemCount(); + + struct Sample_t + { + float sampleEnd; + float value; + }; + CUtlLinkedList<Sample_t, int> m_Samples; + + // the window to show + float m_flDomainSize; + float m_flMaxDomainSize, m_flMinDomainSize; + bool m_bMaxDomainSizeSet; + + // range + float m_flLowRange, m_flHighRange; + bool m_bUseDynamicRange; + CUtlVector<float> m_RangeList; + + // rendering + int m_iGraphBarWidth; + int m_iGraphBarGapWidth; +}; + +} // namespace vgui + +#endif // GRAPHPANEL_H |