1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _CHARTWINDOW_HXX
24 #define _CHARTWINDOW_HXX
25 
26 #include <vcl/window.hxx>
27 
28 //.............................................................................
29 namespace chart
30 {
31 //.............................................................................
32 
33 
34 class WindowController;
35 
36 //-----------------------------------------------------------------------------
37 /** The ChartWindow collects events from the window and forwards them the to the controller
38 thus the controller can perform appropriate actions
39 */
40 
41 class ChartWindow : public Window
42 {
43 public:
44     ChartWindow( WindowController* pWindowController, Window* pParent, WinBits nStyle );
45     virtual ~ChartWindow();
46 
47     void clear();
48 
49     //from base class Window:
50 	virtual void PrePaint();
51 	virtual void Paint( const Rectangle& rRect );
52     virtual void MouseButtonDown( const MouseEvent& rMEvt );
53     virtual void MouseMove( const MouseEvent& rMEvt );
54     virtual void Tracking( const TrackingEvent& rTEvt );
55     virtual void MouseButtonUp( const MouseEvent& rMEvt );
56 	virtual void Resize();
57     virtual void Activate();
58     virtual void Deactivate();
59     virtual void GetFocus();
60     virtual void LoseFocus();
61     virtual void Command( const CommandEvent& rCEvt );
62     virtual void KeyInput( const KeyEvent& rKEvt );
63     virtual void DataChanged( const DataChangedEvent& rDCEvt );
64     virtual void RequestHelp( const HelpEvent& rHEvt );
65 
66     void ForceInvalidate();
67     virtual void Invalidate( sal_uInt16 nFlags = 0 );
68     virtual void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 );
69     virtual void Invalidate( const Region& rRegion, sal_uInt16 nFlags = 0 );
70 
71     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
72 
73 private:
74     WindowController*    m_pWindowController;
75     bool m_bInPaint;
76 
77     void adjustHighContrastMode();
78 };
79 
80 //.............................................................................
81 } //namespace chart
82 //.............................................................................
83 
84 #endif
85