bump product version to 4.1.6.2
[LibreOffice.git] / vcl / inc / headless / svpframe.hxx
blob112e552298b9635d427e553dba49d58e1b93d6aa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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"
28 #include <list>
30 #ifdef IOS
31 #define SvpSalGraphics AquaSalGraphics
32 #endif
34 class SvpSalInstance;
35 class SvpSalGraphics;
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
42 sal_uLong m_nStyle;
43 bool m_bVisible;
44 bool m_bDamageTracking;
45 bool m_bTopDown;
46 sal_Int32 m_nScanlineFormat;
47 long m_nMinWidth;
48 long m_nMinHeight;
49 long m_nMaxWidth;
50 long m_nMaxHeight;
52 SystemEnvData m_aSystemChildData;
54 basebmp::BitmapDeviceSharedPtr m_aFrame;
55 std::list< SvpSalGraphics* > m_aGraphics;
57 static SvpSalFrame* s_pFocusFrame;
58 public:
59 SvpSalFrame( SvpSalInstance* pInstance,
60 SalFrame* pParent,
61 sal_uLong nSalFrameStyle,
62 bool bTopDown,
63 sal_Int32 nScanlineFormat,
64 SystemParentData* pSystemParent = NULL );
65 virtual ~SvpSalFrame();
67 void GetFocus();
68 void LoseFocus();
69 void PostPaint(bool bImmediate) const;
70 void AllocateFrame();
72 // SvpElement
73 virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; }
75 // SalFrame
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();
106 virtual void Sync();
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 );
113 virtual void Beep();
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: */