//---------------------------------------------------------
CACTIVE_Parameters::CACTIVE_Parameters(wxWindow *pParent)
	: wxPanel(pParent, ID_WND_ACTIVE_PARAMETERS, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER)
{
	m_pItem			= NULL;
	m_pControl		= new CParameters_Control(this);

	//-----------------------------------------------------
	m_Btn_Apply		= new wxButton(this, ID_BTN_APPLY	, CTRL_Get_Name(ID_BTN_APPLY)	, wxPoint(0, 0));
	m_Btn_Restore	= new wxButton(this, ID_BTN_RESTORE	, CTRL_Get_Name(ID_BTN_RESTORE)	, wxPoint(0, 0));
	m_Btn_Execute	= new wxButton(this, ID_BTN_EXECUTE	, CTRL_Get_Name(ID_BTN_EXECUTE)	, wxPoint(0, 0));
	m_Btn_Load		= new wxButton(this, ID_BTN_LOAD	, CTRL_Get_Name(ID_BTN_LOAD)	, wxPoint(0, 0));
	m_Btn_Save		= new wxButton(this, ID_BTN_SAVE	, CTRL_Get_Name(ID_BTN_SAVE)	, wxPoint(0, 0));

	m_Btn_Apply		->Show(false);
	m_Btn_Restore	->Show(false);
	m_Btn_Execute	->Show(false);
	m_Btn_Load		->Show(false);
	m_Btn_Save		->Show(false);

	m_btn_height	= m_Btn_Apply->GetDefaultSize().y;

	m_pControl->Set_Parameters(NULL);

	Set_Parameters(NULL);
}
//---------------------------------------------------------
bool CParameters_Control::Restore(void)
{
	if( m_pOriginal && m_bModified )
	{
		Set_Parameters(m_pOriginal);

		return( true );
	}

	return( false );
}
//---------------------------------------------------------
CParameters_Control::CParameters_Control(wxWindow *pParent, bool bDialog)
	: wxPanel(pParent, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxCLIP_CHILDREN)
{
	m_pParameters	= new CSG_Parameters;
	m_pOriginal		= NULL;

	m_bFocus		= 0;

	CParameters_Grid_Manager	*pPGM	= new CParameters_Grid_Manager;
	
	m_pPG	= pPGM->Initialize(this);

//	pPGM->SetDescBoxHeight(bDialog ? 100 : 50);

	m_pPG->AddActionTrigger(wxPG_ACTION_PRESS_BUTTON , WXK_SPACE);

//	m_pPG->SetExtraStyle(wxPG_EX_HELP_AS_TOOLTIPS);
//	m_pPG->SetCellDisabledTextColour(wxColour(200, 200, 200));

	Set_Parameters(NULL);
}