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
|
|
|
|
|
|
|
#ifndef _BMPWIN_HXX
|
|
|
|
#define _BMPWIN_HXX
|
|
|
|
|
|
|
|
#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>
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
2011-04-20 15:36:36 +02:00
|
|
|
Description: extended page for graphics
|
2000-09-18 16:15:01 +00:00
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
class BmpWindow : public Window
|
|
|
|
{
|
2007-08-03 12:42:01 +00:00
|
|
|
private:
|
|
|
|
Graphic aGraphic;
|
|
|
|
BitmapEx aBmp;
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bHorz : 1;
|
|
|
|
sal_Bool bVert : 1;
|
|
|
|
sal_Bool bGraphic : 1;
|
2013-01-26 20:14:11 +09:00
|
|
|
bool bLeftAlign : 1;
|
2007-08-03 12:42:01 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
void Paint(const Rectangle& rRect);
|
|
|
|
|
|
|
|
public:
|
2011-01-17 15:06:54 +01:00
|
|
|
BmpWindow(Window* pPar, sal_uInt16 nId,
|
2010-11-16 14:49:01 +00:00
|
|
|
const Graphic& rGraphic, const BitmapEx& rBmp);
|
2000-09-18 16:15:01 +00:00
|
|
|
BmpWindow(Window* pParent, const ResId rResId) :
|
2007-09-27 10:54:18 +00:00
|
|
|
Window(pParent, rResId),
|
2013-01-26 20:14:11 +09:00
|
|
|
bHorz(sal_False), bVert(sal_False),bGraphic(sal_False), bLeftAlign(true) {}
|
2000-09-18 16:15:01 +00:00
|
|
|
~BmpWindow();
|
2011-01-17 15:06:54 +01:00
|
|
|
void MirrorVert(sal_Bool bMirror) { bVert = bMirror; Invalidate(); }
|
|
|
|
void MirrorHorz(sal_Bool bMirror) { bHorz = bMirror; Invalidate(); }
|
2001-12-12 15:17:20 +00:00
|
|
|
void SetGraphic(const Graphic& 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: */
|