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: TableWindowListBox.hxx,v $
10 * $Revision: 1.11.68.2 $
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_TABLEWINDOWLISTBOX_HXX
31 #define DBAUI_TABLEWINDOWLISTBOX_HXX
33 #include <svtools/svtreebx.hxx>
34 #include "callbacks.hxx"
36 struct AcceptDropEvent
;
37 struct ExecuteDropEvent
;
40 class OTableWindowListBox
;
41 struct OJoinExchangeData
44 OTableWindowListBox
* pListBox
; // die ListBox innerhalb desselben (daraus kann man sich das TabWin und daraus den WinName besorgen)
45 SvLBoxEntry
* pEntry
; // der Eintrag, der gedraggt oder auf den gedroppt wurde
47 OJoinExchangeData(OTableWindowListBox
* pBox
);
48 OJoinExchangeData() : pListBox(NULL
), pEntry(NULL
) { }
52 OJoinExchangeData aSource
;
53 OJoinExchangeData aDest
;
57 class OTableWindowListBox
59 ,public IDragTransferableListener
61 DECL_LINK( OnDoubleClick
, SvTreeListBox
* );
62 DECL_LINK( ScrollUpHdl
, SvTreeListBox
* );
63 DECL_LINK( ScrollDownHdl
, SvTreeListBox
* );
64 DECL_LINK( DropHdl
, void* );
65 DECL_LINK( LookForUiHdl
, void* );
70 OTableWindow
* m_pTabWin
;
73 OJoinDropData m_aDropInfo
;
75 BOOL m_bReallyScrolled
: 1;
76 BOOL m_bDragSource
: 1;
79 virtual void LoseFocus();
80 virtual void GetFocus();
81 virtual void NotifyScrolled();
82 virtual void NotifyEndScroll();
84 virtual long PreNotify(NotifyEvent
& rNEvt
);
86 virtual void dragFinished( );
91 OTableWindowListBox(OTableWindow
* pParent
);
92 virtual ~OTableWindowListBox();
95 virtual void StartDrag( sal_Int8 nAction
, const Point
& rPosPixel
);
96 virtual sal_Int8
AcceptDrop( const AcceptDropEvent
& rEvt
);
97 virtual sal_Int8
ExecuteDrop( const ExecuteDropEvent
& rEvt
);
100 virtual void Command(const CommandEvent
& rEvt
);
102 OTableWindow
* GetTabWin(){ return m_pTabWin
; }
103 SvLBoxEntry
* GetEntryFromText( const String
& rEntryText
);
106 using SvTreeListBox::ExecuteDrop
;
109 #endif // DBAUI_TABLEWINDOWLISTBOX_HXX