#ifndef _APL_MESSAGE_FOLDER_TREE_ITEM_H_
#define _APL_MESSAGE_FOLDER_TREE_ITEM_H_

#include "aplTreeItem.h"

class CaplMessageFolderTreeItem: public CaplTreeItem
{
public:
	CaplMessageFolderTreeItem(CTreeCtrl *tree= 0, CPSMDoc *doc= 0);
    bool GetName(CString &name);
    bool RefreshItem();
    bool CreateTreeItem(HTREEITEM parent_item);
	bool Expand(UINT action);
	void ShowProperties();
	bool ShowInListCtrl(CListCtrl *list);
	void ShowCmd(long cmd);
	//void ShowToolBarButton(CToolBarCtrl *tb);
	BOOL ShowToolBarButton(CCmdUI* pCmdUI);
    bool TrackPopupMenu(CWnd *wnd, CPoint &point, UINT view_mode= APLICM_NORMALE);

	virtual void Sort(bool bRefreshParent=false);
	static int CALLBACK CompareMesHtreeItem(LPARAM lParam1, LPARAM lParam2,LPARAM lParamSort);
	
public:
	bool InsertMessages(bool bWithLosted= false);
	
	CString m_name;
	bool m_bCanExpand;
	bool m_bWithLosted;
};

#endif //_APL_MESSAGE_FOLDER_TREE_ITEM_H_