fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svtools / toolpanel / paneltabbar.hxx
blob0b534f88ed9bc3627e2c82f42b9ba297c4d09712
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 SVT_PANELTABBAR_HXX
21 #define SVT_PANELTABBAR_HXX
23 #include "svtools/svtdllapi.h"
24 #include "svtools/toolpanel/tabalignment.hxx"
25 #include "svtools/toolpanel/tabitemcontent.hxx"
27 #include <vcl/ctrl.hxx>
29 #include <memory>
30 #include <boost/optional.hpp>
32 class PushButton;
34 //........................................................................
35 namespace svt
37 //........................................................................
39 class PanelTabBar_Impl;
40 class IToolPanelDeck;
42 //====================================================================
43 //= PanelTabBar
44 //====================================================================
45 /** a tab bar for selecting panels
47 At the moment, this control aligns the tabs vertically, this might be extended to also support a horizontal
48 layout in the future.
50 class SVT_DLLPUBLIC PanelTabBar : public Control
52 public:
53 PanelTabBar( Window& i_rParentWindow, IToolPanelDeck& i_rPanelDeck, const TabAlignment i_eAlignment, const TabItemContent i_eItemContent );
54 ~PanelTabBar();
56 // attribute access
57 TabItemContent GetTabItemContent() const;
58 void SetTabItemContent( const TabItemContent& i_eItemContent );
60 ::boost::optional< size_t > GetFocusedPanelItem() const;
61 void FocusPanelItem( const size_t i_nItemPos );
62 Rectangle GetItemScreenRect( const size_t i_nItemPos ) const;
63 bool IsVertical() const;
64 IToolPanelDeck& GetPanelDeck() const;
65 PushButton& GetScrollButton( const bool i_bForward );
67 // Window overridables
68 virtual Size GetOptimalSize() const;
70 protected:
71 // Window overridables
72 virtual void Paint( const Rectangle& i_rRect );
73 virtual void Resize();
74 virtual void MouseMove( const MouseEvent& i_rMouseEvent );
75 virtual void MouseButtonDown( const MouseEvent& i_rMouseEvent );
76 virtual void MouseButtonUp( const MouseEvent& i_rMouseEvent );
77 virtual void RequestHelp( const HelpEvent& i_rHelpEvent );
78 virtual void GetFocus();
79 virtual void LoseFocus();
80 virtual void KeyInput( const KeyEvent& i_rKeyEvent );
81 virtual void DataChanged( const DataChangedEvent& i_rDataChanedEvent );
83 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
84 GetComponentInterface( sal_Bool i_bCreate );
86 private:
87 ::std::auto_ptr< PanelTabBar_Impl > m_pImpl;
90 //........................................................................
91 } // namespace svt
92 //........................................................................
94 #endif // SVT_PANELTABBAR_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */