1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef LAYOUT_CORE_BOX_BASE_HXX
33 #define LAYOUT_CORE_BOX_BASE_HXX
35 #include <layout/core/container.hxx>
42 class Box_Base
: public Container
45 // Children properties
48 css::uno::Reference
< css::awt::XLayoutConstrains
> mxChild
;
49 css::uno::Reference
< css::beans::XPropertySet
> mxProps
;
50 css::awt::Size maRequisition
;
51 virtual bool isVisible();
53 ChildData( css::uno::Reference
< css::awt::XLayoutConstrains
> const& xChild
);
54 virtual ~ChildData() { };
57 struct ChildProps
: public PropHelper
59 //ChildProps( ChildProps* );
63 std::list
< ChildData
* > maChildren
;
66 virtual ChildData
*createChild( css::uno::Reference
< css::awt::XLayoutConstrains
> const& xChild
) = 0;
67 virtual ChildProps
*createChildProps( ChildData
* pData
) = 0;
69 ChildData
*removeChildData( std::list
< ChildData
*>, css::uno::Reference
< css::awt::XLayoutConstrains
> const& Child
);
72 void AddChild( const css::uno::Reference
< css::awt::XLayoutConstrains
>& Child
);
74 // css::awt::XLayoutContainer
75 virtual void SAL_CALL
addChild( const css::uno::Reference
< css::awt::XLayoutConstrains
>& Child
)
76 throw (css::uno::RuntimeException
, css::awt::MaxChildrenException
);
77 virtual void SAL_CALL
removeChild( const css::uno::Reference
< css::awt::XLayoutConstrains
>& Child
)
78 throw (css::uno::RuntimeException
);
80 virtual css::uno::Sequence
< css::uno::Reference
81 < css::awt::XLayoutConstrains
> > SAL_CALL
getChildren()
82 throw (css::uno::RuntimeException
);
84 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
getChildProperties(
85 const css::uno::Reference
< css::awt::XLayoutConstrains
>& Child
)
86 throw (css::uno::RuntimeException
);
89 } // namespace layoutimpl
91 #endif /* LAYOUT_CORE_BOX_BASE HXX */