bump product version to 4.1.6.2
[LibreOffice.git] / sfx2 / source / sidebar / TitleBar.hxx
blob36c31a6f46762fd428b40364ea49fc2f3da21fdf
1 /*
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
21 #include "Paint.hxx"
23 #include <vcl/fixed.hxx>
24 #include "sfx2/sidebar/SidebarToolBox.hxx"
27 namespace sfx2 { namespace sidebar {
29 class TitleBar
30 : public Window
32 public:
33 TitleBar (
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 (
45 long nX,
46 long nY,
47 long nWidth,
48 long nHeight,
49 sal_uInt16 nFlags = WINDOW_POSSIZE_ALL);
51 ToolBox& GetToolBox (void);
52 const ToolBox& GetToolBox (void) const;
54 protected:
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);
66 private:
67 Image maIcon;
69 void PaintTitle (const Rectangle& rTitleBox);
70 DECL_LINK(SelectionHandler, ToolBox*);
74 } } // end of namespace sfx2::sidebar
76 #endif