Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / cui / source / options / personalization.hxx
blobc3ff06e3bcf52d95e0035ef881bf59dfa0fa4c6e
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/.
8 */
10 #ifndef CUI_PERSONALIZATION_HXX
11 #define CUI_PERSONALIZATION_HXX
13 #include <sfx2/tabdlg.hxx>
15 class FixedText;
17 class SvxPersonalizationTabPage : public SfxTabPage
19 using SfxTabPage::DeactivatePage;
21 private:
22 RadioButton *m_pNoBackground; ///< Just the default look, without any bitmap
23 RadioButton *m_pDefaultBackground; ///< Use the built-in bitmap for Writer background
24 RadioButton *m_pOwnBackground; ///< Use the user-defined bitmap
25 PushButton *m_pSelectBackground; ///< Let the user select in the 'own' case
26 OUString m_aBackgroundURL; ///< URL of the the background image in the 'own' case
28 RadioButton *m_pNoPersona; ///< Just the default look, without any bitmap
29 RadioButton *m_pDefaultPersona; ///< Use the built-in bitmap
30 RadioButton *m_pOwnPersona; ///< Use the user-defined bitmap
31 PushButton *m_pSelectPersona; ///< Let the user select in the 'own' case
32 OUString m_aPersonaSettings; ///< Header and footer images + color to be set in the settings.
34 public:
35 SvxPersonalizationTabPage( Window *pParent, const SfxItemSet &rSet );
36 ~SvxPersonalizationTabPage();
38 static SfxTabPage* Create( Window *pParent, const SfxItemSet &rSet );
40 /// Apply the settings ([OK] button).
41 virtual sal_Bool FillItemSet( SfxItemSet &rSet );
43 /// Reset to default settings ([Revert] button).
44 virtual void Reset( const SfxItemSet &rSet );
46 private:
47 /// Handle the bacground selection
48 DECL_LINK( SelectBackground, PushButton* );
50 /// Handle the Persona selection
51 DECL_LINK( SelectPersona, PushButton* );
53 /// When 'own' is chosen, but the background image or Persona is not chosen yet.
54 DECL_LINK( ForceSelect, RadioButton* );
56 /// Download the bitmaps + color settings, and copy them to user's profile.
57 bool CopyPersonaToGallery( const OUString &rURL );
60 #endif // CUI_PERSONALIZATION_HXX
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */