/* ==========================================================================
* 파    일 : UserSellSearchWindow.h
* 목    적 : 노점 검색 윈도우
* 작 성 자 : 김가람
* 작 성 일 : 2007-10-18
* 주의사항 :
*===========================================================================*/
#pragma once
#include "UIWindow.h"

class cComboBox;
class cButton;
class cListBox;
class cItemIcon;
class cLabel;
class cUserSellSearchWindow : public cUIWindow
{
public:
	cUserSellSearchWindow();
	virtual ~cUserSellSearchWindow();

	void Clear();
	void AddItem( unsigned long dbIndex, LPCTSTR charactername, unsigned long price,
				  unsigned short mapnum, float xpos, float ypos );

protected:
	bool OnCreate( cUINodeProperty* pproperty );
	void OnCommand( cUINode* pnode, unsigned int id );
	void OnComboSelected( cUINode* caller, unsigned int id );
	void OnListBoxRowHovered( cUINode* , unsigned int , const cUIPos& , void* );
	void OnListBoxRowLeft(cUINode* , unsigned int );
	void OnHide();
	void OnShow();
	void OnNetLock( int lockTry );
	void OnNetUnLock( int lockTry );

	void SetEnhanceList();
	void SetHighList();

	/// 선택
	void SelectHigh( unsigned int high );
	void SelectMiddle( unsigned int high, unsigned int middle );
	void SelectLow( unsigned int high, unsigned int middle, unsigned int low );

private:
	/// 노점 정보
	struct sSearchData
	{
		unsigned long	dbIndex;	
		int				mapnum;
		cStringT		name;
		float			xPos;
		float			yPos;
	};
	typedef tArray<void*> cSearchData;
	cSearchData mSearchData;

	/// 분류 콤보
    cComboBox*	mpHighCombo;	/// 대분류
	cComboBox*	mpMiddleCombo;	/// 중분류
	cComboBox*	mpLowCombo;		/// 소분류
	cComboBox*	mpNameCombo;
	cComboBox*  mpEnhanceCombo;

	/// 
	cButton*	mpSearch;
	cListBox*	mpItemList;

	///
	unsigned long mItemIndex;
	unsigned int mEnhance;

	/// 검색하려는 아이템 아이콘 정보
	cItemIcon*	mItemSlot;
	cLabel*		mpName;
};
