/* * Copyright (c)1998 by Angry Red Planet. * * This code is distributed under a modified form of the * Artistic License. A copy of this license should have * been included with it; if this wasn't the case, the * entire package can be obtained at * . * * A logical GUI layout engine: the programmer describes * high-level relationships between the different user interface * object through formal container classes, which then take care * of their physical placement. The system is completely * font-sensitive and resizeable. * * ---------------------------------------------------------------------- * * ArpViewWrapper.h * * An ArpLayoutable that can be used to wrap around another * BView, without requiring multiple inheritance or subclassing. * * ---------------------------------------------------------------------- * * Known Bugs * ~~~~~~~~~~ * * * I have been unable to get many of the Be-supplied controls * to respond with meaningful GetPreferredSize() files. This * means they require subclassing to work with the ArpLayoutable * system. See ViewStubs.h for subclasses that have been implemented. * * So far, the views I know that DON'T need subclassing are * BColorControl and BCheckBox. * * ---------------------------------------------------------------------- * * To Do * ~~~~~ * * ---------------------------------------------------------------------- * * History * ~~~~~~~ * * Dec 6, 1998: * First public release. * */ #ifndef ARPLAYOUT_ARPVIEWWRAPPER_H #define ARPLAYOUT_ARPVIEWWRAPPER_H #ifndef ARPLAYOUT_ARPLAYOUTABLE_H #include #endif #ifndef _VIEW_H #include #endif class ArpView; class ArpViewWrapper : public ArpLayoutable { private: typedef ArpLayoutable inherited; public: ArpViewWrapper(BView* wrapview); ArpViewWrapper(BMessage* data, BView* v = NULL); static ArpViewWrapper* Instantiate(BMessage* archive); virtual status_t Archive(BMessage* data, bool deep=TRUE); BView* OwnerView(void); protected: // Call this if the view passed into the contructor is // a part of this object -- i.e., the subclass multiply // inherits from BView and ArpViewWrapper. void OwnView(void); virtual void ComputeDimens(void); private: BView* view; bool own_view; }; #endif