1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: RelationControl.hxx,v $
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 ************************************************************************/
30 #ifndef DBAUI_RELATIONCONTROL_HXX
31 #define DBAUI_RELATIONCONTROL_HXX
33 #ifndef _FIXED_HXX //autogen
34 #include <vcl/fixed.hxx>
36 #ifndef _SV_LSTBOX_HXX //autogen
37 #include <vcl/lstbox.hxx>
39 #ifndef DBAUI_JOINTABLEVIEW_HXX
40 #include "JoinTableView.hxx"
45 //========================================================================
46 class OTableListBoxControl
;
47 class OTableConnectionData
;
48 class ORelationTableConnectionData
;
49 class IRelationControlInterface
;
50 class ORelationControl
;
52 class OTableListBoxControl
: public Window
54 FixedLine m_aFL_InvolvedTables
;
55 ListBox m_lmbLeftTable
,
57 FixedLine m_aFL_InvolvedFields
;
59 ORelationControl
* m_pRC_Tables
;
60 const OJoinTableView::OTableWindowMap
* m_pTableMap
;
61 IRelationControlInterface
* m_pParentDialog
;
62 String m_strCurrentLeft
;
63 String m_strCurrentRight
;
65 DECL_LINK( OnTableChanged
, ListBox
* );
67 OTableListBoxControl(Window
* _pParent
,
69 const OJoinTableView::OTableWindowMap
* _pTableMap
,
70 IRelationControlInterface
* _pParentDialog
);
71 virtual ~OTableListBoxControl();
73 /** fillListBoxes fills the list boxes with the table windows
77 /** fillAndDisable fill the listboxes only with one entry and then disable them
78 @param _pConnectionData
79 contains the data which should be filled into the listboxes
81 void fillAndDisable(const TTableConnectionData::value_type
& _pConnectionData
);
83 /** enables the relation control
85 * \param _bEnable when TRUE enables it, otherwise disable it.
87 void enableRelation(bool _bEnable
);
89 /** NotifyCellChange notifies the browse control that the conenction data has changed
91 void NotifyCellChange();
93 /** Init is a call through to the control inside this one
95 the connection data which is used to init the control
97 void Init(const TTableConnectionData::value_type
& _pConnData
);
98 void lateUIInit(Window
* _pTableSeparator
= NULL
);
103 TTableWindowData::value_type
getReferencingTable() const;
105 /** getContainer returns the container interface
106 @return the interface of the container
108 IRelationControlInterface
* getContainer() const { return m_pParentDialog
; }
111 #endif // DBAUI_RELATIONCONTROL_HXX