2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 #ifndef SFX_SIDEBAR_TITLE_BAR_HXX
19 #define SFX_SIDEBAR_TITLE_BAR_HXX
23 #include <vcl/fixed.hxx>
24 #include "sfx2/sidebar/SidebarToolBox.hxx"
27 namespace sfx2
{ namespace sidebar
{
34 const ::rtl::OUString
& rsTitle
,
35 Window
* pParentWindow
,
36 const sidebar::Paint
& rInitialBackgroundPaint
);
37 virtual ~TitleBar (void);
39 void SetTitle (const ::rtl::OUString
& rsTitle
);
40 void SetIcon (const Image
& rIcon
);
42 virtual void Paint (const Rectangle
& rUpdateArea
);
43 virtual void DataChanged (const DataChangedEvent
& rEvent
);
44 virtual void setPosSizePixel (
49 sal_uInt16 nFlags
= WINDOW_POSSIZE_ALL
);
51 ToolBox
& GetToolBox (void);
52 const ToolBox
& GetToolBox (void) const;
55 SidebarToolBox maToolBox
;
56 ::rtl::OUString msTitle
;
58 virtual Rectangle
GetTitleArea (const Rectangle
& rTitleBarBox
) = 0;
59 virtual void PaintDecoration (const Rectangle
& rTitleBarBox
) = 0;
60 virtual void PaintFocus (const Rectangle
& rFocusBox
);
61 virtual sidebar::Paint
GetBackgroundPaint (void) = 0;
62 virtual Color
GetTextColor (void) = 0;
63 virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex
);
64 virtual cssu::Reference
<css::accessibility::XAccessible
> CreateAccessible (void);
69 void PaintTitle (const Rectangle
& rTitleBox
);
70 DECL_LINK(SelectionHandler
, ToolBox
*);
74 } } // end of namespace sfx2::sidebar