xref: /trunk/main/sw/source/ui/inc/glosbib.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _GLOSBIB_HXX
29 #define _GLOSBIB_HXX
30 
31 #ifndef _EDIT_HXX //autogen
32 #include <vcl/edit.hxx>
33 #endif
34 #include <svx/stddlg.hxx>
35 
36 #ifndef _LSTBOX_HXX //autogen
37 #include <vcl/lstbox.hxx>
38 #endif
39 #include <svtools/svtabbx.hxx>
40 
41 #ifndef _BUTTON_HXX //autogen
42 #include <vcl/button.hxx>
43 #endif
44 #include <vcl/fixed.hxx>
45 
46 class SwGlossaryHdl;
47 class SvStrings;
48 
49 class FEdit : public Edit
50 {
51     public:
52         FEdit(Window * pParent, const ResId& rResId) :
53             Edit(pParent, rResId){}
54 
55     virtual void KeyInput( const KeyEvent& rKEvent );
56 };
57 /* -----------------------------08.02.00 15:04--------------------------------
58 
59  ---------------------------------------------------------------------------*/
60 struct GlosBibUserData
61 {
62     String sPath;
63     String sGroupName;
64     String sGroupTitle;
65 };
66 class SwGlossaryGroupTLB : public SvTabListBox
67 {
68 public:
69     SwGlossaryGroupTLB(Window* pParent, const ResId& rResId) :
70         SvTabListBox(pParent, rResId) {}
71 
72     virtual void    RequestHelp( const HelpEvent& rHEvt );
73 };
74 
75 class SwGlossaryGroupDlg : public SvxStandardDialog
76 {
77     FixedText           aBibFT;
78     FEdit               aNameED;
79     FixedText           aPathFT;
80     ListBox             aPathLB;
81     FixedText           aSelectFT;
82     SwGlossaryGroupTLB  aGroupTLB;
83 
84     OKButton        aOkPB;
85     CancelButton    aCancelPB;
86     HelpButton      aHelpPB;
87     PushButton      aNewPB;
88     PushButton      aDelPB;
89     PushButton      aRenamePB;
90 
91     SvStrings*      pRemovedArr;
92     SvStrings*      pInsertedArr;
93     SvStrings*      pRenamedArr;
94 
95     SwGlossaryHdl   *pGlosHdl;
96 
97     String          sCreatedGroup;
98 
99     sal_Bool            IsDeleteAllowed(const String &rGroup);
100 
101 protected:
102     virtual void Apply();
103     DECL_LINK( SelectHdl, SvTabListBox* );
104     DECL_LINK( NewHdl, Button* );
105     DECL_LINK( DeleteHdl, Button*  );
106     DECL_LINK( ModifyHdl, Edit* );
107     DECL_LINK( RenameHdl, Button*  );
108 
109 public:
110     SwGlossaryGroupDlg(Window * pParent,
111                         const SvStrings* pPathArr,
112                         SwGlossaryHdl *pGlosHdl);
113     ~SwGlossaryGroupDlg();
114 
115     const String&       GetCreatedGroupName() const {return sCreatedGroup;}
116 };
117 
118 
119 #endif
120 
121