/*------------------------------------------------------------------------------*
Modification Log:
 *------------------------------------------------------------------------------*/
 
#ifndef _USER_TREE_GUI_H
#define _USER_TREE_GUI_H

//user tree gui
///Jasmine 11/06/09 QA80-14502 REWRITE_CODE_TO_SHARE_COL_PROP_USER_TREE_CODE
enum{
	USERTREEMENU_EDIT,
	USERTREEMENU_DELETE,
	USERTREEMENU_TREE,
	USERTREEMENU_NODE,
	USERTREEMENU_LAST_ITEM
};

class UserTreeMenu : public Menu
{
public:
	UserTreeMenu(bool bDelete, bool bTree, bool bNode);
	
	void OnMenuItem(UINT nPos)
	{
		m_nChoice = nPos;
	}
	
	bool GetCommand(int& nChoice);
	
	void EmptySepFunc(uint nCmd)
	{
	}
	
private:
	int	m_nChoice;
};
///End REWRITE_CODE_TO_SHARE_COL_PROP_USER_TREE_CODE

/// Hong 11/13/09 QA80-14502 WBK_ORGANIZER_USER_TREE_EDIT_GUI_THE_SAME_AS_COL_PROPERTY
enum
{
	USERTREE_STORAGE_SECTION		= 0x00000001,
	USERTREE_HIDE_LABEL_NODE		= 0x00000002,
	USERTREE_HIDE_TYPE_NODE			= 0x00000004,
};

enum
{
	USERTREE_NUMERIC_NODE = 0,
	USERTREE_TEXT_NODE,
	USERTREE_BRANCH_NODE,
};

///Jasmine 01/31/07 QA70-9287 EDIT_STORAGE
int storage_tree_check_node_name(const TreeNode& trParent, string strName);
///End EDIT_STORAGE

bool usertree_input_node_name(TreeNode &trParent, string& strName, string& strLabel, int& nNodeType, HWND hWndParent = NULL, DWORD dwCntrl = 0, LPCSTR lpcszTitle = NULL, LPCSTR lpcszName = NULL, LPCSTR lpcszNote = NULL);
/// end WBK_ORGANIZER_USER_TREE_EDIT_GUI_THE_SAME_AS_COL_PROPERTY

///Jasmine 11/06/09 QA80-14502 REWRITE_CODE_TO_SHARE_COL_PROP_USER_TREE_CODE
bool usertree_make_node(TreeNode& trNew, TreeNode& trParent, const string& strName, const string& strLabel, int nNodeType);
///End REWRITE_CODE_TO_SHARE_COL_PROP_USER_TREE_CODE

bool usertree_edit_node_name(TreeNode &trParent, string& strName, string& strLabel, HWND hWndParent = NULL, DWORD dwCntrl = 0, LPCSTR lpcszTitle = NULL, LPCSTR lpcszName = NULL, LPCSTR lpcszLabel = NULL, LPCSTR lpcszNote = NULL);

bool usertree_replace_node(TreeNode& trStorage, LPCSTR lpcszNode, LPCSTR lpcszName = NULL, LPCSTR lpcszLabel = NULL);
#endif//_USER_TREE_GUI_H