本文整理汇总了C++中IObjParam类的典型用法代码示例。如果您正苦于以下问题:C++ IObjParam类的具体用法?C++ IObjParam怎么用?C++ IObjParam使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IObjParam类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EndEditParams
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);
}
示例2: EndEditParams
void MorphObject::EndEditParams(
IObjParam *ip, ULONG flags,Animatable *next)
{
//ip->DeleteMode(pickMode);
//delete pickMode;
//pickMode = NULL;
ip->ClearPickMode();
editOb = NULL;
creating = FALSE;
addTargMethod = AddTargMethod();
if (flags&END_EDIT_REMOVEUI) {
ip->UnRegisterDlgWnd(hParams1);
ip->DeleteRollupPage(hParams1);
hParams1 = NULL;
ip->UnRegisterDlgWnd(hParams2);
ip->DeleteRollupPage(hParams2);
hParams2 = NULL;
} else {
DLSetWindowLongPtr(hParams1, NULL);
DLSetWindowLongPtr(hParams2, NULL);
}
ip = NULL;
}
示例3: BeginEditParams
void MorphObject::BeginEditParams(
IObjParam *ip, ULONG flags,Animatable *prev)
{
this->ip = ip;
editOb = this;
//pickMode = new PickTargCommandMode(this,ip);
if (flags&BEGIN_EDIT_CREATE) {
creating = TRUE;
} else {
creating = FALSE;
}
if (!hParams1) {
hParams1 = ip->AddRollupPage(
hInstance,
MAKEINTRESOURCE(IDD_MORPHPARAM1),
MorphParamDlgProc1,
GetString(IDS_RB_PICKTARGETS),
(LPARAM)this);
ip->RegisterDlgWnd(hParams1);
hParams2 = ip->AddRollupPage(
hInstance,
MAKEINTRESOURCE(IDD_MORPHPARAM2),
MorphParamDlgProc2,
GetString(IDS_RB_CURRENTTARGETS),
(LPARAM)this);
ip->RegisterDlgWnd(hParams1);
} else {
DLSetWindowLongPtr(hParams1, this);
DLSetWindowLongPtr(hParams2, this);
SetupTargetList();
SetTargMethod(addTargMethod);
}
}
示例4: EndEditParams
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);
}
示例5: EndEditParams
// 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);
}
示例6: EndEditParams
void RendSpline::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next)
{
RendSplineDesc.EndEditParams(ip, this, flags, next);
TimeValue t = ip->GetTime();
paramDlgProc = NULL;
ip->EnableShowEndResult(TRUE);
ClearAFlag(A_MOD_BEING_EDITED);
NotifyDependents(Interval(t,t), PART_ALL, REFMSG_END_EDIT);
NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_OFF);
this->ip = NULL;
}
示例7: BeginEditParams
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);
}
}
示例8: DefaultSOTProc
INT_PTR CALLBACK DefaultSOTProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
{ IObjParam *ip = (IObjParam*)GetWindowLongPtr(hWnd,GWLP_USERDATA);
switch (msg)
{ case WM_INITDIALOG:
SetWindowLongPtr(hWnd,GWLP_USERDATA,lParam);
break;
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
case WM_MOUSEMOVE:
if (ip) ip->RollupMouseMessage(hWnd,msg,wParam,lParam);
return FALSE;
default:
return FALSE;
}
return TRUE;
}
示例9: BeginEditParams
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));
}
示例10: BeginEditParams
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));
}
示例11: BeginEditParams
void FExtrudeMod::BeginEditParams(
IObjParam *ip, ULONG flags,Animatable *prev)
{
this->ip = ip;
editMod = this;
// Add our sub object type
// TSTR type1(GetString(IDS_RB_EXTRUDECENT));
// const TCHAR *ptype[] = {type1};
// This call is obsolete. Please see BaseObject::NumSubObjTypes() and BaseObject::GetSubObjType()
// ip->RegisterSubObjectTypes(ptype, 1);
// Create sub object editing modes.
moveMode = new MoveModBoxCMode(this,ip);
TimeValue t = ip->GetTime();
NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT);
NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
SetAFlag(A_MOD_BEING_EDITED);
pmapParam = CreateCPParamMap(
descParam,PARAMDESC_LENGTH,
pblock,
ip,
hInstance,
MAKEINTRESOURCE(IDD_FACEEXTRUDEPARAM),
GetString(IDS_RB_PARAMETERS),
0);
}
示例12: Display
int FExtrudeMod::Display(
TimeValue t, INode* inode, ViewExp *vpt,
int flagst, ModContext *mc)
{
if ( ! vpt || ! vpt->IsAlive() )
{
// why are we here
DbgAssert(!_T("Invalid viewport!"));
return FALSE;
}
GraphicsWindow *gw = vpt->getGW();
Point3 pt;
Matrix3 tm = CompMatrix(t,inode,mc);
int savedLimits;
gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
gw->setTransform(tm);
// Draw start point
if (ip && ip->GetSubObjectLevel() == 1) {
//gw->setColor(LINE_COLOR, (float)1.0, (float)1.0, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
} else {
//gw->setColor(LINE_COLOR, (float).85, (float).5, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
}
base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
gw->marker(&pt,HOLLOW_BOX_MRKR);
gw->setRndLimits(savedLimits);
return 0;
}
示例13: ChangeBegin
void EditFaceDataMod::ChangeBegin () {
if (selLevel == SEL_OBJECT) return;
if (efdRestore) {
delete efdRestore;
efdRestore = NULL;
}
// Find the modcontext with the selected faces.
// NOTE that as currently written, this modifier won't
// support setting FaceFloats on more than one node at a time.
ModContextList mcList;
INodeTab nodes;
ip->GetModContexts(mcList,nodes);
int numSelected=0, whichFace;
float value;
bool valueDetermined=true;
EditFaceDataModData *relevantMD;
if (selLevel) {
for (int i = 0; i < mcList.Count(); i++) {
EditFaceDataModData *meshData = (EditFaceDataModData*)mcList[i]->localData;
if (!meshData) continue;
meshData->DescribeSelection (numSelected, whichFace, value, valueDetermined);
if (!numSelected) continue;
relevantMD = meshData;
break;
}
}
nodes.DisposeTemporary ();
if (!numSelected) return;
efdRestore = new EditFaceDataRestore (this, relevantMD);
}
示例14: UpdateUI
void EllipseObject::UpdateUI(HWND hwnd)
{
Interval valid;
BOOL build_outine = FALSE;
TimeValue t = ip? ip->GetTime() : 0;
myParamBlock->GetValue(PB_OUTLINE, t, build_outine, valid);
ICustEdit *thickness_edit = GetICustEdit(GetDlgItem(hwnd, IDC_THICKNESSEDIT));
ISpinnerControl *thickness_spin = GetISpinner(GetDlgItem(hwnd, IDC_THICKSPINNER));
if(!thickness_edit || !thickness_spin)
return;
if(build_outine)
{
EnableWindow(GetDlgItem(hwnd,IDC_THICKNESS_TEXT),TRUE);
thickness_edit->Enable();
thickness_spin->Enable();
}
else
{
EnableWindow(GetDlgItem(hwnd,IDC_THICKNESS_TEXT),FALSE);
thickness_edit->Disable();
thickness_spin->Disable();
}
ReleaseICustEdit(thickness_edit);
ReleaseISpinner(thickness_spin);
}
示例15: UpdateUI
void bhkListObject::UpdateUI()
{
if (ip == NULL)
return;
ListParamDlgProc* dlg = static_cast<ListParamDlgProc*>(pmapParam->GetUserDlgProc());
dlg->Update(ip->GetTime());
}