LibreOffice Module vcl (master)  1
toolkit/fixed.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #pragma once
20 
21 #if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS)
22 #error "don't use this in new code"
23 #endif
24 
25 #include <vcl/dllapi.h>
26 #include <vcl/edit.hxx>
27 #include <vcl/fixed.hxx>
28 
29 class SelectableFixedText final : public Edit
30 {
31 public:
32  explicit SelectableFixedText( vcl::Window* pParent, WinBits nStyle );
33 
34  virtual void LoseFocus() override;
35  virtual void ApplySettings(vcl::RenderContext&) override;
36 };
37 
38 class VCL_DLLPUBLIC FixedBitmap final : public Control
39 {
40 private:
42 
44  using Window::ImplInit;
45  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
46  SAL_DLLPRIVATE static WinBits ImplInitStyle( WinBits nStyle );
47  SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, const Point& rPos, const Size& rSize );
48 
49 public:
50  explicit FixedBitmap( vcl::Window* pParent, WinBits nStyle = 0 );
51 
52  virtual void ApplySettings(vcl::RenderContext&) override;
53 
54  virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
55  virtual void Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags ) override;
56  virtual void Resize() override;
57  virtual void StateChanged( StateChangedType nType ) override;
58  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
59 
60  void SetBitmap( const BitmapEx& rBitmap );
61 };
62 
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
virtual void StateChanged(StateChangedType nStateChange) override
Definition: ctrl.cxx:260
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
Definition: ctrl.cxx:418
StateChangedType
Definition: window.hxx:310
sal_Int64 WinBits
BitmapEx maBitmap
Definition: edit.hxx:52
DrawFlags
Definition: window.hxx:353
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:302
virtual void ApplySettings(vcl::RenderContext &) override
Definition: fixed.cxx:446
virtual void Draw(::OutputDevice *pDev, const Point &rPos, DrawFlags nFlags)
Definition: window.cxx:1824
SelectableFixedText(vcl::Window *pParent, WinBits nStyle)
Definition: fixed.cxx:434
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
Definition: window.cxx:936
virtual void Resize() override
Definition: ctrl.cxx:74
Definition: ctrl.hxx:33
virtual void LoseFocus() override
Definition: fixed.cxx:451
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: paint.cxx:1019
void ImplInitSettings()
Definition: ctrl.cxx:428
virtual void DataChanged(const DataChangedEvent &rDCEvt)
Definition: event.cxx:35