Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / vcl / inc / headless / svpframe.hxx
blobbcf504ef2e98a0d79462975e01469be7d50800cb
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 INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX
21 #define INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX
23 #include <vcl/sysdata.hxx>
24 #include <basegfx/range/b2ibox.hxx>
26 #include <salframe.hxx>
28 #include <list>
30 #ifdef IOS
31 #define SvpSalInstance AquaSalInstance
32 #define SvpSalGraphics AquaSalGraphics
33 #endif
35 class SvpSalInstance;
36 class SvpSalGraphics;
38 class VCL_DLLPUBLIC SvpSalFrame : public SalFrame
40 SvpSalInstance* m_pInstance;
41 SvpSalFrame* m_pParent; // pointer to parent frame
42 std::list< SvpSalFrame* > m_aChildren; // List of child frames
43 SalFrameStyleFlags m_nStyle;
44 bool m_bVisible;
45 #ifndef IOS
46 cairo_surface_t* m_pSurface;
47 #endif
48 long m_nMinWidth;
49 long m_nMinHeight;
50 long m_nMaxWidth;
51 long m_nMaxHeight;
53 SystemEnvData m_aSystemChildData;
55 std::list< SvpSalGraphics* > m_aGraphics;
57 static SvpSalFrame* s_pFocusFrame;
58 public:
59 SvpSalFrame( SvpSalInstance* pInstance,
60 SalFrame* pParent,
61 SalFrameStyleFlags nSalFrameStyle,
62 SystemParentData* pSystemParent = nullptr );
63 virtual ~SvpSalFrame();
65 void GetFocus();
66 void LoseFocus();
67 void PostPaint() const;
69 // SalFrame
70 virtual SalGraphics* AcquireGraphics() override;
71 virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
73 virtual bool PostEvent(ImplSVEvent* pData) override;
75 virtual void SetTitle( const OUString& rTitle ) override;
76 virtual void SetIcon( sal_uInt16 nIcon ) override;
77 virtual void SetMenu( SalMenu* pMenu ) override;
78 virtual void DrawMenuBar() override;
80 virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) override;
81 virtual void Show( bool bVisible, bool bNoActivate = false ) override;
82 virtual void SetMinClientSize( long nWidth, long nHeight ) override;
83 virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
84 virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
85 virtual void GetClientSize( long& rWidth, long& rHeight ) override;
86 virtual void GetWorkArea( Rectangle& rRect ) override;
87 virtual SalFrame* GetParent() const override;
88 virtual void SetWindowState( const SalFrameState* pState ) override;
89 virtual bool GetWindowState( SalFrameState* pState ) override;
90 virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay ) override;
91 virtual void StartPresentation( bool bStart ) override;
92 virtual void SetAlwaysOnTop( bool bOnTop ) override;
93 virtual void ToTop( SalFrameToTop nFlags ) override;
94 virtual void SetPointer( PointerStyle ePointerStyle ) override;
95 virtual void CaptureMouse( bool bMouse ) override;
96 virtual void SetPointerPos( long nX, long nY ) override;
97 using SalFrame::Flush;
98 virtual void Flush() override;
99 virtual void SetInputContext( SalInputContext* pContext ) override;
100 virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) override;
101 virtual OUString GetKeyName( sal_uInt16 nKeyCode ) override;
102 virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) override;
103 virtual LanguageType GetInputLanguage() override;
104 virtual void UpdateSettings( AllSettings& rSettings ) override;
105 virtual void Beep() override;
106 virtual const SystemEnvData* GetSystemData() const override;
107 virtual SalPointerState GetPointerState() override;
108 virtual KeyIndicatorState GetIndicatorState() override;
109 virtual void SimulateKeyPress( sal_uInt16 nKeyCode ) override;
110 virtual void SetParent( SalFrame* pNewParent ) override;
111 virtual bool SetPluginParent( SystemParentData* pNewParent ) override;
112 virtual void ResetClipRegion() override;
113 virtual void BeginSetClipRegion( sal_uLong nRects ) override;
114 virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
115 virtual void EndSetClipRegion() override;
117 /*TODO: functional implementation */
118 virtual void SetScreenNumber( unsigned int nScreen ) override { (void)nScreen; }
119 virtual void SetApplicationID(const OUString &rApplicationID) override { (void) rApplicationID; }
123 #endif // INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */