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 .
20 #ifndef INCLUDED_SD_WORKBEN_CUSTOMPANEL_CTP_PANEL_HXX
21 #define INCLUDED_SD_WORKBEN_CUSTOMPANEL_CTP_PANEL_HXX
23 #include <com/sun/star/drawing/framework/XView.hpp>
24 #include <com/sun/star/ui/XToolPanel.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
26 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
27 #include <com/sun/star/drawing/framework/XResourceId.hpp>
28 #include <com/sun/star/awt/XPaintListener.hpp>
30 #include <cppuhelper/compbase3.hxx>
31 #include <cppuhelper/basemutex.hxx>
33 #include <boost/scoped_ptr.hpp>
35 namespace sd
{ namespace colortoolpanel
38 // class SingleColorPanel
39 typedef ::cppu::WeakComponentImplHelper3
< ::com::sun::star::drawing::framework::XView
40 , ::com::sun::star::ui::XToolPanel
41 , ::com::sun::star::awt::XPaintListener
42 > SingleColorPanel_Base
;
43 class SingleColorPanel
:public ::cppu::BaseMutex
44 ,public SingleColorPanel_Base
48 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& i_rContext
,
49 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::framework::XConfigurationController
>& i_rConfigController
,
50 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::framework::XResourceId
>& i_rResourceId
54 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> SAL_CALL
getWindow( ) throw (::com::sun::star::uno::RuntimeException
);
55 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
createAccessible( const ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
>& ParentAccessible
) throw (::com::sun::star::uno::RuntimeException
);
61 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::framework::XResourceId
> SAL_CALL
getResourceId( ) throw (::com::sun::star::uno::RuntimeException
);
62 virtual sal_Bool SAL_CALL
isAnchorOnly( ) throw (::com::sun::star::uno::RuntimeException
);
65 virtual void SAL_CALL
windowPaint( const ::com::sun::star::awt::PaintEvent
& e
) throw (::com::sun::star::uno::RuntimeException
);
68 virtual void SAL_CALL
disposing( const ::com::sun::star::lang::EventObject
& Source
) throw (::com::sun::star::uno::RuntimeException
);
70 // XComponent equivalents
71 virtual void SAL_CALL
disposing();
77 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> m_xContext
;
78 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::framework::XResourceId
> m_xResourceId
;
79 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> m_xWindow
;
82 } } // namespace sd::colortoolpanel
84 #endif // INCLUDED_SD_WORKBEN_CUSTOMPANEL_CTP_PANEL_HXX
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */