TabBar.cxx (7a32b0c8) TabBar.cxx (65908a7e)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 14 unchanged lines hidden (view full) ---

23
24#include "TabBar.hxx"
25#include "TabItem.hxx"
26#include "sidebar/ControlFactory.hxx"
27#include "DeckDescriptor.hxx"
28#include "Paint.hxx"
29#include "sfx2/sidebar/Theme.hxx"
30#include "Tools.hxx"
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 14 unchanged lines hidden (view full) ---

23
24#include "TabBar.hxx"
25#include "TabItem.hxx"
26#include "sidebar/ControlFactory.hxx"
27#include "DeckDescriptor.hxx"
28#include "Paint.hxx"
29#include "sfx2/sidebar/Theme.hxx"
30#include "Tools.hxx"
31#include "FocusManager.hxx"
31
32#include <vcl/gradient.hxx>
33#include <vcl/image.hxx>
34#include <vcl/wrkwin.hxx>
35#include <comphelper/processfactory.hxx>
36#include <comphelper/componentcontext.hxx>
37#include <tools/svborder.hxx>
38

--- 8 unchanged lines hidden (view full) ---

47
48namespace sfx2 { namespace sidebar {
49
50TabBar::TabBar (
51 Window* pParentWindow,
52 const Reference<frame::XFrame>& rxFrame,
53 const ::boost::function<void(const ::rtl::OUString&)>& rDeckActivationFunctor,
54 const PopupMenuProvider& rPopupMenuProvider)
32
33#include <vcl/gradient.hxx>
34#include <vcl/image.hxx>
35#include <vcl/wrkwin.hxx>
36#include <comphelper/processfactory.hxx>
37#include <comphelper/componentcontext.hxx>
38#include <tools/svborder.hxx>
39

--- 8 unchanged lines hidden (view full) ---

48
49namespace sfx2 { namespace sidebar {
50
51TabBar::TabBar (
52 Window* pParentWindow,
53 const Reference<frame::XFrame>& rxFrame,
54 const ::boost::function<void(const ::rtl::OUString&)>& rDeckActivationFunctor,
55 const PopupMenuProvider& rPopupMenuProvider)
55 : Window(pParentWindow),
56 : Window(pParentWindow, WB_DIALOGCONTROL),
56 mxFrame(rxFrame),
57 mpMenuButton(ControlFactory::CreateMenuButton(this)),
58 maItems(),
59 maDeckActivationFunctor(rDeckActivationFunctor),
60 maPopupMenuProvider(rPopupMenuProvider)
61{
62 SetBackground(Theme::GetPaint(Theme::Paint_TabBarBackground).GetWallpaper());
63

--- 270 unchanged lines hidden (view full) ---

334 }
335 if (bNeedsLayout)
336 Layout();
337}
338
339
340
341
57 mxFrame(rxFrame),
58 mpMenuButton(ControlFactory::CreateMenuButton(this)),
59 maItems(),
60 maDeckActivationFunctor(rDeckActivationFunctor),
61 maPopupMenuProvider(rPopupMenuProvider)
62{
63 SetBackground(Theme::GetPaint(Theme::Paint_TabBarBackground).GetWallpaper());
64

--- 270 unchanged lines hidden (view full) ---

335 }
336 if (bNeedsLayout)
337 Layout();
338}
339
340
341
342
343void TabBar::UpdateFocusManager (FocusManager& rFocusManager)
344{
345 ::std::vector<Button*> aButtons;
346 aButtons.reserve(maItems.size()+1);
347
348 aButtons.push_back(mpMenuButton.get());
349 for(ItemContainer::const_iterator
350 iItem(maItems.begin()), iEnd(maItems.end());
351 iItem!=iEnd;
352 ++iItem)
353 {
354 aButtons.push_back(iItem->mpButton.get());
355 }
356 rFocusManager.SetButtons(aButtons);
357}
358
359
360
361
342IMPL_LINK(TabBar, OnToolboxClicked, void*, EMPTYARG)
343{
344 ::std::vector<DeckMenuData> aSelectionData;
345 ::std::vector<DeckMenuData> aShowData;
346
347 for(ItemContainer::const_iterator iItem(maItems.begin()),iEnd(maItems.end());
348 iItem!=iEnd;
349 ++iItem)

--- 32 unchanged lines hidden ---
362IMPL_LINK(TabBar, OnToolboxClicked, void*, EMPTYARG)
363{
364 ::std::vector<DeckMenuData> aSelectionData;
365 ::std::vector<DeckMenuData> aShowData;
366
367 for(ItemContainer::const_iterator iItem(maItems.begin()),iEnd(maItems.end());
368 iItem!=iEnd;
369 ++iItem)

--- 32 unchanged lines hidden ---