1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SV_COLRDLG_HXX 25 #define _SV_COLRDLG_HXX 26 27 #include "svtools/svtdllapi.h" 28 #include <vcl/dialog.hxx> 29 #ifndef _SV_BUTTON_HXX //autogen 30 #include <vcl/button.hxx> 31 #endif 32 #include <vcl/fixed.hxx> 33 #include <vcl/field.hxx> 34 #include <svtools/colctrl.hxx> 35 36 // --------------- 37 // - ColorDialog - 38 // --------------- 39 40 class SVT_DLLPUBLIC SvColorDialog : public ModalDialog 41 { 42 private: 43 ColorMixingControl maColMixCtrl; 44 PushButton maBtn1; 45 PushButton maBtn2; 46 //PushButton maBtn3; 47 //PushButton maBtn4; 48 //FixedText maFtRGB; 49 SvColorControl maCtlColor; 50 51 // CMYK controls. 52 FixedText maFtCyan; 53 MetricField maNumCyan; 54 FixedText maFtMagenta; 55 MetricField maNumMagenta; 56 FixedText maFtYellow; 57 MetricField maNumYellow; 58 FixedText maFtKey; 59 MetricField maNumKey; 60 61 // RGB controls. 62 FixedText maFtRed; 63 NumericField maNumRed; 64 FixedText maFtGreen; 65 NumericField maNumGreen; 66 FixedText maFtBlue; 67 NumericField maNumBlue; 68 69 // HSL controls. 70 FixedText maFtHue; 71 NumericField maNumHue; 72 FixedText maFtSaturation; 73 NumericField maNumSaturation; 74 FixedText maFtLuminance; 75 NumericField maNumLuminance; 76 77 ColorPreviewControl maCtlPreview; 78 ColorPreviewControl maCtlPreviewOld; 79 80 OKButton maBtnOK; 81 CancelButton maBtnCancel; 82 HelpButton maBtnHelp; 83 84 Color maColor; 85 86 SVT_DLLPRIVATE void Initialize(); 87 88 DECL_DLLPRIVATE_LINK( ColorModifyHdl, void * ); 89 DECL_DLLPRIVATE_LINK( ClickBtnHdl, void * ); 90 DECL_DLLPRIVATE_LINK( ClickMixCtrlHdl, void * ); 91 DECL_DLLPRIVATE_LINK( SelectMixCtrlHdl, void * ); 92 93 public: 94 SvColorDialog( Window* pParent ); 95 ~SvColorDialog(); 96 97 void SetColor( const Color& rColor ); 98 const Color& GetColor() const; 99 100 virtual short Execute(); 101 }; 102 103 #endif // _SV_COLRDLG_HXX 104