Exemplo n.º 1
0
//---------------------------------------------------------
CDLG_Text::CDLG_Text(wxString *_pText, wxString Caption)
	: CDLG_Base(-1, Caption)
{
	m_pText		= _pText;

	m_pControl	= new wxTextCtrl(this, -1, *m_pText, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxSUNKEN_BORDER);

	Add_Button(ID_BTN_LOAD);
	Add_Button(ID_BTN_SAVE);

	Set_Positions();
}
//---------------------------------------------------------
void CDLG_Parameters::Show_Info(bool bShow)
{
	if( m_pInfo )
	{
		m_pInfo_Button->SetLabel(wxString::Format("%s %s", _TL("Info"), bShow ? wxT("<<") : wxT(">>")));

		if( bShow != m_pInfo->IsShown() )
		{
			m_pInfo->Show(bShow);

			Set_Positions();
		}
	}
}
Exemplo n.º 3
0
//---------------------------------------------------------
CDLG_Parameters::CDLG_Parameters(CSG_Parameters *pParameters)
	: CDLG_Base(-1, pParameters ? pParameters->Get_Name() : LNG("[CAP] Parameters"))
{
	m_pControl		= new CParameters_Control(this, true);

	m_pParameters	= pParameters;

	g_pACTIVE->Get_Parameters()->Update_Parameters(m_pParameters, true);

	m_pControl->Set_Parameters(m_pParameters);

	Add_Button(ID_BTN_LOAD);
	Add_Button(ID_BTN_SAVE);

	Set_Positions();
}
//---------------------------------------------------------
CDLG_Parameters::CDLG_Parameters(CSG_Parameters *pParameters, const wxString &Caption, const wxString &Info)
	: CDLG_Base(-1, Caption)
{
	if( Caption.IsEmpty() )
	{
		if( pParameters && !pParameters->Get_Name().is_Empty() )
		{
			SetTitle(pParameters->Get_Name().c_str());
		}
		else
		{
			SetTitle(_TL("Parameters"));
		}
	}

	m_pControl		= new CParameters_Control(this, true);

	m_pParameters	= pParameters;

	g_pActive->Get_Parameters()->Update_Parameters(m_pParameters, true);

	m_pControl->Set_Parameters(m_pParameters);

	Add_Button(ID_BTN_LOAD);
	Add_Button(ID_BTN_SAVE);
	Add_Button(ID_BTN_DEFAULTS);

	if( Info.IsEmpty() )
	{
		m_pInfo_Button	= NULL;
		m_pInfo			= NULL;
	}
	else
	{
		Add_Button(0);

		wxString	_Info(Info); _Info.Replace("\n", "<br>");

		m_pInfo_Button	= Add_Button(ID_BTN_DESCRIPTION);
		m_pInfo			= new CActive_Description(this);
		m_pInfo->SetPage(_Info);

		Show_Info(m_bInfo);
	}

	Set_Positions();
}
Exemplo n.º 5
0
//---------------------------------------------------------
void CDLG_Colors_Control::On_Size(wxSizeEvent &event)
{
	Set_Positions();
}