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 #ifndef _SVX_LBOXCTRL_HXX_ 25 #define _SVX_LBOXCTRL_HXX_ 26 27 #include <sfx2/tbxctrl.hxx> 28 #include <rtl/ustring.hxx> 29 #include <vector> 30 #include "svx/svxdllapi.h" 31 32 class ToolBox; 33 class SvxPopupWindowListBox; 34 35 ///////////////////////////////////////////////////////////////// 36 37 class SvxListBoxControl : public SfxToolBoxControl 38 { 39 protected: 40 String aActionStr; 41 SvxPopupWindowListBox * pPopupWin; 42 43 void Impl_SetInfo( sal_uInt16 nCount ); 44 45 DECL_LINK( PopupModeEndHdl, void * ); 46 DECL_LINK( SelectHdl, void * ); 47 48 public: 49 SFX_DECL_TOOLBOX_CONTROL(); 50 51 SvxListBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 52 virtual ~SvxListBoxControl(); 53 54 virtual SfxPopupWindowType GetPopupWindowType() const; 55 virtual SfxPopupWindow* CreatePopupWindow(); 56 virtual void StateChanged( sal_uInt16 nSID, 57 SfxItemState eState, 58 const SfxPoolItem* pState ); 59 }; 60 61 ///////////////////////////////////////////////////////////////// 62 63 class SVX_DLLPUBLIC SvxUndoRedoControl : public SvxListBoxControl 64 { 65 std::vector< ::rtl::OUString > aUndoRedoList; 66 ::rtl::OUString aDefaultText; 67 68 public: 69 SFX_DECL_TOOLBOX_CONTROL(); 70 71 SvxUndoRedoControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 72 73 virtual ~SvxUndoRedoControl(); 74 virtual void StateChanged( sal_uInt16 nSID, 75 SfxItemState eState, 76 const SfxPoolItem* pState ); 77 78 virtual SfxPopupWindow* CreatePopupWindow(); 79 }; 80 81 #endif 82 83