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 #ifndef _BOOKMARK_HXX 23 #define _BOOKMARK_HXX 24 25 #include <svx/stddlg.hxx> 26 #include <vcl/fixed.hxx> 27 28 #ifndef _BUTTON_HXX // autogen 29 #include <vcl/button.hxx> 30 #endif 31 32 #include "swlbox.hxx" // SwComboBox 33 34 class SwWrtShell; 35 class SfxRequest; 36 37 class BookmarkCombo : public SwComboBox 38 { 39 sal_uInt16 GetFirstSelEntryPos() const; 40 sal_uInt16 GetNextSelEntryPos(sal_uInt16 nPos) const; 41 sal_uInt16 GetSelEntryPos(sal_uInt16 nPos) const; 42 43 virtual long PreNotify(NotifyEvent& rNEvt); 44 public: 45 BookmarkCombo( Window* pWin, const ResId& rResId ); 46 47 sal_uInt16 GetSelectEntryCount() const; 48 sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const; 49 50 static const String aForbiddenChars; 51 }; 52 53 54 class SwInsertBookmarkDlg: public SvxStandardDialog 55 { 56 FixedLine aBookmarkFl; 57 BookmarkCombo aBookmarkBox; 58 OKButton aOkBtn; 59 CancelButton aCancelBtn; 60 PushButton aDeleteBtn; 61 62 String sRemoveWarning; 63 SwWrtShell &rSh; 64 SfxRequest& rReq; 65 66 DECL_LINK( ModifyHdl, BookmarkCombo * ); 67 DECL_LINK( DeleteHdl, Button * ); 68 69 virtual void Apply(); 70 71 public: 72 SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq ); 73 ~SwInsertBookmarkDlg(); 74 }; 75 76 #endif 77 78 /* vim: set noet sw=4 ts=4: */ 79