update credits
[LibreOffice.git] / include / svtools / roadmap.hxx
blobd36a1a3165bb1e2b2b3b4f97ed3e9ae1554623f4
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 _SVTOOLS_ROADMAP_HXX
20 #define _SVTOOLS_ROADMAP_HXX
22 #include "svtools/svtdllapi.h"
23 #include <vcl/ctrl.hxx>
24 #include <vcl/imgctrl.hxx>
26 #include "svtools/hyperlabel.hxx"
31 class Bitmap;
32 //.........................................................................
33 namespace svt
35 //.........................................................................
37 struct RoadmapTypes
39 public:
40 typedef sal_Int16 ItemId;
41 typedef sal_Int32 ItemIndex;
44 class RoadmapImpl;
45 class RoadmapItem;
47 //=====================================================================
48 //= Roadmap
49 //=====================================================================
50 class SVT_DLLPUBLIC ORoadmap : public Control, public RoadmapTypes
52 protected:
53 RoadmapImpl* m_pImpl;
54 // Window overridables
55 void Paint( const Rectangle& _rRect );
56 void implInit();
58 public:
59 ORoadmap( Window* _pParent, WinBits _nWinStyle = 0 );
60 ~ORoadmap( );
62 void SetRoadmapBitmap( const BitmapEx& maBitmap, sal_Bool _bInvalidate = sal_True );
64 void EnableRoadmapItem( ItemId _nItemId, sal_Bool _bEnable, ItemIndex _nStartIndex = 0 );
66 void ChangeRoadmapItemLabel( ItemId _nID, const OUString& sLabel, ItemIndex _nStartIndex = 0 );
67 void ChangeRoadmapItemID( ItemId _nID, ItemId _NewID, ItemIndex _nStartIndex = 0 );
69 void SetRoadmapInteractive( sal_Bool _bInteractive );
70 sal_Bool IsRoadmapInteractive();
72 void SetRoadmapComplete( sal_Bool _bComplete );
73 sal_Bool IsRoadmapComplete() const;
75 ItemIndex GetItemCount() const;
76 ItemId GetItemID( ItemIndex _nIndex ) const;
78 void InsertRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, sal_Bool _bEnabled = sal_True );
79 void ReplaceRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, sal_Bool _bEnabled );
80 void DeleteRoadmapItem( ItemIndex _nIndex );
82 ItemId GetCurrentRoadmapItemID() const;
83 sal_Bool SelectRoadmapItemByID( ItemId _nItemID );
85 void SetItemSelectHdl( const Link& _rHdl );
86 Link GetItemSelectHdl( ) const;
87 virtual void DataChanged( const DataChangedEvent& rDCEvt );
88 virtual void GetFocus();
91 protected:
92 long PreNotify( NotifyEvent& rNEvt );
94 protected:
95 /// called when an item has been selected by any means
96 virtual void Select();
98 private:
99 DECL_LINK(ImplClickHdl, HyperLabel*);
101 RoadmapItem* GetByIndex( ItemIndex _nItemIndex );
102 const RoadmapItem* GetByIndex( ItemIndex _nItemIndex ) const;
104 RoadmapItem* GetByID( ItemId _nID, ItemIndex _nStartIndex = 0 );
105 const RoadmapItem* GetByID( ItemId _nID, ItemIndex _nStartIndex = 0 ) const;
106 RoadmapItem* GetPreviousHyperLabel( ItemIndex _Index);
108 void DrawHeadline();
109 void DeselectOldRoadmapItems();
110 ItemId GetNextAvailableItemId( ItemIndex _NewIndex );
111 ItemId GetPreviousAvailableItemId( ItemIndex _NewIndex );
112 RoadmapItem* GetByPointer(Window* pWindow);
113 RoadmapItem* InsertHyperLabel( ItemIndex _Index, const OUString& _aStr, ItemId _RMID, sal_Bool _bEnabled = sal_True );
114 void UpdatefollowingHyperLabels( ItemIndex _Index );
117 //.........................................................................
118 } // namespace svt
119 //.........................................................................
121 #endif
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */