Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _SVP_SVPFRAME_HXX
30 : :
31 : : #include <vcl/sysdata.hxx>
32 : : #include <basegfx/range/b2ibox.hxx>
33 : :
34 : : #include <salframe.hxx>
35 : : #include "svpelement.hxx"
36 : :
37 : : #include <list>
38 : :
39 : : class SvpSalInstance;
40 : : class SvpSalGraphics;
41 : :
42 : : class SvpSalFrame : public SalFrame, public SvpElement
43 : : {
44 : : SvpSalInstance* m_pInstance;
45 : : SvpSalFrame* m_pParent; // pointer to parent frame
46 : : std::list< SvpSalFrame* > m_aChildren; // List of child frames
47 : : sal_uLong m_nStyle;
48 : : bool m_bVisible;
49 : : bool m_bDamageTracking;
50 : : bool m_bTopDown;
51 : : sal_Int32 m_nScanlineFormat;
52 : : long m_nMinWidth;
53 : : long m_nMinHeight;
54 : : long m_nMaxWidth;
55 : : long m_nMaxHeight;
56 : :
57 : : SystemEnvData m_aSystemChildData;
58 : :
59 : : basebmp::BitmapDeviceSharedPtr m_aFrame;
60 : : std::list< SvpSalGraphics* > m_aGraphics;
61 : :
62 : : static SvpSalFrame* s_pFocusFrame;
63 : : public:
64 : : SvpSalFrame( SvpSalInstance* pInstance,
65 : : SalFrame* pParent,
66 : : sal_uLong nSalFrameStyle,
67 : : bool bTopDown,
68 : : sal_Int32 nScanlineFormat,
69 : : SystemParentData* pSystemParent = NULL );
70 : : virtual ~SvpSalFrame();
71 : :
72 : : void GetFocus();
73 : : void LoseFocus();
74 : : void PostPaint(bool bImmediate) const;
75 : : void AllocateFrame();
76 : :
77 : : // SvpElement
78 : 0 : virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; }
79 : :
80 : : // SalFrame
81 : : virtual SalGraphics* GetGraphics();
82 : : virtual void ReleaseGraphics( SalGraphics* pGraphics );
83 : :
84 : : virtual sal_Bool PostEvent( void* pData );
85 : :
86 : : virtual void SetTitle( const rtl::OUString& rTitle );
87 : : virtual void SetIcon( sal_uInt16 nIcon );
88 : : virtual void SetMenu( SalMenu* pMenu );
89 : : virtual void DrawMenuBar();
90 : :
91 : : virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle );
92 : : virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = sal_False );
93 : : virtual void Enable( sal_Bool bEnable );
94 : : virtual void SetMinClientSize( long nWidth, long nHeight );
95 : : virtual void SetMaxClientSize( long nWidth, long nHeight );
96 : : virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags );
97 : : virtual void GetClientSize( long& rWidth, long& rHeight );
98 : : virtual void GetWorkArea( Rectangle& rRect );
99 : : virtual SalFrame* GetParent() const;
100 : : virtual void SetWindowState( const SalFrameState* pState );
101 : : virtual sal_Bool GetWindowState( SalFrameState* pState );
102 : : virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay );
103 : : virtual void StartPresentation( sal_Bool bStart );
104 : : virtual void SetAlwaysOnTop( sal_Bool bOnTop );
105 : : virtual void ToTop( sal_uInt16 nFlags );
106 : : virtual void SetPointer( PointerStyle ePointerStyle );
107 : : virtual void CaptureMouse( sal_Bool bMouse );
108 : : virtual void SetPointerPos( long nX, long nY );
109 : : using SalFrame::Flush;
110 : : virtual void Flush();
111 : : virtual void Sync();
112 : : virtual void SetInputContext( SalInputContext* pContext );
113 : : virtual void EndExtTextInput( sal_uInt16 nFlags );
114 : : virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode );
115 : : virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
116 : : virtual LanguageType GetInputLanguage();
117 : : virtual void UpdateSettings( AllSettings& rSettings );
118 : : virtual const SystemEnvData* GetSystemData() const;
119 : : virtual SalPointerState GetPointerState();
120 : : virtual SalIndicatorState GetIndicatorState();
121 : : virtual void SimulateKeyPress( sal_uInt16 nKeyCode );
122 : : virtual void SetParent( SalFrame* pNewParent );
123 : : virtual bool SetPluginParent( SystemParentData* pNewParent );
124 : : virtual void SetBackgroundBitmap( SalBitmap* pBitmap );
125 : : virtual void ResetClipRegion();
126 : : virtual void BeginSetClipRegion( sal_uLong nRects );
127 : : virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
128 : : virtual void EndSetClipRegion();
129 : :
130 : : // If enabled we can get damage notifications for regions immediately rendered to ...
131 : : virtual void enableDamageTracker( bool bOn = true );
132 : 0 : virtual void damaged( const basegfx::B2IBox& /* rDamageRect */) {}
133 : :
134 : : /*TODO: functional implementation */
135 : 0 : virtual void SetScreenNumber( unsigned int nScreen ) { (void)nScreen; }
136 : 5153 : virtual void SetApplicationID(const rtl::OUString &rApplicationID) { (void) rApplicationID; }
137 : : bool IsVisible() { return m_bVisible; }
138 : :
139 : : static SvpSalFrame* GetFocusFrame() { return s_pFocusFrame; }
140 : :
141 : : };
142 : : #endif // _SVP_SVPFRAME_HXX
143 : :
144 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|