xref: /AOO41X/main/svx/source/tbxctrls/colorwindow.hxx (revision 05236b1a0a8122ee73deabdbaef6d40a9b9d7792)
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 // class SvxColorWindow_Impl --------------------------------------------------
24 //========================================================================
25 #ifndef __SVX_COLORWINDOW_HXX_
26 #define __SVX_COLORWINDOW_HXX_
27 
28 #include <sfx2/tbxctrl.hxx>
29 #include <svl/lstner.hxx>
30 #include <rtl/ustring.hxx>
31 #include <com/sun/star/frame/XFrame.hpp>
32 
33 //========================================================================
34 // class SvxColorWindow_Impl --------------------------------------------------
35 //========================================================================
36 
37 class SvxColorWindow_Impl : public SfxPopupWindow
38 {
39 	using FloatingWindow::StateChanged;
40 
41 private:
42 	const sal_uInt16	                                                    theSlotId;
43 	ValueSet		                                                    aColorSet;
44     rtl::OUString                                                       maCommand;
45 
46 #if _SOLAR__PRIVATE
47 	DECL_LINK( SelectHdl, void * );
48 #endif
49 
50 protected:
51 	virtual void    Resize();
52 	virtual sal_Bool	Close();
53 
54 public:
55     SvxColorWindow_Impl( const rtl::OUString& rCommand,
56                          sal_uInt16 nSlotId,
57                          const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
58 					     const String& rWndTitle,
59                          Window* pParentWindow );
60     ~SvxColorWindow_Impl();
61 	void                StartSelection();
62 
63     virtual void        KeyInput( const KeyEvent& rKEvt );
64     virtual void        StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
65 
66 	virtual SfxPopupWindow* Clone() const;
67 };
68 
69 #endif
70