update credits
[LibreOffice.git] / cui / source / inc / postdlg.hxx
blob4ae9b7d3f666e2c8236d017c979cb189fbf41a5d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/button.hxx>
23 #include <vcl/edit.hxx>
24 #include <vcl/group.hxx>
25 #include <vcl/layout.hxx>
26 #include <svtools/stdctrl.hxx>
27 #include <sfx2/basedlgs.hxx>
28 #include <svtools/svmedit.hxx>
30 // class SvxPostItDialog -------------------------------------------------
32 [Description]
33 In this dialog a note can be created or edited. If the
34 application holds a list of notes, it can be iterated
35 over this list with links.
37 [Items]
38 <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR>
39 <SvxPostitDateItem><SID_ATTR_POSTIT_DATE>
40 <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT>
43 class SvxPostItDialog : public SfxModalDialog
45 public:
46 SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet,
47 bool bPrevNext = false);
48 ~SvxPostItDialog();
50 static sal_uInt16* GetRanges();
51 const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
53 Link GetPrevHdl() const { return aPrevHdlLink; }
54 void SetPrevHdl( const Link& rLink )
55 { aPrevHdlLink = rLink; }
56 Link GetNextHdl() const { return aNextHdlLink; }
57 void SetNextHdl( const Link& rLink )
58 { aNextHdlLink = rLink; }
60 void EnableTravel(sal_Bool bNext, sal_Bool bPrev);
61 String GetNote()
63 return m_pEditED->GetText();
65 void SetNote(const OUString& rTxt)
67 m_pEditED->SetText(rTxt);
69 void ShowLastAuthor(const String& rAuthor, const String& rDate);
70 void DontChangeAuthor()
72 m_pAuthorBtn->Enable(false);
74 void HideAuthor()
76 m_pInsertAuthor->Hide();
78 void SetReadonlyPostIt(bool bDisable)
80 m_pOKBtn->Enable( !bDisable );
81 m_pEditED->SetReadOnly( bDisable );
82 m_pAuthorBtn->Enable( !bDisable );
84 bool IsOkEnabled() const
86 return m_pOKBtn->IsEnabled();
89 private:
90 FixedText* m_pLastEditFT;
92 VclMultiLineEdit* m_pEditED;
94 VclContainer* m_pInsertAuthor;
95 PushButton* m_pAuthorBtn;
97 OKButton* m_pOKBtn;
99 PushButton* m_pPrevBtn;
100 PushButton* m_pNextBtn;
102 const SfxItemSet& rSet;
103 SfxItemSet* pOutSet;
105 Link aPrevHdlLink;
106 Link aNextHdlLink;
108 DECL_LINK(Stamp, void *);
109 DECL_LINK(OKHdl, void *);
110 DECL_LINK(PrevHdl, void *);
111 DECL_LINK(NextHdl, void *);
114 #endif
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */