1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_BROWSERLINE_HXX
21 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_BROWSERLINE_HXX
23 #include <com/sun/star/inspection/XPropertyControl.hpp>
24 #include <vcl/fixed.hxx>
25 #include <vcl/button.hxx>
27 namespace com
{ namespace sun
{ namespace star
{ namespace inspection
{ namespace PropertyLineElement
29 const sal_Int16 CompleteLine
= 0x4000;
40 class IButtonClickListener
43 virtual void buttonClicked( OBrowserLine
* _pLine
, bool _bPrimary
) = 0;
46 ~IButtonClickListener() {}
53 OUString m_sEntryName
;
54 VclPtr
<FixedText
> m_aFtTitle
;
57 css::uno::Reference
< css::inspection::XPropertyControl
>
59 VclPtr
<vcl::Window
> m_pControlWindow
;
60 VclPtr
<PushButton
> m_pBrowseButton
;
61 VclPtr
<PushButton
> m_pAdditionalBrowseButton
;
62 IButtonClickListener
* m_pClickListener
;
63 VclPtr
<vcl::Window
> m_pTheParent
;
64 sal_uInt16 m_nNameWidth
;
65 sal_uInt16 m_nEnableFlags
;
70 OBrowserLine( const OUString
& _rEntryName
, vcl::Window
* pParent
);
73 void setControl( const css::uno::Reference
< css::inspection::XPropertyControl
>& _rxControl
);
74 const css::uno::Reference
< css::inspection::XPropertyControl
>& getControl() const
78 vcl::Window
* getControlWindow() const
80 return m_pControlWindow
;
83 const OUString
& GetEntryName() const { return m_sEntryName
; }
85 void SetComponentHelpIds(const OString
& _rHelpId
);
87 void SetTitle(const OUString
& rString
);
88 void FullFillTitleString();
89 OUString
GetTitle() const;
90 void SetTitleWidth(sal_uInt16
);
92 void SetPosSizePixel(Point aPos
,Size aSize
);
93 void Show(bool bFlag
=true);
95 bool IsVisible() const;
97 vcl::Window
* GetRefWindow();
98 void SetTabOrder(vcl::Window
* pRefWindow
, ZOrderFlags nFlags
);
101 void ShowBrowseButton( const OUString
& _rImageURL
, bool _bPrimary
);
102 void ShowBrowseButton( const Image
& _rImage
, bool _bPrimary
);
103 void ShowBrowseButton( bool _bPrimary
);
104 void HideBrowseButton( bool _bPrimary
);
106 void EnablePropertyControls( sal_Int16 _nControls
, bool _bEnable
);
107 void EnablePropertyLine( bool _bEnable
);
109 void SetReadOnly( bool _bReadOnly
);
111 void SetClickListener( IButtonClickListener
* _pListener
);
113 void IndentTitle( bool _bIndent
);
116 DECL_LINK( OnButtonClicked
, Button
*, void );
117 DECL_LINK( OnButtonFocus
, Control
&, void );
119 void implHideBrowseButton(bool _bPrimary
);
120 void implUpdateEnabledDisabled();
122 void impl_layoutComponents();
124 PushButton
& impl_ensureButton( bool _bPrimary
);
131 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_BROWSERLINE_HXX
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */