fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / vcl / morebtn.hxx
blob7b5399f41eb126dc1c32914abfc315b28f515ab3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _SV_MOREBTN_HXX
21 #define _SV_MOREBTN_HXX
23 #include <tools/solar.h>
24 #include <vcl/dllapi.h>
25 #include <vcl/mapmod.hxx>
26 #include <vcl/button.hxx>
28 struct ImplMoreButtonData;
30 // --------------
31 // - MoreButton -
32 // --------------
34 class VCL_DLLPUBLIC MoreButton : public PushButton
36 private:
37 ImplMoreButtonData* mpMBData;
38 sal_uLong mnDelta;
39 MapUnit meUnit;
40 sal_Bool mbState;
42 // Copy assignment is forbidden and not implemented.
43 SAL_DLLPRIVATE MoreButton( const MoreButton & );
44 SAL_DLLPRIVATE MoreButton& operator=( const MoreButton & );
45 SAL_DLLPRIVATE void ShowState();
47 protected:
48 using Window::ImplInit;
49 SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
50 SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
52 public:
53 explicit MoreButton( Window* pParent, WinBits nStyle = 0 );
54 explicit MoreButton( Window* pParent, const ResId& );
55 virtual ~MoreButton();
57 void Click();
59 void AddWindow( Window* pWindow );
61 void SetDelta( sal_uLong nNewDelta ) { mnDelta = nNewDelta; }
62 sal_uLong GetDelta() const { return mnDelta; }
64 void SetMapUnit( MapUnit eNewUnit = MAP_PIXEL ) { meUnit = eNewUnit; }
65 MapUnit GetMapUnit() const { return meUnit; }
67 using PushButton::SetState;
68 void SetState( sal_Bool bNewState = sal_True );
69 sal_Bool GetState() const { return mbState; }
71 void SetText( const OUString& rNewText );
72 OUString GetText() const;
74 void SetMoreText( const OUString& rNewText );
75 void SetLessText( const OUString& rNewText );
76 OUString GetMoreText() const;
77 OUString GetLessText() const;
80 inline void MoreButton::SetState( sal_Bool bNewState )
82 if ( mbState != bNewState )
83 Click();
86 #endif // _SV_MOREBTN_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */