15d39f272SZheng Fan /**************************************************************
25d39f272SZheng Fan *
35d39f272SZheng Fan * Licensed to the Apache Software Foundation (ASF) under one
45d39f272SZheng Fan * or more contributor license agreements. See the NOTICE file
55d39f272SZheng Fan * distributed with this work for additional information
65d39f272SZheng Fan * regarding copyright ownership. The ASF licenses this file
75d39f272SZheng Fan * to you under the Apache License, Version 2.0 (the
85d39f272SZheng Fan * "License"); you may not use this file except in compliance
95d39f272SZheng Fan * with the License. You may obtain a copy of the License at
105d39f272SZheng Fan *
115d39f272SZheng Fan * http://www.apache.org/licenses/LICENSE-2.0
125d39f272SZheng Fan *
135d39f272SZheng Fan * Unless required by applicable law or agreed to in writing,
145d39f272SZheng Fan * software distributed under the License is distributed on an
155d39f272SZheng Fan * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
165d39f272SZheng Fan * KIND, either express or implied. See the License for the
175d39f272SZheng Fan * specific language governing permissions and limitations
185d39f272SZheng Fan * under the License.
195d39f272SZheng Fan *
205d39f272SZheng Fan *************************************************************/
215d39f272SZheng Fan
225d39f272SZheng Fan #include "precompiled_svx.hxx"
235d39f272SZheng Fan
245d39f272SZheng Fan #include "EmptyPanel.hxx"
25*da72173fSAndre Fischer #include "EmptyPanel.hrc"
26*da72173fSAndre Fischer #include "area/AreaPropertyPanel.hrc"
27*da72173fSAndre Fischer #include "svx/dialogs.hrc"
28*da72173fSAndre Fischer #include "svx/dialmgr.hxx"
29*da72173fSAndre Fischer
305d39f272SZheng Fan
315d39f272SZheng Fan namespace svx { namespace sidebar {
325d39f272SZheng Fan
33*da72173fSAndre Fischer namespace
34*da72173fSAndre Fischer {
35*da72173fSAndre Fischer class SidebarResource : public Resource
36*da72173fSAndre Fischer {
37*da72173fSAndre Fischer public:
SidebarResource(const ResId & rResId)38*da72173fSAndre Fischer SidebarResource (const ResId& rResId) : Resource(rResId) {}
~SidebarResource(void)39*da72173fSAndre Fischer ~SidebarResource (void) { FreeResource(); }
40*da72173fSAndre Fischer };
41*da72173fSAndre Fischer }
42*da72173fSAndre Fischer
43*da72173fSAndre Fischer
44*da72173fSAndre Fischer
45*da72173fSAndre Fischer
EmptyPanel(::Window * pParent)465d39f272SZheng Fan EmptyPanel::EmptyPanel (::Window* pParent)
47*da72173fSAndre Fischer : Control(pParent, SVX_RES(RID_SIDEBAR_EMPTY_PANEL)),
48*da72173fSAndre Fischer maMessageControl(this, SVX_RES(FT_MESSAGE))
495d39f272SZheng Fan {
505d39f272SZheng Fan maMessageControl.SetPosSizePixel(5,5, 250,15);
51*da72173fSAndre Fischer maMessageControl.SetStyle(WB_WORDBREAK);// | WB_NOMNEMONICS);
52*da72173fSAndre Fischer //maMessageControl.GetStyle()
53*da72173fSAndre Fischer // & ~(WB_NOMULTILINE | WB_PATHELLIPSIS)
54*da72173fSAndre Fischer // | WB_WORDBREAK | WB_NOMNEMONICS);
55*da72173fSAndre Fischer FreeResource();
56*da72173fSAndre Fischer
57*da72173fSAndre Fischer SetBackground(Wallpaper());
585d39f272SZheng Fan
595d39f272SZheng Fan maMessageControl.Show();
605d39f272SZheng Fan Show();
615d39f272SZheng Fan }
625d39f272SZheng Fan
635d39f272SZheng Fan
645d39f272SZheng Fan
655d39f272SZheng Fan
~EmptyPanel(void)665d39f272SZheng Fan EmptyPanel::~EmptyPanel (void)
675d39f272SZheng Fan {
685d39f272SZheng Fan }
695d39f272SZheng Fan
705d39f272SZheng Fan
715d39f272SZheng Fan
725d39f272SZheng Fan
Resize(void)73*da72173fSAndre Fischer void EmptyPanel::Resize (void)
74*da72173fSAndre Fischer {
75*da72173fSAndre Fischer const Size aSize (GetSizePixel());
76*da72173fSAndre Fischer maMessageControl.SetSizePixel(aSize);
77*da72173fSAndre Fischer }
78*da72173fSAndre Fischer
79*da72173fSAndre Fischer
805d39f272SZheng Fan } } // end of namespace ::svx::sidebar
81