LibreOffice Module toolkit (master) 1
filectrl.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
20#pragma once
21
22#include <vcl/window.hxx>
24
25class Edit;
26
27// Flags for internal use of FileControl
29{
30 INRESIZE = 0x0001,
31 ORIGINALBUTTONTEXT = 0x0002,
32};
33
34namespace o3tl
35{
36 template<> struct typed_flags<FileControlMode_Internal> : is_typed_flags<FileControlMode_Internal, 0x03> {};
37}
38
39
40class FileControl final : public vcl::Window
41{
44 OUString maButtonText;
46
47 void Resize() override;
48 void GetFocus() override;
49 void StateChanged( StateChangedType nType ) override;
51 DECL_LINK( ButtonHdl, Button*, void );
52
53public:
54 FileControl( vcl::Window* pParent, WinBits nStyle );
55 virtual ~FileControl() override;
56 virtual void dispose() override;
57
58 Edit& GetEdit() { return *maEdit; }
60
61 void Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags nFlags ) override;
62
63 void SetText( const OUString& rStr ) override;
64 OUString GetText() const override;
65
66 void SetEditModifyHdl( const Link<Edit&,void>& rLink );
67};
68
69
70/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SystemTextColorFlags
void SetText(const OUString &rStr) override
Definition: filectrl.cxx:95
OUString maButtonText
Definition: filectrl.hxx:44
virtual void dispose() override
Definition: filectrl.cxx:88
FileControl(vcl::Window *pParent, WinBits nStyle)
Definition: filectrl.cxx:37
DECL_LINK(ButtonHdl, Button *, void)
WinBits ImplInitStyle(WinBits nStyle)
Definition: filectrl.cxx:55
void StateChanged(StateChangedType nType) override
Definition: filectrl.cxx:107
PushButton & GetButton()
Definition: filectrl.hxx:59
OUString GetText() const override
Definition: filectrl.cxx:101
void SetEditModifyHdl(const Link< Edit &, void > &rLink)
Definition: filectrl.cxx:183
Edit & GetEdit()
Definition: filectrl.hxx:58
void Resize() override
Definition: filectrl.cxx:146
void Draw(OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags) override
Definition: filectrl.cxx:190
VclPtr< Edit > maEdit
Definition: filectrl.hxx:42
virtual ~FileControl() override
Definition: filectrl.cxx:83
FileControlMode_Internal mnInternalFlags
Definition: filectrl.hxx:45
VclPtr< PushButton > maButton
Definition: filectrl.hxx:43
void GetFocus() override
Definition: filectrl.cxx:176
FileControlMode_Internal
Definition: filectrl.hxx:29
StateChangedType
sal_Int64 WinBits