1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef _CUI_CHARMAP_HXX 28*cdf0e10cSrcweir #define _CUI_CHARMAP_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir // include --------------------------------------------------------------- 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir #include <vcl/ctrl.hxx> 33*cdf0e10cSrcweir #include <vcl/metric.hxx> 34*cdf0e10cSrcweir #include <vcl/button.hxx> 35*cdf0e10cSrcweir #include <vcl/fixed.hxx> 36*cdf0e10cSrcweir #include <vcl/lstbox.hxx> 37*cdf0e10cSrcweir #include <sfx2/basedlgs.hxx> 38*cdf0e10cSrcweir #include <svx/charmap.hxx> 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir class SubsetMap; 41*cdf0e10cSrcweir class SvxCharMapData; 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir // define ---------------------------------------------------------------- 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir #define CHARMAP_MAXLEN 32 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir namespace svx 48*cdf0e10cSrcweir { 49*cdf0e10cSrcweir struct SvxShowCharSetItem; 50*cdf0e10cSrcweir class SvxShowCharSetVirtualAcc; 51*cdf0e10cSrcweir } 52*cdf0e10cSrcweir // class SvxCharacterMap ------------------------------------------------- 53*cdf0e10cSrcweir // the main purpose of this dialog is to enable the use of characters 54*cdf0e10cSrcweir // that are not easily accesible from the keyboard 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir // class SvxShowText ===================================================== 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir class SvxShowText : public Control 59*cdf0e10cSrcweir { 60*cdf0e10cSrcweir public: 61*cdf0e10cSrcweir SvxShowText( Window* pParent, 62*cdf0e10cSrcweir const ResId& rResId, 63*cdf0e10cSrcweir sal_Bool bCenter = sal_False ); 64*cdf0e10cSrcweir ~SvxShowText(); 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir void SetFont( const Font& rFont ); 67*cdf0e10cSrcweir void SetText( const String& rText ); 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir protected: 70*cdf0e10cSrcweir virtual void Paint( const Rectangle& ); 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir private: 73*cdf0e10cSrcweir long mnY; 74*cdf0e10cSrcweir sal_Bool mbCenter; 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir }; 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir class SvxCharMapData 79*cdf0e10cSrcweir { 80*cdf0e10cSrcweir public: 81*cdf0e10cSrcweir SvxCharMapData( class SfxModalDialog* pDialog, sal_Bool bOne_, ResMgr* pResContext ); 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir void SetCharFont( const Font& rFont ); 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir private: 86*cdf0e10cSrcweir friend class SvxCharacterMap; 87*cdf0e10cSrcweir SfxModalDialog* mpDialog; 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir SvxShowCharSet aShowSet; 90*cdf0e10cSrcweir SvxShowText aShowText; 91*cdf0e10cSrcweir // SvxShowText aShowShortcut; 92*cdf0e10cSrcweir OKButton aOKBtn; 93*cdf0e10cSrcweir CancelButton aCancelBtn; 94*cdf0e10cSrcweir HelpButton aHelpBtn; 95*cdf0e10cSrcweir PushButton aDeleteBtn; 96*cdf0e10cSrcweir // PushButton aAssignBtn; 97*cdf0e10cSrcweir FixedText aFontText; 98*cdf0e10cSrcweir ListBox aFontLB; 99*cdf0e10cSrcweir FixedText aSubsetText; 100*cdf0e10cSrcweir ListBox aSubsetLB; 101*cdf0e10cSrcweir FixedText aSymbolText; 102*cdf0e10cSrcweir SvxShowText aShowChar; 103*cdf0e10cSrcweir FixedText aCharCodeText; 104*cdf0e10cSrcweir // FixedText aAssignText; 105*cdf0e10cSrcweir Font aFont; 106*cdf0e10cSrcweir sal_Bool bOne; 107*cdf0e10cSrcweir const SubsetMap* pSubsetMap; 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir DECL_LINK( OKHdl, OKButton* ); 110*cdf0e10cSrcweir DECL_LINK( FontSelectHdl, ListBox* ); 111*cdf0e10cSrcweir DECL_LINK( SubsetSelectHdl, ListBox* ); 112*cdf0e10cSrcweir DECL_LINK( CharDoubleClickHdl, Control* pControl ); 113*cdf0e10cSrcweir DECL_LINK( CharSelectHdl, Control* pControl ); 114*cdf0e10cSrcweir DECL_LINK( CharHighlightHdl, Control* pControl ); 115*cdf0e10cSrcweir DECL_LINK( CharPreSelectHdl, Control* pControl ); 116*cdf0e10cSrcweir DECL_LINK( DeleteHdl, PushButton* pBtn ); 117*cdf0e10cSrcweir DECL_LINK( AssignHdl, PushButton* pBtn ); 118*cdf0e10cSrcweir }; 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir class SvxCharacterMap : public SfxModalDialog 121*cdf0e10cSrcweir { 122*cdf0e10cSrcweir private: 123*cdf0e10cSrcweir SvxCharMapData* mpCharMapData; 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir public: 126*cdf0e10cSrcweir SvxCharacterMap( Window* pParent, sal_Bool bOne=sal_True, const SfxItemSet* pSet=0 ); 127*cdf0e10cSrcweir ~SvxCharacterMap(); 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir void DisableFontSelection(); 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir const Font& GetCharFont() const; 132*cdf0e10cSrcweir void SetCharFont( const Font& rFont ); 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir void SetChar( sal_UCS4 ); 135*cdf0e10cSrcweir sal_UCS4 GetChar() const; 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir String GetCharacters() const; 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir virtual short Execute(); 140*cdf0e10cSrcweir }; 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir #endif 143*cdf0e10cSrcweir 144