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_TABLEWINDOWLISTBOX_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_TABLEWINDOWLISTBOX_HXX
22 #include <svtools/treelistbox.hxx>
23 #include "callbacks.hxx"
25 struct AcceptDropEvent
;
26 struct ExecuteDropEvent
;
29 class OTableWindowListBox
;
30 struct OJoinExchangeData
33 VclPtr
<OTableWindowListBox
> pListBox
; // the ListBox inside the same (you can get the TabWin and the WinName out of it)
34 SvTreeListEntry
* pEntry
; // the entry, which was dragged or to which was dropped on
36 OJoinExchangeData(OTableWindowListBox
* pBox
);
37 OJoinExchangeData() : pListBox(nullptr), pEntry(nullptr) { }
41 OJoinExchangeData aSource
;
42 OJoinExchangeData aDest
;
46 class OTableWindowListBox
48 ,public IDragTransferableListener
50 DECL_LINK_TYPED( OnDoubleClick
, SvTreeListBox
*, bool );
51 DECL_LINK_TYPED( ScrollUpHdl
, Timer
*, void );
52 DECL_LINK_TYPED( ScrollDownHdl
, Timer
*, void );
53 DECL_LINK_TYPED( DropHdl
, void*, void );
54 DECL_LINK_TYPED( LookForUiHdl
, void*, void );
59 VclPtr
<OTableWindow
> m_pTabWin
;
60 ImplSVEvent
* m_nDropEvent
;
61 ImplSVEvent
* m_nUiEvent
;
62 OJoinDropData m_aDropInfo
;
64 bool m_bReallyScrolled
: 1;
67 virtual void LoseFocus() override
;
68 virtual void GetFocus() override
;
69 virtual void NotifyScrolled() override
;
70 virtual void NotifyEndScroll() override
;
72 virtual bool PreNotify(NotifyEvent
& rNEvt
) override
;
74 virtual void dragFinished( ) override
;
78 OTableWindowListBox(OTableWindow
* pParent
);
79 virtual ~OTableWindowListBox();
80 virtual void dispose() override
;
83 virtual void StartDrag( sal_Int8 nAction
, const Point
& rPosPixel
) override
;
84 virtual sal_Int8
AcceptDrop( const AcceptDropEvent
& rEvt
) override
;
85 virtual sal_Int8
ExecuteDrop( const ExecuteDropEvent
& rEvt
) override
;
88 virtual void Command(const CommandEvent
& rEvt
) override
;
90 OTableWindow
* GetTabWin(){ return m_pTabWin
; }
91 SvTreeListEntry
* GetEntryFromText( const OUString
& rEntryText
);
94 using SvTreeListBox::ExecuteDrop
;
97 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_TABLEWINDOWLISTBOX_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */