/* ========================================================================== * ÆÄ ÀÏ : MsgBox.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : ±è°¡¶÷ * ÀÛ ¼º ÀÏ : 2007-04-02 * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "UIWindow.h" #include "UINodeData.h" class cBaseStage; class cButton; class cLabel; class cEditBox; class cMsgBox : public cUIWindow { friend class cUIManager; public: virtual ~cMsgBox(); virtual void Open() {} /// ¿¡µðÆ®ÀÇ ÅØ½ºÆ®¸¦ ¾ò´Â´Ù LPCTSTR GetEditText(); unsigned int GetLength(); eBoxSkin_Type GetSkinType() { return mSkinType; } virtual void Show( bool onsound = true ); protected: /// Msg¹Ú½ºÀÇ »ý¼ºÀº UIMANAGER·Î ÇÑÁ¤ÇÑ´Ù. cMsgBox( eUINodeType type = eUINODE_MESSAGEBOX ); // ¸Þ½ÃÁö ¹Ú½º »ý¼º bool Create( cBaseStage* msgHandler, eMSGBox_Type boxtype, eMSGBox_Event eventtype, eBoxSkin_Type skintype, void* extraData ); void SetTime( unsigned long totaltime = 0, bool printTime = false, bool success = false ); // void SetText( LPCTSTR text, LPCTSTR caption ); void ChangeText( LPCTSTR text ); void SetEnableLength( unsigned int length ); void SetMaxLength( int length ); protected: virtual bool OnCreate( cUINodeProperty* pproperty ); virtual bool SetSkin( const cUINodeSkin* pskin ); virtual bool HandleEvent( const cUIEvent& event ); virtual void OnProcess( unsigned long deltaTime, unsigned long accumTime ); virtual void OnRender( cUIFontItemKeeper* pKeeper ); virtual void OnKeyUp( eKeyCode code ); virtual void OnKeyDown( eKeyCode code ); virtual void UpdateRect(); virtual void UpdateSkin(); virtual void OnShow(); virtual void UpdateCaption(); virtual void HideESC( bool onsound = true ); protected: /// ÀÚ½Ä ÄÁÆ®·Ñ ½ºÅ² cString mOkButtonSkin; cString mYesButtonSkin; cString mNoButtonSkin; cString mEditSkin; cButton* mpYesButton; cButton* mpNoButton; cEditBox* mpEdit; cLabel* mpLabel; /// ÅØ½ºÆ® Ãâ·Â ¶óº§ eBoxSkin_Type mSkinType; // µ¥ÀÌÅÍ cUIPos mCaptionPos; cStringT mCaptionText; cStringT mText; // óÀ½ ¼¼ÆÃµÈ ÅØ½ºÆ® void* mExtraData; /// ½Ã°£ Á¦ÇÑ ³Ö±â unsigned long mStartTime; unsigned long mTotalTime; bool mTimePrint; /// ½Ã°£Á¤º¸¸¦ Ãâ·ÂÇÒ °ÍÀÎÁö ¿©ºÎ bool mTimeResult; /// ¼º°ø or ½ÇÆÐ ¸Þ¼¼Áö // unsigned int mEnableLength; /// yes ¹öưÀÌ È°¼ºÈ­ µÉ ÃÖ¼Ò ±ÛÀÚ Á¶°Ç. }; ////////////////////////////////////////////////////////////////////////// class cMessageBoxSkin : public cUINodeSkin { public: cMessageBoxSkin( eUINodeType type = eUINODE_MESSAGEBOX ); virtual ~cMessageBoxSkin(); /// ·Îµù virtual bool Load( cParser& parser ); public: /// À̵¿°¡´É ¿©ºÎ bool mMoveable; /// ĸ¼Ç¿µ¿ª cUIRect mCaptionRect; /// ¹öư ¹Ú½º ½ºÅ² ³×ÀÓ cString mOkButtonSkin; cString mYesButtonSkin; cString mNoButtonSkin; cString mEditSkin; };