1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _SVX_POSTDLG_HXX 28 #define _SVX_POSTDLG_HXX 29 30 // include --------------------------------------------------------------- 31 32 #ifndef _GROUP_HXX //autogen 33 #include <vcl/group.hxx> 34 #endif 35 #ifndef _IMAGEBTN_HXX //autogen 36 #include <vcl/button.hxx> 37 #endif 38 #ifndef _EDIT_HXX //autogen 39 #include <vcl/edit.hxx> 40 #endif 41 #include <svtools/stdctrl.hxx> 42 #include <sfx2/basedlgs.hxx> 43 #include <svtools/svmedit.hxx> 44 45 // class SvxPostItDialog ------------------------------------------------- 46 /* 47 {k:\svx\prototyp\dialog\memo.bmp} 48 49 [Beschreibung] 50 In diesem Dialog kann eine Notiz erstellt oder bearbeitet werden. Wenn die 51 Applikation eine Liste von Notizen haelt, kann mit Hilfe von Links, ueber 52 diese Liste iteriert werden. 53 54 [Items] 55 <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR> 56 <SvxPostitDateItem><SID_ATTR_POSTIT_DATE> 57 <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT> 58 */ 59 60 class SvxPostItDialog : public SfxModalDialog 61 { 62 public: 63 SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet, 64 sal_Bool bPrevNext = sal_False, sal_Bool bRedline = sal_False ); 65 ~SvxPostItDialog(); 66 67 static sal_uInt16* GetRanges(); 68 const SfxItemSet* GetOutputItemSet() const { return pOutSet; } 69 70 Link GetPrevHdl() const { return aPrevHdlLink; } 71 void SetPrevHdl( const Link& rLink ) 72 { aPrevHdlLink = rLink; } 73 Link GetNextHdl() const { return aNextHdlLink; } 74 void SetNextHdl( const Link& rLink ) 75 { aNextHdlLink = rLink; } 76 77 void EnableTravel(sal_Bool bNext, sal_Bool bPrev); 78 inline String GetNote() { return aEditED.GetText(); } 79 inline void SetNote(const String& rTxt) { aEditED.SetText(rTxt); } 80 81 void ShowLastAuthor(const String& rAuthor, const String& rDate); 82 inline void DontChangeAuthor() { aAuthorBtn.Enable(sal_False); } 83 inline void HideAuthor() { aAuthorBtn.Hide(); } 84 inline void SetReadonlyPostIt(sal_Bool bDisable) 85 { 86 aOKBtn.Enable( !bDisable ); 87 aEditED.SetReadOnly( bDisable ); 88 aAuthorBtn.Enable( !bDisable ); 89 } 90 inline sal_Bool IsOkEnabled() const { return aOKBtn.IsEnabled(); } 91 92 private: 93 FixedLine aPostItFL; 94 FixedText aLastEditLabelFT; 95 FixedInfo aLastEditFT; 96 97 FixedText aEditFT; 98 MultiLineEdit aEditED; 99 100 FixedText aAuthorFT; 101 PushButton aAuthorBtn; 102 103 OKButton aOKBtn; 104 CancelButton aCancelBtn; 105 HelpButton aHelpBtn; 106 107 ImageButton aPrevBtn; 108 ImageButton aNextBtn; 109 110 const SfxItemSet& rSet; 111 SfxItemSet* pOutSet; 112 113 Link aPrevHdlLink; 114 Link aNextHdlLink; 115 116 #ifdef _SVX_POSTDLG_CXX 117 DECL_LINK( Stamp, Button* ); 118 DECL_LINK( OKHdl, Button* ); 119 DECL_LINK( PrevHdl, Button* ); 120 DECL_LINK( NextHdl, Button* ); 121 #endif 122 }; 123 124 125 #endif 126 127