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 .
19 #ifndef _SVX_POSTDLG_HXX
20 #define _SVX_POSTDLG_HXX
22 #include <vcl/group.hxx>
23 #include <vcl/button.hxx>
24 #include <vcl/edit.hxx>
25 #include <svtools/stdctrl.hxx>
26 #include <sfx2/basedlgs.hxx>
27 #include <svtools/svmedit.hxx>
29 // class SvxPostItDialog -------------------------------------------------
31 {k:\svx\prototyp\dialog\memo.bmp}
34 In this dialog a note can be created or edited. If the
35 application holds a list of notes, it can be iterated
36 over this list with links.
39 <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR>
40 <SvxPostitDateItem><SID_ATTR_POSTIT_DATE>
41 <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT>
44 class SvxPostItDialog
: public SfxModalDialog
47 SvxPostItDialog( Window
* pParent
, const SfxItemSet
& rCoreSet
,
48 sal_Bool bPrevNext
= sal_False
, sal_Bool bRedline
= sal_False
);
51 static sal_uInt16
* GetRanges();
52 const SfxItemSet
* GetOutputItemSet() const { return pOutSet
; }
54 Link
GetPrevHdl() const { return aPrevHdlLink
; }
55 void SetPrevHdl( const Link
& rLink
)
56 { aPrevHdlLink
= rLink
; }
57 Link
GetNextHdl() const { return aNextHdlLink
; }
58 void SetNextHdl( const Link
& rLink
)
59 { aNextHdlLink
= rLink
; }
61 void EnableTravel(sal_Bool bNext
, sal_Bool bPrev
);
62 inline String
GetNote() { return aEditED
.GetText(); }
63 inline void SetNote(const String
& rTxt
) { aEditED
.SetText(rTxt
); }
65 void ShowLastAuthor(const String
& rAuthor
, const String
& rDate
);
66 inline void DontChangeAuthor() { aAuthorBtn
.Enable(sal_False
); }
67 inline void HideAuthor() { aAuthorFT
.Hide(); aAuthorBtn
.Hide(); }
68 inline void SetReadonlyPostIt(sal_Bool bDisable
)
70 aOKBtn
.Enable( !bDisable
);
71 aEditED
.SetReadOnly( bDisable
);
72 aAuthorBtn
.Enable( !bDisable
);
74 inline sal_Bool
IsOkEnabled() const { return aOKBtn
.IsEnabled(); }
78 FixedText aLastEditLabelFT
;
79 FixedInfo aLastEditFT
;
82 MultiLineEdit aEditED
;
85 PushButton aAuthorBtn
;
88 CancelButton aCancelBtn
;
94 const SfxItemSet
& rSet
;
100 #ifdef _SVX_POSTDLG_CXX
101 DECL_LINK(Stamp
, void *);
102 DECL_LINK(OKHdl
, void *);
103 DECL_LINK(PrevHdl
, void *);
104 DECL_LINK(NextHdl
, void *);
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */