Files
libreoffice/include/vcl/rendersettings.hxx
Tomaž Vajngerl b4bbb5e5d7 refactor how font, fg. and bg. are applied in widgets/controls
- Move vcl::RenderContext to outdev.
- Change some methods on vcl::Window to accept RenderContext
  as parameter.
- Add ApplySettings to vcl::Window - This method is called before
  painting. Refactor existing classes that use InitSettings to
  have ApplySettings or mark the classes to be refactored later.
- Add RenderSettings for adding defered settings to rendering.
  This is similar to ApplySettings but for more ad-hoc calls.

Change-Id: I4ea58461f3b6b08ccfa3e0ddd1a4a3e04f8c4f45
2015-05-18 11:22:49 +09:00

46 lines
1.1 KiB
C++

/* -*- 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/.
*/
#ifndef INCLUDED_VCL_RENDERSETTINGS_HXX
#define INCLUDED_VCL_RENDERSETTINGS_HXX
#include <vcl/window.hxx>
#include <vcl/outdev.hxx>
#include <vcl/outdevstate.hxx>
namespace vcl
{
class VCL_DLLPUBLIC RenderSettings
{
OutDevState maOutDevState;
std::unique_ptr<Wallpaper> mpBackground;
public:
RenderSettings()
{}
virtual ~RenderSettings()
{}
inline void SetLineColor(const Color& rColor);
inline void SetFillColor(const Color& rColor);
inline void SetBackground(const Wallpaper& rBackground);
inline void SetFont(const vcl::Font& rNewFont);
void PushAndApply(vcl::RenderContext& rRenderContext);
void Apply(vcl::RenderContext& rRenderContext);
};
}
#endif // INCLUDED_VCL_RENDERSETTINGS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */