bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svx / checklbx.hxx
blob44eeb3631143aa1aaae54e331d27c2365ff10be0
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 INCLUDED_SVX_CHECKLBX_HXX
21 #define INCLUDED_SVX_CHECKLBX_HXX
23 #include <rtl/ustring.hxx>
24 #include <vcl/treelistbox.hxx>
25 #include <svx/svxdllapi.h>
26 #include <tools/solar.h>
27 #include <tools/wintypes.hxx>
28 #include <vcl/window.hxx>
29 #include <memory>
31 class SvLBoxButtonData;
32 class SvTreeListEntry;
34 class SVX_DLLPUBLIC SvxCheckListBox : public SvTreeListBox
36 using Window::GetText;
38 private:
39 std::unique_ptr<SvLBoxButtonData> pCheckButton;
41 SVX_DLLPRIVATE void Init_Impl();
43 using SvTreeListBox::InsertEntry;
44 // Avoid ambiguity with new InsertEntry:
45 virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent,
46 bool bChildrenOnDemand,
47 sal_uLong nPos, void* pUserData,
48 SvLBoxButtonKind eButtonKind ) override;
50 public:
51 SvxCheckListBox( vcl::Window* pParent, WinBits nWinStyle = 0 );
52 virtual ~SvxCheckListBox() override;
53 virtual void dispose() override;
55 void SelectEntryPos ( sal_uLong nPos );
56 sal_uLong GetSelectedEntryPos () const;
58 void CheckEntryPos ( sal_uLong nPos, bool bCheck = true );
59 bool IsChecked ( sal_uLong nPos ) const;
60 void ToggleCheckButton ( SvTreeListEntry* pEntry );
62 virtual void MouseButtonDown ( const MouseEvent& rMEvt ) override;
63 virtual void KeyInput ( const KeyEvent& rKEvt ) override;
66 #endif
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */