2011-05-25 14:05:29 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-12 17:21:24 +00: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 .
|
|
|
|
*/
|
2010-06-22 11:12:01 +02:00
|
|
|
|
2021-03-06 08:21:49 +01:00
|
|
|
#pragma once
|
2010-06-22 11:12:01 +02:00
|
|
|
|
2023-03-31 19:15:11 +02:00
|
|
|
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
2012-10-17 10:52:52 +02:00
|
|
|
#include <com/sun/star/uno/XComponentContext.hpp>
|
2010-06-22 11:12:01 +02:00
|
|
|
#include <com/sun/star/frame/XFrame.hpp>
|
|
|
|
#include <com/sun/star/ui/XUIElement.hpp>
|
|
|
|
#include <com/sun/star/awt/Rectangle.hpp>
|
2010-10-26 14:58:05 +02:00
|
|
|
#include <com/sun/star/ui/DockingArea.hpp>
|
2010-10-28 14:13:05 +02:00
|
|
|
#include <com/sun/star/awt/Point.hpp>
|
2010-06-22 11:12:01 +02:00
|
|
|
|
|
|
|
#include <vcl/window.hxx>
|
2010-10-07 16:33:21 +02:00
|
|
|
#include <vcl/toolbox.hxx>
|
2010-06-22 11:12:01 +02:00
|
|
|
|
2021-11-25 14:51:21 +02:00
|
|
|
inline constexpr OUStringLiteral UIRESOURCE_URL = u"private:resource";
|
|
|
|
inline constexpr OUStringLiteral UIRESOURCETYPE_TOOLBAR = u"toolbar";
|
2010-10-07 16:33:21 +02:00
|
|
|
#define UIRESOURCETYPE_MENUBAR "menubar"
|
|
|
|
|
2010-06-22 11:12:01 +02:00
|
|
|
namespace framework
|
|
|
|
{
|
|
|
|
|
2015-10-13 16:59:57 +02:00
|
|
|
bool hasEmptySize( const css::awt::Size& rSize );
|
|
|
|
bool hasDefaultPosValue( const css::awt::Point& rPos );
|
|
|
|
bool isDefaultPos( const css::awt::Point& rPos );
|
2017-07-19 17:44:29 +02:00
|
|
|
bool isToolboxHorizontalAligned( ToolBox const * pToolBox );
|
2010-11-01 13:29:26 +01:00
|
|
|
bool isReverseOrderDockingArea( const sal_Int32 nDockArea );
|
|
|
|
bool isHorizontalDockingArea( const sal_Int32 nDockArea );
|
2015-10-13 16:59:57 +02:00
|
|
|
bool isHorizontalDockingArea( const css::ui::DockingArea& nDockArea );
|
2014-09-23 11:20:40 +02:00
|
|
|
OUString retrieveToolbarNameFromHelpURL( vcl::Window* pWindow );
|
|
|
|
ToolBox* getToolboxPtr( vcl::Window* pWindow );
|
2015-10-13 16:59:57 +02:00
|
|
|
vcl::Window* getWindowFromXUIElement( const css::uno::Reference< css::ui::XUIElement >& xUIElement );
|
|
|
|
SystemWindow* getTopSystemWindow( const css::uno::Reference< css::awt::XWindow >& xWindow );
|
2010-09-24 16:25:13 +02:00
|
|
|
bool equalRectangles( const css::awt::Rectangle& rRect1, const css::awt::Rectangle& rRect2 );
|
2015-10-13 16:59:57 +02:00
|
|
|
bool lcl_checkUIElement(const css::uno::Reference< css::ui::XUIElement >& xUIElement,css::awt::Rectangle& _rPosSize, css::uno::Reference< css::awt::XWindow >& _xWindow);
|
2023-03-31 19:15:11 +02:00
|
|
|
css::uno::Reference< css::awt::XVclWindowPeer > createToolkitWindow( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference< css::awt::XVclWindowPeer >& rParent, const char* pService );
|
2017-02-22 16:39:20 +02:00
|
|
|
WindowAlign ImplConvertAlignment( css::ui::DockingArea aAlignment );
|
2022-04-12 12:43:11 +02:00
|
|
|
std::u16string_view getElementTypeFromResourceURL( std::u16string_view aResourceURL );
|
|
|
|
void parseResourceURL( std::u16string_view aResourceURL, OUString& aElementType, OUString& aElementName );
|
2017-03-30 20:27:55 +02:00
|
|
|
::tools::Rectangle putAWTToRectangle( const css::awt::Rectangle& rRect );
|
|
|
|
css::awt::Rectangle putRectangleValueToAWT( const ::tools::Rectangle& rRect );
|
2015-10-13 16:59:57 +02:00
|
|
|
css::uno::Reference< css::frame::XModel > impl_getModelFromFrame( const css::uno::Reference< css::frame::XFrame >& rFrame );
|
|
|
|
bool implts_isPreviewModel( const css::uno::Reference< css::frame::XModel >& xModel );
|
|
|
|
bool implts_isFrameOrWindowTop( const css::uno::Reference< css::frame::XFrame >& xFrame );
|
2022-04-12 12:43:11 +02:00
|
|
|
void impl_setDockingWindowVisibility( const css::uno::Reference< css::uno::XComponentContext>& rxContext, const css::uno::Reference< css::frame::XFrame >& rFrame, std::u16string_view rDockingWindowName, bool bVisible );
|
2015-10-13 16:59:57 +02:00
|
|
|
void impl_addWindowListeners( const css::uno::Reference< css::uno::XInterface >& xThis, const css::uno::Reference< css::ui::XUIElement >& xUIElement );
|
2010-06-22 11:12:01 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2011-05-25 14:05:29 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|