1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _CONTDLG_HXX_ 25 #define _CONTDLG_HXX_ 26 27 #include <sfx2/basedlgs.hxx> 28 #include <sfx2/ctrlitem.hxx> 29 #include <sfx2/childwin.hxx> 30 #include "svx/svxdllapi.h" 31 32 /************************************************************************* 33 |* 34 |* Ableitung vom SfxChildWindow als "Behaelter" fuer Float 35 |* 36 \************************************************************************/ 37 38 class Graphic; 39 40 class SVX_DLLPUBLIC SvxContourDlgChildWindow : public SfxChildWindow 41 { 42 public: 43 44 SvxContourDlgChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); 45 46 SFX_DECL_CHILDWINDOW( SvxContourDlgChildWindow ); 47 48 static void UpdateContourDlg( const Graphic& rGraphic, sal_Bool bGraphicLinked, 49 const PolyPolygon* pPolyPoly = NULL, 50 void* pEditingObj = NULL ); 51 }; 52 53 #ifndef _REDUCED_ContourDlg_HXX_ 54 #define _REDUCED_CONTDLG_HXX_ 55 56 class SvxSuperContourDlg; 57 58 /************************************************************************* 59 |* 60 |* 61 |* 62 \************************************************************************/ 63 64 class SvxContourDlgItem : public SfxControllerItem 65 { 66 SvxSuperContourDlg& rDlg; 67 68 protected: 69 70 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); 71 72 public: 73 74 SvxContourDlgItem( sal_uInt16 nId, SvxSuperContourDlg& rDlg, SfxBindings& rBindings ); 75 }; 76 77 /************************************************************************* 78 |* 79 |* 80 |* 81 \************************************************************************/ 82 83 class SVX_DLLPUBLIC SvxContourDlg : public SfxFloatingWindow 84 { 85 using Window::Update; 86 87 SvxSuperContourDlg* pSuperClass; 88 89 //#if 0 // _SOLAR__PRIVATE 90 91 protected: 92 SetSuperClass(SvxSuperContourDlg & rSuperClass)93 void SetSuperClass( SvxSuperContourDlg& rSuperClass ) { pSuperClass = &rSuperClass; } 94 95 //#endif // __PRIVATE 96 97 public: 98 99 SvxContourDlg( SfxBindings *pBindings, SfxChildWindow *pCW, 100 Window* pParent, const ResId& rResId ); 101 ~SvxContourDlg(); 102 103 void SetExecState( sal_Bool bEnable ); 104 105 void SetGraphic( const Graphic& rGraphic ); 106 void SetGraphicLinked( sal_Bool bLinked ); 107 const Graphic& GetGraphic() const; 108 sal_Bool IsGraphicChanged() const; 109 110 void SetPolyPolygon( const PolyPolygon& rPolyPoly ); 111 PolyPolygon GetPolyPolygon(); 112 113 void SetEditingObject( void* pObj ); 114 const void* GetEditingObject() const; 115 116 void Update( const Graphic& rGraphic, sal_Bool bGraphicLinked, 117 const PolyPolygon* pPolyPoly = NULL, void* pEditingObj = NULL ); 118 119 static PolyPolygon CreateAutoContour( const Graphic& rGraphic, 120 const Rectangle* pRect = NULL, 121 const sal_uIntPtr nFlags = 0L ); 122 static void ScaleContour( PolyPolygon& rContour, const Graphic& rGraphic, 123 const MapUnit eUnit, const Size& rDisplaySize ); 124 }; 125 126 /************************************************************************* 127 |* 128 |* Defines 129 |* 130 \************************************************************************/ 131 132 #define SVXCONTOURDLG() ( (SvxContourDlg*) ( SfxViewFrame::Current()->GetChildWindow( \ 133 SvxContourDlgChildWindow::GetChildWindowId() )-> \ 134 GetWindow() ) ) 135 136 #endif // _REDUCED_CONTDLG_HXX_ 137 #endif // _CONTDLG_HXX_ 138 139