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: cuicharmap.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 ************************************************************************/
30 #ifndef _CUI_CHARMAP_HXX
31 #define _CUI_CHARMAP_HXX
33 // include ---------------------------------------------------------------
35 #include <vcl/ctrl.hxx>
36 #include <vcl/metric.hxx>
37 #include <vcl/button.hxx>
38 #include <vcl/fixed.hxx>
39 #include <vcl/lstbox.hxx>
40 #include <sfx2/basedlgs.hxx>
41 #include <svx/charmap.hxx>
46 // define ----------------------------------------------------------------
48 #define CHARMAP_MAXLEN 32
52 struct SvxShowCharSetItem
;
53 class SvxShowCharSetVirtualAcc
;
55 // class SvxCharacterMap -------------------------------------------------
56 // the main purpose of this dialog is to enable the use of characters
57 // that are not easily accesible from the keyboard
59 // class SvxShowText =====================================================
61 class SvxShowText
: public Control
64 SvxShowText( Window
* pParent
,
66 BOOL bCenter
= FALSE
);
69 void SetFont( const Font
& rFont
);
70 void SetText( const String
& rText
);
73 virtual void Paint( const Rectangle
& );
84 SvxCharMapData( class SfxModalDialog
* pDialog
, BOOL bOne_
, ResMgr
* pResContext
);
86 void SetCharFont( const Font
& rFont
);
89 friend class SvxCharacterMap
;
90 SfxModalDialog
* mpDialog
;
92 SvxShowCharSet aShowSet
;
93 SvxShowText aShowText
;
94 // SvxShowText aShowShortcut;
96 CancelButton aCancelBtn
;
98 PushButton aDeleteBtn
;
99 // PushButton aAssignBtn;
102 FixedText aSubsetText
;
104 FixedText aSymbolText
;
105 SvxShowText aShowChar
;
106 FixedText aCharCodeText
;
107 // FixedText aAssignText;
110 const SubsetMap
* pSubsetMap
;
112 DECL_LINK( OKHdl
, OKButton
* );
113 DECL_LINK( FontSelectHdl
, ListBox
* );
114 DECL_LINK( SubsetSelectHdl
, ListBox
* );
115 DECL_LINK( CharDoubleClickHdl
, Control
* pControl
);
116 DECL_LINK( CharSelectHdl
, Control
* pControl
);
117 DECL_LINK( CharHighlightHdl
, Control
* pControl
);
118 DECL_LINK( CharPreSelectHdl
, Control
* pControl
);
119 DECL_LINK( DeleteHdl
, PushButton
* pBtn
);
120 DECL_LINK( AssignHdl
, PushButton
* pBtn
);
123 class SvxCharacterMap
: public SfxModalDialog
126 SvxCharMapData
* mpCharMapData
;
129 SvxCharacterMap( Window
* pParent
, BOOL bOne
=TRUE
, const SfxItemSet
* pSet
=0 );
132 void DisableFontSelection();
134 const Font
& GetCharFont() const;
135 void SetCharFont( const Font
& rFont
);
137 void SetChar( sal_UCS4
);
138 sal_UCS4
GetChar() const;
140 String
GetCharacters() const;
142 virtual short Execute();