/*------------------------------------------------------------------------------*
 * File Name: XFScriptEdit.h													*
 * Creation: CPY 06/04/2007														*
 * Purpose: X-Function Sample Script Edit				 						*
 * Copyright (c) OriginLab Corp.	2007										*
 * All Rights Reserved															*
 * 																				*
 * Modification Log:															*
 *	Folger 07/15/08 QA80-11230 SUPPORT_SHORTCUT_MENU_IN_SCRIPT_PANEL			*
 *------------------------------------------------------------------------------*/

class XFScriptEdit : public CodeEdit 
{
public:
	XFScriptEdit()
	{
	}
	void OnInit()
	{  
		ColorOptions(CODEEDIT_PARSE_NO_KEY_WORDS);
	}
				
	//------ Folger 07/15/08 QA80-11230 SUPPORT_SHORTCUT_MENU_IN_SCRIPT_PANEL
	void OnDelete()
	{
		ReplaceSel("");
	}

	void OnCut()
	{
		Copy();
		OnDelete();
	}

	void OnSelectAll()
	{
		SetSel(0, -1);
	}

	bool IsSelEmpty()
	{
		int nBegin, nEnd;
		GetSel(nBegin, nEnd);
		if(nBegin == nEnd)
			return true;
		
		return false;
	}
	//------ End SUPPORT_SHORTCUT_MENU_IN_SCRIPT_PANEL
	
};

	
	
