Files
libreoffice/dbaccess/source/ui/inc/TableWindowListBox.hxx

110 lines
3.5 KiB
C++
Raw Normal View History

2001-02-28 09:09:17 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2001-02-28 09:09:17 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2001-02-28 09:09:17 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2001-02-28 09:09:17 +00:00
*
* This file is part of OpenOffice.org.
2001-02-28 09:09:17 +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
*
* 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
*
* 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
{
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* );
DECL_LINK( LookForUiHdl, void* );
2001-02-28 09:09:17 +00:00
Timer m_aScrollTimer;
Point m_aMousePos;
2001-02-28 09:09:17 +00:00
OTableWindow* m_pTabWin;
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
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);
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:
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
private:
using SvTreeListBox::ExecuteDrop;
2001-02-28 09:09:17 +00:00
};
}
#endif // DBAUI_TABLEWINDOWLISTBOX_HXX