tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / dbaccess / source / ui / app / AppSwapWindow.hxx
blob1ce972e3b000059457f8a7c9420476a26f556baa
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 .
19 #pragma once
21 #include <IClipBoardTest.hxx>
22 #include "AppIconControl.hxx"
23 #include <AppElementType.hxx>
24 #include <ChildWindow.hxx>
26 struct ImplSVEvent;
27 class MnemonicGenerator;
29 namespace dbaui
31 class OAppBorderWindow;
32 class OApplicationSwapWindow : public OChildWindow
33 , public IClipboardTest
35 std::unique_ptr<OApplicationIconControl> m_xIconControl;
36 std::unique_ptr<weld::CustomWeld> m_xIconControlWin;
37 ElementType m_eLastType;
38 OAppBorderWindow& m_rBorderWin;
39 ImplSVEvent* m_nChangeEvent;
41 DECL_LINK( OnContainerSelectHdl, const ThumbnailViewItem*, void );
42 DECL_LINK( ChangeToLastSelected, void*, void );
44 public:
45 OApplicationSwapWindow(weld::Container* pParent, OAppBorderWindow& rBorderWindow);
46 virtual ~OApplicationSwapWindow() override;
48 virtual void GrabFocus() override;
49 virtual bool HasChildPathFocus() const override;
51 bool isCutAllowed() override { return false; }
52 bool isCopyAllowed() override { return false; }
53 bool isPasteAllowed() override { return false; }
54 void copy() override { }
55 void cut() override { }
56 void paste() override { }
58 /** automatically creates mnemonics for the icon/texts in our left hand side panel
60 void createIconAutoMnemonics( MnemonicGenerator& _rMnemonics );
62 /** called to give the window the chance to intercept key events, while it has not
63 the focus
65 @return <TRUE/> if and only if the event has been handled, and should not
66 not be further processed
68 bool interceptKeyInput( const KeyEvent& _rEvent );
70 /// return the element of currently select entry
71 ElementType getElementType() const;
73 /** clears the selection in the icon choice control and calls the handler
75 void clearSelection();
77 /** changes the container which should be displayed. The select handler will also be called.
78 @param _eType
79 Which container to show.
81 void selectContainer(ElementType _eType);
83 private:
84 bool onContainerSelected( ElementType _eType );
86 } // namespace dbaui
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */