xref: /trunk/main/dbaccess/source/ui/app/AppTitleWindow.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
12e2212a7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
32e2212a7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
42e2212a7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
52e2212a7SAndrew Rist  * distributed with this work for additional information
62e2212a7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
72e2212a7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
82e2212a7SAndrew Rist  * "License"); you may not use this file except in compliance
92e2212a7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
112e2212a7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
132e2212a7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
142e2212a7SAndrew Rist  * software distributed under the License is distributed on an
152e2212a7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
162e2212a7SAndrew Rist  * KIND, either express or implied.  See the License for the
172e2212a7SAndrew Rist  * specific language governing permissions and limitations
182e2212a7SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
202e2212a7SAndrew Rist  *************************************************************/
212e2212a7SAndrew Rist 
222e2212a7SAndrew Rist 
23cdf0e10cSrcweir #ifndef DBAUI_TITLE_WINDOW_HXX
24cdf0e10cSrcweir #define DBAUI_TITLE_WINDOW_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #ifndef _SV_FIXED_HXX
27cdf0e10cSrcweir #include <vcl/fixed.hxx>
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir 
30cdf0e10cSrcweir namespace dbaui
31cdf0e10cSrcweir {
32cdf0e10cSrcweir     class OTitleWindow : public Window
33cdf0e10cSrcweir     {
34cdf0e10cSrcweir         FixedText   m_aSpace1;
35cdf0e10cSrcweir         FixedText   m_aSpace2;
36cdf0e10cSrcweir         FixedText   m_aTitle;
37cdf0e10cSrcweir         Window*     m_pChild;
38cdf0e10cSrcweir         sal_Bool        m_bShift;
39cdf0e10cSrcweir         void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
40cdf0e10cSrcweir     protected:
41cdf0e10cSrcweir         virtual void DataChanged(const DataChangedEvent& rDCEvt);
42cdf0e10cSrcweir     public:
43cdf0e10cSrcweir         OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,sal_Bool _bShift = sal_True);
44cdf0e10cSrcweir         virtual ~OTitleWindow();
45cdf0e10cSrcweir 
46cdf0e10cSrcweir         // window overloads
47cdf0e10cSrcweir         virtual void Resize();
48cdf0e10cSrcweir         virtual void GetFocus();
49cdf0e10cSrcweir 
50cdf0e10cSrcweir         /** sets the child window which should be displayed below the title. It will be destroyed at the end.
51cdf0e10cSrcweir             @param  _pChild
52cdf0e10cSrcweir                 The child window.
53cdf0e10cSrcweir         */
54cdf0e10cSrcweir         void setChildWindow(Window* _pChild);
55cdf0e10cSrcweir 
56cdf0e10cSrcweir         /** gets the child window.
57cdf0e10cSrcweir 
58cdf0e10cSrcweir             @return
59*80b7adedSJohn Bampton                 The child window.
60cdf0e10cSrcweir         */
getChildWindow() const61cdf0e10cSrcweir         inline Window* getChildWindow() const { return m_pChild; }
62cdf0e10cSrcweir 
63cdf0e10cSrcweir         /** sets the title text out of the resource
64cdf0e10cSrcweir             @param  _nTitleId
65cdf0e10cSrcweir                 The resource id of the title text.
66cdf0e10cSrcweir         */
67cdf0e10cSrcweir         void setTitle(sal_uInt16 _nTitleId);
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 
70cdf0e10cSrcweir         /** Gets the min Width in Pixel which is needed to display the whole
71cdf0e10cSrcweir 
72cdf0e10cSrcweir             @return
73cdf0e10cSrcweir                 the min width
74cdf0e10cSrcweir         */
75cdf0e10cSrcweir         long GetWidthPixel() const;
76cdf0e10cSrcweir     };
77cdf0e10cSrcweir // .............................................................
78cdf0e10cSrcweir } // namespace dbaui
79cdf0e10cSrcweir // .............................................................
80cdf0e10cSrcweir #endif // DBAUI_TITLE_WINDOW_HXX
81