1ff12d537SAndre Fischer /**************************************************************
2ff12d537SAndre Fischer  *
3ff12d537SAndre Fischer  * Licensed to the Apache Software Foundation (ASF) under one
4ff12d537SAndre Fischer  * or more contributor license agreements.  See the NOTICE file
5ff12d537SAndre Fischer  * distributed with this work for additional information
6ff12d537SAndre Fischer  * regarding copyright ownership.  The ASF licenses this file
7ff12d537SAndre Fischer  * to you under the Apache License, Version 2.0 (the
8ff12d537SAndre Fischer  * "License"); you may not use this file except in compliance
9ff12d537SAndre Fischer  * with the License.  You may obtain a copy of the License at
10ff12d537SAndre Fischer  *
11ff12d537SAndre Fischer  *   http://www.apache.org/licenses/LICENSE-2.0
12ff12d537SAndre Fischer  *
13ff12d537SAndre Fischer  * Unless required by applicable law or agreed to in writing,
14ff12d537SAndre Fischer  * software distributed under the License is distributed on an
15ff12d537SAndre Fischer  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16ff12d537SAndre Fischer  * KIND, either express or implied.  See the License for the
17ff12d537SAndre Fischer  * specific language governing permissions and limitations
18ff12d537SAndre Fischer  * under the License.
19ff12d537SAndre Fischer  *
20ff12d537SAndre Fischer  *************************************************************/
21ff12d537SAndre Fischer 
22ff12d537SAndre Fischer #ifndef SFX_SIDEBAR_PANEL_TITLE_BAR_HXX
23ff12d537SAndre Fischer #define SFX_SIDEBAR_PANEL_TITLE_BAR_HXX
24ff12d537SAndre Fischer 
25ff12d537SAndre Fischer #include "TitleBar.hxx"
26ff12d537SAndre Fischer 
278a1a651aSAndre Fischer #include <com/sun/star/frame/XFrame.hpp>
287a32b0c8SAndre Fischer #include <boost/function.hpp>
297a32b0c8SAndre Fischer 
30ff12d537SAndre Fischer 
31ff12d537SAndre Fischer namespace sfx2 { namespace sidebar {
32ff12d537SAndre Fischer 
33ff12d537SAndre Fischer class Panel;
34ff12d537SAndre Fischer 
35ff12d537SAndre Fischer class PanelTitleBar
36ff12d537SAndre Fischer     : public TitleBar
37ff12d537SAndre Fischer {
38ff12d537SAndre Fischer public:
39ff12d537SAndre Fischer     PanelTitleBar (
40ff12d537SAndre Fischer         const ::rtl::OUString& rsTitle,
41ff12d537SAndre Fischer         Window* pParentWindow,
42c545150fSOliver-Rainer Wittmann         Panel* pPanel );
43ff12d537SAndre Fischer     virtual ~PanelTitleBar (void);
44ff12d537SAndre Fischer 
458a1a651aSAndre Fischer     void SetMoreOptionsCommand (
468a1a651aSAndre Fischer         const ::rtl::OUString& rsCommandName,
478a1a651aSAndre Fischer         const ::cssu::Reference<css::frame::XFrame>& rxFrame);
48c545150fSOliver-Rainer Wittmann 
497a32b0c8SAndre Fischer     virtual void DataChanged (const DataChangedEvent& rEvent);
50ff12d537SAndre Fischer     virtual void MouseButtonDown (const MouseEvent& rMouseEvent);
51ff12d537SAndre Fischer     virtual void MouseButtonUp (const MouseEvent& rMouseEvent);
52ff12d537SAndre Fischer 
53ff12d537SAndre Fischer protected:
54ff12d537SAndre Fischer     virtual Rectangle GetTitleArea (const Rectangle& rTitleBarBox);
55ff12d537SAndre Fischer     virtual void PaintDecoration (const Rectangle& rTitleBarBox);
56ff12d537SAndre Fischer     virtual sidebar::Paint GetBackgroundPaint (void);
57ff12d537SAndre Fischer     virtual Color GetTextColor (void);
587a32b0c8SAndre Fischer     virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex);
59*3b2c5b9dSAndre Fischer     virtual cssu::Reference<css::accessibility::XAccessible> CreateAccessible (void);
60ff12d537SAndre Fischer 
61ff12d537SAndre Fischer private:
62ff12d537SAndre Fischer     bool mbIsLeftButtonDown;
63ff12d537SAndre Fischer     Panel* mpPanel;
647a32b0c8SAndre Fischer     const sal_uInt16 mnMenuItemIndex;
658a1a651aSAndre Fischer     cssu::Reference<css::frame::XFrame> mxFrame;
668a1a651aSAndre Fischer     ::rtl::OUString msMoreOptionsCommand;
67*3b2c5b9dSAndre Fischer     ::rtl::OUString msAccessibleNamePrefix;
68ff12d537SAndre Fischer };
69ff12d537SAndre Fischer 
70ff12d537SAndre Fischer 
71ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar
72ff12d537SAndre Fischer 
73ff12d537SAndre Fischer #endif
74