/* ========================================================================== * ÆÄ ÀÏ : SpinBox.h * ¸ñ Àû : ½ºÇÉ ÄÁÆ®·Ñ * ÀÛ ¼º ÀÚ : ±è°¡¶÷ * ÀÛ ¼º ÀÏ : 2006-11-24 * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "SpinCtrl.h" #include "UINodeData.h" class cButton; class cLabel; class cSpinBox : public cSpinCtrl { public: cSpinBox( eUINodeType type = eUINODE_SPINBOX ); virtual ~cSpinBox(); virtual void AddData( LPCTSTR str, void* pExData = 0 ); virtual void Clear(); inline int GetSelectedIdx() { return mSelectedIdx; } void SetSelectIdx( int idx ); protected: /// À̺¥Æ® ó¸® virtual bool HandleEvent( const cUIEvent& event ); virtual void OnLButtonDown( const cUIPos& pos, bool ctrl, bool alt, bool shift ); virtual void OnLButtonUp( const cUIPos& pos ); virtual bool SetSkin( const cUINodeSkin* pskin ); virtual void UpdateSkin(); /// »ý¼º bool OnCreate( cUINodeProperty* pproperty ); /// ¹öư üũ void CheckButtonEvent( unsigned int id ); void UpdateLabel(); private: // ¿ÞÂÊ ¹öư ½ºÅ² ³×ÀÓ cString mLeftButtonSkin; /// ¿À¸¥ÂÊ ¹öư ½ºÅ² ³×ÀÓ cString mRightButtonSkin; /// ¶óº§ ½ºÅ² ³×ÀÓ cString mLabelSkin; /// ¿ÞÂÊ ¿À¸¥ÂÊ ¹öư cButton* mpLeftButton; cButton* mpRightButton; /// ½ºÇɹڽºÀÇ ¶óº§ cLabel* mpLabel; /// ¿ø¼Ò À妽º int mSelectedIdx; /// ½ºÇɹڽº À¯Çü ŸÀÔ ( rotation true: °è¼Ó µ·´Ù / false : ÇѹæÇ⸸ °£´Ù ) bool mRotation; }; ////////////////////////////////////////////////////////////////////////// class cSpinBoxSkin : public cUINodeSkin { public: cSpinBoxSkin( eUINodeType type = eUINODE_SPINBOX ); virtual ~cSpinBoxSkin(); /// ·Îµù virtual bool Load( cParser& parser ); public: /// ÅØ½ºÆ® Á¤·Ä int mTextAlign; /// ½ºÇɹڽº ŸÀÔ bool mRotation; /// ¿ÞÂÊ ¹öư ½ºÅ² ³×ÀÓ cString mLeftButtonSkin; /// ¿À¸¥ÂÊ ¹öư ½ºÅ² ³×ÀÓ cString mRightButtonSkin; /// ¶óº§ ½ºÅ² cString mLabelSkin; };