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