Kaydet (Commit) 5bb93690 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS hedaburemove01 (1.1.2); FILE ADDED

2007/02/09 16:53:13 vg 1.1.2.1: #72503# get rid of hedabu procedure: Moving headers to svx/inc/svx and correspondent necessary changes
üst 495c1a04
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: frmdiritem.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: vg $ $Date: 2007-04-11 15:54:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef _SVX_FRMDIRITEM_HXX
#define _SVX_FRMDIRITEM_HXX
// include ---------------------------------------------------------------
#ifndef _SFXINTITEM_HXX
#include <svtools/intitem.hxx>
#endif
#ifndef _SVX_FRMDIR_HXX
#include <svx/frmdir.hxx>
#endif
#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
#endif
#ifndef INCLUDED_SVXDLLAPI_H
#include "svx/svxdllapi.h"
#endif
// class SvxFrameDirectionItem ----------------------------------------------
/* [Description]
This item defines a frame direction, which place the content inside
a frame. It exist different kind of directions which are used to the
layout text for Western, CJK and CTL languages.
*/
class SVX_DLLPUBLIC SvxFrameDirectionItem : public SfxUInt16Item
{
public:
TYPEINFO();
SvxFrameDirectionItem( SvxFrameDirection nValue = FRMDIR_HORI_LEFT_TOP,
USHORT nWhich = ITEMID_FRAMEDIR );
virtual ~SvxFrameDirectionItem();
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT) const;
virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFileVersion ) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper * = 0 ) const;
virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
BYTE nMemberId );
virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
BYTE nMemberId ) const;
inline SvxFrameDirectionItem& operator=( const SvxFrameDirectionItem& rItem )
{
SetValue( rItem.GetValue() );
return *this;
}
};
#endif // #ifndef _SVX_FRMDIRITEM_HXX
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: frmdirlbox.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: vg $ $Date: 2007-04-11 15:55:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef _SVX_FRMDIRLBOX_HXX
#define _SVX_FRMDIRLBOX_HXX
#ifndef _LSTBOX_HXX
#include <vcl/lstbox.hxx>
#endif
#ifndef SFX_ITEMCONNECT_HXX
#include <sfx2/itemconnect.hxx>
#endif
#ifndef _SVX_FRMDIR_HXX
#include <svx/frmdir.hxx>
#endif
#ifndef INCLUDED_SVXDLLAPI_H
#include "svx/svxdllapi.h"
#endif
class SvxFrameDirectionItem;
namespace svx {
// ============================================================================
/** This listbox contains entries to select horizontal text direction.
The control works on the SvxFrameDirection enumeration (i.e. left-to-right,
right-to-left), used i.e. in conjunction with the SvxFrameDirectionItem.
*/
class SVX_DLLPUBLIC FrameDirectionListBox : public ListBox
{
public:
explicit FrameDirectionListBox( Window* pParent, WinBits nStyle = WB_BORDER );
explicit FrameDirectionListBox( Window* pParent, const ResId& rResId );
virtual ~FrameDirectionListBox();
/** Inserts a string with corresponding direction enum into the listbox. */
void InsertEntryValue(
const String& rString,
SvxFrameDirection eDirection,
sal_uInt16 nPos = LISTBOX_APPEND );
/** Removes the entry, that represents the specified frame direction. */
void RemoveEntryValue( SvxFrameDirection eDirection );
/** Selects the specified frame direction. */
void SelectEntryValue( SvxFrameDirection eDirection );
/** Returns the currently selected frame direction. */
SvxFrameDirection GetSelectEntryValue() const;
/** Saves the currently selected frame direction. */
inline void SaveValue() { meSaveValue = GetSelectEntryValue(); }
/** Returns the frame direction saved with SaveValue(). */
inline SvxFrameDirection GetSavedValue() const { return meSaveValue; }
private:
SvxFrameDirection meSaveValue; /// Saved value for later comparison.
};
typedef FrameDirectionListBox FrameDirListBox;
// ============================================================================
/** Wrapper for usage of a FrameDirectionListBox in item connections. */
class SVX_DLLPUBLIC FrameDirListBoxWrapper : public sfx::SingleControlWrapper< FrameDirListBox, SvxFrameDirection >
{
public:
explicit FrameDirListBoxWrapper( FrameDirListBox& rListBox );
virtual bool IsControlDontKnow() const;
virtual void SetControlDontKnow( bool bSet );
virtual SvxFrameDirection GetControlValue() const;
virtual void SetControlValue( SvxFrameDirection eValue );
};
/** Wrapper for usage of a SvxFrameDirectionItem in item connections. */
typedef sfx::ValueItemWrapper< SvxFrameDirectionItem, SvxFrameDirection, sal_uInt16 > FrameDirItemWrapper;
/** An item<->control connection for a FrameDirectionListBox. */
typedef sfx::ItemControlConnection< FrameDirItemWrapper, FrameDirListBoxWrapper > FrameDirListBoxConnection;
// ============================================================================
} // namespace svx
#endif
This diff is collapsed.
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: graphctl.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: vg $ $Date: 2007-04-11 15:55:49 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef _GRAPHCTL_HXX
#define _GRAPHCTL_HXX
// include ---------------------------------------------------------------
#ifndef _SV_CTRL_HXX //autogen
#include <vcl/ctrl.hxx>
#endif
#ifndef _SV_GRAPH_HXX //autogen
#include <vcl/graph.hxx>
#endif
#ifndef INCLUDED_SVXDLLAPI_H
#include "svx/svxdllapi.h"
#endif
#include <svx/svdview.hxx>
#include <svx/svdobj.hxx>
/*************************************************************************
|*
|*
|*
\************************************************************************/
class GraphCtrlUserCall;
class SvxGraphCtrlAccessibleContext;
#define WB_SDRMODE ((WinBits)0x0080)
#define WB_ANIMATION ((WinBits)0x0100)
class SVX_DLLPUBLIC GraphCtrl : public Control
{
friend class GraphCtrlView;
friend class GraphCtrlUserCall;
Graphic aGraphic;
Timer aUpdateTimer;
Link aMousePosLink;
Link aGraphSizeLink;
Link aMarkObjLink;
Link aUpdateLink;
MapMode aMap100;
Size aGraphSize;
Point aMousePos;
GraphCtrlUserCall* pUserCall;
WinBits nWinStyle;
SdrObjKind eObjKind;
USHORT nPolyEdit;
BOOL bEditMode;
BOOL bSdrMode;
BOOL bAnim;
DECL_LINK( UpdateHdl, Timer* );
SvxGraphCtrlAccessibleContext* mpAccContext;
protected:
SdrModel* pModel;
SdrView* pView;
virtual void Paint( const Rectangle& rRect );
virtual void Resize();
virtual void KeyInput(const KeyEvent& rKEvt);
virtual void MouseButtonDown(const MouseEvent& rMEvt);
virtual void MouseButtonUp(const MouseEvent& rMEvt);
virtual void MouseMove(const MouseEvent& rMEvt);
virtual void InitSdrModel();
virtual void SdrObjCreated( const SdrObject& rObj );
virtual void SdrObjChanged( const SdrObject& rObj );
virtual void MarkListHasChanged();
SdrObjUserCall* GetSdrUserCall() { return (SdrObjUserCall*) pUserCall; }
public:
GraphCtrl( Window* pParent, const WinBits nWinBits = 0 );
GraphCtrl( Window* pParent, const ResId& rResId );
~GraphCtrl();
void SetWinStyle( WinBits nWinBits );
WinBits GetWinStyle() const { return nWinStyle; }
void SetGraphic( const Graphic& rGraphic, BOOL bNewModel = TRUE );
const Graphic& GetGraphic() const { return aGraphic; }
const Size& GetGraphicSize() const { return aGraphSize; }
const Point& GetMousePos() const { return aMousePos; }
void SetEditMode( const BOOL bEditMode );
BOOL IsEditMode() const { return bEditMode; }
void SetPolyEditMode( const USHORT nPolyEdit );
USHORT GetPolyEditMode() const { return nPolyEdit; }
void SetObjKind( const SdrObjKind eObjKind );
SdrObjKind GetObjKind() const { return eObjKind; }
SdrModel* GetSdrModel() const { return pModel; }
SdrView* GetSdrView() const { return pView; }
SdrObject* GetSelectedSdrObject() const;
BOOL IsChanged() const { return bSdrMode ? pModel->IsChanged() : FALSE; }
void SetMousePosLink( const Link& rLink ) { aMousePosLink = rLink; }
const Link& GetMousePosLink() const { return aMousePosLink; }
void SetGraphSizeLink( const Link& rLink ) { aGraphSizeLink = rLink; }
const Link& GetGraphSizeLink() const { return aGraphSizeLink; }
void SetMarkObjLink( const Link& rLink ) { aMarkObjLink = rLink; }
const Link& GetMarkObjLink() const { return aMarkObjLink; }
void SetUpdateLink( const Link& rLink ) { aUpdateLink = rLink; }
const Link& GetUpdateLink() const { return aUpdateLink; }
static String GetStringFromDouble( const double& rDouble );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
};
//#if 0 // _SOLAR__PRIVATE
/*************************************************************************
|*
|*
|*
\************************************************************************/
class GraphCtrlUserCall : public SdrObjUserCall
{
GraphCtrl& rWin;
public:
GraphCtrlUserCall( GraphCtrl& rGraphWin ) : rWin( rGraphWin ) {};
virtual ~GraphCtrlUserCall() {};
virtual void Changed( const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect );
};
/*************************************************************************
|*
|*
|*
\************************************************************************/
class GraphCtrlView : public SdrView
{
GraphCtrl& rGraphCtrl;
protected:
virtual void MarkListHasChanged()
{
SdrView::MarkListHasChanged();
rGraphCtrl.MarkListHasChanged();
}
public:
GraphCtrlView( SdrModel* pModel, GraphCtrl* pWindow) :
SdrView ( pModel, pWindow ),
rGraphCtrl ( *pWindow ) {};
virtual ~GraphCtrlView() {};
};
//#endif // __PRIVATE
#endif // _GRAPHCTL_HXX
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment