示例#1
0
BOOL ScaleTab::UngreySection()
{
TRACEUSER( "Neville", _T("UngreySection in ScaleTab section\n"));
	ERROR2IF(pPrefsDlg == NULL,FALSE,"ScaleTab::UngreySection called with no dialog pointer");

	BOOL ok = pPrefsDlg->TalkToPage(_R(IDD_OPTSTAB_SCALE));	// The ScaleTab identifier
	if (!ok)
		return TRUE;	// Talk to page failed to return now

	// Make sure the information field displaying the name of the current document
	// is correct.
	String_256	DocumentName(_R(IDT_OPTS_SCALING_INFO)); 
	DocumentName +=	*GetDocumentName();
	pPrefsDlg->SetStringGadgetValue(_R(IDC_OPTS_INFO), DocumentName);

	// Only update if we are not already ungrey 
	if (GreyStatus == FALSE)
		return TRUE;

	// Call our central greying/ungreying function
	ok = ChangeControlStatus(TRUE);
	
	GreyStatus = FALSE;

	return ok;
}
示例#2
0
BOOL GuidesPropertiesTab::ShowDetails()
{
	Layer* pLayer = GetGuideLayer();
	if (pLayer != NULL)
	{
		ShowGuidelines(pLayer);
		ShowColours();

		pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_GUIDETAB_HORZ),GuideType == GUIDELINE_HORZ);
		pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_GUIDETAB_VERT),GuideType == GUIDELINE_VERT);
	}

	ChangeControlStatus(!GreyStatus);

	return TRUE;
}
示例#3
0
BOOL GuidesPropertiesTab::UngreySection()
{
TRACEUSER( "Neville", _T("UngreySection in GuidesPropertiesTab section\n"));
	ERROR2IF(pPropertiesDlg == NULL,FALSE,"GuidesPropertiesTab::UngreySection called with no dialog pointer");

	BOOL ok = pPropertiesDlg->TalkToPage(GetPageID());	// The GuidesPropertiesTab identifier
	if (!ok)
		return TRUE;	// Talk to page failed to return now

	// Only update if we are not already ungrey 
	if (GreyStatus == FALSE)
		return TRUE;

	// Call our central greying/ungreying function
	ok = ChangeControlStatus(TRUE);
	
	GreyStatus = FALSE;

	return ok;
}
示例#4
0
文件: optsedit.cpp 项目: vata/xarino
BOOL EditTab::GreySection()
{
TRACEUSER( "Neville", _T("GreySection in EditTab section\n"));
	ERROR2IF(pPrefsDlg == NULL,FALSE,"EditTab::GreySection called with no dialog pointer");

	BOOL ok = pPrefsDlg->TalkToPage(_R(IDD_OPTSTAB_EDIT));	// The EditTab identifier
	if (!ok)
		return TRUE;	// Talk to page failed to return now

	// Only update if we are not already grey 
	if (GreyStatus == TRUE)
		return TRUE;

	// Call our central greying/ungreying function
	ok = ChangeControlStatus(FALSE);
	
	GreyStatus = TRUE;

	return ok;
} 
示例#5
0
文件: prpslyrs.cpp 项目: vata/xarino
BOOL LayerPropertiesTab::ShowDetails()
{
	String_256 LayerID;

	Layer* pLayer = GetActiveLayer();
	if (pLayer != NULL)
	{
		LayerID = pLayer->GetLayerID();

//		pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_LAYERTAB_VISIBLE),pLayer->IsVisible());
//		pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_LAYERTAB_EDITABLE),!pLayer->IsLocked());
		pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_LAYERTAB_VISIBLE),pLayer->GetVisibleFlagState());
		pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_LAYERTAB_EDITABLE),!pLayer->GetLockedFlagState());
	}

	pPropertiesDlg->SetStringGadgetValue(_R(IDC_LAYERTAB_NAME), LayerID);

	ChangeControlStatus(!GreyStatus);

	return TRUE;
}
示例#6
0
BOOL GuidesPropertiesTab::HandleMsg(DialogMsg* Msg)
{
TRACEUSER( "Neville", _T("GuidesPropertiesTab::HandleMsg\n"));
	ERROR2IF(Msg == NULL,FALSE,"GuidesPropertiesTab::Message null message received");
	ERROR2IF(pPropertiesDlg == NULL,FALSE,"GuidesPropertiesTab::HandleMsg called with no dialog pointer");

	BOOL ok = pPropertiesDlg->TalkToPage(GetPageID());
	if (!ok)
		return TRUE;		// no page present = handled message
	
	switch(Msg->DlgMsg)
	{
		case DIM_CREATE:	// Initialise controls
			GreyStatus = FALSE;	// we are ungreyed by default
			ok = InitSection();
			if (!ok)
				InformError();
			break;
		case DIM_LFT_BN_CLICKED:
			//LayerPropertyTabs::SetApplyNowState(TRUE);
			if (FALSE) {}
			else if (Msg->GadgetID == _R(IDC_GUIDETAB_HORZ))
			{
				if (GuideType != GUIDELINE_HORZ)
				{
					GuideType = GUIDELINE_HORZ;
					ShowDetails();
				}
			}
			else if (Msg->GadgetID == _R(IDC_GUIDETAB_VERT))
			{
				if (GuideType != GUIDELINE_VERT)
				{
					GuideType = GUIDELINE_VERT;
					ShowDetails();
				}
			}
			else if (Msg->GadgetID == _R(IDC_GUIDETAB_PROPERTIES))
			{
				PropertiesClicked();
				ShowDetails();
			}
			else if (Msg->GadgetID == _R(IDC_GUIDETAB_NEW))
			{
				NewClicked();
				ShowDetails();
			}
			else if (Msg->GadgetID == _R(IDC_GUIDETAB_DELETE))
			{	
				DeleteClicked();
				ShowDetails();
			}
			break;

		case DIM_SELECTION_CHANGED:
		case DIM_TEXT_CHANGED:
			//LayerPropertyTabs::SetApplyNowState(TRUE);
			if (FALSE) {}
			else if (Msg->GadgetID == _R(IDC_GUIDETAB_GUIDELINELIST))
			{
				ChangeControlStatus(!GreyStatus);
			}
			else if (Msg->GadgetID == _R(IDC_GUIDETAB_COLOURLIST))
			{
				ColourChanged(pPropertiesDlg->GetSelectedValueIndex(Msg->GadgetID));
				ShowDetails();
			}
			break;
		default:
			break;
	}
	return TRUE;
}