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_SVX_SOURCE_INC_TABWIN_HXX
20 #define INCLUDED_SVX_SOURCE_INC_TABWIN_HXX
22 #include <vcl/treelistbox.hxx>
23 #include <sfx2/basedlgs.hxx>
24 #include <sfx2/childwin.hxx>
25 #include <sfx2/ctrlitem.hxx>
26 #include <com/sun/star/form/XForm.hpp>
28 #include <comphelper/propmultiplex.hxx>
29 #include <vcl/transfer.hxx>
30 #include <connectivity/dbtools.hxx>
34 class FmFieldWinListBox
37 VclPtr
<FmFieldWin
> pTabWin
;
40 // virtual void Command( const CommandEvent& rEvt );
43 FmFieldWinListBox( FmFieldWin
* pParent
);
44 virtual ~FmFieldWinListBox() override
;
45 virtual void dispose() override
;
47 sal_Int8
AcceptDrop( const AcceptDropEvent
& rEvt
) override
;
48 sal_Int8
ExecuteDrop( const ExecuteDropEvent
& rEvt
) override
;
52 virtual void StartDrag( sal_Int8 nAction
, const Point
& rPosPixel
) override
;
55 virtual bool DoubleClickHdl() override
;
57 using SvTreeListBox::ExecuteDrop
;
64 class FmFieldWin
:public SfxFloatingWindow
65 ,public SfxControllerItem
66 ,public ::comphelper::OPropertyChangeListener
68 ::osl::Mutex m_aMutex
;
69 VclPtr
<FmFieldWinListBox
> pListBox
;
70 ::dbtools::SharedConnection
72 OUString m_aDatabaseName
,
74 sal_Int32 m_nObjectType
;
76 rtl::Reference
<::comphelper::OPropertyChangeMultiplexer
> m_pChangeListener
;
79 FmFieldWin(SfxBindings
*pBindings
,
80 SfxChildWindow
*pMgr
, vcl::Window
* pParent
);
82 virtual ~FmFieldWin() override
;
83 virtual void dispose() override
;
84 virtual void Resize() override
;
85 using SfxFloatingWindow::Close
;
86 virtual void GetFocus() override
;
87 virtual bool PreNotify( NotifyEvent
& _rNEvt
) override
;
88 virtual void StateChanged(sal_uInt16 nSID
, SfxItemState eState
,
89 const SfxPoolItem
* pState
) override
;
91 void UpdateContent(FmFormShell
const *);
92 void UpdateContent(const css::uno::Reference
< css::form::XForm
> &);
93 void FillInfo( SfxChildWinInfo
& rInfo
) const override
;
95 const OUString
& GetDatabaseName() const { return m_aDatabaseName
; }
96 const ::dbtools::SharedConnection
& GetConnection() const { return m_aConnection
; }
97 const OUString
& GetObjectName() const { return m_aObjectName
; }
98 sal_Int32
GetObjectType() const { return m_nObjectType
; }
100 bool createSelectionControls( );
104 virtual void _propertyChanged(const css::beans::PropertyChangeEvent
& evt
) override
;
107 using SfxControllerItem::GetBindings
;
108 using SfxFloatingWindow::StateChanged
;
112 class FmFieldWinMgr
: public SfxChildWindow
115 FmFieldWinMgr(vcl::Window
*pParent
, sal_uInt16 nId
,
116 SfxBindings
*pBindings
, SfxChildWinInfo
const *pInfo
);
117 SFX_DECL_CHILDWINDOW(FmFieldWinMgr
);
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */