2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02: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 .
|
|
|
|
*/
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2014-06-03 10:01:18 +02:00
|
|
|
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_BMPWIN_HXX
|
|
|
|
#define INCLUDED_SW_SOURCE_UIBASE_INC_BMPWIN_HXX
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#include <vcl/graph.hxx>
|
2007-08-03 12:42:01 +00:00
|
|
|
#include <vcl/bitmapex.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <vcl/window.hxx>
|
|
|
|
|
2014-05-25 21:26:51 -04:00
|
|
|
// extended page for graphics
|
2014-09-23 11:20:40 +02:00
|
|
|
class BmpWindow : public vcl::Window
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2007-08-03 12:42:01 +00:00
|
|
|
private:
|
|
|
|
Graphic aGraphic;
|
|
|
|
BitmapEx aBmp;
|
|
|
|
|
2014-04-25 14:00:35 +02:00
|
|
|
bool bHorz : 1;
|
|
|
|
bool bVert : 1;
|
|
|
|
bool bGraphic : 1;
|
2013-01-26 20:14:11 +09:00
|
|
|
bool bLeftAlign : 1;
|
2007-08-03 12:42:01 +00:00
|
|
|
|
2015-04-28 11:00:54 +09:00
|
|
|
virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) SAL_OVERRIDE;
|
2013-08-22 15:57:19 +01:00
|
|
|
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual Size GetOptimalSize() const SAL_OVERRIDE;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
BmpWindow(vcl::Window* pPar, WinBits nStyle);
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~BmpWindow();
|
2014-04-25 14:00:35 +02:00
|
|
|
void MirrorVert(bool bMirror) { bVert = bMirror; Invalidate(); }
|
|
|
|
void MirrorHorz(bool bMirror) { bHorz = bMirror; Invalidate(); }
|
2001-12-12 15:17:20 +00:00
|
|
|
void SetGraphic(const Graphic& rGrf);
|
2013-08-22 15:57:19 +01:00
|
|
|
void SetBitmapEx(const BitmapEx& rGrf);
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|