xref: /trunk/main/dbaccess/source/ui/app/AppTitleWindow.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef DBAUI_TITLE_WINDOW_HXX
28 #define DBAUI_TITLE_WINDOW_HXX
29 
30 #ifndef _SV_FIXED_HXX
31 #include <vcl/fixed.hxx>
32 #endif
33 
34 namespace dbaui
35 {
36     class OTitleWindow : public Window
37     {
38         FixedText   m_aSpace1;
39         FixedText   m_aSpace2;
40         FixedText   m_aTitle;
41         Window*     m_pChild;
42         sal_Bool        m_bShift;
43         void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
44     protected:
45         virtual void DataChanged(const DataChangedEvent& rDCEvt);
46     public:
47         OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,sal_Bool _bShift = sal_True);
48         virtual ~OTitleWindow();
49 
50         // window overloads
51         virtual void Resize();
52         virtual void GetFocus();
53 
54         /** sets the child window which should be displayed below the title. It will be destroyed at the end.
55             @param  _pChild
56                 The child window.
57         */
58         void setChildWindow(Window* _pChild);
59 
60         /** gets the child window.
61 
62             @return
63                 The child winodw.
64         */
65         inline Window* getChildWindow() const { return m_pChild; }
66 
67         /** sets the title text out of the resource
68             @param  _nTitleId
69                 The resource id of the title text.
70         */
71         void setTitle(sal_uInt16 _nTitleId);
72 
73 
74         /** Gets the min Width in Pixel which is needed to display the whole
75 
76             @return
77                 the min width
78         */
79         long GetWidthPixel() const;
80     };
81 // .............................................................
82 } // namespace dbaui
83 // .............................................................
84 #endif // DBAUI_TITLE_WINDOW_HXX
85 
86