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