예제 #1
0
void CExtObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{		
	SimpleObject::EndEditParams(ip,flags,next);
	this->ip = NULL;

	if (flags & END_EDIT_REMOVEUI ) {
		if (pmapCreate) DestroyCPParamMap(pmapCreate);
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
		pmapCreate = NULL;
	}
	else
	{
		pmapTypeIn->SetUserDlgProc(nullptr);
		pmapParam->SetUserDlgProc(nullptr);
		pmapCreate->SetParamBlock(nullptr);
		pmapTypeIn->SetParamBlock(nullptr);
		pmapParam->SetParamBlock(nullptr);
	}

	// Save these values in class variables so the next object created will inherit them.
	pblock->GetValue(PB_TSEGS,ip->GetTime(),dlgTSegs,FOREVER);
	pblock->GetValue(PB_SSEGS,ip->GetTime(),dlgSSegs,FOREVER);
	pblock->GetValue(PB_BSEGS,ip->GetTime(),dlgBSegs,FOREVER);
	pblock->GetValue(PB_WSEGS,ip->GetTime(),dlgWSegs,FOREVER);
	pblock->GetValue(PB_HSEGS,ip->GetTime(),dlgHSegs,FOREVER);
}
예제 #2
0
void TorusObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{
	SimpleObject::EndEditParams(ip,flags,next);
	this->ip = NULL;

	if (flags & END_EDIT_REMOVEUI ) {
		if (pmapCreate) DestroyCPParamMap(pmapCreate);
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
		pmapCreate = NULL;
	}
	else
	{
		pmapTypeIn->SetUserDlgProc(nullptr);
		pmapParam->SetUserDlgProc(nullptr);
		pmapCreate->SetParamBlock(nullptr);
		pmapTypeIn->SetParamBlock(nullptr);
		pmapParam->SetParamBlock(nullptr);
	}

	// Save these values in class variables so the next object created will inherit them.
	pblock->GetValue(PB_SIDES,ip->GetTime(),dlgSides,FOREVER);
	pblock->GetValue(PB_SEGMENTS,ip->GetTime(),dlgSegments,FOREVER);
	pblock->GetValue(PB_SMOOTH,ip->GetTime(),dlgSmooth,FOREVER);	
	pblock->GetValue(PB_RADIUS2,ip->GetTime(),dlgRadius2,FOREVER);		
}
예제 #3
0
// This is called by the system to terminate the editing of the
// parameters in the command panel.  
void ChBoxObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{
	SimpleObject::EndEditParams(ip,flags,next);
	this->ip = NULL;

	if (flags & END_EDIT_REMOVEUI ) {
		// Remove the rollup pages from the command panel.
		if (pmapCreate) DestroyCPParamMap(pmapCreate);
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
		pmapCreate = NULL;
	}
	else
	{
		pmapTypeIn->SetUserDlgProc(nullptr);
		pmapParam->SetUserDlgProc(nullptr);
		pmapCreate->SetParamBlock(nullptr);
		pmapTypeIn->SetParamBlock(nullptr);
		pmapParam->SetParamBlock(nullptr);
	}

	// Save these values in class variables so the next object 
	// created will inherit them.
	pblock->GetValue(PB_LSEGS,ip->GetTime(),dlgLSegs,FOREVER);
	pblock->GetValue(PB_WSEGS,ip->GetTime(),dlgWSegs,FOREVER);
	pblock->GetValue(PB_HSEGS,ip->GetTime(),dlgHSegs,FOREVER);	
	pblock->GetValue(PB_CSEGS,ip->GetTime(),dlgCSegs,FOREVER);	
}
예제 #4
0
void CExtObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
{
	SimpleObject::BeginEditParams(ip,flags,prev);

	if (pmapCreate && pmapParam) {

		// Left over from last CExt ceated
		pmapCreate->SetParamBlock(this);
		pmapTypeIn->SetParamBlock(this);
		pmapParam->SetParamBlock(pblock);
		CExtWidthDlgProc* dlg = static_cast<CExtWidthDlgProc*>(pmapParam->GetUserDlgProc());
		if (dlg != NULL) {
			BOOL rws = dlg->GetRWSState();
			SetUsePhysicalScaleUVs(rws);
		}
	} else {

		// Gotta make a new one.
		if (flags&BEGIN_EDIT_CREATE) {
			pmapCreate = CreateCPParamMap(
				descCreate,CREATEDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_UEXTRUSIONS1),
				GetString(IDS_RB_CREATE_DIALOG),
				0);

			pmapTypeIn = CreateCPParamMap(
				descTypeIn,TYPEINDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_C_EXTRUSION2),
				GetString(IDS_RB_KEYBOARDENTRY),
				APPENDROLL_CLOSED);			
		}

		pmapParam = CreateCPParamMap(
			descParam,PARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_C_EXTRUSION3),
			GetString(IDS_AP_PARAMETERS),
			0);
	}

	this->ip = ip;

	if(pmapTypeIn) {
		// A callback for the type in.
		pmapTypeIn->SetUserDlgProc(new CExtTypeInDlgProc(this));
	}	
	if(pmapParam) {
		// A callback for the type in.
		pmapParam->SetUserDlgProc(new CExtWidthDlgProc(this));
	}
}
예제 #5
0
파일: scuba.cpp 프로젝트: artemeliy/inf4715
void ScubaObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
	{
	SimpleObject::BeginEditParams(ip,flags,prev);

	if (pmapCreate && pmapParam) {
		
		// Left over from last Scuba ceated
		pmapCreate->SetParamBlock(this);
		pmapTypeIn->SetParamBlock(this);
		pmapParam->SetParamBlock(pblock);
        ScubaHeightDlgProc* dlg = static_cast<ScubaHeightDlgProc*>(pmapParam->GetUserDlgProc());
        if (dlg != NULL) {
            BOOL rws = dlg->GetRWSState();
            SetUsePhysicalScaleUVs(rws);
        }
	} else {
		
		if (flags&BEGIN_EDIT_CREATE) {
			pmapCreate = CreateCPParamMap(
				descCreate,CREATEDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_UREVS1),
				GetString(IDS_RB_CREATE_DIALOG),
				0);

			pmapTypeIn = CreateCPParamMap(
				descTypeIn,TYPEINDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_SCUBA2),
				GetString(IDS_RB_KEYBOARDENTRY),
				APPENDROLL_CLOSED);			
			}

		pmapParam = CreateCPParamMap(
			descParam,PARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_SCUBA3),
			GetString(IDS_AP_PARAMETERS),
			0);
		}


	this->ip = ip;

	if(pmapTypeIn) {
		pmapTypeIn->SetUserDlgProc(new ScubaTypeInDlgProc(this));
		}
	if(pmapParam) {
		pmapParam->SetUserDlgProc(new ScubaHeightDlgProc(this));
		}
	}
