Update ooo320-m1
[ooovba.git] / svx / source / cui / cuicharmap.hxx
blob7ab3974fb1cd7e46c238a1abfc3b8925bf83847f
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: cuicharmap.hxx,v $
10 * $Revision: 1.8 $
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>
43 class SubsetMap;
44 class SvxCharMapData;
46 // define ----------------------------------------------------------------
48 #define CHARMAP_MAXLEN 32
50 namespace svx
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
63 public:
64 SvxShowText( Window* pParent,
65 const ResId& rResId,
66 BOOL bCenter = FALSE );
67 ~SvxShowText();
69 void SetFont( const Font& rFont );
70 void SetText( const String& rText );
72 protected:
73 virtual void Paint( const Rectangle& );
75 private:
76 long mnY;
77 BOOL mbCenter;
81 class SvxCharMapData
83 public:
84 SvxCharMapData( class SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pResContext );
86 void SetCharFont( const Font& rFont );
88 private:
89 friend class SvxCharacterMap;
90 SfxModalDialog* mpDialog;
92 SvxShowCharSet aShowSet;
93 SvxShowText aShowText;
94 // SvxShowText aShowShortcut;
95 OKButton aOKBtn;
96 CancelButton aCancelBtn;
97 HelpButton aHelpBtn;
98 PushButton aDeleteBtn;
99 // PushButton aAssignBtn;
100 FixedText aFontText;
101 ListBox aFontLB;
102 FixedText aSubsetText;
103 ListBox aSubsetLB;
104 FixedText aSymbolText;
105 SvxShowText aShowChar;
106 FixedText aCharCodeText;
107 // FixedText aAssignText;
108 Font aFont;
109 BOOL bOne;
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
125 private:
126 SvxCharMapData* mpCharMapData;
128 public:
129 SvxCharacterMap( Window* pParent, BOOL bOne=TRUE, const SfxItemSet* pSet=0 );
130 ~SvxCharacterMap();
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();
145 #endif