Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / vcl / builderfactory.hxx
blobfbb53cc5f89f94737760fc16a2bae1a79a23da2c
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/.
8 */
10 #ifndef INCLUDED_VCL_BUILDER_FACTORY_HXX
11 #define INCLUDED_VCL_BUILDER_FACTORY_HXX
13 #include <vcl/vclptr.hxx>
14 #include <vcl/builder.hxx>
16 #define VCL_BUILDER_DECL_FACTORY(typeName) \
17 extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL \
18 make##typeName(VclPtr<vcl::Window> &rRet, VclPtr<vcl::Window> &pParent, VclBuilder::stringmap &rMap)
20 #define VCL_BUILDER_FACTORY(typeName) \
21 VCL_BUILDER_DECL_FACTORY(typeName) \
22 { \
23 (void)rMap; \
24 rRet = VclPtr<typeName>::Create(pParent); \
27 #define VCL_BUILDER_FACTORY_ARGS(typeName,arg1) \
28 VCL_BUILDER_DECL_FACTORY(typeName) \
29 { \
30 (void)rMap; \
31 rRet = VclPtr<typeName>::Create(pParent,arg1); \
34 #define VCL_BUILDER_FACTORY_CONSTRUCTOR(typeName,arg2) \
35 VCL_BUILDER_DECL_FACTORY(typeName) \
36 { \
37 OUString sBorder = VclBuilder::extractCustomProperty(rMap); \
38 WinBits wb = arg2; \
39 if (!sBorder.isEmpty()) \
40 wb |= WB_BORDER; \
41 rRet = VclPtr<typeName>::Create(pParent,wb); \
44 #endif
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */