LibreOffice Module toolkit (master) 1
stdtabcontroller.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22
23#include <com/sun/star/lang/XServiceInfo.hpp>
24#include <com/sun/star/awt/XTabController.hpp>
25#include <com/sun/star/lang/XTypeProvider.hpp>
27#include <osl/mutex.hxx>
28
29
30namespace com::sun::star::awt { class XWindow; }
31namespace com::sun::star::awt { class XControl; }
32namespace com::sun::star::awt { class XControlContainer; }
33
34class StdTabController final : public css::awt::XTabController,
35 public css::lang::XServiceInfo,
36 public css::lang::XTypeProvider,
38{
39private:
40 ::osl::Mutex maMutex;
41 css::uno::Reference< css::awt::XTabControllerModel > mxModel;
42 css::uno::Reference< css::awt::XControlContainer > mxControlContainer;
43
44 ::osl::Mutex& GetMutex() { return maMutex; }
45 static bool ImplCreateComponentSequence( css::uno::Sequence< css::uno::Reference< css::awt::XControl > >& rControls, const css::uno::Sequence< css::uno::Reference< css::awt::XControlModel > >& rModels, css::uno::Sequence< css::uno::Reference< css::awt::XWindow > >& rComponents, css::uno::Sequence< css::uno::Any>* pTabStops, bool bPeerComponent );
46 // if sequence length of rModels is less than rControls, return only the matching elements in rModels sequence and remove corresponding elements from rControls
47 void ImplActivateControl( bool bFirst ) const;
48
49public:
51 virtual ~StdTabController() override;
52
53 static css::uno::Reference< css::awt::XControl > FindControl( css::uno::Sequence< css::uno::Reference< css::awt::XControl > >& rCtrls, const css::uno::Reference< css::awt::XControlModel > & rxCtrlModel );
54
55 // css::uno::XInterface
56 css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override { return OWeakAggObject::queryInterface(rType); }
57 void SAL_CALL acquire() noexcept override { OWeakAggObject::acquire(); }
58 void SAL_CALL release() noexcept override { OWeakAggObject::release(); }
59
60 css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
61
62 // css::lang::XTypeProvider
63 css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
64 css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
65
66 // XTabController
67 void SAL_CALL setModel( const css::uno::Reference< css::awt::XTabControllerModel >& Model ) override;
68 css::uno::Reference< css::awt::XTabControllerModel > SAL_CALL getModel( ) override;
69 void SAL_CALL setContainer( const css::uno::Reference< css::awt::XControlContainer >& Container ) override;
70 css::uno::Reference< css::awt::XControlContainer > SAL_CALL getContainer( ) override;
71 css::uno::Sequence< css::uno::Reference< css::awt::XControl > > SAL_CALL getControls( ) override;
72 void SAL_CALL autoTabOrder( ) override;
73 void SAL_CALL activateTabOrder( ) override;
74 void SAL_CALL activateFirst( ) override;
75 void SAL_CALL activateLast( ) override;
76
77 // XServiceInfo
78 OUString SAL_CALL getImplementationName() override;
79
80 sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
81
82 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
83};
84
85
86/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Sequence< css::uno::Reference< css::awt::XControl > > SAL_CALL getControls() override
OUString SAL_CALL getImplementationName() override
css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
void SAL_CALL activateFirst() override
css::uno::Reference< css::awt::XTabControllerModel > mxModel
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
css::uno::Reference< css::awt::XTabControllerModel > SAL_CALL getModel() override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
static css::uno::Reference< css::awt::XControl > FindControl(css::uno::Sequence< css::uno::Reference< css::awt::XControl > > &rCtrls, const css::uno::Reference< css::awt::XControlModel > &rxCtrlModel)
css::uno::Reference< css::awt::XControlContainer > mxControlContainer
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
void SAL_CALL release() noexcept override
void ImplActivateControl(bool bFirst) const
void SAL_CALL autoTabOrder() override
void SAL_CALL activateTabOrder() override
::osl::Mutex & GetMutex()
virtual ~StdTabController() override
static bool ImplCreateComponentSequence(css::uno::Sequence< css::uno::Reference< css::awt::XControl > > &rControls, const css::uno::Sequence< css::uno::Reference< css::awt::XControlModel > > &rModels, css::uno::Sequence< css::uno::Reference< css::awt::XWindow > > &rComponents, css::uno::Sequence< css::uno::Any > *pTabStops, bool bPeerComponent)
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
css::uno::Reference< css::awt::XControlContainer > SAL_CALL getContainer() override
void SAL_CALL activateLast() override
::osl::Mutex maMutex
void SAL_CALL setContainer(const css::uno::Reference< css::awt::XControlContainer > &Container) override
void SAL_CALL acquire() noexcept override
void SAL_CALL setModel(const css::uno::Reference< css::awt::XTabControllerModel > &Model) override
unsigned char sal_Bool