Update ooo320-m1
[ooovba.git] / dbaccess / source / ui / dlg / dsselect.hxx
blob80a18a8b4c2b9c34329fbca66162bc797644baff
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dsselect.hxx,v $
10 * $Revision: 1.8.68.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DBAUI_DSSELECT_HXX_
32 #define _DBAUI_DSSELECT_HXX_
34 #include "dsntypes.hxx"
35 #include "odbcconfig.hxx"
36 #include "commontypes.hxx"
38 #include <vcl/dialog.hxx>
39 #include <vcl/lstbox.hxx>
40 #include <vcl/button.hxx>
41 #include <vcl/group.hxx>
42 #include <vcl/fixed.hxx>
43 #include <rtl/ustring.hxx>
45 #include <memory>
47 class SfxItemSet;
48 //.........................................................................
49 namespace dbaui
51 //.........................................................................
53 //=========================================================================
54 //= ODatasourceSelector
55 //=========================================================================
56 class ODatasourceSelectDialog : public ModalDialog
58 protected:
59 FixedText m_aDescription;
60 ListBox m_aDatasource;
61 OKButton m_aOk;
62 CancelButton m_aCancel;
63 HelpButton m_aHelp;
64 #ifdef HAVE_ODBC_ADMINISTRATION
65 PushButton m_aManageDatasources;
66 #endif
67 PushButton m_aCreateAdabasDB;
68 SfxItemSet* m_pOutputSet;
69 #ifdef HAVE_ODBC_ADMINISTRATION
70 ::std::auto_ptr< OOdbcManagement >
71 m_pODBCManagement;
72 #endif
74 public:
75 ODatasourceSelectDialog( Window* _pParent, const StringBag& _rDatasources, bool _bAdabas,SfxItemSet* _pOutputSet = NULL );
76 ~ODatasourceSelectDialog();
78 inline String GetSelected() const { return m_aDatasource.GetSelectEntry();}
79 void Select( const String& _rEntry ) { m_aDatasource.SelectEntry(_rEntry); }
81 virtual BOOL Close();
83 protected:
84 DECL_LINK( ListDblClickHdl, ListBox * );
85 #ifdef HAVE_ODBC_ADMINISTRATION
86 DECL_LINK( ManageClickHdl, PushButton * );
87 DECL_LINK( ManageProcessFinished, void* );
88 #endif
89 DECL_LINK( CreateDBClickHdl, PushButton * );
90 void fillListBox(const StringBag& _rDatasources);
93 //.........................................................................
94 } // namespace dbaui
95 //.........................................................................
97 #endif // _DBAUI_DSSELECT_HXX_