xref: /trunk/main/sc/source/ui/inc/cbutton.hxx (revision 38d50f7b)
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 //------------------------------------------------------------------
25 
26 #ifndef SC_CBUTTON_HXX
27 #define SC_CBUTTON_HXX
28 
29 #include <tools/gen.hxx>
30 #include <tools/color.hxx>
31 
32 class OutputDevice;
33 
34 
35 //==================================================================
36 
37 class ScDDComboBoxButton
38 {
39 public:
40             ScDDComboBoxButton( OutputDevice* pOutputDevice );
41 			~ScDDComboBoxButton();
42 
43     void    SetOutputDevice( OutputDevice* pOutputDevice );
44 
45 	void	Draw( const Point&	rAt,
46 				  const Size&	rSize,
47                   sal_Bool          bState,
48 				  sal_Bool			bBtnIn = sal_False );
49 
Draw(const Point & rAt,sal_Bool bState,sal_Bool bBtnIn=sal_False)50 	void	Draw( const Point&	rAt,
51                   sal_Bool          bState,
52 				  sal_Bool			bBtnIn = sal_False )
53                 { Draw( rAt, aBtnSize, bState, bBtnIn ); }
54 
Draw(sal_Bool bState,sal_Bool bBtnIn=sal_False)55     void    Draw( sal_Bool          bState,
56                   sal_Bool          bBtnIn = sal_False )
57                 { Draw( aBtnPos, aBtnSize, bState, bBtnIn ); }
58 
59 	void	SetOptSizePixel();
60 
SetPosPixel(const Point & rNewPos)61 	void	SetPosPixel( const Point& rNewPos )  { aBtnPos = rNewPos; }
GetPosPixel() const62 	Point	GetPosPixel() const				 	 { return aBtnPos; }
63 
SetSizePixel(const Size & rNewSize)64 	void	SetSizePixel( const Size& rNewSize ) { aBtnSize = rNewSize; }
GetSizePixel() const65 	Size	GetSizePixel() const				 { return aBtnSize; }
66 
67 private:
68 	void	ImpDrawArrow( const Rectangle&	rRect,
69                           sal_Bool              bState );
70 
71 protected:
72     OutputDevice* pOut;
73 	Point	aBtnPos;
74 	Size	aBtnSize;
75 };
76 
77 
78 #endif // SC_CBUTTON_HXX
79 
80 
81