1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 DBAUI_APPSWAPWINDOW_HXX
20 #define DBAUI_APPSWAPWINDOW_HXX
22 #include "IClipBoardTest.hxx"
23 #include <vcl/lstbox.hxx>
24 #include "AppIconControl.hxx"
25 #include "AppElementType.hxx"
29 class OAppBorderWindow
;
30 //==================================================================
31 class OApplicationSwapWindow
: public Window
,
34 OApplicationIconControl m_aIconControl
;
35 ElementType m_eLastType
;
36 OAppBorderWindow
& m_rBorderWin
;
38 void ImplInitSettings( sal_Bool bFont
, sal_Bool bForeground
, sal_Bool bBackground
);
40 DECL_LINK( OnContainerSelectHdl
, SvtIconChoiceCtrl
* );
41 DECL_LINK( ChangeToLastSelected
, void* );
43 virtual void DataChanged(const DataChangedEvent
& rDCEvt
);
45 OApplicationSwapWindow( Window
* _pParent
, OAppBorderWindow
& _rBorderWindow
);
46 virtual ~OApplicationSwapWindow();
48 virtual void Resize();
51 inline sal_Bool
isCutAllowed() { return sal_False
; }
52 inline sal_Bool
isCopyAllowed() { return sal_False
; }
53 inline sal_Bool
isPasteAllowed() { return sal_False
; }
54 virtual sal_Bool
hasChildPathFocus() { return HasChildPathFocus(); }
55 inline void copy() { }
57 inline void paste() { }
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
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;
79 /** clears the selection in the icon choice control and calls the handler
81 void clearSelection();
83 /** changes the container which should be displayed. The select handler will also be called.
85 Which container to show.
87 void selectContainer(ElementType _eType
);
90 bool onContainerSelected( ElementType _eType
);
92 // .............................................................
94 // .............................................................
95 #endif // DBAUI_APPSWAPWINDOW_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */