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 27 //_________________________________________________________________________________________________________________ 28 // my own includes 29 //_________________________________________________________________________________________________________________ 30 #include <uielement/toolbar.hxx> 31 #include <uielement/toolbarmanager.hxx> 32 #include <rtl/logfile.hxx> 33 34 namespace framework 35 { 36 ToolBar(Window * pParent,WinBits nWinBits)37ToolBar::ToolBar( Window* pParent, WinBits nWinBits ) : 38 ToolBox( pParent, nWinBits ) 39 , m_pToolBarManager( 0 ) 40 { 41 } 42 ~ToolBar()43ToolBar::~ToolBar() 44 { 45 } 46 SetToolBarManager(ToolBarManager * pTbMgr)47void ToolBar::SetToolBarManager( ToolBarManager* pTbMgr ) 48 { 49 m_pToolBarManager = pTbMgr; 50 } 51 Command(const CommandEvent & rCEvt)52void ToolBar::Command( const CommandEvent& rCEvt ) 53 { 54 if ( m_aCommandHandler.IsSet() ) 55 m_aCommandHandler.Call( (void *)( &rCEvt )); 56 ToolBox::Command( rCEvt ); 57 } 58 StateChanged(StateChangedType nType)59void ToolBar::StateChanged( StateChangedType nType ) 60 { 61 ToolBox::StateChanged( nType ); 62 if ( m_aStateChangedHandler.IsSet() ) 63 m_aStateChangedHandler.Call( &nType ); 64 } 65 DataChanged(const DataChangedEvent & rDCEvt)66void ToolBar::DataChanged( const DataChangedEvent& rDCEvt ) 67 { 68 ToolBox::DataChanged( rDCEvt ); 69 if ( m_aDataChangedHandler.IsSet() ) 70 m_aDataChangedHandler.Call( (void*)&rDCEvt ); 71 } 72 73 } 74