Panel.cxx (52d13b84) Panel.cxx (7e429a12)
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

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

21
22#include "precompiled_sfx2.hxx"
23
24#include "Panel.hxx"
25#include "PanelTitleBar.hxx"
26#include "PanelDescriptor.hxx"
27#include "sfx2/sidebar/Theme.hxx"
28#include "Paint.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

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

21
22#include "precompiled_sfx2.hxx"
23
24#include "Panel.hxx"
25#include "PanelTitleBar.hxx"
26#include "PanelDescriptor.hxx"
27#include "sfx2/sidebar/Theme.hxx"
28#include "Paint.hxx"
29#include "ResourceManager.hxx"
29
30#ifdef DEBUG
31#include "sfx2/sidebar/Tools.hxx"
32#include "Deck.hxx"
33#endif
34
35#include <tools/svborder.hxx>
36#include <toolkit/helper/vclunohelper.hxx>

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

47
48
49
50namespace sfx2 { namespace sidebar {
51
52Panel::Panel (
53 const PanelDescriptor& rPanelDescriptor,
54 Window* pParentWindow,
30
31#ifdef DEBUG
32#include "sfx2/sidebar/Tools.hxx"
33#include "Deck.hxx"
34#endif
35
36#include <tools/svborder.hxx>
37#include <toolkit/helper/vclunohelper.hxx>

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

48
49
50
51namespace sfx2 { namespace sidebar {
52
53Panel::Panel (
54 const PanelDescriptor& rPanelDescriptor,
55 Window* pParentWindow,
55 const ::boost::function<void(void)>& rDeckLayoutTrigger)
56 const bool bIsInitiallyExpanded,
57 const ::boost::function<void(void)>& rDeckLayoutTrigger,
58 const ::boost::function<Context(void)>& rContextAccess)
56 : Window(pParentWindow),
57 msPanelId(rPanelDescriptor.msId),
58 mpTitleBar(new PanelTitleBar(
59 rPanelDescriptor.msTitle,
60 pParentWindow,
61 this)),
62 mbIsTitleBarOptional(rPanelDescriptor.mbIsTitleBarOptional),
63 mxElement(),
64 mxPanelComponent(),
59 : Window(pParentWindow),
60 msPanelId(rPanelDescriptor.msId),
61 mpTitleBar(new PanelTitleBar(
62 rPanelDescriptor.msTitle,
63 pParentWindow,
64 this)),
65 mbIsTitleBarOptional(rPanelDescriptor.mbIsTitleBarOptional),
66 mxElement(),
67 mxPanelComponent(),
65 mbIsExpanded(true),
66 maDeckLayoutTrigger(rDeckLayoutTrigger)
68 mbIsExpanded(bIsInitiallyExpanded),
69 maDeckLayoutTrigger(rDeckLayoutTrigger),
70 maContextAccess(rContextAccess)
67{
68 SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper());
69
70#ifdef DEBUG
71 SetText(A2S("Panel"));
72#endif
73}
74

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

153
154
155void Panel::SetExpanded (const bool bIsExpanded)
156{
157 if (mbIsExpanded != bIsExpanded)
158 {
159 mbIsExpanded = bIsExpanded;
160 maDeckLayoutTrigger();
71{
72 SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper());
73
74#ifdef DEBUG
75 SetText(A2S("Panel"));
76#endif
77}
78

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

157
158
159void Panel::SetExpanded (const bool bIsExpanded)
160{
161 if (mbIsExpanded != bIsExpanded)
162 {
163 mbIsExpanded = bIsExpanded;
164 maDeckLayoutTrigger();
165
166 if (maContextAccess)
167 ResourceManager::Instance().StorePanelExpansionState(
168 msPanelId,
169 bIsExpanded,
170 maContextAccess());
161 }
162}
163
164
165
166
167bool Panel::IsExpanded (void) const
168{

--- 111 unchanged lines hidden ---
171 }
172}
173
174
175
176
177bool Panel::IsExpanded (void) const
178{

--- 111 unchanged lines hidden ---