예제 #6
0
파일: prism.cpp 프로젝트: artemeliy/inf4715
void PrismObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
	{
	SimpleObject::BeginEditParams(ip,flags,prev);
	this->ip = ip;

	if (pmapCreate && pmapParam) {
		
		// Left over from last Prism ceated
		pmapCreate->SetParamBlock(this);
		pmapTypeIn->SetParamBlock(this);
		pmapParam->SetParamBlock(pblock);
	} else {
		
		// Gotta make a new one.
		if (flags&BEGIN_EDIT_CREATE) {
			pmapCreate = CreateCPParamMap(
				descCreate,CREATEDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_PRISM1),
				GetString(IDS_RB_CREATE_DIALOG),
				0);

			pmapTypeIn = CreateCPParamMap(
				descTypeIn,TYPEINDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_PRISM2),
				GetString(IDS_RB_KEYBOARDENTRY),
				APPENDROLL_CLOSED);			
			}

		pmapParam = CreateCPParamMap(
			descParam,PARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_PRISM3),
			GetString(IDS_AP_PARAMETERS),
			0);
		}

	if(pmapTypeIn) {
		// A callback for the type in.
		pmapTypeIn->SetUserDlgProc(new PrismTypeInDlgProc(this));
		}	
	if(pmapParam) {
		pmapParam->SetUserDlgProc(new PrismSideDlgProc(this));
		}
	}
예제 #7
0
void RectangleObject::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev)
	{
	SimpleSpline::BeginEditParams(ip,flags,prev);
	this->ip = ip;

	if (pmapCreate && pmapParam) {
		
		// Left over from last shape ceated
		pmapCreate->SetParamBlock(this);
		pmapTypeIn->SetParamBlock(this);
		pmapParam->SetParamBlock(pblock);
	} else {
		
		// Gotta make a new one.
		if (flags&BEGIN_EDIT_CREATE) {
			pmapCreate = CreateCPParamMap(
				descCreate,CREATEDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_RECTANGLEPARAM1),
				GetString(IDS_TH_CREATION_METHOD),
				0);

			pmapTypeIn = CreateCPParamMap(
				descTypeIn,TYPEINDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_RECTANGLEPARAM3),
				GetString(IDS_TH_KEYBOARD_ENTRY),
				APPENDROLL_CLOSED);
			}

		pmapParam = CreateCPParamMap(
			descParam,PARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_RECTANGLEPARAM2),
			GetString(IDS_TH_PARAMETERS),
			0);
		}

	if(pmapTypeIn) {
		// A callback for the type in.
		pmapTypeIn->SetUserDlgProc(new RectangleTypeInDlgProc(this));
		}
	}
예제 #8
0
파일: surfwrap.cpp 프로젝트: 2asoft/xray
void SWrapObject::BeginEditParams(
		IObjParam *ip,ULONG flags,Animatable *prev)
	{
	this->ip = ip;
	if (flags&BEGIN_EDIT_CREATE) {
		creating = TRUE;
	} else { creating = FALSE; }

	if (pmapParam) {		
		// Left over
		pmapParam->SetParamBlock(pblock);
	} else {		
		hSot = ip->AddRollupPage( 
			hInstance, 
			MAKEINTRESOURCE(IDD_SW_DESC),
			DefaultSOTProc,
			GetString(IDS_AP_TOP), 
			(LPARAM)ip,APPENDROLL_CLOSED);

		// Gotta make a new one.
		pmapParam = CreateCPParamMap(
			descParam,PARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_AP_SURFWRAP),
			GetString(IDS_AP_PARAMETERS),
			0);
		}
		if (pmapParam)
			pmapParam->SetUserDlgProc(new SWrapObjectDlgProc(this));
	}
예제 #9
0
파일: pbomb.cpp 프로젝트: DimondTheCat/xray
void PBombObject::BeginEditParams(
		IObjParam *ip,ULONG flags,Animatable *prev)
	{
	SimpleWSMObject::BeginEditParams(ip,flags,prev);
	this->ip = ip;

	if (pmapParam) {		
		// Left over
		pmapParam->SetParamBlock(pblock);
	} else {		
		hSot = ip->AddRollupPage( 
			hInstance, 
			MAKEINTRESOURCE(IDD_SW_DESC_BOTH),
			DefaultSOTProc,
			GetString(IDS_RB_TOP), 
			(LPARAM)ip,APPENDROLL_CLOSED);

		// Gotta make a new one.
		pmapParam = CreateCPParamMap(
			descParamBomb,BOMBPARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_SW_PARTICLEBOMB),
			GetString(IDS_RB_PARAMETERS),
			0);
		}
		if (pmapParam) pmapParam->SetUserDlgProc(new PBombDlgProc(this));
	}
예제 #10
0
파일: sinwave.cpp 프로젝트: 2asoft/xray
void WaveObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
	{
	SimpleWSMObject::BeginEditParams(ip,flags,prev);
	this->ip = ip;

	if (pmapParam) {
		
		// Left over from last SinWave ceated
		pmapParam->SetParamBlock(pblock);
	} else {
		hSot = ip->AddRollupPage( 
				hInstance, 
				MAKEINTRESOURCE(IDD_SINWAVE_SOT),
				DefaultSOTProc,
				GetString(IDS_RB_SOT), 
				(LPARAM)ip,APPENDROLL_CLOSED);

		// Gotta make a new one.
		pmapParam = CreateCPParamMap(
			descParamObj,OBJPARAMDESC_LENGH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(DialogID()),
			GetString(IDS_RB_PARAMETERS),
			0);		
		}
	}
예제 #11
0
void TriPatchObject::EndEditParams( IObjParam *ip, ULONG flags, Animatable *next )
{
	editOb = NULL;
	this->ip = NULL;

	if (flags & END_EDIT_REMOVEUI ) {
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
	}
	else
	{
		pmapTypeIn->SetUserDlgProc(nullptr);
		pmapTypeIn->SetParamBlock(nullptr);
		pmapParam->SetParamBlock(nullptr);
	}

	// Save these values in class variables so the next object created will inherit them.
	pblock->GetValue(PB_TEXTURE,ip->GetTime(),dlgTexture,FOREVER);	
}
예제 #12
0
void TriPatchObject::BeginEditParams( IObjParam *ip, ULONG flags, Animatable *prev )
	{
	editOb = this;
	this->ip = ip;
	
	if (pmapTypeIn && pmapParam) {
		
		// Left over from last shape ceated
		pmapTypeIn->SetParamBlock(this);
		pmapParam->SetParamBlock(pblock);
	} else {
		
		// Gotta make a new one.
		if (flags&BEGIN_EDIT_CREATE) {
			pmapTypeIn = CreateCPParamMap(
				descTypeIn,TYPEINDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_TRIPATCHPARAM2),
				GetString(IDS_TH_KEYBOARD_ENTRY),
				APPENDROLL_CLOSED);
			}

		pmapParam = CreateCPParamMap(
			descParam,PARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_TRIPATCHPARAM),
			GetString(IDS_TH_PARAMETERS),
			0);
		}

	if(pmapTypeIn) {
		// A callback for the type in.
		pmapTypeIn->SetUserDlgProc(new TriPatchTypeInDlgProc(this));
		}
	}
