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"
31 #define SvpSalGraphics AquaSalGraphics
37 class SvpSalFrame
: public SalFrame
, public SvpElement
39 SvpSalInstance
* m_pInstance
;
40 SvpSalFrame
* m_pParent
; // pointer to parent frame
41 std::list
< SvpSalFrame
* > m_aChildren
; // List of child frames
44 bool m_bDamageTracking
;
46 sal_Int32 m_nScanlineFormat
;
52 SystemEnvData m_aSystemChildData
;
54 basebmp::BitmapDeviceSharedPtr m_aFrame
;
55 std::list
< SvpSalGraphics
* > m_aGraphics
;
57 static SvpSalFrame
* s_pFocusFrame
;
59 SvpSalFrame( SvpSalInstance
* pInstance
,
61 sal_uLong nSalFrameStyle
,
63 sal_Int32 nScanlineFormat
,
64 SystemParentData
* pSystemParent
= NULL
);
65 virtual ~SvpSalFrame();
69 void PostPaint(bool bImmediate
) const;
73 virtual const basebmp::BitmapDeviceSharedPtr
& getDevice() const { return m_aFrame
; }
76 virtual SalGraphics
* GetGraphics();
77 virtual void ReleaseGraphics( SalGraphics
* pGraphics
);
79 virtual sal_Bool
PostEvent( void* pData
);
81 virtual void SetTitle( const OUString
& rTitle
);
82 virtual void SetIcon( sal_uInt16 nIcon
);
83 virtual void SetMenu( SalMenu
* pMenu
);
84 virtual void DrawMenuBar();
86 virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle
);
87 virtual void Show( sal_Bool bVisible
, sal_Bool bNoActivate
= sal_False
);
88 virtual void Enable( sal_Bool bEnable
);
89 virtual void SetMinClientSize( long nWidth
, long nHeight
);
90 virtual void SetMaxClientSize( long nWidth
, long nHeight
);
91 virtual void SetPosSize( long nX
, long nY
, long nWidth
, long nHeight
, sal_uInt16 nFlags
);
92 virtual void GetClientSize( long& rWidth
, long& rHeight
);
93 virtual void GetWorkArea( Rectangle
& rRect
);
94 virtual SalFrame
* GetParent() const;
95 virtual void SetWindowState( const SalFrameState
* pState
);
96 virtual sal_Bool
GetWindowState( SalFrameState
* pState
);
97 virtual void ShowFullScreen( sal_Bool bFullScreen
, sal_Int32 nDisplay
);
98 virtual void StartPresentation( sal_Bool bStart
);
99 virtual void SetAlwaysOnTop( sal_Bool bOnTop
);
100 virtual void ToTop( sal_uInt16 nFlags
);
101 virtual void SetPointer( PointerStyle ePointerStyle
);
102 virtual void CaptureMouse( sal_Bool bMouse
);
103 virtual void SetPointerPos( long nX
, long nY
);
104 using SalFrame::Flush
;
105 virtual void Flush();
107 virtual void SetInputContext( SalInputContext
* pContext
);
108 virtual void EndExtTextInput( sal_uInt16 nFlags
);
109 virtual OUString
GetKeyName( sal_uInt16 nKeyCode
);
110 virtual sal_Bool
MapUnicodeToKeyCode( sal_Unicode aUnicode
, LanguageType aLangType
, KeyCode
& rKeyCode
);
111 virtual LanguageType
GetInputLanguage();
112 virtual void UpdateSettings( AllSettings
& rSettings
);
114 virtual const SystemEnvData
* GetSystemData() const;
115 virtual SalPointerState
GetPointerState();
116 virtual SalIndicatorState
GetIndicatorState();
117 virtual void SimulateKeyPress( sal_uInt16 nKeyCode
);
118 virtual void SetParent( SalFrame
* pNewParent
);
119 virtual bool SetPluginParent( SystemParentData
* pNewParent
);
120 virtual void ResetClipRegion();
121 virtual void BeginSetClipRegion( sal_uLong nRects
);
122 virtual void UnionClipRegion( long nX
, long nY
, long nWidth
, long nHeight
);
123 virtual void EndSetClipRegion();
125 // If enabled we can get damage notifications for regions immediately rendered to ...
126 virtual void enableDamageTracker( bool bOn
= true );
127 virtual void damaged( const basegfx::B2IBox
& /* rDamageRect */) {}
129 /*TODO: functional implementation */
130 virtual void SetScreenNumber( unsigned int nScreen
) { (void)nScreen
; }
131 virtual void SetApplicationID(const OUString
&rApplicationID
) { (void) rApplicationID
; }
132 bool IsVisible() { return m_bVisible
; }
134 static SvpSalFrame
* GetFocusFrame() { return s_pFocusFrame
; }
137 #endif // _SVP_SVPFRAME_HXX
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */