2001-02-28 09:09:17 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 14:20:16 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2001-02-28 09:09:17 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2001-02-28 09:09:17 +00:00
|
|
|
*
|
2008-04-10 14:20:16 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2001-02-28 09:09:17 +00:00
|
|
|
*
|
2008-04-10 14:20:16 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2001-02-28 09:09:17 +00:00
|
|
|
*
|
2008-04-10 14:20:16 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2001-02-28 09:09:17 +00:00
|
|
|
*
|
2008-04-10 14:20:16 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2001-02-28 09:09:17 +00:00
|
|
|
*
|
2008-04-10 14:20:16 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2001-02-28 09:09:17 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
|
|
|
|
#define DBAUI_TABLEWINDOWLISTBOX_HXX
|
|
|
|
|
|
|
|
#include <svtools/svtreebx.hxx>
|
2001-03-30 12:06:46 +00:00
|
|
|
#include "callbacks.hxx"
|
|
|
|
|
|
|
|
struct AcceptDropEvent;
|
|
|
|
struct ExecuteDropEvent;
|
2001-02-28 09:09:17 +00:00
|
|
|
namespace dbaui
|
|
|
|
{
|
2001-10-11 07:38:14 +00:00
|
|
|
class OTableWindowListBox;
|
|
|
|
struct OJoinExchangeData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
OTableWindowListBox* pListBox; // die ListBox innerhalb desselben (daraus kann man sich das TabWin und daraus den WinName besorgen)
|
|
|
|
SvLBoxEntry* pEntry; // der Eintrag, der gedraggt oder auf den gedroppt wurde
|
|
|
|
|
|
|
|
OJoinExchangeData(OTableWindowListBox* pBox);
|
|
|
|
OJoinExchangeData() : pListBox(NULL), pEntry(NULL) { }
|
|
|
|
};
|
|
|
|
struct OJoinDropData
|
|
|
|
{
|
|
|
|
OJoinExchangeData aSource;
|
|
|
|
OJoinExchangeData aDest;
|
|
|
|
};
|
|
|
|
|
2001-02-28 09:09:17 +00:00
|
|
|
class OTableWindow;
|
2001-03-30 12:06:46 +00:00
|
|
|
class OTableWindowListBox
|
|
|
|
:public SvTreeListBox
|
|
|
|
,public IDragTransferableListener
|
2001-02-28 09:09:17 +00:00
|
|
|
{
|
2006-06-20 02:14:35 +00:00
|
|
|
DECL_LINK( OnDoubleClick, SvTreeListBox* );
|
2001-02-28 09:09:17 +00:00
|
|
|
DECL_LINK( ScrollUpHdl, SvTreeListBox* );
|
|
|
|
DECL_LINK( ScrollDownHdl, SvTreeListBox* );
|
2001-10-11 07:38:14 +00:00
|
|
|
DECL_LINK( DropHdl, void* );
|
2007-11-01 14:19:44 +00:00
|
|
|
DECL_LINK( LookForUiHdl, void* );
|
2001-02-28 09:09:17 +00:00
|
|
|
|
2003-03-19 16:57:12 +00:00
|
|
|
Timer m_aScrollTimer;
|
2001-07-09 05:56:49 +00:00
|
|
|
Point m_aMousePos;
|
2001-02-28 09:09:17 +00:00
|
|
|
|
2001-07-09 05:56:49 +00:00
|
|
|
OTableWindow* m_pTabWin;
|
2008-08-18 12:22:20 +00:00
|
|
|
ULONG m_nDropEvent;
|
|
|
|
ULONG m_nUiEvent;
|
2001-10-11 07:38:14 +00:00
|
|
|
OJoinDropData m_aDropInfo;
|
2001-02-28 09:09:17 +00:00
|
|
|
|
2001-07-09 05:56:49 +00:00
|
|
|
BOOL m_bReallyScrolled : 1;
|
|
|
|
BOOL m_bDragSource : 1;
|
2001-02-28 09:09:17 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void LoseFocus();
|
|
|
|
virtual void GetFocus();
|
|
|
|
virtual void NotifyScrolled();
|
|
|
|
virtual void NotifyEndScroll();
|
|
|
|
|
|
|
|
virtual long PreNotify(NotifyEvent& rNEvt);
|
|
|
|
|
2001-07-09 05:56:49 +00:00
|
|
|
virtual void dragFinished( );
|
|
|
|
|
2001-03-30 12:06:46 +00:00
|
|
|
|
2002-02-06 06:44:03 +00:00
|
|
|
|
2001-02-28 09:09:17 +00:00
|
|
|
public:
|
2006-06-20 02:14:35 +00:00
|
|
|
OTableWindowListBox(OTableWindow* pParent);
|
2001-02-28 09:09:17 +00:00
|
|
|
virtual ~OTableWindowListBox();
|
|
|
|
|
2001-03-30 12:06:46 +00:00
|
|
|
// DnD stuff
|
|
|
|
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
|
|
|
|
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
|
|
|
|
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
|
|
|
|
|
2002-02-06 06:44:03 +00:00
|
|
|
// window
|
|
|
|
virtual void Command(const CommandEvent& rEvt);
|
|
|
|
|
2001-02-28 09:09:17 +00:00
|
|
|
OTableWindow* GetTabWin(){ return m_pTabWin; }
|
|
|
|
SvLBoxEntry* GetEntryFromText( const String& rEntryText );
|
2001-10-11 07:38:14 +00:00
|
|
|
|
2006-06-20 02:14:35 +00:00
|
|
|
private:
|
|
|
|
using SvTreeListBox::ExecuteDrop;
|
2001-02-28 09:09:17 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // DBAUI_TABLEWINDOWLISTBOX_HXX
|
|
|
|
|
|
|
|
|
|
|
|
|