Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #include "EmptyPanel.hxx"
21 : #include "EmptyPanel.hrc"
22 : #include "area/AreaPropertyPanel.hrc"
23 : #include "svx/dialogs.hrc"
24 : #include "svx/dialmgr.hxx"
25 :
26 :
27 : namespace svx { namespace sidebar {
28 :
29 2617 : EmptyPanel::EmptyPanel (vcl::Window* pParent)
30 2617 : : Control(pParent, SVX_RES(RID_SIDEBAR_EMPTY_PANEL)),
31 2617 : maMessageControl(VclPtr<FixedText>::Create(this, SVX_RES(FT_MESSAGE)))
32 : {
33 2617 : maMessageControl->setPosSizePixel(5,5, 250,15);
34 2617 : maMessageControl->SetStyle(WB_WORDBREAK);// | WB_NOMNEMONICS);
35 : //maMessageControl.GetStyle()
36 : // & ~(WB_NOMULTILINE | WB_PATHELLIPSIS)
37 : // | WB_WORDBREAK | WB_NOMNEMONICS);
38 2617 : FreeResource();
39 :
40 2617 : SetBackground(Wallpaper());
41 :
42 2617 : maMessageControl->Show();
43 2617 : Show();
44 2617 : }
45 :
46 :
47 :
48 :
49 7851 : EmptyPanel::~EmptyPanel()
50 : {
51 2617 : disposeOnce();
52 5234 : }
53 :
54 2617 : void EmptyPanel::dispose()
55 : {
56 2617 : maMessageControl.disposeAndClear();
57 2617 : Control::dispose();
58 2617 : }
59 :
60 :
61 895 : void EmptyPanel::Resize()
62 : {
63 895 : const Size aSize (GetSizePixel());
64 895 : maMessageControl->SetSizePixel(aSize);
65 895 : }
66 :
67 :
68 390 : } } // end of namespace svx::sidebar
69 :
70 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|