1*5900e8ecSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*5900e8ecSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*5900e8ecSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*5900e8ecSAndrew Rist * distributed with this work for additional information 6*5900e8ecSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*5900e8ecSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*5900e8ecSAndrew Rist * "License"); you may not use this file except in compliance 9*5900e8ecSAndrew Rist * with the License. You may obtain a copy of the License at 10*5900e8ecSAndrew Rist * 11*5900e8ecSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*5900e8ecSAndrew Rist * 13*5900e8ecSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*5900e8ecSAndrew Rist * software distributed under the License is distributed on an 15*5900e8ecSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*5900e8ecSAndrew Rist * KIND, either express or implied. See the License for the 17*5900e8ecSAndrew Rist * specific language governing permissions and limitations 18*5900e8ecSAndrew Rist * under the License. 19*5900e8ecSAndrew Rist * 20*5900e8ecSAndrew Rist *************************************************************/ 21*5900e8ecSAndrew Rist 22*5900e8ecSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_svtools.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir // ======================================================================= 30cdf0e10cSrcweir 31cdf0e10cSrcweir FixedInfo::FixedInfo( Window* pParent, WinBits nWinStyle ) : 32cdf0e10cSrcweir FixedText( pParent, nWinStyle | WB_INFO ) 33cdf0e10cSrcweir { 34cdf0e10cSrcweir } 35cdf0e10cSrcweir 36cdf0e10cSrcweir // ----------------------------------------------------------------------- 37cdf0e10cSrcweir 38cdf0e10cSrcweir FixedInfo::FixedInfo( Window* pParent, const ResId& rResId ) : 39cdf0e10cSrcweir FixedText( pParent, rResId ) 40cdf0e10cSrcweir { 41cdf0e10cSrcweir SetStyle( GetStyle() | WB_INFO ); 42cdf0e10cSrcweir } 43cdf0e10cSrcweir 44cdf0e10cSrcweir namespace svt 45cdf0e10cSrcweir { 46cdf0e10cSrcweir // class svt::SelectableFixedText ---------------------------------------- 47cdf0e10cSrcweir 48cdf0e10cSrcweir SelectableFixedText::SelectableFixedText( Window* pParent, WinBits nWinStyle ) : 49cdf0e10cSrcweir Edit( pParent, nWinStyle ) 50cdf0e10cSrcweir { 51cdf0e10cSrcweir Init(); 52cdf0e10cSrcweir } 53cdf0e10cSrcweir 54cdf0e10cSrcweir // ----------------------------------------------------------------------- 55cdf0e10cSrcweir 56cdf0e10cSrcweir SelectableFixedText::SelectableFixedText( Window* pParent, const ResId& rResId ) : 57cdf0e10cSrcweir Edit( pParent, rResId ) 58cdf0e10cSrcweir { 59cdf0e10cSrcweir Init(); 60cdf0e10cSrcweir } 61cdf0e10cSrcweir 62cdf0e10cSrcweir // ----------------------------------------------------------------------- 63cdf0e10cSrcweir 64cdf0e10cSrcweir SelectableFixedText::~SelectableFixedText() 65cdf0e10cSrcweir { 66cdf0e10cSrcweir } 67cdf0e10cSrcweir 68cdf0e10cSrcweir // ----------------------------------------------------------------------- 69cdf0e10cSrcweir 70cdf0e10cSrcweir void SelectableFixedText::Init() 71cdf0e10cSrcweir { 72cdf0e10cSrcweir // no border 73cdf0e10cSrcweir SetBorderStyle( WINDOW_BORDER_NOBORDER ); 74cdf0e10cSrcweir // read-only 75cdf0e10cSrcweir SetReadOnly(); 76cdf0e10cSrcweir // make it transparent 77cdf0e10cSrcweir SetControlBackground(); 78cdf0e10cSrcweir SetBackground(); 79cdf0e10cSrcweir SetPaintTransparent( sal_True ); 80cdf0e10cSrcweir } 81cdf0e10cSrcweir 82cdf0e10cSrcweir // ----------------------------------------------------------------------- 83cdf0e10cSrcweir 84cdf0e10cSrcweir void SelectableFixedText::LoseFocus() 85cdf0e10cSrcweir { 86cdf0e10cSrcweir Edit::LoseFocus(); 87cdf0e10cSrcweir // clear cursor 88cdf0e10cSrcweir Invalidate(); 89cdf0e10cSrcweir } 90cdf0e10cSrcweir 91cdf0e10cSrcweir } // namespace svt 92cdf0e10cSrcweir 93