Bump version to 6.4-15
[LibreOffice.git] / svx / source / inc / tabwin.hxx
blob9645ff5a134349074733a1ecb15cd274373a4c05
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
33 class FmFieldWin;
34 class FmFieldWinListBox
35 :public SvTreeListBox
37 VclPtr<FmFieldWin> pTabWin;
39 protected:
40 // virtual void Command( const CommandEvent& rEvt );
42 public:
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;
50 protected:
51 // DragSourceHelper
52 virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
54 // SvTreeListBox
55 virtual bool DoubleClickHdl() override;
57 using SvTreeListBox::ExecuteDrop;
61 class FmFormShell;
64 class FmFieldWin :public SfxFloatingWindow
65 ,public SfxControllerItem
66 ,public ::comphelper::OPropertyChangeListener
68 ::osl::Mutex m_aMutex;
69 VclPtr<FmFieldWinListBox> pListBox;
70 ::dbtools::SharedConnection
71 m_aConnection;
72 OUString m_aDatabaseName,
73 m_aObjectName;
74 sal_Int32 m_nObjectType;
76 rtl::Reference<::comphelper::OPropertyChangeMultiplexer> m_pChangeListener;
78 public:
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( );
102 protected:
103 // FmXChangeListener
104 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
106 protected:
107 using SfxControllerItem::GetBindings;
108 using SfxFloatingWindow::StateChanged;
112 class FmFieldWinMgr : public SfxChildWindow
114 public:
115 FmFieldWinMgr(vcl::Window *pParent, sal_uInt16 nId,
116 SfxBindings *pBindings, SfxChildWinInfo const *pInfo);
117 SFX_DECL_CHILDWINDOW(FmFieldWinMgr);
121 #endif
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */