update dev300-m58
[ooovba.git] / svx / source / cui / postdlg.hxx
blob85e71d255c58cf4c8a2fc290d04b65b2293f4619
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: postdlg.hxx,v $
10 * $Revision: 1.4 $
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>
37 #endif
38 #ifndef _IMAGEBTN_HXX //autogen
39 #include <vcl/imagebtn.hxx>
40 #endif
41 #ifndef _EDIT_HXX //autogen
42 #include <vcl/edit.hxx>
43 #endif
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}
52 [Beschreibung]
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.
57 [Items]
58 <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR>
59 <SvxPostitDateItem><SID_ATTR_POSTIT_DATE>
60 <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT>
63 class SvxPostItDialog : public SfxModalDialog
65 public:
66 SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet,
67 BOOL bPrevNext = FALSE, BOOL bRedline = FALSE );
68 ~SvxPostItDialog();
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(); }
95 private:
96 FixedLine aPostItFL;
97 FixedText aLastEditLabelFT;
98 FixedInfo aLastEditFT;
100 FixedText aEditFT;
101 MultiLineEdit aEditED;
103 FixedText aAuthorFT;
104 PushButton aAuthorBtn;
106 OKButton aOKBtn;
107 CancelButton aCancelBtn;
108 HelpButton aHelpBtn;
110 ImageButton aPrevBtn;
111 ImageButton aNextBtn;
113 const SfxItemSet& rSet;
114 SfxItemSet* pOutSet;
116 Link aPrevHdlLink;
117 Link aNextHdlLink;
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* );
124 #endif
128 #endif