1 /*************************************************************************
2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3  *
4  * Copyright 2000, 2010 Oracle and/or its affiliates.
5  *
6  * OpenOffice.org - a multi-platform office productivity suite
7  *
8  * This file is part of OpenOffice.org.
9  *
10  * OpenOffice.org is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License version 3
12  * only, as published by the Free Software Foundation.
13  *
14  * OpenOffice.org is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU Lesser General Public License version 3 for more details
18  * (a copy is included in the LICENSE file that accompanied this code).
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with OpenOffice.org.  If not, see
22  * <http://www.openoffice.org/license.html>
23  * for a copy of the LGPLv3 License.
24  *
25 ************************************************************************/
26 
27 #ifndef SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX
28 #define SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX
29 
30 #ifndef _SV_WINDOW_HXX
31 #include <vcl/window.hxx>
32 #endif
33 #include <vcl/seleng.hxx>
34 
35 //........................................................................
36 namespace svt { namespace table
37 {
38 //........................................................................
39 
40     class TableControl_Impl;
41 	class TableFunctionSet;
42 
43 
44 	//====================================================================
45 	//= TableDataWindow
46 	//====================================================================
47     /** the window containing the content area (including headers) of
48         a table control
49     */
50     class TableDataWindow : public Window
51 	{
52 		friend class TableFunctionSet;
53     private:
54         TableControl_Impl&  m_rTableControl;
55 		Link				m_aSelectHdl;
56         sal_uLong           m_nTipWindowHandle;
57 
58     public:
59         TableDataWindow( TableControl_Impl& _rTableControl );
60         ~TableDataWindow();
61 
62 		inline void			SetSelectHdl( const Link& rLink )	{ m_aSelectHdl = rLink; }
63 		inline const Link& 	GetSelectHdl() const				{ return m_aSelectHdl; }
64 
65 		// Window overridables
66         virtual void        Paint( const Rectangle& rRect );
67 		virtual void		MouseMove( const MouseEvent& rMEvt);
68 		virtual void		MouseButtonDown( const MouseEvent& rMEvt);
69 		virtual void		MouseButtonUp( const MouseEvent& rMEvt);
70 		virtual long		Notify(NotifyEvent& rNEvt);
71 		virtual void		SetControlBackground(const Color& rColor);
72 		virtual void		SetControlBackground();
73         virtual void        RequestHelp( const HelpEvent& rHEvt );
74 
75 		void				SetBackground(const Wallpaper& rColor);
76 		void				SetBackground();
77 
78     private:
79         void    impl_hideTipWindow();
80 	};
81 //........................................................................
82 } } // namespace svt::table
83 //........................................................................
84 
85 #endif // SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX
86