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