1/* 2 * Copyright 2013, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Ingo Weinhold <ingo_weinhold@gmx.de> 7 */ 8#ifndef _VIEW_PORT_H 9#define _VIEW_PORT_H 10 11 12#include <View.h> 13 14 15namespace BPrivate { 16 17 18class BViewPort : public BView { 19public: 20 BViewPort(BView* child = NULL); 21 BViewPort(BLayoutItem* child); 22 BViewPort(const char* name, 23 BView* child = NULL); 24 BViewPort(const char* name, 25 BLayoutItem* child); 26 virtual ~BViewPort(); 27 28 BView* ChildView() const; 29 void SetChildView(BView* child); 30 31 BLayoutItem* ChildItem() const; 32 void SetChildItem(BLayoutItem* child); 33 34private: 35 class ViewPortLayout; 36 friend class ViewPortLayout; 37 38private: 39 void _Init(); 40 41private: 42 ViewPortLayout* fLayout; 43 BLayoutItem* fChild; 44}; 45 46 47} // namespace BPrivate 48 49 50using ::BPrivate::BViewPort; 51 52 53#endif // _VIEW_PORT_H 54