Laxkit
0.0.7.1
|
Class to make searching for objects convenient and expandable in a ViewportWindow. More...
Public Member Functions | |
ObjectContext (int ii, SomeData *o) | |
Set i=ii and obj=o. If o==NULL, then i is set to -1, and ii is ignored. | |
virtual | ~ObjectContext () |
Empty virtual placeholder. obj is not deleted. | |
virtual int | isequal (const ObjectContext *oc) |
Return (oc && (i==oc->i)). | |
virtual void | SetObject (SomeData *o) |
virtual void | set (int ii, SomeData *o) |
virtual void | clear () |
virtual ObjectContext * | duplicate () |
Return a duplicate of the context. |
Public Attributes | |
int | i |
Equals -1 for NULL obj. | |
SomeData * | obj |
Class to make searching for objects convenient and expandable in a ViewportWindow.
Interfaces should consider any ObjectContext it receives from a ViewportWindow to be opaque, because there is no requirement that subclassing ObjectContext preserves the meaning of anything other than ObjectContext::obj.
Decs count of old obj, incs count of o, if any.
If !o, then i gets set to -1.
Referenced by LaxInterfaces::ViewportWithStack::ChangeObject(), and LaxInterfaces::ViewportWithStack::FindObject().
|
virtual |
Decs count of old obj, incs count of o, if any. Does not change anything but obj.
References Laxkit::anObject::inc_count().
Referenced by LaxInterfaces::ViewportWithStack::DropObject(), LaxInterfaces::ViewportWithStack::NewData(), and LaxInterfaces::ViewportWithStack::SelectObject().
int LaxInterfaces::ObjectContext::i |
Equals -1 for NULL obj.
In ViewportWithStack, i is the index in the stack of the object.
Referenced by LaxInterfaces::ViewportWithStack::ChangeObject(), LaxInterfaces::ViewportWithStack::DropObject(), LaxInterfaces::ViewportWithStack::FindObject(), isequal(), LaxInterfaces::ViewportWithStack::NewData(), and LaxInterfaces::ViewportWithStack::SelectObject().