2010-10-27 12:33:13 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2013-10-23 19:18:54 +02:00
|
|
|
#ifndef INCLUDED_DBACCESS_DATAVIEW_HXX
|
|
|
|
#define INCLUDED_DBACCESS_DATAVIEW_HXX
|
2007-07-06 06:49:00 +00:00
|
|
|
|
2016-06-15 21:00:59 -07:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include <com/sun/star/uno/Reference.hxx>
|
2013-11-09 15:53:08 -06:00
|
|
|
#include <dbaccess/dbaccessdllapi.h>
|
2016-06-15 21:00:59 -07:00
|
|
|
#include <rtl/ref.hxx>
|
|
|
|
#include <tools/wintypes.hxx>
|
|
|
|
#include <vcl/outdev.hxx>
|
|
|
|
#include <vcl/vclptr.hxx>
|
|
|
|
#include <vcl/window.hxx>
|
2010-11-25 14:28:03 +01:00
|
|
|
|
2016-06-15 21:00:59 -07:00
|
|
|
namespace com { namespace sun { namespace star {
|
|
|
|
namespace frame { class XFrame; }
|
|
|
|
namespace uno { class XComponentContext; }
|
|
|
|
} } }
|
2010-11-25 14:28:03 +01:00
|
|
|
|
2016-06-15 21:00:59 -07:00
|
|
|
namespace svt {
|
|
|
|
class AcceleratorExecute;
|
|
|
|
}
|
2007-07-06 06:49:00 +00:00
|
|
|
|
2016-06-15 21:00:59 -07:00
|
|
|
class DataChangedEvent;
|
2007-07-06 06:49:00 +00:00
|
|
|
class FixedLine;
|
2016-06-15 21:00:59 -07:00
|
|
|
class NotifyEvent;
|
2017-03-30 20:27:55 +02:00
|
|
|
namespace tools { class Rectangle; }
|
2016-06-15 21:00:59 -07:00
|
|
|
|
2007-07-06 06:49:00 +00:00
|
|
|
namespace dbaui
|
|
|
|
{
|
|
|
|
class IController;
|
2014-09-23 11:20:40 +02:00
|
|
|
class DBACCESS_DLLPUBLIC ODataView : public vcl::Window
|
2007-07-06 06:49:00 +00:00
|
|
|
{
|
2015-10-20 11:11:25 +02:00
|
|
|
css::uno::Reference< css::uno::XComponentContext > m_xContext; // the service factory to work with
|
2007-07-06 06:49:00 +00:00
|
|
|
|
|
|
|
protected:
|
2015-02-27 10:09:37 +00:00
|
|
|
rtl::Reference<IController> m_xController; // the controller in where we resides in
|
2015-01-16 15:30:06 +02:00
|
|
|
VclPtr<FixedLine> m_aSeparator;
|
2014-09-24 18:50:37 +02:00
|
|
|
::std::unique_ptr< ::svt::AcceleratorExecute> m_pAccel;
|
2007-07-06 06:49:00 +00:00
|
|
|
|
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
ODataView( vcl::Window* pParent,
|
2008-06-25 11:28:13 +00:00
|
|
|
IController& _rController,
|
2015-10-20 11:11:25 +02:00
|
|
|
const css::uno::Reference< css::uno::XComponentContext >& ,
|
2007-07-06 06:49:00 +00:00
|
|
|
WinBits nStyle = 0 );
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~ODataView() override;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void dispose() override;
|
2007-07-06 06:49:00 +00:00
|
|
|
|
|
|
|
/// late construction
|
|
|
|
virtual void Construct();
|
|
|
|
// initialize will be called when after the controller finished his initialize method
|
|
|
|
virtual void initialize(){}
|
|
|
|
// window overridables
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
|
|
|
|
virtual void StateChanged( StateChangedType nStateChange ) override;
|
|
|
|
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
|
2007-07-06 06:49:00 +00:00
|
|
|
|
2017-03-03 20:57:02 +01:00
|
|
|
IController& getCommandController() const { return *m_xController.get(); }
|
2007-07-06 06:49:00 +00:00
|
|
|
|
2016-04-13 10:44:57 +02:00
|
|
|
const css::uno::Reference< css::uno::XComponentContext >& getORB() { return m_xContext;}
|
2007-07-06 06:49:00 +00:00
|
|
|
|
|
|
|
// the default implementation simply calls resizeAll( GetSizePixel() )
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Resize() override;
|
2007-07-06 06:49:00 +00:00
|
|
|
|
2015-10-20 11:11:25 +02:00
|
|
|
void attachFrame(const css::uno::Reference< css::frame::XFrame >& _xFrame);
|
2007-07-06 06:49:00 +00:00
|
|
|
protected:
|
|
|
|
// window overridables
|
2017-03-30 20:27:55 +02:00
|
|
|
virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect ) override;
|
2007-07-06 06:49:00 +00:00
|
|
|
|
|
|
|
/// re-arrange all controls, including the toolbox, it's separator, and the "real view"
|
2017-03-30 20:27:55 +02:00
|
|
|
virtual void resizeAll( const tools::Rectangle& _rPlayground );
|
2007-07-06 06:49:00 +00:00
|
|
|
|
|
|
|
// re-arrange the controls belonging to the document itself
|
2017-03-30 20:27:55 +02:00
|
|
|
virtual void resizeDocumentView( tools::Rectangle& _rPlayground );
|
2007-07-06 06:49:00 +00:00
|
|
|
};
|
|
|
|
}
|
2013-10-23 19:18:54 +02:00
|
|
|
#endif // INCLUDED_DBACCESS_DATAVIEW_HXX
|
2007-07-06 06:49:00 +00:00
|
|
|
|
2010-10-27 12:33:13 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|