LibreOffice Module vcl (master)  1
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
23 #include <vcl/sysdata.hxx>
25 #include <salframe.hxx>
27 #include <vector>
29 #ifdef IOS
30 #define SvpSalInstance AquaSalInstance
31 #define SvpSalGraphics AquaSalGraphics
32 #endif
34 class SvpSalInstance;
35 class SvpSalGraphics;
37 class SvpSalFrame : public SalFrame
38 {
40  SvpSalFrame* m_pParent; // pointer to parent frame
41  std::vector< SvpSalFrame* > m_aChildren; // Vector of child frames
43  bool m_bVisible;
44 #ifndef IOS
46 #endif
54  std::vector< SvpSalGraphics* > m_aGraphics;
57 public:
58  SvpSalFrame( SvpSalInstance* pInstance,
59  SalFrame* pParent,
60  SalFrameStyleFlags nSalFrameStyle );
61  virtual ~SvpSalFrame() override;
63  void GetFocus();
64  void LoseFocus();
65  void PostPaint() const;
67  // SalFrame
68  virtual SalGraphics* AcquireGraphics() override;
69  virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
71  virtual bool PostEvent(std::unique_ptr<ImplSVEvent> pData) override;
73  virtual void SetTitle( const OUString& rTitle ) override;
74  virtual void SetIcon( sal_uInt16 nIcon ) override;
75  virtual void SetMenu( SalMenu* pMenu ) override;
76  virtual void DrawMenuBar() override;
78  virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) override;
79  virtual void Show( bool bVisible, bool bNoActivate = false ) override;
80  virtual void SetMinClientSize( tools::Long nWidth, tools::Long nHeight ) override;
81  virtual void SetMaxClientSize( tools::Long nWidth, tools::Long nHeight ) override;
82  virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags ) override;
83  virtual void GetClientSize( tools::Long& rWidth, tools::Long& rHeight ) override;
84  virtual void GetWorkArea( tools::Rectangle& rRect ) override;
85  virtual SalFrame* GetParent() const override;
86  virtual void SetWindowState( const SalFrameState* pState ) override;
87  virtual bool GetWindowState( SalFrameState* pState ) override;
88  virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay ) override;
89  virtual void StartPresentation( bool bStart ) override;
90  virtual void SetAlwaysOnTop( bool bOnTop ) override;
91  virtual void ToTop( SalFrameToTop nFlags ) override;
92  virtual void SetPointer( PointerStyle ePointerStyle ) override;
93  virtual void CaptureMouse( bool bMouse ) override;
94  virtual void SetPointerPos( tools::Long nX, tools::Long nY ) override;
95  using SalFrame::Flush;
96  virtual void Flush() override;
97  virtual void SetInputContext( SalInputContext* pContext ) override;
98  virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) override;
99  virtual OUString GetKeyName( sal_uInt16 nKeyCode ) override;
100  virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) override;
101  virtual LanguageType GetInputLanguage() override;
102  virtual void UpdateSettings( AllSettings& rSettings ) override;
103  virtual void Beep() override;
104  virtual const SystemEnvData* GetSystemData() const override;
105  virtual SalPointerState GetPointerState() override;
106  virtual KeyIndicatorState GetIndicatorState() override;
107  virtual void SimulateKeyPress( sal_uInt16 nKeyCode ) override;
108  virtual void SetParent( SalFrame* pNewParent ) override;
109  virtual void SetPluginParent( SystemParentData* pNewParent ) override;
110  virtual void ResetClipRegion() override;
111  virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
112  virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
113  virtual void EndSetClipRegion() override;
115  /*TODO: functional implementation */
116  virtual void SetScreenNumber( unsigned int ) override {}
117  virtual void SetApplicationID(const OUString &) override {}
119 private:
121 };
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SetIcon(sal_uInt16 nIcon) override
void GetFocus()
virtual OUString GetKeyName(sal_uInt16 nKeyCode) override
SvpSalFrame(SvpSalInstance *pInstance, SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle)
virtual void Flush() override
virtual bool MapUnicodeToKeyCode(sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode &rKeyCode) override
virtual void EndSetClipRegion() override
virtual LanguageType GetInputLanguage() override
long Long
virtual void SetExtendedFrameStyle(SalExtStyle nExtStyle) override
std::vector< SvpSalGraphics * > m_aGraphics
Definition: svpframe.hxx:54
virtual SalPointerState GetPointerState() override
SalFrameStyleFlags m_nStyle
Definition: svpframe.hxx:42
virtual void UpdateSettings(AllSettings &rSettings) override
virtual void SetMinClientSize(tools::Long nWidth, tools::Long nHeight) override
basegfx::B2IVector GetSurfaceFrameSize() const
virtual void ResetClipRegion() override
virtual void GetClientSize(tools::Long &rWidth, tools::Long &rHeight) override
SvpSalFrame * m_pParent
Definition: svpframe.hxx:40
SvpSalInstance * m_pInstance
Definition: svpframe.hxx:39
virtual const SystemEnvData * GetSystemData() const override
virtual KeyIndicatorState GetIndicatorState() override
virtual void SetApplicationID(const OUString &) override
Definition: svpframe.hxx:117
SystemEnvData m_aSystemChildData
Definition: svpframe.hxx:52
sal_uInt16 sal_Unicode
virtual void SetTitle(const OUString &rTitle) override
virtual void ToTop(SalFrameToTop nFlags) override
sal_uInt64 SalExtStyle
Definition: salframe.hxx:95
virtual void SetPluginParent(SystemParentData *pNewParent) override
tools::Long m_nMinWidth
Definition: svpframe.hxx:47
virtual void BeginSetClipRegion(sal_uInt32 nRects) override
virtual bool GetWindowState(SalFrameState *pState) override
virtual void SetScreenNumber(unsigned int) override
Definition: svpframe.hxx:116
virtual void Show(bool bVisible, bool bNoActivate=false) override
virtual void SetAlwaysOnTop(bool bOnTop) override
Definition: salframe.hxx:43
virtual void GetWorkArea(tools::Rectangle &rRect) override
virtual void ShowFullScreen(bool bFullScreen, sal_Int32 nDisplay) override
virtual void EndExtTextInput(EndExtTextInputFlags nFlags) override
virtual void SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags) override
virtual void CaptureMouse(bool bMouse) override
virtual ~SvpSalFrame() override
virtual void UnionClipRegion(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
virtual void SetPointerPos(tools::Long nX, tools::Long nY) override
Definition: keycodes.hxx:184
tools::Long m_nMaxHeight
Definition: svpframe.hxx:50
Definition: window.hxx:357
virtual void StartPresentation(bool bStart) override
virtual void Flush()=0
virtual void SetMenu(SalMenu *pMenu) override
virtual void DrawMenuBar() override
void PostPaint() const
virtual void SimulateKeyPress(sal_uInt16 nKeyCode) override
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:112
virtual void SetPointer(PointerStyle ePointerStyle) override
tools::Long m_nMinHeight
Definition: svpframe.hxx:48
virtual bool PostEvent(std::unique_ptr< ImplSVEvent > pData) override
std::vector< SvpSalFrame * > m_aChildren
Definition: svpframe.hxx:41
static SvpSalFrame * s_pFocusFrame
Definition: svpframe.hxx:56
Definition: salframe.hxx:64
virtual SalFrame * GetParent() const override
void LoseFocus()
Definition: ptrstyle.hxx:25
virtual void Beep() override
cairo_surface_t * m_pSurface
Definition: svpframe.hxx:45
bool m_bVisible
Definition: svpframe.hxx:43
tools::Long m_nMaxWidth
Definition: svpframe.hxx:49
virtual SalGraphics * AcquireGraphics() override
virtual void SetParent(SalFrame *pNewParent) override
virtual void SetMaxClientSize(tools::Long nWidth, tools::Long nHeight) override
virtual void ReleaseGraphics(SalGraphics *pGraphics) override
virtual void SetWindowState(const SalFrameState *pState) override
virtual void SetInputContext(SalInputContext *pContext) override
struct _cairo_surface cairo_surface_t
Definition: svpgdi.hxx:71