OROCHI
 
Loading...
Searching...
No Matches
GxGuiGraphTime.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if GX_DEVELOP
14
15GX_CORE_NAMESPACE_BEGIN()
16
17//===========================================================================
19//===========================================================================
20class GxGuiGraphTime : public GxGuiBase
21{
22 //-----------------------------------------------------------
24 //-----------------------------------------------------------
26public:
27 // RTTI定義
28 GX_RTTI_CLASS(GxGuiGraphTime, GxGuiBase)
29 // 基底継承クラス用禁止宣言
31
32
33 static constexpr s32 MARGIN_TOP = 15;
35 static constexpr s32 MARGIN_BOTTOM = 40;
37 static constexpr s32 MARGIN_LEFT = 40;
39 static constexpr s32 MARGIN_RIGHT = 15;
41 static constexpr u32 PLOT_MAX_COUNT = 32;
42
44 //-----------------------------------------------------------
46 //-----------------------------------------------------------
48public:
50 GxGuiGraphTime( const GxProperty& property, GxTypedObject* pOwner, const u32 index, const u32 recordFrames = 240 );
52 //memo: プロパティは必ず配列でなければなりません
53 GxGuiGraphTime( const GxProperty& property, GxTypedObject* pOwner, const u32 plotDataCount, const s32 minFrame, const s32 maxFrame );
54
56 b32 initialize( void ) override;
57
59 void cleanup( void ) override;
60
61private:
63 GxGuiGraphTime( void ){}
64
66 //-----------------------------------------------------------
68 //-----------------------------------------------------------
70public:
72 GX_FORCE_INLINE void setLabelX( GxString string ) { _label[0] = string; }
74 GX_FORCE_INLINE void setLabelY( GxString string ) { _label[1] = string; }
76 GX_FORCE_INLINE void setRangeY( const f32 min, const f32 max ) { _min = min; _max = max; _labelMin[1].format("%.0f", _min); _labelMax[1].format("%.0f", _max); }
78 GX_FORCE_INLINE void setRangeLabelY( GxString min, GxString max ) { _labelMin[1] = min; _labelMax[1] = max;}
79
81 constexpr void setSkipFrame( const u32 skipFrame ) { _skipFrame = skipFrame; }
82
84 GX_FORCE_INLINE void setTitle( GxString title ) { _title = title; }
85
87 f32 getValue( u32 index = 0 );
88
90 GX_FORCE_INLINE void setLineColor( const GxColor& color , u32 index ) { _lineColor[index] = color; }
91
93 GX_FORCE_INLINE void setLineFocus( b32 isPlotFocus , u32 index ) { _isPlotFocus[index] = isPlotFocus; }
94
96 //-----------------------------------------------------------
98 //-----------------------------------------------------------
100protected:
102 // note:未完成
103 void update( void ) override;
104
106 // note:未完成
107 void onDraw( void ) override;
108
112 GX_FORCE_INLINE GxSize getClampedRegionSize( const GxSize& size ) const override { return GxSize( GxMath::getMax(MARGIN_TOP + MARGIN_BOTTOM, size._width), GxMath::getMax(MARGIN_LEFT + MARGIN_RIGHT, size._height) ); }
113
115 //-----------------------------------------------------------
117 //-----------------------------------------------------------
119private:
120 GxProperty _property;
121 GxTypedObject* _pOwner;
122 u32 _index;
123
124 f32* _pPlotData[PLOT_MAX_COUNT];
125 u32 _plotDataSize;
126 u32 _plotDataCount;
127 u32 _currentIndex;
128
129 //---- グラフパラメタ
130 b32 _isUseAnyLine;
131 GxString _title;
132 GxString _label[2];
133 GxString _labelMin[2];
134 GxString _labelMax[2];
135 f32 _min;
136 f32 _max;
137 u32 _recordFrames;
138 u32 _skipFrame;
139 u32 _skipFrameCount;
140 b32 _isPlotFocus[PLOT_MAX_COUNT];
141 GxColor _lineColor[PLOT_MAX_COUNT];
142 GxColor _areaColor;
143 GxColor _gridColor;
144
146};
147GX_CORE_NAMESPACE_END()
148
149#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
void GxTypedObject
その他
Definition GxDefine.h:213
static GX_FORCE_INLINE T getMax(const T value0, const T value1)
大きいほうを取得
Definition GxMath.h:174
プロパティクラス
Definition GxProperty.h:48
Definition GxColor.h:21
サイズ
Definition GxStruct.h:730
s32 _width
Definition GxStruct.h:857
s32 _height
高さ
Definition GxStruct.h:858
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173