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 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_framework.hxx" 26 #include <uielement/statusbar.hxx> 27 28 //_________________________________________________________________________________________________________________ 29 // interface includes 30 //_________________________________________________________________________________________________________________ 31 32 //_________________________________________________________________________________________________________________ 33 // other includes 34 //_________________________________________________________________________________________________________________ 35 36 #include <vcl/svapp.hxx> 37 38 namespace framework 39 { 40 41 FrameworkStatusBar::FrameworkStatusBar( 42 Window* pParent, 43 WinBits nWinBits ) : 44 StatusBar( pParent, nWinBits ), 45 m_pMgr( NULL ), 46 m_bShow( sal_False ), 47 m_bLock( sal_False ) 48 { 49 // set optimal size 50 SetOutputSizePixel( CalcWindowSizePixel() ); 51 } 52 53 FrameworkStatusBar::~FrameworkStatusBar() 54 { 55 } 56 57 void FrameworkStatusBar::SetStatusBarManager( StatusBarManager* pStatusBarManager ) 58 { 59 vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); 60 m_pMgr = pStatusBarManager; 61 } 62 63 void FrameworkStatusBar::UserDraw(const UserDrawEvent& rUDEvt) 64 { 65 if ( m_pMgr ) 66 m_pMgr->UserDraw( rUDEvt ); 67 } 68 69 void FrameworkStatusBar::Command( const CommandEvent& rEvt ) 70 { 71 if ( m_pMgr ) 72 m_pMgr->Command( rEvt ); 73 } 74 75 void FrameworkStatusBar::StateChanged( StateChangedType nType ) 76 { 77 if ( m_pMgr ) 78 m_pMgr->StateChanged( nType ); 79 } 80 81 void FrameworkStatusBar::DataChanged( const DataChangedEvent& rDCEvt ) 82 { 83 StatusBar::DataChanged( rDCEvt ); 84 if ( m_pMgr ) 85 m_pMgr->DataChanged( rDCEvt ); 86 } 87 88 void FrameworkStatusBar::MouseMove( const MouseEvent& rMEvt ) 89 { 90 StatusBar::MouseMove( rMEvt ); 91 if ( m_pMgr ) 92 m_pMgr->MouseMove( rMEvt ); 93 } 94 95 void FrameworkStatusBar::MouseButtonDown( const MouseEvent& rMEvt ) 96 { 97 StatusBar::MouseButtonDown( rMEvt ); 98 if ( m_pMgr ) 99 m_pMgr->MouseButtonDown( rMEvt ); 100 } 101 102 void FrameworkStatusBar::MouseButtonUp( const MouseEvent& rMEvt ) 103 { 104 StatusBar::MouseButtonUp( rMEvt ); 105 if ( m_pMgr ) 106 m_pMgr->MouseButtonUp( rMEvt ); 107 } 108 109 } 110