xref: /aoo41x/main/cui/source/inc/cuicharmap.hxx (revision 9b8096d0)
1c4eee24dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3c4eee24dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4c4eee24dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5c4eee24dSAndrew Rist  * distributed with this work for additional information
6c4eee24dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7c4eee24dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8c4eee24dSAndrew Rist  * "License"); you may not use this file except in compliance
9c4eee24dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10c4eee24dSAndrew Rist  *
11c4eee24dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12c4eee24dSAndrew Rist  *
13c4eee24dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14c4eee24dSAndrew Rist  * software distributed under the License is distributed on an
15c4eee24dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16c4eee24dSAndrew Rist  * KIND, either express or implied.  See the License for the
17c4eee24dSAndrew Rist  * specific language governing permissions and limitations
18c4eee24dSAndrew Rist  * under the License.
19c4eee24dSAndrew Rist  *
20c4eee24dSAndrew Rist  *************************************************************/
21c4eee24dSAndrew Rist 
22c4eee24dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _CUI_CHARMAP_HXX
24cdf0e10cSrcweir #define _CUI_CHARMAP_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // include ---------------------------------------------------------------
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <vcl/ctrl.hxx>
29cdf0e10cSrcweir #include <vcl/metric.hxx>
30cdf0e10cSrcweir #include <vcl/button.hxx>
31cdf0e10cSrcweir #include <vcl/fixed.hxx>
32cdf0e10cSrcweir #include <vcl/lstbox.hxx>
33cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
34cdf0e10cSrcweir #include <svx/charmap.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class SubsetMap;
37cdf0e10cSrcweir class SvxCharMapData;
38cdf0e10cSrcweir 
39cdf0e10cSrcweir // define ----------------------------------------------------------------
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #define CHARMAP_MAXLEN  32
42cdf0e10cSrcweir 
43cdf0e10cSrcweir namespace svx
44cdf0e10cSrcweir {
45cdf0e10cSrcweir 	struct SvxShowCharSetItem;
46cdf0e10cSrcweir 	class SvxShowCharSetVirtualAcc;
47cdf0e10cSrcweir }
48cdf0e10cSrcweir // class SvxCharacterMap -------------------------------------------------
49cdf0e10cSrcweir // the main purpose of this dialog is to enable the use of characters
50cdf0e10cSrcweir // that are not easily accesible from the keyboard
51cdf0e10cSrcweir 
52cdf0e10cSrcweir // class SvxShowText =====================================================
53cdf0e10cSrcweir 
54cdf0e10cSrcweir class SvxShowText : public Control
55cdf0e10cSrcweir {
56cdf0e10cSrcweir public:
57cdf0e10cSrcweir                     SvxShowText( Window* pParent,
58cdf0e10cSrcweir                                  const ResId& rResId,
59cdf0e10cSrcweir                                  sal_Bool bCenter = sal_False );
60cdf0e10cSrcweir                     ~SvxShowText();
61cdf0e10cSrcweir 
62cdf0e10cSrcweir     void            SetFont( const Font& rFont );
63cdf0e10cSrcweir     void            SetText( const String& rText );
64cdf0e10cSrcweir 
65cdf0e10cSrcweir protected:
66cdf0e10cSrcweir     virtual void    Paint( const Rectangle& );
67cdf0e10cSrcweir 
68cdf0e10cSrcweir private:
69cdf0e10cSrcweir     long            mnY;
70cdf0e10cSrcweir     sal_Bool            mbCenter;
71cdf0e10cSrcweir 
72cdf0e10cSrcweir };
73cdf0e10cSrcweir 
74cdf0e10cSrcweir class SvxCharMapData
75cdf0e10cSrcweir {
76cdf0e10cSrcweir public:
77cdf0e10cSrcweir                     SvxCharMapData( class SfxModalDialog* pDialog, sal_Bool bOne_, ResMgr* pResContext );
78cdf0e10cSrcweir 
79cdf0e10cSrcweir     void            SetCharFont( const Font& rFont );
80cdf0e10cSrcweir 
81cdf0e10cSrcweir private:
82cdf0e10cSrcweir friend class SvxCharacterMap;
83cdf0e10cSrcweir     SfxModalDialog* mpDialog;
84cdf0e10cSrcweir 
85*9b8096d0SSteve Yin     FixedText       aFontText;
86*9b8096d0SSteve Yin     ListBox         aFontLB;
87*9b8096d0SSteve Yin     FixedText       aSubsetText;
88*9b8096d0SSteve Yin     ListBox         aSubsetLB;
89cdf0e10cSrcweir     SvxShowCharSet  aShowSet;
90*9b8096d0SSteve Yin     FixedText       aSymbolText;
91cdf0e10cSrcweir     SvxShowText     aShowText;
92cdf0e10cSrcweir //    SvxShowText     aShowShortcut;
93cdf0e10cSrcweir     OKButton        aOKBtn;
94cdf0e10cSrcweir     CancelButton    aCancelBtn;
95cdf0e10cSrcweir     HelpButton      aHelpBtn;
96cdf0e10cSrcweir     PushButton      aDeleteBtn;
97cdf0e10cSrcweir //    PushButton		aAssignBtn;
98cdf0e10cSrcweir     SvxShowText     aShowChar;
99cdf0e10cSrcweir     FixedText       aCharCodeText;
100cdf0e10cSrcweir //	FixedText		aAssignText;
101cdf0e10cSrcweir     Font            aFont;
102cdf0e10cSrcweir     sal_Bool            bOne;
103cdf0e10cSrcweir     const SubsetMap* pSubsetMap;
104cdf0e10cSrcweir 
105cdf0e10cSrcweir     DECL_LINK( OKHdl, OKButton* );
106cdf0e10cSrcweir     DECL_LINK( FontSelectHdl, ListBox* );
107cdf0e10cSrcweir     DECL_LINK( SubsetSelectHdl, ListBox* );
108cdf0e10cSrcweir     DECL_LINK( CharDoubleClickHdl, Control* pControl );
109cdf0e10cSrcweir     DECL_LINK( CharSelectHdl, Control* pControl );
110cdf0e10cSrcweir     DECL_LINK( CharHighlightHdl, Control* pControl );
111cdf0e10cSrcweir     DECL_LINK( CharPreSelectHdl, Control* pControl );
112cdf0e10cSrcweir     DECL_LINK( DeleteHdl, PushButton* pBtn );
113cdf0e10cSrcweir     DECL_LINK( AssignHdl, PushButton* pBtn );
114cdf0e10cSrcweir };
115cdf0e10cSrcweir 
116cdf0e10cSrcweir class SvxCharacterMap : public SfxModalDialog
117cdf0e10cSrcweir {
118cdf0e10cSrcweir private:
119cdf0e10cSrcweir     SvxCharMapData* mpCharMapData;
120cdf0e10cSrcweir 
121cdf0e10cSrcweir public:
122cdf0e10cSrcweir                     SvxCharacterMap( Window* pParent, sal_Bool bOne=sal_True, const SfxItemSet* pSet=0 );
123cdf0e10cSrcweir                     ~SvxCharacterMap();
124cdf0e10cSrcweir 
125cdf0e10cSrcweir     void            DisableFontSelection();
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     const Font&     GetCharFont() const;
128cdf0e10cSrcweir     void            SetCharFont( const Font& rFont );
129cdf0e10cSrcweir 
130cdf0e10cSrcweir     void            SetChar( sal_UCS4 );
131cdf0e10cSrcweir     sal_UCS4        GetChar() const;
132cdf0e10cSrcweir 
133cdf0e10cSrcweir     String          GetCharacters() const;
134cdf0e10cSrcweir 
135cdf0e10cSrcweir 	virtual short	Execute();
136cdf0e10cSrcweir };
137cdf0e10cSrcweir 
138cdf0e10cSrcweir #endif
139cdf0e10cSrcweir 
140