1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONCONTROL_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONCONTROL_HXX
22 #include <vcl/fixed.hxx>
23 #include <vcl/builder.hxx>
24 #include <vcl/lstbox.hxx>
25 #include "JoinTableView.hxx"
29 class OTableListBoxControl
;
30 class IRelationControlInterface
;
31 class ORelationControl
;
33 class OTableListBoxControl
35 VclPtr
<ListBox
> m_pLeftTable
;
36 VclPtr
<ListBox
> m_pRightTable
;
38 VclPtr
<ORelationControl
> m_pRC_Tables
;
39 const OJoinTableView::OTableWindowMap
* m_pTableMap
;
40 IRelationControlInterface
* m_pParentDialog
;
41 OUString m_strCurrentLeft
;
42 OUString m_strCurrentRight
;
44 DECL_LINK_TYPED( OnTableChanged
, ListBox
&, void );
46 OTableListBoxControl(VclBuilderContainer
* _pParent
,
47 const OJoinTableView::OTableWindowMap
* _pTableMap
,
48 IRelationControlInterface
* _pParentDialog
);
49 virtual ~OTableListBoxControl();
51 /** fillListBoxes fills the list boxes with the table windows
55 /** fillAndDisable fill the listboxes only with one entry and then disable them
56 @param _pConnectionData
57 contains the data which should be filled into the listboxes
59 void fillAndDisable(const TTableConnectionData::value_type
& _pConnectionData
);
61 /** enables the relation control
63 * \param _bEnable when sal_True enables it, otherwise disable it.
65 void enableRelation(bool _bEnable
);
67 /** NotifyCellChange notifies the browse control that the connection data has changed
69 void NotifyCellChange();
71 /** Init is a call through to the control inside this one
73 the connection data which is used to init the control
75 void Init(const TTableConnectionData::value_type
& _pConnData
);
84 TTableWindowData::value_type
getReferencingTable() const;
86 /** getContainer returns the container interface
87 @return the interface of the container
89 IRelationControlInterface
* getContainer() const { return m_pParentDialog
; }
92 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONCONTROL_HXX
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */