tvnode.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: tvnode.h
00004 
00005     DESCRIPTION: Track View Node Class
00006 
00007     CREATED BY: Rolf Berteig
00008 
00009     HISTORY: 11-14-96
00010 
00011  *> Copyright (c) 1996, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 
00015 #pragma once
00016 #include "maxheap.h"
00017 #include "ref.h"
00018 // forward declarations
00019 class Control;
00020 
00021 #define TVNODE_CLASS_ID Class_ID(0x8d73b8aa, 0x90f2ee71)
00022 
00023 // Default position for appending
00024 #define TVNODE_APPEND -1
00025 
00026 
00027 // TrackViewNodes can contain one or more sub nodes or controllers.
00028 // Sub-nodes and controllers are identified by a unique ID in the
00029 // form of a Class_ID variable. This does not necessarily have to
00030 // be the class ID of an existing plug-in, however plug-ins may
00031 // wish to use thier class ID for any items they add to be sure they
00032 // are unique.
00033 //
00034 // The Interface class provides access to the root track view node.
00035 // From this node, new nodes can be added. There are two defined
00036 // sub nodes:
00037 
00038 #define GLOBAL_VAR_TVNODE_CLASS_ID          Class_ID(0xb27e9f2a, 0x73fad370)
00039 #define VIDEO_POST_TVNODE_CLASS_ID          Class_ID(0x482b8d30, 0xb72c8511)
00040 #define TRACK_SELECTION_SET_MGR_CLASS_ID    Class_ID(0x77a71ca2, 0x670c632d)
00041 #define TRACK_SELECTION_SET_CLASS_ID        Class_ID(0x6eb33def, 0x20344f6a)
00042 
00043 // These can be retreived by calling GetNode() on the track view root
00044 // node and passing in one of the above IDs.
00045 
00046 
00047 // These can be registered with a TVNode to intercept reference notifications
00060 class TVNodeNotify: public MaxHeapOperators {
00061     public:
00086         virtual RefResult NotifyRefChanged(
00087             Interval changeInt, RefTargetHandle hTarget, 
00088             PartID& partID,  RefMessage message)=0;
00089     };
00090  
00114 class ITrackViewNode : public ReferenceTarget {
00115     public:
00132         virtual void AddNode(ITrackViewNode *node, MCHAR *name, Class_ID cid, int pos=TVNODE_APPEND)=0;
00149         virtual void AddController(Control* c, MCHAR* name, Class_ID cid, int pos=TVNODE_APPEND)=0;
00157         virtual int FindItem(Class_ID cid)=0;
00168         virtual void RemoveItem(int i)=0;
00179         virtual void RemoveItem(Class_ID cid)=0;
00185         virtual Control *GetController(int i)=0;
00191         virtual Control *GetController(Class_ID cid)=0;
00196         virtual ITrackViewNode *GetNode(int i)=0;
00202         virtual ITrackViewNode *GetNode(Class_ID cid)=0;
00205         virtual int NumItems()=0;
00218         virtual void SwapPositions(int i1, int i2)=0;
00225         virtual MCHAR *GetName(int i)=0;
00233         virtual void SetName(int i,MCHAR *name)=0;
00239         virtual void RegisterTVNodeNotify(TVNodeNotify *notify)=0;
00244         virtual void UnRegisterTVNodeNotify(TVNodeNotify *notify)=0;
00245 //watje this will prevent children from showing up in the TV
00253         virtual void HideChildren(BOOL chide)=0;
00254     };
00255 
00260 CoreExport ITrackViewNode *CreateITrackViewNode(BOOL hidden=FALSE);
00261