sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / ctrltool.hxx
blob56ff05cb9eb6795ade8f6a190ea3d36328aa912c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ctrltool.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CTRLTOOL_HXX
32 #define _CTRLTOOL_HXX
34 #include <sal/types.h>
35 #include <tools/list.hxx>
36 #include <vcl/metric.hxx>
39 class OutputDevice;
41 namespace binfilter {
43 class ImplFontListNameInfo;
44 #define FONTLIST_FONTINFO_NOTFOUND ((USHORT)0xFFFF)
46 #define FONTLIST_FONTNAMETYPE_PRINTER ((USHORT)0x0001)
47 #define FONTLIST_FONTNAMETYPE_SCREEN ((USHORT)0x0002)
48 #define FONTLIST_FONTNAMETYPE_SCALABLE ((USHORT)0x0004)
50 class FontList : private List
52 private:
53 XubString maMapBoth;
54 XubString maMapPrinterOnly;
55 XubString maMapScreenOnly;
56 XubString maMapSizeNotAvailable;
57 XubString maMapStyleNotAvailable;
58 XubString maMapNotAvailable;
59 XubString maLight;
60 XubString maLightItalic;
61 XubString maNormal;
62 XubString maNormalItalic;
63 XubString maBold;
64 XubString maBoldItalic;
65 XubString maBlack;
66 XubString maBlackItalic;
67 long* mpSizeAry;
68 OutputDevice* mpDev;
69 OutputDevice* mpDev2;
71 #ifdef CTRLTOOL_CXX
72 ImplFontListNameInfo* ImplFind( const XubString& rSearchName, ULONG* pIndex ) const;
73 ImplFontListNameInfo* ImplFindByName( const XubString& rStr ) const;
74 void ImplInsertFonts( OutputDevice* pDev, BOOL bAll,
75 BOOL bInsertData );
76 #endif
78 public:
79 FontList( OutputDevice* pDevice,
80 OutputDevice* pDevice2 = NULL,
81 BOOL bAll = TRUE );
82 ~FontList();
84 OutputDevice* GetDevice() const { return mpDev; }
85 OutputDevice* GetDevice2() const { return mpDev2; }
87 const XubString& GetNormalStr() const { return maNormal; }
88 const XubString& GetItalicStr() const { return maNormalItalic; }
89 const XubString& GetBoldStr() const { return maBold; }
90 const XubString& GetBoldItalicStr() const { return maBoldItalic; }
91 FontInfo Get( const XubString& rName,
92 FontWeight eWeight,
93 FontItalic eItalic ) const;
95 USHORT GetFontNameCount() const
96 { return (USHORT)List::Count(); }
97 private:
98 FontList( const FontList& );
99 FontList& operator =( const FontList& );
104 #endif // _CTRLTOOL_HXX