LCOV - code coverage report
Current view: top level - libreoffice/sfx2/inc/sfx2 - basedlgs.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 13 0.0 %
Date: 2012-12-27 Functions: 0 10 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : #ifndef _BASEDLGS_HXX
      20             : #define _BASEDLGS_HXX
      21             : 
      22             : #include "sal/config.h"
      23             : #include "sfx2/dllapi.h"
      24             : #include "sal/types.h"
      25             : #include <vcl/builder.hxx>
      26             : #include <vcl/dialog.hxx>
      27             : #include <vcl/floatwin.hxx>
      28             : #include <vcl/timer.hxx>
      29             : 
      30             : class TabPage;
      31             : class SfxTabPage;
      32             : class SfxBindings;
      33             : class SfxChildWindow;
      34             : struct SfxChildWinInfo;
      35             : class SfxItemSet;
      36             : class SfxItemPool;
      37             : class OKButton;
      38             : class CancelButton;
      39             : class HelpButton;
      40             : class Button;
      41             : class FixedLine;
      42             : 
      43             : // class SfxModalDefParentHelper -----------------------------------------
      44             : 
      45             : class SfxModalDefParentHelper
      46             : {
      47             : private:
      48             :     Window *pOld;
      49             : 
      50             : public:
      51             :     SfxModalDefParentHelper(Window* pWindow);
      52             :     ~SfxModalDefParentHelper();
      53             : };
      54             : 
      55             : // class SfxModalDialog --------------------------------------------------
      56             : 
      57             : class SFX2_DLLPUBLIC SfxModalDialog: public ModalDialog
      58             : {
      59             :     sal_uInt32              nUniqId;
      60             :     String                  aExtraData;
      61             :     const SfxItemSet*       pInputSet;
      62             :     SfxItemSet*             pOutputSet;
      63             : 
      64             : private:
      65             :     SAL_DLLPRIVATE SfxModalDialog(SfxModalDialog &); // not defined
      66             :     SAL_DLLPRIVATE void operator =(SfxModalDialog &); // not defined
      67             : 
      68             :     SAL_DLLPRIVATE void SetDialogData_Impl();
      69             :     SAL_DLLPRIVATE void GetDialogData_Impl();
      70             :     SAL_DLLPRIVATE void init();
      71             : 
      72             : protected:
      73             :     SfxModalDialog(Window *pParent, const ResId& );
      74             :     SfxModalDialog(Window *pParent, const rtl::OString& rID, const rtl::OUString& rUIXMLDescription);
      75             :     SfxModalDialog(Window* pParent, sal_uInt32 nUniqueId, WinBits nWinStyle = WB_STDMODAL );
      76             : 
      77           0 :     String&             GetExtraData()      { return aExtraData; }
      78           0 :     sal_uInt32          GetUniqId() const   { return nUniqId; }
      79             :     SfxItemSet*         GetItemSet()        { return pOutputSet; }
      80             :     void                CreateOutputItemSet( SfxItemPool& rPool );
      81             :     void                CreateOutputItemSet( const SfxItemSet& rInput );
      82           0 :     void                SetInputSet( const SfxItemSet* pInSet ) { pInputSet = pInSet; }
      83           0 :     SfxItemSet*         GetOutputSetImpl() { return pOutputSet; }
      84             : 
      85             : public:
      86             :     ~SfxModalDialog();
      87           0 :     const SfxItemSet*   GetOutputItemSet() const { return pOutputSet; }
      88           0 :     const SfxItemSet*   GetInputItemSet() const { return pInputSet; }
      89             : };
      90             : 
      91             : // class SfxModelessDialog --------------------------------------------------
      92             : class SfxModelessDialog_Impl;
      93             : class SFX2_DLLPUBLIC SfxModelessDialog: public ModelessDialog
      94             : {
      95             :     SfxBindings*            pBindings;
      96             :     Size                    aSize;
      97             :     SfxModelessDialog_Impl* pImp;
      98             : 
      99             :     SAL_DLLPRIVATE SfxModelessDialog(SfxModelessDialog &); // not defined
     100             :     SAL_DLLPRIVATE void operator =(SfxModelessDialog &); // not defined
     101             : 
     102             :     void Init(SfxBindings *pBindinx, SfxChildWindow *pCW);
     103             : 
     104             : protected:
     105             :                             SfxModelessDialog( SfxBindings*, SfxChildWindow*,
     106             :                                 Window*, const ResId& );
     107             :                             SfxModelessDialog( SfxBindings*, SfxChildWindow*,
     108             :                                 Window*, const rtl::OString& rID, const rtl::OUString& rUIXMLDescription );
     109             :                             ~SfxModelessDialog();
     110             :     virtual sal_Bool            Close();
     111             :     virtual void            Resize();
     112             :     virtual void            Move();
     113             :     virtual void            StateChanged( StateChangedType nStateChange );
     114             : 
     115             : public:
     116             :     virtual void            FillInfo(SfxChildWinInfo&) const;
     117             :     void                    Initialize (SfxChildWinInfo* pInfo);
     118             :     virtual long            Notify( NotifyEvent& rNEvt );
     119           0 :     SfxBindings&            GetBindings()
     120           0 :                             { return *pBindings; }
     121             : 
     122             :     DECL_LINK(TimerHdl, void *);
     123             : 
     124             : };
     125             : 
     126             : // class SfxFloatingWindow --------------------------------------------------
     127             : class SfxFloatingWindow_Impl;
     128             : class SFX2_DLLPUBLIC SfxFloatingWindow: public FloatingWindow
     129             : {
     130             :     SfxBindings*            pBindings;
     131             :     Size                    aSize;
     132             :     SfxFloatingWindow_Impl* pImp;
     133             : 
     134             :     SAL_DLLPRIVATE SfxFloatingWindow(SfxFloatingWindow &); // not defined
     135             :     SAL_DLLPRIVATE void operator =(SfxFloatingWindow &); // not defined
     136             : 
     137             : protected:
     138             :                             SfxFloatingWindow( SfxBindings *pBindings,
     139             :                                               SfxChildWindow *pCW,
     140             :                                               Window* pParent,
     141             :                                               WinBits nWinBits=WB_STDMODELESS);
     142             :                             SfxFloatingWindow( SfxBindings *pBindings,
     143             :                                               SfxChildWindow *pCW,
     144             :                                               Window* pParent,
     145             :                                               const ResId& rResId);
     146             :                             ~SfxFloatingWindow();
     147             : 
     148             :     virtual void            StateChanged( StateChangedType nStateChange );
     149             :     virtual sal_Bool            Close();
     150             :     virtual void            Resize();
     151             :     virtual void            Move();
     152             :     virtual long            Notify( NotifyEvent& rNEvt );
     153           0 :     SfxBindings&            GetBindings()
     154           0 :                             { return *pBindings; }
     155             : 
     156             : public:
     157             :     virtual void            FillInfo(SfxChildWinInfo&) const;
     158             :     void                    Initialize (SfxChildWinInfo* pInfo);
     159             : 
     160             :     DECL_LINK(TimerHdl, void *);
     161             : 
     162             : };
     163             : 
     164             : // class SfxSingleTabDialog --------------------------------------------------
     165             : 
     166           0 : struct SingleTabDlgImpl
     167             : {
     168             :     TabPage*                    m_pTabPage;
     169             :     SfxTabPage*                 m_pSfxPage;
     170             :     FixedLine*                  m_pLine;
     171             :     String                      m_sInfoURL;
     172             :     Link                        m_aInfoLink;
     173             : 
     174           0 :     SingleTabDlgImpl() :
     175           0 :         m_pTabPage( NULL ), m_pSfxPage( NULL ), m_pLine( NULL ) {}
     176             : };
     177             : 
     178             : typedef sal_uInt16* (*GetTabPageRanges)(); // liefert internationale Which-Werte
     179             : 
     180             : class SFX2_DLLPUBLIC SfxSingleTabDialog : public SfxModalDialog
     181             : {
     182             : public:
     183             :     SfxSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, sal_uInt16 nUniqueId );
     184             :     SfxSingleTabDialog( Window* pParent, sal_uInt16 nUniqueId, const SfxItemSet* pInSet = 0 );
     185             : 
     186             :     virtual             ~SfxSingleTabDialog();
     187             : 
     188             :     void                SetTabPage( SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0 );
     189             :     SfxTabPage*         GetTabPage() const { return pImpl->m_pSfxPage; }
     190             : 
     191             :     OKButton*           GetOKButton() const { return pOKBtn; }
     192             :     CancelButton*       GetCancelButton() const { return pCancelBtn; }
     193             : 
     194             : private:
     195             :     GetTabPageRanges    fnGetRanges;
     196             : 
     197             :     OKButton*           pOKBtn;
     198             :     CancelButton*       pCancelBtn;
     199             :     HelpButton*         pHelpBtn;
     200             : 
     201             :     SingleTabDlgImpl*   pImpl;
     202             : 
     203             :     DECL_DLLPRIVATE_LINK(OKHdl_Impl, void *);
     204             : };
     205             : 
     206             : #endif
     207             : 
     208             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10