Detailed Description
- See also:
- Class IRollupSettings, Class IRollupWindow, Class
IRollupCallback
- Description:
- This class is available in release 4.0 and later only.
This class makes it possible to get and set the category field
(order number) for rollups in the RollupOrder.cfg file. Normally a
developer would use this class in order to store the order of
rollout panels as a result of a custom handled Drag and Drop
operation (see IRollupWindow::HandleRollupCallback() and
IRollupCallback::HandleDrop()).
First it is necessary to loop through all rollup panels and update
the category field in the ICatRegistry
void TaskRollupManager::UpdateCats()
{
for(int i = 0 ; i < GetNumPanels() ; i++) {
IRollupPanel *panel = GetPanel(GetPanelDlg(i));
Class_ID cid;
SClass_ID sid;
if(GetEditObjClassID(sid,cid)) {
MCHAR title[256];
GetWindowText(panel->GetTitleWnd(), title, 255);
GetIRollupSettings()->GetCatReg()->UpdateCat(sid,cid, title, panel->GetCategory());
}
}
}
After that the ICatRegistry has to be saved
with
GetIRollupSettings()->GetCatReg()->Save();
In order to reset the rollup order, one has to call ICatRegistry::DeleteList()
for a given superclassid and classid. The structure of the
RollupOrder.cfg file (and thus CatRegistry) can be seen as
list of items that represent the rollup order for each particular
group. A group is identified by a super classid and a
classid.
In 3ds Max we can have different possibilities to store the order
of rollups. In the Create and Modify Panel we want to store the
order of rollups for the currently edited object, which can be an
object, or a modifier. Thus the classid and superclassid of the
group is the one of the currently edited object. For the Display
panel however, we want the rollups to be the same no matter which
object is currently selected. To do this, we create a dummy classid
which represents the display panel and store the rollup orders
under this dummy classid. This classid is identified by the method
IRollupCallback::GetEditObjClassID().
Note, that no classddesc has to exist for a dummy classid. The
RollupOrder.cfg file will indicate "No ClassName" in case a dummy
class id is used.
#include <irollupsettings.h>
List of all
members.
Constructor & Destructor Documentation
Member Function Documentation
virtual int GetCat |
( |
SClass_ID |
sid, |
|
|
Class_ID |
cid, |
|
|
const MCHAR * |
title, |
|
|
int |
category |
|
) |
|
[pure virtual] |
- Parameters:
- SClass_ID sid
The superclass ID.
Class_ID
cid
The class ID.
MCHAR *title
The rollup title.
int category
`This is used for error checking; it becomes the default value
retured by the function if the call fails. So if you pass -1000 and
get a return value of -1000, that means the entry was not
found.
virtual void UpdateCat |
( |
SClass_ID |
sid, |
|
|
Class_ID |
cid, |
|
|
const MCHAR * |
title, |
|
|
int |
category |
|
) |
|
[pure virtual] |
- Parameters:
- SClass_ID sid
The superclass ID.
Class_ID
cid
The class ID.
MCHAR *title
The rollup title.
int category
The category.
virtual void Save |
( |
|
) |
[pure virtual] |
virtual void Load |
( |
|
) |
[pure virtual] |
virtual void EmptyRegistry |
( |
|
) |
[pure virtual] |
virtual void DeleteList |
( |
SClass_ID |
sid, |
|
|
Class_ID |
cid |
|
) |
|
[pure virtual] |
- Parameters:
- SClass_ID sid
The superclass ID.
Class_ID
cid
The class ID.
ICatRegistry ICatRegistry ICatRegistry
ICatRegistry ICatRegistry ICatRegistry ICatRegistry ICatRegistry
ICatRegistry ICatRegistry
ICatRegistry ICatRegistry ICatRegistry
ICatRegistry ICatRegistry ICatRegistry ICatRegistry ICatRegistry
ICatRegistry ICatRegistry