/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
/** A helper class for implementing the <type scope="css::inspection">XPropertyControl</type> or one of its derived interfaces.
This class is used as a base class the CommonBehaviourControl template.
*/ class CommonBehaviourControlHelper
{ private:
sal_Int16 m_nControlType;
css::uno::Reference< css::inspection::XPropertyControlContext >
m_xContext;
css::inspection::XPropertyControl&
m_rAntiImpl; bool m_bModified;
public: /** creates the instance @param nControlType the type of the control - one of the <type scope="css::inspection">PropertyControlType</type> constants @param pAntiImpl Reference to the instance as whose "impl-class" we act i.e. the CommonBehaviourControl<> template, which is why we hold it without acquiring it/
*/
CommonBehaviourControlHelper(
sal_Int16 nControlType,
css::inspection::XPropertyControl& rAntiImpl);
/// may be used by derived classes, they forward the event to the PropCtrListener
DECL_LINK( ModifiedHdl, weld::ComboBox&, void );
DECL_LINK( ColorModifiedHdl, ColorListBox&, void );
DECL_LINK( EditModifiedHdl, weld::Entry&, void );
DECL_LINK( MetricModifiedHdl, weld::MetricSpinButton&, void );
DECL_LINK( FormattedModifiedHdl, weld::FormattedSpinButton&, void );
DECL_LINK( TimeModifiedHdl, weld::FormattedSpinButton&, void );
DECL_LINK( DateModifiedHdl, SvtCalendarBox&, void );
DECL_LINK( GetFocusHdl, weld::Widget&, void );
DECL_LINK( LoseFocusHdl, weld::Widget&, void );
};
//= CommonBehaviourControl
/** implements a base class for <type scope="css::inspection">XPropertyControl</type> implementations
@param TControlInterface an interface class which is derived from (or identical to) <type scope="css::inspection">XPropertyControl</type> @param TControlWindow a class which is derived from weld::Widget
*/ template < class TControlInterface, class TControlWindow > class CommonBehaviourControl :public ::cppu::BaseMutex
,public ::cppu::WeakComponentImplHelper< TControlInterface >
,public CommonBehaviourControlHelper
{ protected: typedef ::cppu::WeakComponentImplHelper< TControlInterface > ComponentBaseClass;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.