1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SV_COLRDLG_HXX 29 #define _SV_COLRDLG_HXX 30 31 #include "svtools/svtdllapi.h" 32 #include <vcl/dialog.hxx> 33 #ifndef _SV_BUTTON_HXX //autogen 34 #include <vcl/button.hxx> 35 #endif 36 #include <vcl/fixed.hxx> 37 #include <vcl/field.hxx> 38 #include <svtools/colctrl.hxx> 39 40 // --------------- 41 // - ColorDialog - 42 // --------------- 43 44 class SVT_DLLPUBLIC SvColorDialog : public ModalDialog 45 { 46 private: 47 ColorMixingControl maColMixCtrl; 48 PushButton maBtn1; 49 PushButton maBtn2; 50 //PushButton maBtn3; 51 //PushButton maBtn4; 52 //FixedText maFtRGB; 53 SvColorControl maCtlColor; 54 55 // CMYK controls. 56 FixedText maFtCyan; 57 MetricField maNumCyan; 58 FixedText maFtMagenta; 59 MetricField maNumMagenta; 60 FixedText maFtYellow; 61 MetricField maNumYellow; 62 FixedText maFtKey; 63 MetricField maNumKey; 64 65 // RGB controls. 66 FixedText maFtRed; 67 NumericField maNumRed; 68 FixedText maFtGreen; 69 NumericField maNumGreen; 70 FixedText maFtBlue; 71 NumericField maNumBlue; 72 73 // HSL controls. 74 FixedText maFtHue; 75 NumericField maNumHue; 76 FixedText maFtSaturation; 77 NumericField maNumSaturation; 78 FixedText maFtLuminance; 79 NumericField maNumLuminance; 80 81 ColorPreviewControl maCtlPreview; 82 ColorPreviewControl maCtlPreviewOld; 83 84 OKButton maBtnOK; 85 CancelButton maBtnCancel; 86 HelpButton maBtnHelp; 87 88 Color maColor; 89 90 SVT_DLLPRIVATE void Initialize(); 91 92 DECL_DLLPRIVATE_LINK( ColorModifyHdl, void * ); 93 DECL_DLLPRIVATE_LINK( ClickBtnHdl, void * ); 94 DECL_DLLPRIVATE_LINK( ClickMixCtrlHdl, void * ); 95 DECL_DLLPRIVATE_LINK( SelectMixCtrlHdl, void * ); 96 97 public: 98 SvColorDialog( Window* pParent ); 99 ~SvColorDialog(); 100 101 void SetColor( const Color& rColor ); 102 const Color& GetColor() const; 103 104 virtual short Execute(); 105 }; 106 107 #endif // _SV_COLRDLG_HXX 108