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
9 * $RCSfile: ctrltool.hxx,v $
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 ************************************************************************/
34 #include <sal/types.h>
35 #include <tools/list.hxx>
36 #include <vcl/metric.hxx>
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
54 XubString maMapPrinterOnly
;
55 XubString maMapScreenOnly
;
56 XubString maMapSizeNotAvailable
;
57 XubString maMapStyleNotAvailable
;
58 XubString maMapNotAvailable
;
60 XubString maLightItalic
;
62 XubString maNormalItalic
;
64 XubString maBoldItalic
;
66 XubString maBlackItalic
;
72 ImplFontListNameInfo
* ImplFind( const XubString
& rSearchName
, ULONG
* pIndex
) const;
73 ImplFontListNameInfo
* ImplFindByName( const XubString
& rStr
) const;
74 void ImplInsertFonts( OutputDevice
* pDev
, BOOL bAll
,
79 FontList( OutputDevice
* pDevice
,
80 OutputDevice
* pDevice2
= NULL
,
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
,
93 FontItalic eItalic
) const;
95 USHORT
GetFontNameCount() const
96 { return (USHORT
)List::Count(); }
98 FontList( const FontList
& );
99 FontList
& operator =( const FontList
& );
104 #endif // _CTRLTOOL_HXX