Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / dbaccess / source / ui / app / AppSwapWindow.hxx
blob89d535806bd998fcc0be6594a4ff91bb2a618600
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef DBAUI_APPSWAPWINDOW_HXX
29 #define DBAUI_APPSWAPWINDOW_HXX
31 #include "IClipBoardTest.hxx"
32 #include <vcl/lstbox.hxx>
33 #include "AppIconControl.hxx"
34 #include "AppElementType.hxx"
36 namespace dbaui
38 class OAppBorderWindow;
39 //==================================================================
40 class OApplicationSwapWindow : public Window,
41 public IClipboardTest
43 OApplicationIconControl m_aIconControl;
44 ElementType m_eLastType;
45 OAppBorderWindow& m_rBorderWin;
47 void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
49 DECL_LINK( OnContainerSelectHdl, SvtIconChoiceCtrl* );
50 DECL_LINK( ChangeToLastSelected, void* );
51 protected:
52 virtual void DataChanged(const DataChangedEvent& rDCEvt);
53 public:
54 OApplicationSwapWindow( Window* _pParent, OAppBorderWindow& _rBorderWindow );
55 virtual ~OApplicationSwapWindow();
56 // window overloads
57 virtual void Resize();
60 inline sal_Bool isCutAllowed() { return sal_False; }
61 inline sal_Bool isCopyAllowed() { return sal_False; }
62 inline sal_Bool isPasteAllowed() { return sal_False; }
63 virtual sal_Bool hasChildPathFocus() { return HasChildPathFocus(); }
64 inline void copy() { }
65 inline void cut() { }
66 inline void paste() { }
68 inline sal_uLong GetEntryCount() const { return m_aIconControl.GetEntryCount(); }
69 inline SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return m_aIconControl.GetEntry(nPos); }
70 inline Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl.GetBoundingBox(pEntry); }
72 /** automatically creates mnemonics for the icon/texts in our left hand side panel
74 void createIconAutoMnemonics( MnemonicGenerator& _rMnemonics );
76 /** called to give the window the chance to intercept key events, while it has not
77 the focus
79 @return <TRUE/> if and only if the event has been handled, and should not
80 not be further processed
82 bool interceptKeyInput( const KeyEvent& _rEvent );
84 /// return the element of currently select entry
85 ElementType getElementType() const;
88 /** clears the selection in the icon choice control and calls the handler
90 void clearSelection();
92 /** changes the container which should be displayed. The select handler will also be called.
93 @param _eType
94 Which container to show.
96 void selectContainer(ElementType _eType);
98 private:
99 bool onContainerSelected( ElementType _eType );
101 // .............................................................
102 } // namespace dbaui
103 // .............................................................
104 #endif // DBAUI_APPSWAPWINDOW_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */