Bump for 3.6-28
[LibreOffice.git] / extensions / source / propctrlr / browserpage.cxx
blobd1713c39c3e716b10da39a88da0711d221a674d7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include "browserpage.hxx"
31 //............................................................................
32 namespace pcr
34 //............................................................................
36 #define LAYOUT_BORDER_LEFT 3
37 #define LAYOUT_BORDER_TOP 3
38 #define LAYOUT_BORDER_RIGHT 3
39 #define LAYOUT_BORDER_BOTTOM 3
41 //==================================================================
42 // class OBrowserPage
43 //==================================================================
44 //------------------------------------------------------------------
45 OBrowserPage::OBrowserPage(Window* pParent,WinBits nWinStyle)
46 :TabPage(pParent,nWinStyle)
47 ,m_aListBox(this)
49 m_aListBox.SetBackground(GetBackground());
50 m_aListBox.SetPaintTransparent( sal_True );
51 m_aListBox.Show();
54 //------------------------------------------------------------------
55 OBrowserPage::~OBrowserPage()
59 //------------------------------------------------------------------
60 void OBrowserPage::Resize()
62 Size aSize( GetOutputSizePixel() );
63 aSize.Width() -= LAYOUT_BORDER_LEFT + LAYOUT_BORDER_RIGHT;
64 aSize.Height() -= LAYOUT_BORDER_TOP + LAYOUT_BORDER_BOTTOM;
65 m_aListBox.SetPosSizePixel( Point( LAYOUT_BORDER_LEFT, LAYOUT_BORDER_TOP ), aSize );
68 //------------------------------------------------------------------
69 OBrowserListBox& OBrowserPage::getListBox()
71 return m_aListBox;
74 //------------------------------------------------------------------
75 const OBrowserListBox& OBrowserPage::getListBox() const
77 return m_aListBox;
80 //------------------------------------------------------------------
81 void OBrowserPage::StateChanged(StateChangedType nType)
83 Window::StateChanged( nType);
84 if (STATE_CHANGE_VISIBLE == nType)
85 m_aListBox.ActivateListBox(IsVisible());
88 //------------------------------------------------------------------
89 sal_Int32 OBrowserPage::getMinimumWidth()
91 return m_aListBox.GetMinimumWidth() + LAYOUT_BORDER_LEFT + LAYOUT_BORDER_RIGHT;
94 //------------------------------------------------------------------
95 sal_Int32 OBrowserPage::getMinimumHeight()
97 return m_aListBox.GetMinimumHeight() + LAYOUT_BORDER_TOP + LAYOUT_BORDER_BOTTOM;
100 //............................................................................
101 } // namespace pcr
102 //............................................................................
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */