Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svx / fmshell.hxx
blob592ed8c3538595f6614d740135c0d60acca94406
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fmshell.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_FMSHELL_HXX
31 #define _SVX_FMSHELL_HXX
33 // ***************************************************************************************************
34 // ***************************************************************************************************
35 // ***************************************************************************************************
37 #ifndef _SFX_SHELL_HXX //autogen
38 #include <bf_sfx2/shell.hxx>
39 #endif
41 #ifndef _SFXMODULE_HXX //autogen
42 #include <bf_sfx2/module.hxx>
43 #endif
45 #ifndef _SV_EVENT_HXX //autogen
46 #include <vcl/event.hxx>
47 #endif
49 #ifndef _SVX_SVXIDS_HRC
50 #include <bf_svx/svxids.hrc>
51 #endif
53 #ifndef _SVX_FMVIEW_HXX
54 #include <bf_svx/fmview.hxx>
55 #endif
57 #include <bf_svx/ifaceids.hxx>
58 namespace binfilter {
60 //========================================================================
61 class FmFormModel;
62 class FmFormPage;
63 class SvxFmTabWin;
64 class FmXFormShell;
65 class FmFormView;
67 //========================================================================
68 class FmDesignModeChangedHint : public SfxHint
70 sal_Bool m_bDesignMode;
72 public:
73 TYPEINFO();
74 FmDesignModeChangedHint( sal_Bool bDesMode );
75 virtual ~FmDesignModeChangedHint();
77 sal_Bool GetDesignMode() const { return m_bDesignMode; }
80 //========================================================================
81 class FmFormShell : public SfxShell
83 friend class FmFormView;
84 friend class FmXFormShell;
86 sal_uInt16 m_nLastSlot;
87 sal_Bool m_bDesignMode : 1;
88 sal_Bool m_bHasForms : 1; // Flag welches festhaelt, ob Formulare auf einer Seite
89 // vorhanden sind, nur für den DesignMode, siehe UIFeatureChanged!
91 FmXFormShell* m_pImpl;
92 FmFormView* m_pFormView;
93 FmFormModel* m_pFormModel;
94 SfxViewShell* m_pParentShell;
96 // die Markierungen einer FormView haben sich geaendert ...
97 void NotifyMarkListChanged(FmFormView*);
98 // (die FormView selber ist kein Broadcaster, deshalb kann sie den Formular-Explorer, den dieses
99 // Ereignis interesiert, nicht sauber verstaendigen (sie koennte sich lediglich von der Application
100 // das Navigator-Fenster geben lassen, aber das wollen wir ja nicht, ge ? ...))
102 //#ifdef NOOLDSV
103 // class FormShellWaitObject
104 // {
105 // Window* m_pWindow;
106 // public:
107 // FormShellWaitObject(const FmFormShell* _pShell);
108 // ~FormShellWaitObject();
109 // };
110 // friend class FormShellWaitObject;
112 // const OutputDevice* GetCurrentViewDevice() const { return m_pFormView ? m_pFormView->GetActualOutDev() : NULL; }
113 //#endif
115 public:
116 SFX_DECL_INTERFACE(SVX_INTERFACE_FORM_SH);
117 TYPEINFO();
119 FmFormShell(SfxViewShell* pParent, FmFormView* pView = NULL);
120 virtual ~FmFormShell();
122 virtual void Execute( SfxRequest& );
123 virtual void GetState( SfxItemSet& );
124 virtual sal_Bool HasUIFeature( sal_uInt32 nFeature );
127 void SetView(FmFormView* pView);
129 FmFormView* GetFormView() const { return m_pFormView; }
130 FmFormModel* GetFormModel() const { return m_pFormModel; }
131 FmFormPage* GetCurPage() const;
132 FmXFormShell* GetImpl() const {return m_pImpl;};
134 sal_uInt16 PrepareClose(sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False);
135 sal_Bool IsDesignMode() const {return m_bDesignMode;}
137 virtual void Activate(sal_Bool bMDI);
138 virtual void Deactivate(sal_Bool bMDI);
140 protected:
142 // gibt es ein Formular auf der aktuellen Seite?
143 void DetermineForms(sal_Bool bInvalidate);
144 void SetDesignMode( sal_Bool bDesign);
147 // ***************************************************************************************************
148 // ***************************************************************************************************
149 // ***************************************************************************************************
151 }//end of namespace binfilter
152 #endif // _SVX_FMSHELL_HXX