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/compbase.hxx>
31 #include <cppuhelper/basemutex.hxx>
35 namespace sd
{ namespace colortoolpanel
38 // class SingleColorPanel
39 typedef ::cppu::WeakComponentImplHelper
< css::drawing::framework::XView
41 , css::awt::XPaintListener
42 > SingleColorPanel_Base
;
43 class SingleColorPanel
:public ::cppu::BaseMutex
44 ,public SingleColorPanel_Base
48 const css::uno::Reference
< css::uno::XComponentContext
>& i_rContext
,
49 const css::uno::Reference
< css::drawing::framework::XConfigurationController
>& i_rConfigController
,
50 const css::uno::Reference
< css::drawing::framework::XResourceId
>& i_rResourceId
54 virtual css::uno::Reference
< css::awt::XWindow
> SAL_CALL
getWindow( ) throw (css::uno::RuntimeException
);
55 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
createAccessible( const css::uno::Reference
< css::accessibility::XAccessible
>& ParentAccessible
) throw (css::uno::RuntimeException
);
61 virtual css::uno::Reference
< css::drawing::framework::XResourceId
> SAL_CALL
getResourceId( ) throw (css::uno::RuntimeException
);
62 virtual sal_Bool SAL_CALL
isAnchorOnly( ) throw (css::uno::RuntimeException
);
65 virtual void SAL_CALL
windowPaint( const css::awt::PaintEvent
& e
) throw (css::uno::RuntimeException
);
68 virtual void SAL_CALL
disposing( const css::lang::EventObject
& Source
) throw (css::uno::RuntimeException
);
70 // XComponent equivalents
71 virtual void SAL_CALL
disposing();
77 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
78 css::uno::Reference
< css::drawing::framework::XResourceId
> m_xResourceId
;
79 css::uno::Reference
< css::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: */