fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / UnoControls / inc / basecontainercontrol.hxx
blobc09b1b54bc492a6122820d8b0e3d3dbc0d77123b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_UNOCONTROLS_INC_BASECONTAINERCONTROL_HXX
21 #define INCLUDED_UNOCONTROLS_INC_BASECONTAINERCONTROL_HXX
23 #include <com/sun/star/lang/XServiceName.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/container/XContainer.hpp>
26 #include <com/sun/star/container/XIndexContainer.hpp>
27 #include <com/sun/star/container/XNameReplace.hpp>
28 #include <com/sun/star/container/XContainerListener.hpp>
29 #include <com/sun/star/container/XSet.hpp>
30 #include <com/sun/star/container/ContainerEvent.hpp>
31 #include <com/sun/star/container/XIndexReplace.hpp>
32 #include <com/sun/star/container/XNameContainer.hpp>
33 #include <vector>
35 #include "basecontrol.hxx"
37 // "namespaces"
39 namespace unocontrols{
41 // structs, types, forwards
43 struct IMPL_ControlInfo
45 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl;
46 OUString sName;
49 class BaseContainerControl : public ::com::sun::star::awt::XControlModel
50 , public ::com::sun::star::awt::XControlContainer
51 , public BaseControl
54 // public methods
56 public:
58 // construct/destruct
60 /**_______________________________________________________________________________________________________
63 BaseContainerControl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
65 /**_______________________________________________________________________________________________________
68 virtual ~BaseContainerControl();
70 // XInterface
72 /**_______________________________________________________________________________________________________
73 @short give answer, if interface is supported
74 @descr The interfaces are searched by type.
76 @seealso XInterface
78 @param "rType" is the type of searched interface.
80 @return Any information about found interface
82 @onerror A RuntimeException is thrown.
85 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
86 const ::com::sun::star::uno::Type& aType
87 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
89 // XTypeProvider
91 /**_______________________________________________________________________________________________________
92 @short get information about supported interfaces
93 @seealso XTypeProvider
94 @return Sequence of types of all supported interfaces
96 @onerror A RuntimeException is thrown.
99 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
100 throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
102 // XAggregation
104 /**_______________________________________________________________________________________________________
107 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(
108 const ::com::sun::star::uno::Type& aType
109 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
111 // XControl
113 /**_______________________________________________________________________________________________________
116 virtual void SAL_CALL createPeer(
117 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& xToolkit ,
118 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent
119 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
121 /**_______________________________________________________________________________________________________
124 virtual sal_Bool SAL_CALL setModel(
125 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xModel
126 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
128 /**_______________________________________________________________________________________________________
131 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel()
132 throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
134 // XComponent
136 /**_______________________________________________________________________________________________________
139 virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
141 // XEventListener
143 /**_______________________________________________________________________________________________________
146 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
148 // XControlContainer
150 /**_______________________________________________________________________________________________________
153 virtual void SAL_CALL addControl(
154 const OUString& sName ,
155 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& xControl
156 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
158 /**_______________________________________________________________________________________________________
161 virtual void SAL_CALL removeControl(
162 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& xControl
163 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
165 /**_______________________________________________________________________________________________________
168 virtual void SAL_CALL setStatusText(
169 const OUString& sStatusText
170 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
172 /**_______________________________________________________________________________________________________
175 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > SAL_CALL getControl(
176 const OUString& sName
177 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
179 /**_______________________________________________________________________________________________________
182 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > > SAL_CALL getControls()
183 throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
185 // XWindow
187 /**_______________________________________________________________________________________________________
190 virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
192 // protected methods
194 protected:
195 using OComponentHelper::disposing;
196 /**_______________________________________________________________________________________________________
197 @short
198 @descr
200 @seealso
202 @param
204 @return
206 @onerror
209 virtual ::com::sun::star::awt::WindowDescriptor* impl_getWindowDescriptor(
210 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParentPeer
211 ) SAL_OVERRIDE;
213 /**_______________________________________________________________________________________________________
214 @short
215 @descr
217 @seealso
219 @param
221 @return
223 @onerror
226 virtual void impl_paint(
227 sal_Int32 nX ,
228 sal_Int32 nY ,
229 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics
230 ) SAL_OVERRIDE;
232 // private methods
234 private:
236 /**_______________________________________________________________________________________________________
237 @short
238 @descr
240 @seealso
242 @param
244 @return
246 @onerror
249 void impl_activateTabControllers();
251 /**_______________________________________________________________________________________________________
252 @short
253 @descr
255 @seealso
257 @param
259 @return
261 @onerror
264 void impl_cleanMemory();
266 // private variables
268 private:
269 // list of pointer of "struct IMPL_ControlInfo" to hold child-controls
270 ::std::vector< IMPL_ControlInfo* > maControlInfoList;
272 // list of references of XTabController to hold tab-order in this container
273 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > > m_xTabControllerList;
275 ::cppu::OMultiTypeInterfaceContainerHelper m_aListeners;
277 }; // class BaseContainerControl
279 } // namespace unocontrols
281 #endif // INCLUDED_UNOCONTROLS_INC_BASECONTAINERCONTROL_HXX
283 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */