//@STATE=作成中
//@DESCRIPTION ---------------------------------------------------------------
// DispositionEditorImpl.h: DispositionEditorImpl クラスのインターフェイス
// 配置エディタクラス
//	履歴：
// $Log: DispositionEditorImpl.h,v $
// Revision 1.1.1.1  2001/11/06 21:29:04  fujiwara
// no message
//
// Revision 1.1  2001/10/28 21:40:35  fujiwara
// DLLに分割
//
// Revision 1.6  2001/07/09 20:30:08  fujiwara
// 例外処理の組み込み
//
// Revision 1.5  2001/07/01 01:03:43  fujiwara
// const の見直し
// 配置エディタは途中経過
//
// Revision 1.4  2001/05/17 12:34:10  fujiwara
// 地上敵サンプル作成
//
// Revision 1.3  2001/05/12 00:50:48  fujiwara
// ＣＶＳを導入し、ログ表示を追加
//
//@DESCRIPTION_END -----------------------------------------------------------
//@AUTHOR=S.F.
// Copyright (C) 2000 Satoshi Fujiwara. All Rights Reserved.
///////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_EDITOR_H__78B4933E_229E_4ACD_9183_C1E688557FE7__INCLUDED_)
#define AFX_EDITOR_H__78B4933E_229E_4ACD_9183_C1E688557FE7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "AbstractScene.h"
namespace sf {
	namespace application {
		namespace scene {

class DispositionEditorImpl : public sf::system::input::mouse::Listener ,
	public sf::system::input::keyboard::Listener ,public AbstractScene
	, public sf::system::console::ObjRectangle
{

public:
	
	// LIFECYCLE //
	
	DispositionEditorImpl(DispositionEditorParameter *pDispositionEditorParam);
	virtual ~DispositionEditorImpl();
	
	// OPERATIONS //
	
	void move(void);

	const TYPE type() const{return DISPOSITION_EDITOR;};

	void endOfScene(Scene * const pScene);
	void exitKeyPressed(Scene * const pScene);

	// マウスリスナー
	void leftButtonDown(const int screenX,const int screenY,const DWORD mkey);
	void leftButtonUp(const int screenX,const int screenY,const DWORD mkey){;};
	void leftButtonDoubleClick(const int screenX,const int screenY,const DWORD mkey){;};
	void rightButtonDown(const int screenX,const int screenY,const DWORD mkey);
	void rightButtonUp(const int screenX,const int screenY,const DWORD mkey){;};
	void rightButtonDoubleClick(const int screenX,const int screenY,const DWORD mkey){;};
	void mouseMove(const int screenX,const int screenY,const DWORD mkey)
	{ 
		mMouseX = screenX; mMouseY = screenY;
	};

	void mouseWheel(const int screenX,const int screenY,const DWORD mkey);
	
	const bool isListeningMouse(void) const {return mbCallBack;};
	void mouseTalkerIsDeleted(void){ mpInput = NULL;};

	const float mouseX(void) const { return mMouseX;};
	const float mouseY(void) const { return mMouseY;};

	void keyDown(const DWORD keyCode,const DWORD extKeyCode);
	void keyUp(const DWORD keyCode,const DWORD extKeyCode){};
	const bool isListeningKeyboard(void) const {return mbListening;};
	void keyboardTalkerIsDeleted(void){ mpInput = NULL;};
	
	void changeCommand(const int commandID);

	// 
	void load(void);
	void unload(void);
	void draw(void);

	static const DWORD CURRENT_SPECULAR;
	static const DWORD NORMAL_SPECULAR;
private:
	enum EDIT_MODE {
		ENEMY,
		ARMY
	} mEditMode;
	void initialize(void);
	

	float mMouseX,mMouseY;

	bool mbCallBack;
	bool mbListening;
	
	sf::application::disposition::command::TYPE mEditType;
	sf::application::scene::Game::DIFFICULTY mDifficulty;
	
	enum STATE {
		INITIALIZE,
		MAIN,
		END
	} mState;

	sf::application::disposition::command::Interface *mpEditCommand;
	
	Game *mpGame;
	int mMax;

};// DispositionEditorImpl
		}
	}
}

#endif // !defined(AFX_EDITOR_H__78B4933E_229E_4ACD_9183_C1E688557FE7__INCLUDED_)
