Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / ui / app / AppSwapWindow.hxx
blobb655dd8e4dc18dd28d44c0ec28b68ce228b8027c
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 #ifndef INCLUDED_DBACCESS_SOURCE_UI_APP_APPSWAPWINDOW_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_APP_APPSWAPWINDOW_HXX
22 #include "IClipBoardTest.hxx"
23 #include <vcl/lstbox.hxx>
24 #include <vcl/vclptr.hxx>
25 #include "AppIconControl.hxx"
26 #include "AppElementType.hxx"
28 namespace dbaui
30 class OAppBorderWindow;
31 class OApplicationSwapWindow : public vcl::Window,
32 public IClipboardTest
34 VclPtr<OApplicationIconControl> m_aIconControl;
35 ElementType m_eLastType;
36 OAppBorderWindow& m_rBorderWin;
38 void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
40 DECL_LINK( OnContainerSelectHdl, SvtIconChoiceCtrl* );
41 DECL_LINK( ChangeToLastSelected, void* );
42 protected:
43 virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE;
44 public:
45 OApplicationSwapWindow( vcl::Window* _pParent, OAppBorderWindow& _rBorderWindow );
46 virtual ~OApplicationSwapWindow();
47 // Window overrides
48 virtual void dispose() SAL_OVERRIDE;
49 virtual void Resize() SAL_OVERRIDE;
51 bool isCutAllowed() SAL_OVERRIDE { return false; }
52 bool isCopyAllowed() SAL_OVERRIDE { return false; }
53 bool isPasteAllowed() SAL_OVERRIDE { return false; }
54 virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); }
55 void copy() SAL_OVERRIDE { }
56 void cut() SAL_OVERRIDE { }
57 void paste() SAL_OVERRIDE { }
59 inline sal_uLong GetEntryCount() const { return m_aIconControl->GetEntryCount(); }
60 inline SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return m_aIconControl->GetEntry(nPos); }
61 inline Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl->GetBoundingBox(pEntry); }
63 /** automatically creates mnemonics for the icon/texts in our left hand side panel
65 void createIconAutoMnemonics( MnemonicGenerator& _rMnemonics );
67 /** called to give the window the chance to intercept key events, while it has not
68 the focus
70 @return <TRUE/> if and only if the event has been handled, and should not
71 not be further processed
73 bool interceptKeyInput( const KeyEvent& _rEvent );
75 /// return the element of currently select entry
76 ElementType getElementType() const;
78 /** clears the selection in the icon choice control and calls the handler
80 void clearSelection();
82 /** changes the container which should be displayed. The select handler will also be called.
83 @param _eType
84 Which container to show.
86 void selectContainer(ElementType _eType);
88 private:
89 bool onContainerSelected( ElementType _eType );
91 } // namespace dbaui
92 #endif // INCLUDED_DBACCESS_SOURCE_UI_APP_APPSWAPWINDOW_HXX
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */