IParamMap2 *plResponderProc::ICreateMap(IParamBlock2 *pb)
{
    ParamBlockDesc2 *pd = pb->GetDesc();

    // Don't show anything if there isn't a UI
    if (pd->Count() < 1)
    {
        pb->ReleaseDesc();
        return nil;
    }

    // Create the rollout
    IParamMap2 *map = CreateCPParamMap2(0,
                                        pb,
                                        GetCOREInterface(),
                                        hInstance,
                                        MAKEINTRESOURCE(pd->dlg_template),
                                        GetString(pd->title),
                                        pd->flags,
                                        pd->dlgProc,
                                        NULL,
                                        ROLLUP_CAT_STANDARD);

    // Save the rollout in the paramblock
    pb->SetMap(map);
    pb->ReleaseDesc();

    return map;
}
Exemplo n.º 2
0
void FaceDataToColorMod::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
{
	mpInterface = ip;
	theDlgProc.SetMod (this);
	mpMap = CreateCPParamMap2 (data_to_color_params, mpParams, ip, hInstance,
		MAKEINTRESOURCE (IDD_DATA_TO_COLOR), GetString (IDS_PARAMS),
		0, &theDlgProc);
}
Exemplo n.º 3
0
IParamMap2 *GetNewPmapC(MonoFlector *stype, Interface *ip,int num,HWND hOldRollup=NULL)
{	IParamMap2 *pmap = NULL;
	switch(num)
	{
		case flectsimplepbd:
			 pmap = CreateCPParamMap2(flectsimplepbd,stype->pbComplex,ip,hInstance,
					MAKEINTRESOURCE(IDD_MF_0201_FLECTCPLXSIMPLE),GetString(compdlgname[flectsimplepbd]),0,NULL,hOldRollup);
			 break;
		case flectcomplexpbd: 
			 pmap = CreateCPParamMap2(flectcomplexpbd, stype->pbComplex,ip,hInstance,
					MAKEINTRESOURCE(IDD_MF_0202_FLECTCPLXCPLX),GetString(compdlgname[flectcomplexpbd]),0,NULL,hOldRollup);
			 break;
		case flectdynamicpbd: 
			 pmap = CreateCPParamMap2(flectdynamicpbd, stype->pbComplex,ip,hInstance,
					MAKEINTRESOURCE(IDD_MF_0202_FLECTCPLXCPLX),GetString(compdlgname[flectdynamicpbd]),0,NULL,hOldRollup);
			 break;
	}
	if (stype->theParam[pbComplex_subani]) 
	{ stype->theParam[pbComplex_subani] = NULL;}
	return pmap;

}
Exemplo n.º 4
0
/*===========================================================================*\
 |	Support the Parammap UI
\*===========================================================================*/
IParamMap2 *GetNewPmap(MonoFlector *stype, Interface *ip,int num,HWND hOldRollup=NULL)
{	IParamMap2 *pmap=NULL;
	switch(num)
	{
		case flectplanepbd:
			 pmap = CreateCPParamMap2(flectplanepbd,stype->pblock2,ip,hInstance,
					MAKEINTRESOURCE(IDD_MF_0101_FLECTTYPEPLANE),GetString(typedlgname[flectplanepbd]),0,NULL,hOldRollup);
			 break;
		case flectspherepbd: 
			 pmap = CreateCPParamMap2(flectspherepbd, stype->pblock2,ip,hInstance,
					MAKEINTRESOURCE(IDD_MF_0102_FLECTTYPESPHERE),GetString(typedlgname[flectspherepbd]),0,NULL,hOldRollup);
			 break;
		case flectmeshpbd: 
			 pmap = CreateCPParamMap2(flectmeshpbd, stype->pblock2,ip,hInstance,
					MAKEINTRESOURCE(IDD_MF_0103_FLECTTYPEMESH),GetString(typedlgname[flectmeshpbd]),0,NULL,hOldRollup);
			 pmap->SetUserDlgProc(new MonoFlectorTypeObjDlgProc(stype,stype->bfobj));
			 break;
	}
	if (stype->theParam[pbType_subani]) 
	{ stype->theParam[pbType_subani]=NULL;}
	return pmap;

}
Exemplo n.º 5
0
void plComponentBase::CreateRollups()
{
    if (!fCompPB)
        return;

    ParamBlockDesc2 *pd = fCompPB->GetDesc();
    plComponentClassDesc *cd = (plComponentClassDesc*)pd->cd;

    // This is a plAutoUIComp, we need to treat it differently
    if (cd->IsAutoUI())
    {
        plAutoUIClassDesc *cd = (plAutoUIClassDesc*)pd->cd;
        cd->CreateAutoRollup(fCompPB);
    }
    // We're using a normal param block with auto UI
    else if (pd->flags & P_AUTO_UI)
    {
        if (pd->flags & P_MULTIMAP)
        {
            int nMaps = pd->map_specs.Count();
            for (int i = 0; i < nMaps; i++)
            {
                ParamBlockDesc2::map_spec spec = pd->map_specs[i];

                // Create the rollout
                IParamMap2 *map = CreateCPParamMap2(spec.map_id,
                                                    fCompPB,
                                                    GetCOREInterface(),
                                                    hInstance,
                                                    MAKEINTRESOURCE(spec.dlg_template),
                                                    GetString(spec.title),
                                                    spec.rollup_flags,
                                                    spec.dlgProc,
                                                    NULL,
                                                    ROLLUP_CAT_STANDARD);

                // Save the rollout in the paramblock
                fCompPB->SetMap(map, spec.map_id);
            }
        }
        else
        {
            // Create the rollout
            IParamMap2 *map = CreateCPParamMap2(0,
                                                fCompPB,
                                                GetCOREInterface(),
                                                hInstance,
                                                MAKEINTRESOURCE(pd->dlg_template),
                                                GetString(pd->title),
                                                pd->flags,
                                                pd->dlgProc,
                                                NULL,
                                                ROLLUP_CAT_STANDARD);

            // Save the rollout in the paramblock
            fCompPB->SetMap(map);
        }
    }

    fCompPB->ReleaseDesc();
}