summaryrefslogtreecommitdiff
path: root/svx/inc/fontworkgallery.hxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-10-12 12:46:02 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-10-12 12:46:02 +0000
commit7947dfc1f5248612908849218d63412ea3d613b9 (patch)
tree1e5d5b464925bff2ce64205cb7da3b91c88bd19b /svx/inc/fontworkgallery.hxx
parentce123a6d87e3f1d2c4f831d1d459a4c4b4e914e0 (diff)
INTEGRATION: CWS sj09 (1.2.8); FILE MERGED
2004/08/20 11:31:40 sj 1.2.8.11: #i33240# added CustomShape integration for Writer and Calc 2004/08/20 09:53:08 sj 1.2.8.10: #i33240# CusomShape integration for Writer and Calc 2004/08/03 10:40:29 sj 1.2.8.9: added characterspacing and kernCharacter for FontWork 2004/07/30 13:35:20 sj 1.2.8.8: added fontwork character spacing dialog 2004/07/29 18:27:08 sj 1.2.8.7: fixed text alignment 2004/07/28 20:37:05 sj 1.2.8.6: removed vertical/horizontzal fontwork direction button 2004/07/28 20:34:24 sj 1.2.8.5: removed vertical/horizontzal fontwork direction button 2004/07/27 19:07:01 sj 1.2.8.4: added fontwork character spacing and alignment floater 2004/07/13 09:36:23 sj 1.2.8.3: api changes (SfxPopUpWindow) 2004/07/09 15:26:27 sj 1.2.8.2: RESYNC: (1.2-1.3); FILE MERGED 2004/07/09 13:17:41 sj 1.2.8.1: fontwork
Diffstat (limited to 'svx/inc/fontworkgallery.hxx')
-rw-r--r--svx/inc/fontworkgallery.hxx172
1 files changed, 167 insertions, 5 deletions
diff --git a/svx/inc/fontworkgallery.hxx b/svx/inc/fontworkgallery.hxx
index 848f519b9653..dd307b532371 100644
--- a/svx/inc/fontworkgallery.hxx
+++ b/svx/inc/fontworkgallery.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fontworkgallery.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2004-06-21 16:37:49 $
+ * last change: $Author: hr $ $Date: 2004-10-12 13:46:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,23 +75,180 @@
#ifndef _SV_DIALOG_HXX
#include <vcl/dialog.hxx>
#endif
+#ifndef _SFXTBXCTRL_HXX //autogen
+#include <sfx2/tbxctrl.hxx>
+#endif
#include <vector>
class FmFormModel;
class SdrView;
class Window;
+class SdrTextObj;
+class SdrObject;
+class SdrModel;
+
+class SfxBindings;
+class ToolbarMenu;
+class SfxStatusForwarder;
+class SvxTbxButtonColorUpdater_Impl;
//------------------------------------------------------------------------
+
namespace svx
{
+
+class FontWorkAlignmentWindow : public SfxPopupWindow
+{
+private:
+ ToolbarMenu* mpMenu;
+
+ Image maImgAlgin1;
+ Image maImgAlgin2;
+ Image maImgAlgin3;
+ Image maImgAlgin4;
+ Image maImgAlgin5;
+ Image maImgAlgin1h;
+ Image maImgAlgin2h;
+ Image maImgAlgin3h;
+ Image maImgAlgin4h;
+ Image maImgAlgin5h;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
+
+ bool mbPopupMode;
+
+ DECL_LINK( SelectHdl, void * );
+
+ void implSetAlignment( int nAlignmentMode, bool bEnabled );
+
+protected:
+ virtual BOOL Close();
+ virtual void PopupModeEnd();
+
+ /** This function is called when the window gets the focus. It grabs
+ the focus to the line ends value set so that it can be controlled with
+ the keyboard.
+ */
+ virtual void GetFocus (void);
+
+public:
+ FontWorkAlignmentWindow( USHORT nId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+ ~FontWorkAlignmentWindow();
+
+ void StartSelection();
+
+ virtual SfxPopupWindow* Clone() const;
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+};
+
+class FontWorkAlignmentControl : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ FontWorkAlignmentControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ ~FontWorkAlignmentControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+};
+
+//------------------------------------------------------------------------
+
+class FontWorkCharacterSpacingWindow : public SfxPopupWindow
+{
+private:
+ ToolbarMenu* mpMenu;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
+
+ bool mbPopupMode;
+
+ DECL_LINK( SelectHdl, void * );
+
+ void implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled );
+ void implSetKernCharacterPairs( sal_Bool bKernOnOff, bool bEnabled );
+
+protected:
+ virtual BOOL Close();
+ virtual void PopupModeEnd();
+
+ /** This function is called when the window gets the focus. It grabs
+ the focus to the line ends value set so that it can be controlled with
+ the keyboard.
+ */
+ virtual void GetFocus (void);
+
+public:
+ FontWorkCharacterSpacingWindow( USHORT nId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+ ~FontWorkCharacterSpacingWindow();
+
+ void StartSelection();
+
+ virtual SfxPopupWindow* Clone() const;
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+};
+
+class FontWorkCharacterSpacingControl : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ FontWorkCharacterSpacingControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ ~FontWorkCharacterSpacingControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+};
+
+//------------------------------------------------------------------------
+
+class FontWorkShapeTypeControl : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ FontWorkShapeTypeControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ ~FontWorkShapeTypeControl();
+
+ virtual void Select( BOOL bMod1 = FALSE );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+};
+
+//------------------------------------------------------------------------
+
+class FontworkCharacterSpacingDialog : public ModalDialog
+{
+ FixedText maFLScale;
+ MetricField maMtrScale;
+ OKButton maOKButton;
+ CancelButton maCancelButton;
+ HelpButton maHelpButton;
+
+public:
+ FontworkCharacterSpacingDialog( Window* pParent, sal_Int32 nScale );
+ ~FontworkCharacterSpacingDialog();
+
+ sal_Int32 getScale() const;
+};
+
+
class FontWorkGalleryDialog : public ModalDialog
{
ValueSet maCtlFavorites;
FixedLine maFLFavorites;
- ImageButton maBtnLTR;
- ImageButton maBtnTTB;
OKButton maOKButton;
CancelButton maCancelButton;
@@ -106,17 +263,22 @@ class FontWorkGalleryDialog : public ModalDialog
DECL_LINK( ClickOKHdl, void * );
DECL_LINK( ClickTextDirectionHdl, ImageButton * );
+ SdrObject** mppSdrObject;
+ SdrModel* mpDestModel;
+
void initfavorites(sal_uInt16 nThemeId, std::vector< Bitmap * >& rFavorites);
void insertSelectedFontwork();
void changeText( SdrTextObj* pObj );
void fillFavorites( sal_uInt16 nThemeId, std::vector< Bitmap * >& rFavorites );
- std::vector< Bitmap * > maFavoritesVertical;
std::vector< Bitmap * > maFavoritesHorizontal;
public:
FontWorkGalleryDialog( SdrView* pView, Window* pParent, sal_uInt16 nSID );
~FontWorkGalleryDialog();
+
+ // SJ: if the SdrObject** is set, the SdrObject is not inserted into the page when executing the dialog
+ void SetSdrObjectRef( SdrObject**, SdrModel* pModel );
};
};