예제 #13
0
void DonutObject::EndEditParams( IObjParam *ip,ULONG flags,Animatable *next )
{
	SimpleSpline::EndEditParams(ip,flags,next);
	this->ip = NULL;

	if (flags & END_EDIT_REMOVEUI ) {
		if (pmapCreate) DestroyCPParamMap(pmapCreate);
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
		pmapCreate = NULL;
	}
	else
	{
		pmapTypeIn->SetUserDlgProc(nullptr);
		pmapCreate->SetParamBlock(nullptr);
		pmapTypeIn->SetParamBlock(nullptr);
		pmapParam->SetParamBlock(nullptr);
	}

	// Save these values in class variables so the next object created will inherit them.
}
예제 #14
0
void PinObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
{
	SimpleWSMObject::BeginEditParams(ip,flags,prev);
	this->ip = ip;
	if (pmapParam)
	{	// Left over
		pmapParam->SetParamBlock(pblock);
	}
	else
	{	hSot = ip->AddRollupPage(hInstance,MAKEINTRESOURCE(IDD_SW_DESC_DYNONLY),DefaultSOTProc,GetString(IDS_AP_TOP),(LPARAM)ip,APPENDROLL_CLOSED);
		// Gotta make a new one.
		pmapParam = CreateCPParamMap(descParamPin,PINPARAMDESC_LENGTH,pblock,ip,hInstance,MAKEINTRESOURCE(IDD_SW_DYNPIN),GetString(IDS_AP_PARAMETERS),0);
	}
}
예제 #15
0
void PinObject::EndEditParams(IObjParam *ip,ULONG flags,Animatable *next)
{
	SimpleWSMObject::EndEditParams(ip,flags,next);
	this->ip = NULL;
	if (flags & END_EDIT_REMOVEUI )
	{	
		DestroyCPParamMap(pmapParam);
		ip->DeleteRollupPage(hSot);
		pmapParam = NULL;
	}
	else
	{
		pmapParam->SetParamBlock(nullptr);
	}
}
예제 #16
0
// This method is called by the system when the user needs 
// to edit the objects parameters in the command panel.  
void ChBoxObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
{
	// We subclass off SimpleObject so we must call its
	// BeginEditParams() method first.
	SimpleObject::BeginEditParams(ip,flags,prev);
	// Save the interface pointer.

	if (pmapCreate && pmapParam) {

		// Left over from last box ceated
		pmapCreate->SetParamBlock(this);
		pmapTypeIn->SetParamBlock(this);
		pmapParam->SetParamBlock(pblock);
		ChBoxParamDlgProc* dlg = static_cast<ChBoxParamDlgProc*>(pmapParam->GetUserDlgProc());
		if (dlg != NULL) {
			BOOL rws = dlg->GetRWSState();
			SetUsePhysicalScaleUVs(rws);
		}
	} else {

		// Gotta make a new one.
		if (flags&BEGIN_EDIT_CREATE) {
			// Here we create each new rollup page in the command panel
			// using our descriptors.
			pmapCreate = CreateCPParamMap(
				descCreate,CREATEDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_CHAMFERCUBE1),
				GetString(IDS_RB_CREATE_DIALOG),
				0);

			pmapTypeIn = CreateCPParamMap(
				descTypeIn,TYPEINDESC_LENGTH,
				this,
				ip,
				hInstance,
				MAKEINTRESOURCE(IDD_CHAMFERCUBE2),
				GetString(IDS_RB_KEYBOARDENTRY),
				APPENDROLL_CLOSED);
		}

		pmapParam = CreateCPParamMap(
			descParam,PARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_CHAMFERCUBE3),
			GetString(IDS_AP_PARAMETERS),
			0);
	}

	this->ip = ip;

	if(pmapTypeIn) {
		// A callback for the type in.
		// This handles processing the Create button in the 
		// Keyboard Entry rollup page.
		pmapTypeIn->SetUserDlgProc(new ChBoxTypeInDlgProc(this));
	}
	if (pmapParam != NULL) {
		pmapParam->SetUserDlgProc(new ChBoxParamDlgProc(this));
	}
}