xref: /trunk/main/sfx2/source/inc/templdgi.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1353d8f4dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3353d8f4dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4353d8f4dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5353d8f4dSAndrew Rist  * distributed with this work for additional information
6353d8f4dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7353d8f4dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8353d8f4dSAndrew Rist  * "License"); you may not use this file except in compliance
9353d8f4dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11353d8f4dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13353d8f4dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14353d8f4dSAndrew Rist  * software distributed under the License is distributed on an
15353d8f4dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16353d8f4dSAndrew Rist  * KIND, either express or implied.  See the License for the
17353d8f4dSAndrew Rist  * specific language governing permissions and limitations
18353d8f4dSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20353d8f4dSAndrew Rist  *************************************************************/
21353d8f4dSAndrew Rist 
22353d8f4dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _SFX_TEMPDLGI_HXX
24cdf0e10cSrcweir #define _SFX_TEMPDLGI_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir class SfxTemplateControllerItem;
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen
29cdf0e10cSrcweir #include <vcl/button.hxx>
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir #ifndef _TOOLBOX_HXX //autogen
32cdf0e10cSrcweir #include <vcl/toolbox.hxx>
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen
35cdf0e10cSrcweir #include <vcl/lstbox.hxx>
36cdf0e10cSrcweir #endif
37cdf0e10cSrcweir #include <svl/lstner.hxx>
38cdf0e10cSrcweir #include <svtools/svtreebx.hxx>
39cdf0e10cSrcweir #include <svl/eitem.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #define _SVSTDARR_USHORTS
42cdf0e10cSrcweir #include <svl/svstdarr.hxx>     // SvUShorts
43cdf0e10cSrcweir 
44cdf0e10cSrcweir #include <rsc/rscsfx.hxx>
45cdf0e10cSrcweir #include <tools/rtti.hxx>
46cdf0e10cSrcweir 
47cdf0e10cSrcweir #include <sfx2/childwin.hxx>
48cdf0e10cSrcweir #include <sfx2/templdlg.hxx>
49cdf0e10cSrcweir 
50cdf0e10cSrcweir class SfxStyleFamilies;
51cdf0e10cSrcweir class SfxStyleFamilyItem;
52cdf0e10cSrcweir class SfxTemplateItem;
53cdf0e10cSrcweir class SfxBindings;
54cdf0e10cSrcweir class SfxStyleSheetBasePool;
55cdf0e10cSrcweir class SvTreeListBox ;
56cdf0e10cSrcweir class StyleTreeListBox_Impl;
57cdf0e10cSrcweir class SfxTemplateDialog_Impl;
58cdf0e10cSrcweir class SfxCommonTemplateDialog_Impl;
59cdf0e10cSrcweir class SfxTemplateDialogWrapper;
60cdf0e10cSrcweir class SfxDockingWindow;
61cdf0e10cSrcweir 
62cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace frame { class XModuleManager; } } } }
63cdf0e10cSrcweir 
64cdf0e10cSrcweir // class DropListBox_Impl ------------------------------------------------
65cdf0e10cSrcweir 
66cdf0e10cSrcweir class DropListBox_Impl : public SvTreeListBox
67cdf0e10cSrcweir {
68cdf0e10cSrcweir private:
69cdf0e10cSrcweir     DECL_LINK( OnAsyncExecuteDrop, SvLBoxEntry* );
70cdf0e10cSrcweir     DECL_LINK( OnAsyncExecuteError, void* );
71cdf0e10cSrcweir 
72cdf0e10cSrcweir protected:
73cdf0e10cSrcweir     SfxCommonTemplateDialog_Impl* pDialog;
74cdf0e10cSrcweir     sal_uInt16                        nModifier;
75cdf0e10cSrcweir 
76cdf0e10cSrcweir public:
DropListBox_Impl(Window * pParent,const ResId & rId,SfxCommonTemplateDialog_Impl * pD)77cdf0e10cSrcweir     DropListBox_Impl( Window* pParent, const ResId& rId, SfxCommonTemplateDialog_Impl* pD ) :
78cdf0e10cSrcweir         SvTreeListBox( pParent, rId ), pDialog( pD ) {}
DropListBox_Impl(Window * pParent,WinBits nWinBits,SfxCommonTemplateDialog_Impl * pD)79cdf0e10cSrcweir     DropListBox_Impl( Window* pParent, WinBits nWinBits, SfxCommonTemplateDialog_Impl* pD ) :
80cdf0e10cSrcweir         SvTreeListBox( pParent, nWinBits ), pDialog( pD ) {}
81cdf0e10cSrcweir 
82cdf0e10cSrcweir     virtual void     MouseButtonDown( const MouseEvent& rMEvt );
83cdf0e10cSrcweir     virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
84cdf0e10cSrcweir     using SvLBox::ExecuteDrop;
85cdf0e10cSrcweir     virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
86cdf0e10cSrcweir 
GetModifier() const87cdf0e10cSrcweir     sal_uInt16           GetModifier() const { return nModifier; }
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     virtual long     Notify( NotifyEvent& rNEvt );
90cdf0e10cSrcweir };
91cdf0e10cSrcweir 
92cdf0e10cSrcweir // class SfxActionListBox ------------------------------------------------
93cdf0e10cSrcweir 
94cdf0e10cSrcweir class SfxActionListBox : public DropListBox_Impl
95cdf0e10cSrcweir {
96cdf0e10cSrcweir protected:
97cdf0e10cSrcweir public:
98cdf0e10cSrcweir     SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinBits );
99cdf0e10cSrcweir     SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent, const ResId &rResId );
100cdf0e10cSrcweir 
101cdf0e10cSrcweir     virtual PopupMenu*  CreateContextMenu( void );
102cdf0e10cSrcweir };
103cdf0e10cSrcweir 
104cdf0e10cSrcweir // class SfxCommonTemplateDialog_Impl ------------------------------------
105cdf0e10cSrcweir 
106cdf0e10cSrcweir struct Deleted
107cdf0e10cSrcweir {
108cdf0e10cSrcweir     bool bDead;
109cdf0e10cSrcweir 
DeletedDeleted110cdf0e10cSrcweir     Deleted() : bDead(false) {}
111cdf0e10cSrcweir 
operator ()Deleted112cdf0e10cSrcweir     inline bool operator()() { return bDead; }
113cdf0e10cSrcweir };
114cdf0e10cSrcweir 
115cdf0e10cSrcweir class SfxCommonTemplateDialog_Impl : public SfxListener
116cdf0e10cSrcweir {
117cdf0e10cSrcweir private:
118cdf0e10cSrcweir     class ISfxTemplateCommon_Impl : public ISfxTemplateCommon
119cdf0e10cSrcweir     {
120cdf0e10cSrcweir     private:
121cdf0e10cSrcweir         SfxCommonTemplateDialog_Impl* pDialog;
122cdf0e10cSrcweir     public:
ISfxTemplateCommon_Impl(SfxCommonTemplateDialog_Impl * pDialogP)123cdf0e10cSrcweir         ISfxTemplateCommon_Impl( SfxCommonTemplateDialog_Impl* pDialogP ) : pDialog( pDialogP ) {}
GetActualFamily() const124cdf0e10cSrcweir         virtual SfxStyleFamily GetActualFamily() const { return pDialog->GetActualFamily(); }
GetSelectedEntry() const125cdf0e10cSrcweir         virtual String GetSelectedEntry() const { return pDialog->GetSelectedEntry(); }
126cdf0e10cSrcweir     };
127cdf0e10cSrcweir 
128cdf0e10cSrcweir     ISfxTemplateCommon_Impl     aISfxTemplateCommon;
129cdf0e10cSrcweir 
130cdf0e10cSrcweir     void    ReadResource();
131cdf0e10cSrcweir     void    ClearResource();
132cdf0e10cSrcweir 
133cdf0e10cSrcweir protected:
134cdf0e10cSrcweir #define MAX_FAMILIES            5
135cdf0e10cSrcweir #define COUNT_BOUND_FUNC        13
136cdf0e10cSrcweir 
137cdf0e10cSrcweir #define UPDATE_FAMILY_LIST      0x0001
138cdf0e10cSrcweir #define UPDATE_FAMILY           0x0002
139cdf0e10cSrcweir 
140cdf0e10cSrcweir     friend class DropListBox_Impl;
141cdf0e10cSrcweir     friend class SfxTemplateControllerItem;
142cdf0e10cSrcweir     friend class SfxTemplateDialogWrapper;
143cdf0e10cSrcweir 
144cdf0e10cSrcweir     SfxBindings*                pBindings;
145cdf0e10cSrcweir     SfxTemplateControllerItem*  pBoundItems[COUNT_BOUND_FUNC];
146cdf0e10cSrcweir 
147cdf0e10cSrcweir     Window*                     pWindow;
148cdf0e10cSrcweir     SfxModule*                  pModule;
149cdf0e10cSrcweir     Timer*                      pTimer;
150cdf0e10cSrcweir 
151cdf0e10cSrcweir     ResId*                      m_pStyleFamiliesId;
152cdf0e10cSrcweir     SfxStyleFamilies*           pStyleFamilies;
153cdf0e10cSrcweir     SfxTemplateItem*            pFamilyState[MAX_FAMILIES];
154cdf0e10cSrcweir     SfxStyleSheetBasePool*      pStyleSheetPool;
155cdf0e10cSrcweir     SvTreeListBox*              pTreeBox;
156cdf0e10cSrcweir     SfxObjectShell*             pCurObjShell;
157cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager >
158cdf0e10cSrcweir                                 xModuleManager;
159cdf0e10cSrcweir     Deleted*                    pbDeleted;
160cdf0e10cSrcweir 
161cdf0e10cSrcweir     SfxActionListBox            aFmtLb;
162cdf0e10cSrcweir     ListBox                     aFilterLb;
163cdf0e10cSrcweir     Size                        aSize;
164cdf0e10cSrcweir 
165cdf0e10cSrcweir     sal_uInt16                      nActFamily; // Id in der ToolBox = Position - 1
166cdf0e10cSrcweir     sal_uInt16                      nActFilter; // FilterIdx
167cdf0e10cSrcweir     sal_uInt16                      nAppFilter; // Filter, den die Applikation gesetzt hat (fuer automatisch)
168cdf0e10cSrcweir 
169cdf0e10cSrcweir     sal_Bool                        bDontUpdate             :1,
170cdf0e10cSrcweir                                 bIsWater                :1,
171cdf0e10cSrcweir                                 bEnabled                :1,
172cdf0e10cSrcweir                                 bUpdate                 :1,
173cdf0e10cSrcweir                                 bUpdateFamily           :1,
174cdf0e10cSrcweir                                 bCanEdit                :1,
175cdf0e10cSrcweir                                 bCanDel                 :1,
176cdf0e10cSrcweir                                 bCanNew                 :1,
177cdf0e10cSrcweir                                 bWaterDisabled          :1,
178cdf0e10cSrcweir                                 bNewByExampleDisabled   :1,
179cdf0e10cSrcweir                                 bUpdateByExampleDisabled:1,
180cdf0e10cSrcweir                                 bTreeDrag               :1,
181cdf0e10cSrcweir                                 bHierarchical           :1,
182cdf0e10cSrcweir                                 bBindingUpdate          :1;
183cdf0e10cSrcweir 
184cdf0e10cSrcweir     DECL_LINK( FilterSelectHdl, ListBox * );
185cdf0e10cSrcweir     DECL_LINK( FmtSelectHdl, SvTreeListBox * );
186cdf0e10cSrcweir     DECL_LINK( ApplyHdl, Control * );
187cdf0e10cSrcweir     DECL_LINK( DropHdl, StyleTreeListBox_Impl * );
188cdf0e10cSrcweir     DECL_LINK( TimeOut, Timer * );
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 
EnableItem(sal_uInt16,sal_Bool=sal_True)191cdf0e10cSrcweir     virtual void        EnableItem( sal_uInt16 /*nMesId*/, sal_Bool /*bCheck*/ = sal_True ) {}
CheckItem(sal_uInt16,sal_Bool=sal_True)192cdf0e10cSrcweir     virtual void        CheckItem( sal_uInt16 /*nMesId*/, sal_Bool /*bCheck*/ = sal_True ) {}
IsCheckedItem(sal_uInt16)193cdf0e10cSrcweir     virtual sal_Bool        IsCheckedItem( sal_uInt16 /*nMesId*/ ) { return sal_True; }
LoadedFamilies()194cdf0e10cSrcweir     virtual void        LoadedFamilies() {}
Update()195cdf0e10cSrcweir     virtual void        Update() { UpdateStyles_Impl(UPDATE_FAMILY_LIST); }
196cdf0e10cSrcweir     virtual void        InvalidateBindings();
197cdf0e10cSrcweir     virtual void        InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten ) = 0;
198cdf0e10cSrcweir     virtual void        EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True ) = 0;
199cdf0e10cSrcweir     virtual void        ClearFamilyList() = 0;
200cdf0e10cSrcweir     virtual void        ReplaceUpdateButtonByMenu();
201cdf0e10cSrcweir 
202cdf0e10cSrcweir         void                NewHdl( void* );
203cdf0e10cSrcweir     void                EditHdl( void* );
204cdf0e10cSrcweir     void                DeleteHdl( void* );
205cdf0e10cSrcweir 
206cdf0e10cSrcweir     sal_Bool                Execute_Impl( sal_uInt16 nId, const String& rStr, const String& rRefStr,
207cdf0e10cSrcweir                                       sal_uInt16 nFamily, sal_uInt16 nMask = 0,
208cdf0e10cSrcweir                                       sal_uInt16* pIdx = NULL, const sal_uInt16* pModifier = NULL );
209cdf0e10cSrcweir 
210cdf0e10cSrcweir     void                        UpdateStyles_Impl(sal_uInt16 nFlags);
211cdf0e10cSrcweir     const SfxStyleFamilyItem*   GetFamilyItem_Impl() const;
IsInitialized()212cdf0e10cSrcweir     sal_Bool                        IsInitialized() { return nActFamily != 0xffff; }
213cdf0e10cSrcweir     void                        ResetFocus();
214cdf0e10cSrcweir     void                        EnableDelete();
215cdf0e10cSrcweir     void                        Initialize();
216cdf0e10cSrcweir 
217cdf0e10cSrcweir     void                FilterSelect( sal_uInt16 nFilterIdx, sal_Bool bForce = sal_False );
218cdf0e10cSrcweir     void                SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* );
219cdf0e10cSrcweir     void                SetWaterCanState( const SfxBoolItem* pItem );
220cdf0e10cSrcweir 
221cdf0e10cSrcweir     void                SelectStyle( const String& rStyle );
222cdf0e10cSrcweir     sal_Bool                HasSelectedStyle() const;
223cdf0e10cSrcweir     void                FillTreeBox();
224cdf0e10cSrcweir     void                Update_Impl();
225cdf0e10cSrcweir     void                UpdateFamily_Impl();
226cdf0e10cSrcweir 
227cdf0e10cSrcweir     // In welchem FamilyState muss ich nachsehen, um die Info der i-ten
228cdf0e10cSrcweir     // Family in der pStyleFamilies zu bekommen.
229cdf0e10cSrcweir     sal_uInt16              StyleNrToInfoOffset( sal_uInt16 i );
230cdf0e10cSrcweir     sal_uInt16              InfoOffsetToStyleNr( sal_uInt16 i );
231cdf0e10cSrcweir 
232cdf0e10cSrcweir     void                Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
233cdf0e10cSrcweir 
234cdf0e10cSrcweir     void                FamilySelect( sal_uInt16 nId );
235cdf0e10cSrcweir     void                SetFamily( sal_uInt16 nId );
236cdf0e10cSrcweir     void                ActionSelect( sal_uInt16 nId );
237cdf0e10cSrcweir 
238cdf0e10cSrcweir     sal_Int32           LoadFactoryStyleFilter( SfxObjectShell* i_pObjSh );
239cdf0e10cSrcweir     void                SaveFactoryStyleFilter( SfxObjectShell* i_pObjSh, sal_Int32 i_nFilter );
240cdf0e10cSrcweir 
241cdf0e10cSrcweir public:
242cdf0e10cSrcweir     TYPEINFO();
243cdf0e10cSrcweir 
244bd7afb38SAndre Fischer     SfxCommonTemplateDialog_Impl( SfxBindings* pB, Window*, bool );
245bd7afb38SAndre Fischer     SfxCommonTemplateDialog_Impl( SfxBindings* pB, Window* );
246e4bfc5b7SAndre Fischer     virtual ~SfxCommonTemplateDialog_Impl();
247cdf0e10cSrcweir 
248cdf0e10cSrcweir     DECL_LINK( MenuSelectHdl, Menu * );
249cdf0e10cSrcweir 
EnableEdit(sal_Bool b=sal_True)250cdf0e10cSrcweir     virtual void        EnableEdit( sal_Bool b = sal_True ) { bCanEdit = b; }
EnableDel(sal_Bool b=sal_True)251cdf0e10cSrcweir     virtual void        EnableDel( sal_Bool b = sal_True )  { bCanDel = b; }
EnableNew(sal_Bool b=sal_True)252cdf0e10cSrcweir     virtual void        EnableNew( sal_Bool b = sal_True )  { bCanNew = b; }
253cdf0e10cSrcweir 
GetISfxTemplateCommon()254cdf0e10cSrcweir     ISfxTemplateCommon* GetISfxTemplateCommon() { return &aISfxTemplateCommon; }
GetWindow()255cdf0e10cSrcweir     Window*             GetWindow() { return pWindow; }
256cdf0e10cSrcweir 
257cdf0e10cSrcweir     void                EnableTreeDrag( sal_Bool b = sal_True );
258cdf0e10cSrcweir     void                ExecuteContextMenu_Impl( const Point& rPos, Window* pWin );
259cdf0e10cSrcweir     void                EnableExample_Impl( sal_uInt16 nId, sal_Bool bEnable );
260cdf0e10cSrcweir     SfxStyleFamily      GetActualFamily() const;
261cdf0e10cSrcweir     String              GetSelectedEntry() const;
GetObjectShell() const262cdf0e10cSrcweir     SfxObjectShell*     GetObjectShell() const { return pCurObjShell; }
263cdf0e10cSrcweir 
264cdf0e10cSrcweir     virtual void        PrepareDeleteAction();  // disable buttons, change button text, etc. when del is going to happen
265cdf0e10cSrcweir 
CanEdit(void) const266cdf0e10cSrcweir     inline sal_Bool         CanEdit( void ) const   { return bCanEdit; }
CanDel(void) const267cdf0e10cSrcweir     inline sal_Bool         CanDel( void ) const    { return bCanDel; }
CanNew(void) const268cdf0e10cSrcweir     inline sal_Bool         CanNew( void ) const    { return bCanNew; }
269cdf0e10cSrcweir 
270*2e3a1b6eSmseidel     // normally for derivates from SvTreeListBoxes, but in this case the dialog handles context menus
271cdf0e10cSrcweir     virtual PopupMenu*  CreateContextMenu( void );
272cdf0e10cSrcweir 
273cdf0e10cSrcweir     // Rechnet von den SFX_STYLE_FAMILY Ids auf 1-5 um
274cdf0e10cSrcweir     static sal_uInt16       SfxFamilyIdToNId( SfxStyleFamily nFamily );
275cdf0e10cSrcweir 
276cdf0e10cSrcweir     void                SetAutomaticFilter();
277cdf0e10cSrcweir };
278cdf0e10cSrcweir /* -----------------10.12.2003 11:42-----------------
279cdf0e10cSrcweir 
280cdf0e10cSrcweir  --------------------------------------------------*/
281cdf0e10cSrcweir 
282cdf0e10cSrcweir class DropToolBox_Impl : public ToolBox, public DropTargetHelper
283cdf0e10cSrcweir {
284cdf0e10cSrcweir     SfxTemplateDialog_Impl&     rParent;
285cdf0e10cSrcweir protected:
286cdf0e10cSrcweir     virtual sal_Int8    AcceptDrop( const AcceptDropEvent& rEvt );
287cdf0e10cSrcweir     virtual sal_Int8    ExecuteDrop( const ExecuteDropEvent& rEvt );
288cdf0e10cSrcweir public:
289cdf0e10cSrcweir     DropToolBox_Impl(Window* pParent, SfxTemplateDialog_Impl* pTemplateDialog);
290cdf0e10cSrcweir     ~DropToolBox_Impl();
291cdf0e10cSrcweir };
292cdf0e10cSrcweir // class SfxTemplateDialog_Impl ------------------------------------------
293cdf0e10cSrcweir 
294cdf0e10cSrcweir class SfxTemplateDialog_Impl :  public SfxCommonTemplateDialog_Impl
295cdf0e10cSrcweir {
296cdf0e10cSrcweir private:
297cdf0e10cSrcweir     friend class SfxTemplateControllerItem;
298cdf0e10cSrcweir     friend class SfxTemplateDialogWrapper;
299cdf0e10cSrcweir     friend class DropToolBox_Impl;
300bd7afb38SAndre Fischer     friend class SfxTemplatePanelControl;
301cdf0e10cSrcweir 
302bd7afb38SAndre Fischer     Window* m_pFloat;
303cdf0e10cSrcweir     sal_Bool            m_bZoomIn;
304cdf0e10cSrcweir     DropToolBox_Impl    m_aActionTbL;
305cdf0e10cSrcweir     ToolBox             m_aActionTbR;
306cdf0e10cSrcweir 
307cdf0e10cSrcweir     DECL_LINK( ToolBoxLSelect, ToolBox * );
308cdf0e10cSrcweir     DECL_LINK( ToolBoxRSelect, ToolBox * );
309cdf0e10cSrcweir     DECL_LINK( ToolBoxRClick, ToolBox * );
310cdf0e10cSrcweir     DECL_LINK( MenuSelectHdl, Menu* );
311cdf0e10cSrcweir 
312cdf0e10cSrcweir protected:
313cdf0e10cSrcweir     virtual void    Command( const CommandEvent& rMEvt );
314cdf0e10cSrcweir     virtual void    EnableEdit( sal_Bool = sal_True );
315cdf0e10cSrcweir     virtual void    EnableItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
316cdf0e10cSrcweir     virtual void    CheckItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
317cdf0e10cSrcweir     virtual sal_Bool    IsCheckedItem( sal_uInt16 nMesId );
318cdf0e10cSrcweir     virtual void    LoadedFamilies();
319cdf0e10cSrcweir     virtual void    InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten );
320cdf0e10cSrcweir     virtual void    EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True );
321cdf0e10cSrcweir     virtual void    ClearFamilyList();
322cdf0e10cSrcweir     virtual void    ReplaceUpdateButtonByMenu();
323cdf0e10cSrcweir 
324cdf0e10cSrcweir     void            Resize();
325cdf0e10cSrcweir     Size            GetMinOutputSizePixel();
326cdf0e10cSrcweir 
327cdf0e10cSrcweir     void            updateFamilyImages();
328cdf0e10cSrcweir     void            updateNonFamilyImages();
329cdf0e10cSrcweir 
330cdf0e10cSrcweir public:
331cdf0e10cSrcweir     friend class SfxTemplateDialog;
332cdf0e10cSrcweir     TYPEINFO();
333cdf0e10cSrcweir 
334bd7afb38SAndre Fischer     SfxTemplateDialog_Impl( SfxBindings*, SfxTemplateDialog* pDlgWindow );
335bd7afb38SAndre Fischer     SfxTemplateDialog_Impl( SfxBindings*, SfxTemplatePanelControl* pDlgWindow );
336cdf0e10cSrcweir     ~SfxTemplateDialog_Impl();
337bd7afb38SAndre Fischer 
338bd7afb38SAndre Fischer     void Initialize (void);
339cdf0e10cSrcweir };
340cdf0e10cSrcweir 
341cdf0e10cSrcweir // class SfxTemplateCatalog_Impl -----------------------------------------
342cdf0e10cSrcweir 
343cdf0e10cSrcweir class SfxTemplateCatalog_Impl : public SfxCommonTemplateDialog_Impl
344cdf0e10cSrcweir {
345cdf0e10cSrcweir private:
346cdf0e10cSrcweir     friend class SfxTemplateControllerItem;
347cdf0e10cSrcweir     friend class SfxCommonTemplateDialog_Impl;
348cdf0e10cSrcweir 
349cdf0e10cSrcweir     ListBox                 aFamList;
350cdf0e10cSrcweir     OKButton                aOkBtn;
351cdf0e10cSrcweir     CancelButton            aCancelBtn;
352cdf0e10cSrcweir     PushButton              aNewBtn;
353cdf0e10cSrcweir     PushButton              aChangeBtn;
354cdf0e10cSrcweir     PushButton              aDelBtn;
355cdf0e10cSrcweir     PushButton              aOrgBtn;
356cdf0e10cSrcweir     HelpButton              aHelpBtn;
357cdf0e10cSrcweir 
358cdf0e10cSrcweir     SfxTemplateCatalog*     pReal;
359cdf0e10cSrcweir     SvUShorts               aFamIds;
360cdf0e10cSrcweir     SfxModalDefParentHelper aHelper;
361cdf0e10cSrcweir 
362cdf0e10cSrcweir protected:
363cdf0e10cSrcweir     virtual void    EnableItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
364cdf0e10cSrcweir     virtual void    CheckItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
365cdf0e10cSrcweir     virtual sal_Bool    IsCheckedItem( sal_uInt16 nMesId );
366cdf0e10cSrcweir     virtual void    InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten );
367cdf0e10cSrcweir     virtual void    EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True );
368cdf0e10cSrcweir     virtual void    ClearFamilyList();
369cdf0e10cSrcweir     virtual void    EnableEdit( sal_Bool = sal_True );
370cdf0e10cSrcweir     virtual void    EnableDel( sal_Bool = sal_True );
371cdf0e10cSrcweir     virtual void    EnableNew( sal_Bool = sal_True );
372cdf0e10cSrcweir 
373cdf0e10cSrcweir         using SfxCommonTemplateDialog_Impl::NewHdl;
374cdf0e10cSrcweir     DECL_LINK( FamListSelect, ListBox * );
375cdf0e10cSrcweir     DECL_LINK( OkHdl, Button * );
376cdf0e10cSrcweir     DECL_LINK( CancelHdl, Button * );
377cdf0e10cSrcweir     DECL_LINK( NewHdl, Button * );
378cdf0e10cSrcweir     DECL_LINK( ChangeHdl, Button * );
379cdf0e10cSrcweir     DECL_LINK( DelHdl, Button * );
380cdf0e10cSrcweir     DECL_LINK( OrgHdl, Button * );
381cdf0e10cSrcweir 
382cdf0e10cSrcweir public:
383cdf0e10cSrcweir     TYPEINFO();
384cdf0e10cSrcweir     SfxTemplateCatalog_Impl( Window* pParent, SfxBindings*, SfxTemplateCatalog* pWindow );
385cdf0e10cSrcweir     ~SfxTemplateCatalog_Impl();
386cdf0e10cSrcweir 
387cdf0e10cSrcweir friend class SfxTemplateCatalog;
388cdf0e10cSrcweir 
389cdf0e10cSrcweir     virtual void    PrepareDeleteAction();
390cdf0e10cSrcweir };
391cdf0e10cSrcweir 
392cdf0e10cSrcweir #endif // #ifndef _SFX_TEMPDLGI_HXX
393