LibreOffice Module vcl (master) 1
hyperlabel.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#ifndef INCLUDED_VCL_HYPERLABEL_HXX
20#define INCLUDED_VCL_HYPERLABEL_HXX
21
22#include <memory>
23
24#include <vcl/toolkit/fixed.hxx>
25
26namespace vcl
27{
28 class HyperLabel final : public FixedText
29 {
31
32 virtual void MouseMove( const MouseEvent& rMEvt ) override;
33 virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
34 virtual void GetFocus() override;
35 virtual void LoseFocus() override;
36
37 void implInit();
38
40
41 public:
42 HyperLabel( vcl::Window* _pParent, WinBits _nWinStyle );
43 virtual ~HyperLabel( ) override;
44
45 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
46 virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
47
48 void SetID( sal_Int16 ID );
49 sal_Int16 GetID() const;
50
51 void SetIndex( sal_Int32 Index );
52 sal_Int32 GetIndex() const;
53
54 void SetLabel( const OUString& _rText );
55
56 void ToggleBackgroundColor( const Color& _rGBColor );
57 void SetInteractive( bool _bInteractive );
58
59 void SetClickHdl( const Link<HyperLabel*,void>& rLink ) { maClickHdl = rLink; }
60
61 Size const & CalcMinimumSize( tools::Long nMaxWidth );
62 private:
63 sal_Int16 ID;
64 sal_Int32 Index;
68 };
69}
70
71#endif
72
73/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
Size CalcMinimumSize(tools::Long nMaxWidth=0x7fffffff) const
Definition: fixed.cxx:324
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:171
sal_Int16 GetID() const
Definition: hyperlabel.cxx:123
sal_Int32 GetIndex() const
Definition: hyperlabel.cxx:128
void SetIndex(sal_Int32 Index)
Definition: hyperlabel.cxx:138
virtual void GetFocus() override
Definition: hyperlabel.cxx:98
Link< HyperLabel *, void > maClickHdl
Definition: hyperlabel.hxx:30
void ToggleBackgroundColor(const Color &_rGBColor)
Definition: hyperlabel.cxx:59
sal_Int32 Index
Definition: hyperlabel.hxx:64
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
Definition: hyperlabel.cxx:148
void SetLabel(const OUString &_rText)
Definition: hyperlabel.cxx:143
HyperLabel(vcl::Window *_pParent, WinBits _nWinStyle)
Definition: hyperlabel.cxx:28
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: hyperlabel.cxx:90
Size const & CalcMinimumSize(tools::Long nMaxWidth)
Definition: hyperlabel.cxx:38
void SetInteractive(bool _bInteractive)
Definition: hyperlabel.cxx:118
sal_Int16 ID
Definition: hyperlabel.hxx:63
void SetClickHdl(const Link< HyperLabel *, void > &rLink)
Definition: hyperlabel.hxx:59
void SetID(sal_Int16 ID)
Definition: hyperlabel.cxx:133
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: hyperlabel.cxx:159
virtual void LoseFocus() override
Definition: hyperlabel.cxx:108
virtual void MouseMove(const MouseEvent &rMEvt) override
Definition: hyperlabel.cxx:64
virtual ~HyperLabel() override
Definition: hyperlabel.cxx:113
long Long
sal_Int64 WinBits
Definition: wintypes.hxx:109