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 .
22 #include <com/sun/star/drawing/framework/XView.hpp>
23 #include <com/sun/star/ui/XToolPanel.hpp>
24 #include <com/sun/star/uno/XComponentContext.hpp>
25 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
26 #include <com/sun/star/drawing/framework/XResourceId.hpp>
27 #include <com/sun/star/awt/XPaintListener.hpp>
29 #include <cppuhelper/compbase.hxx>
30 #include <cppuhelper/basemutex.hxx>
34 namespace sd::colortoolpanel
37 typedef ::cppu::WeakComponentImplHelper
< css::drawing::framework::XView
39 , css::awt::XPaintListener
40 > SingleColorPanel_Base
;
41 class SingleColorPanel
:public ::cppu::BaseMutex
42 ,public SingleColorPanel_Base
46 const css::uno::Reference
< css::uno::XComponentContext
>& i_rContext
,
47 const css::uno::Reference
< css::drawing::framework::XConfigurationController
>& i_rConfigController
,
48 const css::uno::Reference
< css::drawing::framework::XResourceId
>& i_rResourceId
52 virtual css::uno::Reference
< css::awt::XWindow
> SAL_CALL
getWindow( ) throw (css::uno::RuntimeException
);
53 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
createAccessible( const css::uno::Reference
< css::accessibility::XAccessible
>& ParentAccessible
) throw (css::uno::RuntimeException
);
59 virtual css::uno::Reference
< css::drawing::framework::XResourceId
> SAL_CALL
getResourceId( ) throw (css::uno::RuntimeException
);
60 virtual sal_Bool SAL_CALL
isAnchorOnly( ) throw (css::uno::RuntimeException
);
63 virtual void SAL_CALL
windowPaint( const css::awt::PaintEvent
& e
) throw (css::uno::RuntimeException
);
66 virtual void SAL_CALL
disposing( const css::lang::EventObject
& Source
) throw (css::uno::RuntimeException
);
68 // XComponent equivalents
69 virtual void SAL_CALL
disposing();
75 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
76 css::uno::Reference
< css::drawing::framework::XResourceId
> m_xResourceId
;
77 css::uno::Reference
< css::awt::XWindow
> m_xWindow
;
80 } } // namespace sd::colortoolpanel
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */