bump product version to 5.0.4.1
[LibreOffice.git] / cui / source / inc / postdlg.hxx
blob0c98b22ca2bd66cb441c80ae725da5932ecc22a1
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 INCLUDED_CUI_SOURCE_INC_POSTDLG_HXX
20 #define INCLUDED_CUI_SOURCE_INC_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(vcl::Window* pParent, const SfxItemSet& rCoreSet,
47 bool bPrevNext = false);
48 virtual ~SvxPostItDialog();
49 virtual void dispose() SAL_OVERRIDE;
51 static const sal_uInt16* GetRanges();
52 const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
54 Link<> GetPrevHdl() const { return aPrevHdlLink; }
55 void SetPrevHdl( const Link<>& rLink )
56 { aPrevHdlLink = rLink; }
57 Link<> GetNextHdl() const { return aNextHdlLink; }
58 void SetNextHdl( const Link<>& rLink )
59 { aNextHdlLink = rLink; }
61 void EnableTravel(bool bNext, bool bPrev);
62 OUString GetNote()
64 return m_pEditED->GetText();
66 void SetNote(const OUString& rTxt)
68 m_pEditED->SetText(rTxt);
70 void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate);
71 void DontChangeAuthor()
73 m_pAuthorBtn->Enable(false);
75 void HideAuthor()
77 m_pInsertAuthor->Hide();
79 void SetReadonlyPostIt(bool bDisable)
81 m_pOKBtn->Enable( !bDisable );
82 m_pEditED->SetReadOnly( bDisable );
83 m_pAuthorBtn->Enable( !bDisable );
85 bool IsOkEnabled() const
87 return m_pOKBtn->IsEnabled();
90 private:
91 VclPtr<FixedText> m_pLastEditFT;
93 VclPtr<VclMultiLineEdit> m_pEditED;
95 VclPtr<VclContainer> m_pInsertAuthor;
96 VclPtr<PushButton> m_pAuthorBtn;
98 VclPtr<OKButton> m_pOKBtn;
100 VclPtr<PushButton> m_pPrevBtn;
101 VclPtr<PushButton> m_pNextBtn;
103 const SfxItemSet& rSet;
104 SfxItemSet* pOutSet;
106 Link<> aPrevHdlLink;
107 Link<> aNextHdlLink;
109 DECL_LINK(Stamp, void *);
110 DECL_LINK(OKHdl, void *);
111 DECL_LINK(PrevHdl, void *);
112 DECL_LINK(NextHdl, void *);
115 #endif
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */