1*c4eee24dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c4eee24dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c4eee24dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c4eee24dSAndrew Rist * distributed with this work for additional information 6*c4eee24dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c4eee24dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c4eee24dSAndrew Rist * "License"); you may not use this file except in compliance 9*c4eee24dSAndrew Rist * with the License. You may obtain a copy of the License at 10*c4eee24dSAndrew Rist * 11*c4eee24dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*c4eee24dSAndrew Rist * 13*c4eee24dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c4eee24dSAndrew Rist * software distributed under the License is distributed on an 15*c4eee24dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c4eee24dSAndrew Rist * KIND, either express or implied. See the License for the 17*c4eee24dSAndrew Rist * specific language governing permissions and limitations 18*c4eee24dSAndrew Rist * under the License. 19*c4eee24dSAndrew Rist * 20*c4eee24dSAndrew Rist *************************************************************/ 21*c4eee24dSAndrew Rist 22*c4eee24dSAndrew Rist 23cdf0e10cSrcweir #ifndef _SVX_POSTDLG_HXX 24cdf0e10cSrcweir #define _SVX_POSTDLG_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir // include --------------------------------------------------------------- 27cdf0e10cSrcweir 28cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen 29cdf0e10cSrcweir #include <vcl/group.hxx> 30cdf0e10cSrcweir #endif 31cdf0e10cSrcweir #ifndef _IMAGEBTN_HXX //autogen 32cdf0e10cSrcweir #include <vcl/button.hxx> 33cdf0e10cSrcweir #endif 34cdf0e10cSrcweir #ifndef _EDIT_HXX //autogen 35cdf0e10cSrcweir #include <vcl/edit.hxx> 36cdf0e10cSrcweir #endif 37cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 38cdf0e10cSrcweir #include <sfx2/basedlgs.hxx> 39cdf0e10cSrcweir #include <svtools/svmedit.hxx> 40cdf0e10cSrcweir 41cdf0e10cSrcweir // class SvxPostItDialog ------------------------------------------------- 42cdf0e10cSrcweir /* 43cdf0e10cSrcweir {k:\svx\prototyp\dialog\memo.bmp} 44cdf0e10cSrcweir 45cdf0e10cSrcweir [Beschreibung] 46cdf0e10cSrcweir In diesem Dialog kann eine Notiz erstellt oder bearbeitet werden. Wenn die 47cdf0e10cSrcweir Applikation eine Liste von Notizen haelt, kann mit Hilfe von Links, ueber 48cdf0e10cSrcweir diese Liste iteriert werden. 49cdf0e10cSrcweir 50cdf0e10cSrcweir [Items] 51cdf0e10cSrcweir <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR> 52cdf0e10cSrcweir <SvxPostitDateItem><SID_ATTR_POSTIT_DATE> 53cdf0e10cSrcweir <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT> 54cdf0e10cSrcweir */ 55cdf0e10cSrcweir 56cdf0e10cSrcweir class SvxPostItDialog : public SfxModalDialog 57cdf0e10cSrcweir { 58cdf0e10cSrcweir public: 59cdf0e10cSrcweir SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet, 60cdf0e10cSrcweir sal_Bool bPrevNext = sal_False, sal_Bool bRedline = sal_False ); 61cdf0e10cSrcweir ~SvxPostItDialog(); 62cdf0e10cSrcweir 63cdf0e10cSrcweir static sal_uInt16* GetRanges(); GetOutputItemSet() const64cdf0e10cSrcweir const SfxItemSet* GetOutputItemSet() const { return pOutSet; } 65cdf0e10cSrcweir GetPrevHdl() const66cdf0e10cSrcweir Link GetPrevHdl() const { return aPrevHdlLink; } SetPrevHdl(const Link & rLink)67cdf0e10cSrcweir void SetPrevHdl( const Link& rLink ) 68cdf0e10cSrcweir { aPrevHdlLink = rLink; } GetNextHdl() const69cdf0e10cSrcweir Link GetNextHdl() const { return aNextHdlLink; } SetNextHdl(const Link & rLink)70cdf0e10cSrcweir void SetNextHdl( const Link& rLink ) 71cdf0e10cSrcweir { aNextHdlLink = rLink; } 72cdf0e10cSrcweir 73cdf0e10cSrcweir void EnableTravel(sal_Bool bNext, sal_Bool bPrev); GetNote()74cdf0e10cSrcweir inline String GetNote() { return aEditED.GetText(); } SetNote(const String & rTxt)75cdf0e10cSrcweir inline void SetNote(const String& rTxt) { aEditED.SetText(rTxt); } 76cdf0e10cSrcweir 77cdf0e10cSrcweir void ShowLastAuthor(const String& rAuthor, const String& rDate); DontChangeAuthor()78cdf0e10cSrcweir inline void DontChangeAuthor() { aAuthorBtn.Enable(sal_False); } HideAuthor()79cdf0e10cSrcweir inline void HideAuthor() { aAuthorBtn.Hide(); } SetReadonlyPostIt(sal_Bool bDisable)80cdf0e10cSrcweir inline void SetReadonlyPostIt(sal_Bool bDisable) 81cdf0e10cSrcweir { 82cdf0e10cSrcweir aOKBtn.Enable( !bDisable ); 83cdf0e10cSrcweir aEditED.SetReadOnly( bDisable ); 84cdf0e10cSrcweir aAuthorBtn.Enable( !bDisable ); 85cdf0e10cSrcweir } IsOkEnabled() const86cdf0e10cSrcweir inline sal_Bool IsOkEnabled() const { return aOKBtn.IsEnabled(); } 87cdf0e10cSrcweir 88cdf0e10cSrcweir private: 89cdf0e10cSrcweir FixedLine aPostItFL; 90cdf0e10cSrcweir FixedText aLastEditLabelFT; 91cdf0e10cSrcweir FixedInfo aLastEditFT; 92cdf0e10cSrcweir 93cdf0e10cSrcweir FixedText aEditFT; 94cdf0e10cSrcweir MultiLineEdit aEditED; 95cdf0e10cSrcweir 96cdf0e10cSrcweir FixedText aAuthorFT; 97cdf0e10cSrcweir PushButton aAuthorBtn; 98cdf0e10cSrcweir 99cdf0e10cSrcweir OKButton aOKBtn; 100cdf0e10cSrcweir CancelButton aCancelBtn; 101cdf0e10cSrcweir HelpButton aHelpBtn; 102cdf0e10cSrcweir 103cdf0e10cSrcweir ImageButton aPrevBtn; 104cdf0e10cSrcweir ImageButton aNextBtn; 105cdf0e10cSrcweir 106cdf0e10cSrcweir const SfxItemSet& rSet; 107cdf0e10cSrcweir SfxItemSet* pOutSet; 108cdf0e10cSrcweir 109cdf0e10cSrcweir Link aPrevHdlLink; 110cdf0e10cSrcweir Link aNextHdlLink; 111cdf0e10cSrcweir 112cdf0e10cSrcweir #ifdef _SVX_POSTDLG_CXX 113cdf0e10cSrcweir DECL_LINK( Stamp, Button* ); 114cdf0e10cSrcweir DECL_LINK( OKHdl, Button* ); 115cdf0e10cSrcweir DECL_LINK( PrevHdl, Button* ); 116cdf0e10cSrcweir DECL_LINK( NextHdl, Button* ); 117cdf0e10cSrcweir #endif 118cdf0e10cSrcweir }; 119cdf0e10cSrcweir 120cdf0e10cSrcweir 121cdf0e10cSrcweir #endif 122cdf0e10cSrcweir 123