summaryrefslogtreecommitdiff
path: root/svtools/inc/roadmap.hxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-11 12:25:55 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-11 13:57:30 +0900
commit71c561740d3a11081c7737376948212fb0937fe4 (patch)
tree5a58c21d0b2742678b92511cc50d32f4b6220af1 /svtools/inc/roadmap.hxx
parent01f1a5b106ca2a324619ca02e7df6aba872c9a35 (diff)
refactor Roadmap to use RenderContext, some cleanup
Change-Id: I4750c17ae7110b0102ebdd141a31ab2a52c4e774
Diffstat (limited to 'svtools/inc/roadmap.hxx')
-rw-r--r--svtools/inc/roadmap.hxx126
1 files changed, 58 insertions, 68 deletions
diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx
index 412bc4a3a344..a4e943166faa 100644
--- a/svtools/inc/roadmap.hxx
+++ b/svtools/inc/roadmap.hxx
@@ -25,100 +25,90 @@
#include <svtools/hyperlabel.hxx>
-
-
-
class Bitmap;
namespace svt
{
+struct RoadmapTypes
+{
+public:
+ typedef sal_Int16 ItemId;
+ typedef sal_Int32 ItemIndex;
+};
- struct RoadmapTypes
- {
- public:
- typedef sal_Int16 ItemId;
- typedef sal_Int32 ItemIndex;
- };
-
- class RoadmapImpl;
- class RoadmapItem;
-
-
- //= Roadmap
-
- class SVT_DLLPUBLIC ORoadmap : public Control, public RoadmapTypes
- {
- protected:
- RoadmapImpl* m_pImpl;
- // Window overridables
- void Paint( vcl::RenderContext& rRenderContext, const Rectangle& _rRect ) SAL_OVERRIDE;
- void implInit();
-
- public:
- ORoadmap( vcl::Window* _pParent, WinBits _nWinStyle = 0 );
- virtual ~ORoadmap( );
- virtual void dispose() SAL_OVERRIDE;
+class RoadmapImpl;
+class RoadmapItem;
- void SetRoadmapBitmap( const BitmapEx& maBitmap, bool _bInvalidate = true );
+class SVT_DLLPUBLIC ORoadmap : public Control, public RoadmapTypes
+{
+protected:
+ RoadmapImpl* m_pImpl;
+ // Window overridables
+ void Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) SAL_OVERRIDE;
+ void implInit(vcl::RenderContext& rRenderContext);
- void EnableRoadmapItem( ItemId _nItemId, bool _bEnable, ItemIndex _nStartIndex = 0 );
+public:
+ ORoadmap( vcl::Window* _pParent, WinBits _nWinStyle = 0 );
+ virtual ~ORoadmap( );
+ virtual void dispose() SAL_OVERRIDE;
- void ChangeRoadmapItemLabel( ItemId _nID, const OUString& sLabel, ItemIndex _nStartIndex = 0 );
- void ChangeRoadmapItemID( ItemId _nID, ItemId _NewID, ItemIndex _nStartIndex = 0 );
+ void SetRoadmapBitmap( const BitmapEx& maBitmap, bool _bInvalidate = true );
- void SetRoadmapInteractive( bool _bInteractive );
- bool IsRoadmapInteractive();
+ void EnableRoadmapItem( ItemId _nItemId, bool _bEnable, ItemIndex _nStartIndex = 0 );
- void SetRoadmapComplete( bool _bComplete );
- bool IsRoadmapComplete() const;
+ void ChangeRoadmapItemLabel( ItemId _nID, const OUString& sLabel, ItemIndex _nStartIndex = 0 );
+ void ChangeRoadmapItemID( ItemId _nID, ItemId _NewID, ItemIndex _nStartIndex = 0 );
- ItemIndex GetItemCount() const;
- ItemId GetItemID( ItemIndex _nIndex ) const;
+ void SetRoadmapInteractive( bool _bInteractive );
+ bool IsRoadmapInteractive();
- void InsertRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, bool _bEnabled = true );
- void ReplaceRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, bool _bEnabled );
- void DeleteRoadmapItem( ItemIndex _nIndex );
+ void SetRoadmapComplete( bool _bComplete );
+ bool IsRoadmapComplete() const;
- ItemId GetCurrentRoadmapItemID() const;
- bool SelectRoadmapItemByID( ItemId _nItemID );
+ ItemIndex GetItemCount() const;
+ ItemId GetItemID( ItemIndex _nIndex ) const;
- void SetItemSelectHdl( const Link<>& _rHdl );
- Link<> GetItemSelectHdl( ) const;
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
- virtual void GetFocus() SAL_OVERRIDE;
+ void InsertRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, bool _bEnabled = true );
+ void ReplaceRoadmapItem( ItemIndex _Index, const OUString& _RoadmapItem, ItemId _nUniqueId, bool _bEnabled );
+ void DeleteRoadmapItem( ItemIndex _nIndex );
+ ItemId GetCurrentRoadmapItemID() const;
+ bool SelectRoadmapItemByID( ItemId _nItemID );
- protected:
- bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
+ void SetItemSelectHdl( const Link<>& _rHdl );
+ Link<> GetItemSelectHdl( ) const;
+ virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
+ virtual void GetFocus() SAL_OVERRIDE;
- protected:
- /// called when an item has been selected by any means
- void Select();
+protected:
+ bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
- private:
- DECL_LINK(ImplClickHdl, HyperLabel*);
+protected:
+ /// called when an item has been selected by any means
+ void Select();
- RoadmapItem* GetByIndex( ItemIndex _nItemIndex );
- const RoadmapItem* GetByIndex( ItemIndex _nItemIndex ) const;
+private:
+ DECL_LINK(ImplClickHdl, HyperLabel*);
- RoadmapItem* GetByID( ItemId _nID, ItemIndex _nStartIndex = 0 );
- const RoadmapItem* GetByID( ItemId _nID, ItemIndex _nStartIndex = 0 ) const;
- RoadmapItem* GetPreviousHyperLabel( ItemIndex _Index);
+ RoadmapItem* GetByIndex( ItemIndex _nItemIndex );
+ const RoadmapItem* GetByIndex( ItemIndex _nItemIndex ) const;
- void DrawHeadline();
- void DeselectOldRoadmapItems();
- ItemId GetNextAvailableItemId( ItemIndex _NewIndex );
- ItemId GetPreviousAvailableItemId( ItemIndex _NewIndex );
- RoadmapItem* GetByPointer(vcl::Window* pWindow);
- RoadmapItem* InsertHyperLabel( ItemIndex _Index, const OUString& _aStr, ItemId _RMID, bool _bEnabled, bool _bIncomplete );
- void UpdatefollowingHyperLabels( ItemIndex _Index );
- };
+ RoadmapItem* GetByID( ItemId _nID, ItemIndex _nStartIndex = 0 );
+ const RoadmapItem* GetByID( ItemId _nID, ItemIndex _nStartIndex = 0 ) const;
+ RoadmapItem* GetPreviousHyperLabel( ItemIndex _Index);
+ void DrawHeadline(vcl::RenderContext& rRenderContext);
+ void DeselectOldRoadmapItems();
+ ItemId GetNextAvailableItemId( ItemIndex _NewIndex );
+ ItemId GetPreviousAvailableItemId( ItemIndex _NewIndex );
+ RoadmapItem* GetByPointer(vcl::Window* pWindow);
+ RoadmapItem* InsertHyperLabel( ItemIndex _Index, const OUString& _aStr, ItemId _RMID, bool _bEnabled, bool _bIncomplete );
+ void UpdatefollowingHyperLabels( ItemIndex _Index );
+};
} // namespace svt
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */