xref: /aoo41x/main/sw/source/ui/inc/glosbib.hxx (revision 1d2dbeb0)
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 _GLOSBIB_HXX
25 #define _GLOSBIB_HXX
26 
27 #ifndef _EDIT_HXX //autogen
28 #include <vcl/edit.hxx>
29 #endif
30 #include <svx/stddlg.hxx>
31 
32 #ifndef _LSTBOX_HXX //autogen
33 #include <vcl/lstbox.hxx>
34 #endif
35 #include <svtools/svtabbx.hxx>
36 
37 #ifndef _BUTTON_HXX //autogen
38 #include <vcl/button.hxx>
39 #endif
40 #include <vcl/fixed.hxx>
41 
42 class SwGlossaryHdl;
43 class SvStrings;
44 
45 class FEdit : public Edit
46 {
47 	public:
FEdit(Window * pParent,const ResId & rResId)48 		FEdit(Window * pParent, const ResId& rResId) :
49 			Edit(pParent, rResId){}
50 
51 	virtual void KeyInput( const KeyEvent& rKEvent );
52 };
53 /* -----------------------------08.02.00 15:04--------------------------------
54 
55  ---------------------------------------------------------------------------*/
56 struct GlosBibUserData
57 {
58 	String sPath;
59 	String sGroupName;
60 	String sGroupTitle;
61 };
62 class SwGlossaryGroupTLB : public SvTabListBox
63 {
64 public:
SwGlossaryGroupTLB(Window * pParent,const ResId & rResId)65 	SwGlossaryGroupTLB(Window* pParent, const ResId& rResId) :
66 		SvTabListBox(pParent, rResId) {}
67 
68 	virtual void 	RequestHelp( const HelpEvent& rHEvt );
69 };
70 
71 class SwGlossaryGroupDlg : public SvxStandardDialog
72 {
73 	FixedText			aBibFT;
74 	FEdit 				aNameED;
75 	FixedText			aPathFT;
76 	ListBox				aPathLB;
77 	FixedText			aSelectFT;
78 	SwGlossaryGroupTLB 	aGroupTLB;
79 
80 	OKButton 		aOkPB;
81 	CancelButton 	aCancelPB;
82 	HelpButton		aHelpPB;
83 	PushButton		aNewPB;
84 	PushButton		aDelPB;
85 	PushButton		aRenamePB;
86 
87 	SvStrings*		pRemovedArr;
88 	SvStrings*		pInsertedArr;
89 	SvStrings*		pRenamedArr;
90 
91 	SwGlossaryHdl 	*pGlosHdl;
92 
93 	String 			sCreatedGroup;
94 
95 	sal_Bool			IsDeleteAllowed(const String &rGroup);
96 
97 protected:
98 	virtual void Apply();
99 	DECL_LINK( SelectHdl, SvTabListBox* );
100 	DECL_LINK( NewHdl, Button* );
101 	DECL_LINK( DeleteHdl, Button*  );
102 	DECL_LINK( ModifyHdl, Edit* );
103 	DECL_LINK( RenameHdl, Button*  );
104 
105 public:
106 	SwGlossaryGroupDlg(Window * pParent,
107 						const SvStrings* pPathArr,
108 						SwGlossaryHdl *pGlosHdl);
109 	~SwGlossaryGroupDlg();
110 
GetCreatedGroupName() const111 	const String&		GetCreatedGroupName() const {return sCreatedGroup;}
112 };
113 
114 
115 #endif
116 
117