Those exported symboles of properties editors add-ons are recognized and called by BeConstruct:
#pragma export on void InitEditor(entry_ref* ref); // init the add-on. ref point to the add-on file wich may contain resources void FreeEditor(entry_ref* ref); // close the add-on BView* CreateEditor(BArchivable* trytarget); int32 ClassLevel = 3; // BArchivable -> BHandler -> BLooper -> BWindow char EditorName[] = "BWindow editor"; bool GetSubObjects(BArchivable* obj, BList* fill); // must fill BList* fill with all sub-objects of BArchivable* obj bool HasSubObject(BArchivable* parent, BArchivable* child, BArchivable** after); // must return true if *child is a sub-object of *parent // must fill **after with the previous sub-object of *child if any bool DropSubObject(BArchivable* under, BArchivable* obj, BArchivable* before); // an newly created object *obj is dropped to be added to *under before *before. bool RemoveSubObject(BArchivable* under, BArchivable* obj); // the sub-object *obj is to be removed (but not deleted !) #pragma export resetTo make your properties editor you make a subclass of StandardClassPropEditor and at least implement and export the "CreateEditor" function which create and return the editor if the object is a kind of your class.
#ifndef STANDARD_CLASS_PROP_EDITOR_H #define STANDARD_CLASS_PROP_EDITOR_H #include "ImplemMessages.h" class StandardClassPropEditor : public BView { public: StandardClassPropEditor(BRect frame, const char* name, BArchivable *settarget); virtual ~StandardClassPropEditor(); virtual void AttachedToWindow(); virtual void MessageReceived(BMessage *msg); virtual void Draw(BRect updateRect); virtual bool UpdateData(); virtual void SetUpData(BArchivable* changed); virtual void WillRemoveObject(BArchivable* toremove); bool LockMainEditor(); void UnlockMainEditor(); // call this function to update the object after a modification void CommitChange(); // call this function to make BeConstruct select any existing object void SelectObject(BView* v); // call this function to make BeConstruct remove and delete any object void RemoveObject(BArchivable* o); // call this function to make BeConstruct open a properties editor for any object void EditObject(BArchivable* o); protected: BArchivable* target; // contain the target object of the editor float normal_haut; BPictureButton* expandCtnl; }; #endif