Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_SC_SOURCE_UI_INC_CBUTTON_HXX
21 : #define INCLUDED_SC_SOURCE_UI_INC_CBUTTON_HXX
22 :
23 : #include <tools/gen.hxx>
24 : #include <tools/color.hxx>
25 :
26 : class OutputDevice;
27 :
28 : class ScDDComboBoxButton
29 : {
30 : public:
31 : ScDDComboBoxButton( OutputDevice* pOutputDevice );
32 : ~ScDDComboBoxButton();
33 :
34 : void SetOutputDevice( OutputDevice* pOutputDevice );
35 :
36 : void Draw( const Point& rAt,
37 : const Size& rSize,
38 : bool bState,
39 : bool bBtnIn = false );
40 :
41 : void Draw( const Point& rAt,
42 : bool bState,
43 : bool bBtnIn = false )
44 : { Draw( rAt, aBtnSize, bState, bBtnIn ); }
45 :
46 0 : void Draw( bool bState,
47 : bool bBtnIn = false )
48 0 : { Draw( aBtnPos, aBtnSize, bState, bBtnIn ); }
49 :
50 : void SetOptSizePixel();
51 :
52 0 : void SetPosPixel( const Point& rNewPos ) { aBtnPos = rNewPos; }
53 1474 : Point GetPosPixel() const { return aBtnPos; }
54 :
55 0 : void SetSizePixel( const Size& rNewSize ) { aBtnSize = rNewSize; }
56 1474 : Size GetSizePixel() const { return aBtnSize; }
57 :
58 : private:
59 : void ImpDrawArrow( const Rectangle& rRect,
60 : bool bState );
61 :
62 : protected:
63 : OutputDevice* pOut;
64 : Point aBtnPos;
65 : Size aBtnSize;
66 : };
67 :
68 : #endif // INCLUDED_SC_SOURCE_UI_INC_CBUTTON_HXX
69 :
70 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|