1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SVP_SVPFRAME_HXX
22 #include <vcl/sysdata.hxx>
23 #include <basegfx/range/b2ibox.hxx>
25 #include <salframe.hxx>
26 #include "svpelement.hxx"
33 class SvpSalFrame
: public SalFrame
, public SvpElement
35 SvpSalInstance
* m_pInstance
;
36 SvpSalFrame
* m_pParent
; // pointer to parent frame
37 std::list
< SvpSalFrame
* > m_aChildren
; // List of child frames
40 bool m_bDamageTracking
;
42 sal_Int32 m_nScanlineFormat
;
48 SystemEnvData m_aSystemChildData
;
50 basebmp::BitmapDeviceSharedPtr m_aFrame
;
51 std::list
< SvpSalGraphics
* > m_aGraphics
;
53 static SvpSalFrame
* s_pFocusFrame
;
55 SvpSalFrame( SvpSalInstance
* pInstance
,
57 sal_uLong nSalFrameStyle
,
59 sal_Int32 nScanlineFormat
,
60 SystemParentData
* pSystemParent
= NULL
);
61 virtual ~SvpSalFrame();
65 void PostPaint(bool bImmediate
) const;
69 virtual const basebmp::BitmapDeviceSharedPtr
& getDevice() const { return m_aFrame
; }
72 virtual SalGraphics
* GetGraphics();
73 virtual void ReleaseGraphics( SalGraphics
* pGraphics
);
75 virtual sal_Bool
PostEvent( void* pData
);
77 virtual void SetTitle( const rtl::OUString
& rTitle
);
78 virtual void SetIcon( sal_uInt16 nIcon
);
79 virtual void SetMenu( SalMenu
* pMenu
);
80 virtual void DrawMenuBar();
82 virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle
);
83 virtual void Show( sal_Bool bVisible
, sal_Bool bNoActivate
= sal_False
);
84 virtual void Enable( sal_Bool bEnable
);
85 virtual void SetMinClientSize( long nWidth
, long nHeight
);
86 virtual void SetMaxClientSize( long nWidth
, long nHeight
);
87 virtual void SetPosSize( long nX
, long nY
, long nWidth
, long nHeight
, sal_uInt16 nFlags
);
88 virtual void GetClientSize( long& rWidth
, long& rHeight
);
89 virtual void GetWorkArea( Rectangle
& rRect
);
90 virtual SalFrame
* GetParent() const;
91 virtual void SetWindowState( const SalFrameState
* pState
);
92 virtual sal_Bool
GetWindowState( SalFrameState
* pState
);
93 virtual void ShowFullScreen( sal_Bool bFullScreen
, sal_Int32 nDisplay
);
94 virtual void StartPresentation( sal_Bool bStart
);
95 virtual void SetAlwaysOnTop( sal_Bool bOnTop
);
96 virtual void ToTop( sal_uInt16 nFlags
);
97 virtual void SetPointer( PointerStyle ePointerStyle
);
98 virtual void CaptureMouse( sal_Bool bMouse
);
99 virtual void SetPointerPos( long nX
, long nY
);
100 using SalFrame::Flush
;
101 virtual void Flush();
103 virtual void SetInputContext( SalInputContext
* pContext
);
104 virtual void EndExtTextInput( sal_uInt16 nFlags
);
105 virtual rtl::OUString
GetKeyName( sal_uInt16 nKeyCode
);
106 virtual sal_Bool
MapUnicodeToKeyCode( sal_Unicode aUnicode
, LanguageType aLangType
, KeyCode
& rKeyCode
);
107 virtual LanguageType
GetInputLanguage();
108 virtual void UpdateSettings( AllSettings
& rSettings
);
109 virtual const SystemEnvData
* GetSystemData() const;
110 virtual SalPointerState
GetPointerState();
111 virtual SalIndicatorState
GetIndicatorState();
112 virtual void SimulateKeyPress( sal_uInt16 nKeyCode
);
113 virtual void SetParent( SalFrame
* pNewParent
);
114 virtual bool SetPluginParent( SystemParentData
* pNewParent
);
115 virtual void ResetClipRegion();
116 virtual void BeginSetClipRegion( sal_uLong nRects
);
117 virtual void UnionClipRegion( long nX
, long nY
, long nWidth
, long nHeight
);
118 virtual void EndSetClipRegion();
120 // If enabled we can get damage notifications for regions immediately rendered to ...
121 virtual void enableDamageTracker( bool bOn
= true );
122 virtual void damaged( const basegfx::B2IBox
& /* rDamageRect */) {}
124 /*TODO: functional implementation */
125 virtual void SetScreenNumber( unsigned int nScreen
) { (void)nScreen
; }
126 virtual void SetApplicationID(const rtl::OUString
&rApplicationID
) { (void) rApplicationID
; }
127 bool IsVisible() { return m_bVisible
; }
129 static SvpSalFrame
* GetFocusFrame() { return s_pFocusFrame
; }
132 #endif // _SVP_SVPFRAME_HXX
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */