1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: postdlg.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_POSTDLG_HXX
31 #define _SVX_POSTDLG_HXX
33 // include ---------------------------------------------------------------
35 #ifndef _GROUP_HXX //autogen
36 #include <vcl/group.hxx>
38 #ifndef _IMAGEBTN_HXX //autogen
39 #include <vcl/imagebtn.hxx>
41 #ifndef _EDIT_HXX //autogen
42 #include <vcl/edit.hxx>
44 #include <svtools/stdctrl.hxx>
45 #include <sfx2/basedlgs.hxx>
46 #include <svtools/svmedit.hxx>
48 // class SvxPostItDialog -------------------------------------------------
50 {k:\svx\prototyp\dialog\memo.bmp}
53 In diesem Dialog kann eine Notiz erstellt oder bearbeitet werden. Wenn die
54 Applikation eine Liste von Notizen haelt, kann mit Hilfe von Links, ueber
55 diese Liste iteriert werden.
58 <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR>
59 <SvxPostitDateItem><SID_ATTR_POSTIT_DATE>
60 <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT>
63 class SvxPostItDialog
: public SfxModalDialog
66 SvxPostItDialog( Window
* pParent
, const SfxItemSet
& rCoreSet
,
67 BOOL bPrevNext
= FALSE
, BOOL bRedline
= FALSE
);
70 static USHORT
* GetRanges();
71 const SfxItemSet
* GetOutputItemSet() const { return pOutSet
; }
73 Link
GetPrevHdl() const { return aPrevHdlLink
; }
74 void SetPrevHdl( const Link
& rLink
)
75 { aPrevHdlLink
= rLink
; }
76 Link
GetNextHdl() const { return aNextHdlLink
; }
77 void SetNextHdl( const Link
& rLink
)
78 { aNextHdlLink
= rLink
; }
80 void EnableTravel(BOOL bNext
, BOOL bPrev
);
81 inline String
GetNote() { return aEditED
.GetText(); }
82 inline void SetNote(const String
& rTxt
) { aEditED
.SetText(rTxt
); }
84 void ShowLastAuthor(const String
& rAuthor
, const String
& rDate
);
85 inline void DontChangeAuthor() { aAuthorBtn
.Enable(FALSE
); }
86 inline void HideAuthor() { aAuthorBtn
.Hide(); }
87 inline void SetReadonlyPostIt(BOOL bDisable
)
89 aOKBtn
.Enable( !bDisable
);
90 aEditED
.SetReadOnly( bDisable
);
91 aAuthorBtn
.Enable( !bDisable
);
93 inline BOOL
IsOkEnabled() const { return aOKBtn
.IsEnabled(); }
97 FixedText aLastEditLabelFT
;
98 FixedInfo aLastEditFT
;
101 MultiLineEdit aEditED
;
104 PushButton aAuthorBtn
;
107 CancelButton aCancelBtn
;
110 ImageButton aPrevBtn
;
111 ImageButton aNextBtn
;
113 const SfxItemSet
& rSet
;
119 #ifdef _SVX_POSTDLG_CXX
120 DECL_LINK( Stamp
, Button
* );
121 DECL_LINK( OKHdl
, Button
* );
122 DECL_LINK( PrevHdl
, Button
* );
123 DECL_LINK( NextHdl
, Button
* );