bump product version to 6.3.0.0.beta1
[LibreOffice.git] / svtools / inc / roadmap.hxx
blob3056dfb0bff6dc474ea06e1177c82b960c72c049
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 .
19 #ifndef INCLUDED_SVTOOLS_INC_ROADMAP_HXX
20 #define INCLUDED_SVTOOLS_INC_ROADMAP_HXX
22 #include <svtools/svtdllapi.h>
23 #include <vcl/ctrl.hxx>
24 #include <vcl/imgctrl.hxx>
26 #include <svtools/hyperlabel.hxx>
27 #include <memory>
29 class Bitmap;
31 namespace svt
34 struct RoadmapTypes
36 public:
37 typedef sal_Int16 ItemId;
38 typedef sal_Int32 ItemIndex;
41 class RoadmapImpl;
42 class RoadmapItem;
44 class SVT_DLLPUBLIC ORoadmap final : public Control, public RoadmapTypes
46 public:
47 ORoadmap( vcl::Window* _pParent, WinBits _nWinStyle );
48 virtual ~ORoadmap( ) override;
49 virtual void dispose() override;
51 void SetRoadmapBitmap( const BitmapEx& maBitmap );
53 void EnableRoadmapItem( ItemId _nItemId, bool _bEnable );
55 void ChangeRoadmapItemLabel( ItemId _nID, const OUString& sLabel );
56 void ChangeRoadmapItemID( ItemId _nID, ItemId NewID );
58 void SetRoadmapInteractive( bool _bInteractive );
59 bool IsRoadmapInteractive();
61 void SetRoadmapComplete( bool _bComplete );
62 bool IsRoadmapComplete() const;
64 ItemIndex GetItemCount() const;
65 ItemId GetItemID( ItemIndex _nIndex ) const;
67 void InsertRoadmapItem( ItemIndex Index, const OUString& RoadmapItem, ItemId _nUniqueId, bool _bEnabled );
68 void ReplaceRoadmapItem( ItemIndex Index, const OUString& RoadmapItem, ItemId _nUniqueId, bool _bEnabled );
69 void DeleteRoadmapItem( ItemIndex _nIndex );
71 ItemId GetCurrentRoadmapItemID() const;
72 bool SelectRoadmapItemByID( ItemId _nItemID );
74 void SetItemSelectHdl( const Link<LinkParamNone*,void>& _rHdl );
75 Link<LinkParamNone*,void> const & GetItemSelectHdl( ) const;
76 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
77 virtual void GetFocus() override;
78 virtual void ApplySettings( vcl::RenderContext& rRenderContext ) override;
80 private:
81 bool PreNotify( NotifyEvent& rNEvt ) override;
83 /// called when an item has been selected by any means
84 void Select();
86 DECL_LINK(ImplClickHdl, HyperLabel*, void);
88 RoadmapItem* GetByIndex( ItemIndex _nItemIndex );
89 const RoadmapItem* GetByIndex( ItemIndex _nItemIndex ) const;
91 RoadmapItem* GetByID( ItemId _nID );
92 const RoadmapItem* GetByID( ItemId _nID ) const;
93 RoadmapItem* GetPreviousHyperLabel( ItemIndex Index);
95 void DrawHeadline(vcl::RenderContext& rRenderContext);
96 void DeselectOldRoadmapItems();
97 ItemId GetNextAvailableItemId( ItemIndex NewIndex );
98 ItemId GetPreviousAvailableItemId( ItemIndex NewIndex );
99 RoadmapItem* GetByPointer(vcl::Window const * pWindow);
100 RoadmapItem* InsertHyperLabel( ItemIndex Index, const OUString& _aStr, ItemId RMID, bool _bEnabled, bool _bIncomplete );
101 void UpdatefollowingHyperLabels( ItemIndex Index );
103 // Window overridables
104 void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) override;
105 void implInit(vcl::RenderContext& rRenderContext);
107 std::unique_ptr<RoadmapImpl> m_pImpl;
110 } // namespace svt
112 #endif
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */