15GX_CORE_NAMESPACE_BEGIN()
20class GxGuiPropertyParameter : public GxGuiProperty
27 GX_RTTI_CLASS(GxGuiPropertyParameter, GxGuiProperty)
32 enum class PARAMETER_MODE
53 enum class GUI_FLOAT_FORMAT
69 GX_ENUM_TABLE_MAX(GUI_FLOAT_FORMAT)
79 GxGuiPropertyParameter(
void);
82 GxGuiPropertyParameter(
const GxProperty& propertyData,
GxTypedObject* pBase,
const GxRtti& rtti, u32 index = 0, NAME_TYPE nameType = NAME_TYPE::LEFT, PARAMETER_MODE mode = PARAMETER_MODE::INT);
85 GxGuiPropertyParameter(
const GxProperty& propertyData,
GxTypedObject* pBase,
const GxRtti& rtti, f64 min, f64 max, u32 index = 0, NAME_TYPE nameType = NAME_TYPE::LEFT, PARAMETER_MODE mode = PARAMETER_MODE::INT);
88 b32 initialize(
void )
override;
97 void setMinMax( u64 min, u64 max );
99 void setMinMax( s64 min, s64 max );
101 void setMinMax( f64 min, f64 max );
103 GX_FORCE_INLINE
void getMinMax( u64& min, u64& max )
const { min = _u64Min; max = _u64Max; }
105 GX_FORCE_INLINE
void getMinMax( s64& min, s64& max )
const { min = _s64Min; max = _s64Max; }
107 GX_FORCE_INLINE
void getMinMax( f64& min, f64& max )
const { min = _f64Min; max = _f64Max; }
113 void setStepS( f64 step );
115 void setStepF( f64 step );
118 constexpr f64 getStepS(
void )
const {
return _s64Step; }
121 constexpr f64 getStepF(
void )
const {
return _f64Step; }
124 constexpr void setSpaceMode(
const SPACE_MODE spaceMode){ _spaceMode = spaceMode; }
126 constexpr SPACE_MODE getSpaceMode(
void){
return _spaceMode; }
130 void update(
void)
override;
132 void onDraw(
void)
override;
136 void onRemoveGui(GxGuiBase* pGui)
override;
139 void onSize(
const GxSize& size)
override;
143 void onKeyPress(GxKeyboard::KEY key)
override;
146 void onActive(
b32 active)
override;
149 void onMouseDown(
const GxPoint2& position, u32 button)
override;
152 void onMouseMove(
const GxPoint2& position)
override;
155 void onDoubleClick(
const GxPoint2& position, u32 button)
override;
159 void eventEditString(
void);
162 void createControlButton(
void);
165 void deleteControlButton(
void);
167#if defined( _WINDOWS )
169 static LRESULT CALLBACK MyDlgProc(HWND handleDialogWindow, UINT message, WPARAM wParam, LPARAM lParam);
173 void controlParamUsedMouse(
const GxPoint2& position);
182 GX_FORCE_INLINE
const GxFlag32Bit& getLayout(
void)
const {
return _layout; }
185 void setLayout( u32 flag,
b32 on );
188 constexpr void setParameterMode( PARAMETER_MODE parameterMode ){ _parameterMode = parameterMode; }
191 constexpr PARAMETER_MODE getParameterMode(
void )
const {
return _parameterMode; }
194 GX_FORCE_INLINE
void setFrameDrawn(
b32 on ){ _isFrameDrawn = on; }
198 GX_FORCE_INLINE
b32 isFrameDrawn(
void )
const {
return _isFrameDrawn; }
202 void setEnableButton(
b32 on );
206 GX_FORCE_INLINE
b32 isEnableButton(
void )
const {
return _enableButton; }
209 void getValueString(
GxString&
string, u32 size )
const;
212 GX_FORCE_INLINE
GxString getValueString( u32 size )
const {
GxString string; getValueString(
string, size );
return string; }
215 void addValue( s64 add );
218 void addValue( f64 add );
221 f64 getValueRatio(
void );
224 void setValueRatio( f64 ratio );
228 GX_FORCE_INLINE
b32 isEditParam(
void )
const {
return _isEditParam; }
231 virtual b32 isControl(
void )
const;
234 GX_FORCE_INLINE
void setIsEditParam(
b32 edit ){ _isEditParam = edit; getGxGuiSystem()->setEditMode( edit ); }
237 constexpr void setFloatFormat(GUI_FLOAT_FORMAT format) { _floatFormat = format; };
240 void setValue(u64 value);
242 void setValue(s64 value);
244 void setValue(f64 value);
247 u64 getValueU(
void )
const;
249 s64 getValueS(
void )
const;
251 f64 getValueF(
void )
const;
254 void setValue(
const GxString&
string);
258 b32 isDefaultValue(
void )
override;
260 void setDefaultValue(
void )
override;
268 PARAMETER_MODE _parameterMode;
269 GUI_FLOAT_FORMAT _floatFormat;
282 GxSize _clipDisplayStringSize;
301 GxGuiButton* _pGuiButton;
303 SPACE_MODE _spaceMode;
311class GxGuiValueEdit :
public GxGuiButton
318 GX_RTTI_CLASS(GxGuiValueEdit, GxGuiButton)
329 GxGuiValueEdit(
void);
338 b32 initialize(
void )
override;
343 void onMouseDown(
const GxPoint2& position, u32 button)
override;
347 void onNoClientMouseMove(
const GxPoint2& position)
override;
352 void onMouseUp(
const GxPoint2& position, u32 button)
override;
357 void onNoClientMouseUp(
const GxPoint2& position, u32 button)
override;
361 void controlParamUsedMouse(
const GxPoint2& position);
370 void update(
void )
override;
374 GX_FORCE_INLINE
b32 isControl(
void )
const {
return _isControlMouse; }
384 f64 _mouseDownValueF;
385 s64 _mouseDownValueS;
386 u64 _mouseDownValueU;
395typedef void (*GX_GUI_PROPERTY_MODIFIER_FUNCTION)(GxGuiPropertyParameter& property,
GxTypedObject* pOwner, u32 index);
397GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
void GxTypedObject
その他
Definition GxDefine.h:213
@ DEFAULT
ソートせずに名前順(デフォルト)
プロパティクラス
Definition GxProperty.h:48
TYPE
タイプ定義
Definition GxProperty.h:56
実行時型情報クラス
Definition GxRtti.h:154
ビット指定型フラグ
Definition GxStruct.h:1338
座標
Definition GxStruct.h:867
サイズ
Definition GxStruct.h:730
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173