diff options
Diffstat (limited to 'sd/source/ui/slidesorter/inc/model')
7 files changed, 0 insertions, 814 deletions
diff --git a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx deleted file mode 100644 index 4b12659a5..000000000 --- a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx +++ /dev/null @@ -1,254 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_SLIDESORTER_SLIDE_SORTER_MODEL_HXX -#define SD_SLIDESORTER_SLIDE_SORTER_MODEL_HXX - -class SdDrawDocument; - -#include "model/SlsPageEnumeration.hxx" -#include "model/SlsSharedPageDescriptor.hxx" - -#include "pres.hxx" -#include <com/sun/star/drawing/XDrawPage.hpp> -#include <osl/mutex.hxx> -#include <vcl/region.hxx> - -#include <memory> -#include <vector> -#include <functional> - -namespace css = ::com::sun::star; - -class SdrPage; -class SdPage; - -namespace sd { namespace slidesorter { -class SlideSorter; -} } - -namespace sd { namespace slidesorter { namespace controller { -class PageObjectFactory; -} } } - -namespace sd { namespace slidesorter { namespace model { - -class DocumentPageContainer; - -inline sal_Int32 FromCoreIndex (const sal_uInt16 nCoreIndex) { return (nCoreIndex-1)/2; } -inline sal_uInt16 ToCoreIndex (const sal_Int32 nIndex) { return nIndex*2+1; } - -/** The model of the slide sorter gives access to the slides that are to be - displayed in the slide sorter view. Via the SetDocumentSlides() method - this set of slides can be modified (but do not call it directly, use - SlideSorterController::SetDocumentSlides() instead.) -*/ -class SlideSorterModel -{ -public: - SlideSorterModel (SlideSorter& rSlideSorter); - void Init (void); - - virtual ~SlideSorterModel (void); - void Dispose (void); - - /** This method is present to let the view create a ShowView for - displaying slides. - */ - SdDrawDocument* GetDocument (void); - - /** Set a new edit mode and return whether the edit mode really - has been changed. When the edit mode is changed then the - previous page descriptor list is replaced by a new one which - has to be repainted. - @return - A return value of <TRUE/> indicates that the edit mode has - changed and thus the page descriptor list has been set up - to reflect that change. A repaint is necessary. - */ - bool SetEditMode (EditMode eEditMode); - - /** Set the edit mode to that currently used by the controller. - */ - bool SetEditModeFromController (void); - EditMode GetEditMode (void) const; - PageKind GetPageType (void) const; - - /** Return the number of slides in the document regardless of whether - they are visible or not or whether they are hidden or not. - The number of slides depends on the set of slides available through - the XIndexAccess given to SetDocumentSlides(). - */ - sal_Int32 GetPageCount (void) const; - - /** Return a page descriptor for the page with the specified index. - Page descriptors are created on demand. The page descriptor is - found (or not found) in constant time. - @param nPageIndex - The index of the requested slide. The valid values - are 0 to GetPageCount()-1. - @param bCreate - When <TRUE/> and the requested page descriptor is missing then - it is created. When <FALSE/> then an empty reference is - returned for missing descriptors. - @return - When the given index is not valid, i.e. lower then zero or - larger than or equal to the number of pages then an empty - reference is returned. Note that the page count may change - between calls to GetPageCount() and GetPageDescriptor(). - */ - SharedPageDescriptor GetPageDescriptor ( - const sal_Int32 nPageIndex, - const bool bCreate = true) const; - - /** Return a page descriptor for the given XDrawPage. Page descriptors - are created on demand. The page descriptor is found (or not found) - in (at most) linear time. Note that all page descriptors in front of - the one associated with the given XDrawPage are created when not yet - present. When the XDrawPage is not found then all descriptors are - created. - @return - Returns the index to the requested page descriptor or -1 when - there is no such page descriptor. - */ - sal_Int32 GetIndex ( - const ::com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage>& rxSlide) const; - - /** Return a page descriptor for the given SdrPage. Page descriptors - are created on demand. The page descriptor is found (or not found) - in (at most) linear time. Note that all page descriptors in front of - the one associated with the given XDrawPage are created when not yet - present. When the SdrPage is not found then all descriptors are - created. - @return - Returns the index to the requested page descriptor or -1 when - there is no such page descriptor. - */ - sal_Int32 GetIndex (const SdrPage* pPage) const; - - /** Return an index for accessing an SdrModel that corresponds to the - given SlideSorterModel index. In many cases we just have to apply - the n*2+1 magic. Only when a special model is set, like a custom - slide show, then the returned value is different. - */ - sal_uInt16 GetCoreIndex (const sal_Int32 nIndex) const; - - /** Call this method after the document has changed its structure. This - will get the model in sync with the SdDrawDocument. This method - tries not to throw away to much information already gathered. This - is especially important for previews of complex pages that take some - time to create. - */ - void Resync (void); - - /** Delete all descriptors that currently are in the container. The size - of the container, however, is not altered. Use the AdaptSize - method for that. - */ - void ClearDescriptorList (void); - - /** Set the selection of the document to exactly that of the called model. - */ - void SynchronizeDocumentSelection (void); - - /** Set the selection of the called model to exactly that of the document. - */ - void SynchronizeModelSelection (void); - - /** Return the mutex so that the caller can lock it and then safely - access the model. - */ - ::osl::Mutex& GetMutex (void); - - /** Set the XIndexAccess from which the called SlideSorterModel takes - its pages. - @param rxSlides - The set of slides accessible through this XIndexAccess are not - necessarily the same as the ones of the XModel of the - XController (although it typically is a subset). - */ - void SetDocumentSlides (const css::uno::Reference<css::container::XIndexAccess>& rxSlides); - - /** Return the set of pages that is currently displayed by the slide sorter. - */ - css::uno::Reference<css::container::XIndexAccess> GetDocumentSlides (void) const; - - /** This method is called when the edit mode has changed. It calls - SetDocumentSlides() with the set of slides or master pages obtained - from the model of the XController. - */ - void UpdatePageList (void); - - bool IsReadOnly (void) const; - - /** The current selection is saved by copying the ST_Selected state into - ST_WasSelected for slides. - */ - void SaveCurrentSelection (void); - - /** The current selection is restored from the ST_WasSelected state from - the slides. - @returns - The returned region has to be repainted to reflect the updated - selection states. - */ - Region RestoreSelection (void); - - /** Typically called from controller::Listener this method handles the - insertion and deletion of single pages. - @return - Returns <TRUE/> when the given page is relevant for the current - page kind and edit mode. - */ - bool NotifyPageEvent (const SdrPage* pPage); - -private: - mutable ::osl::Mutex maMutex; - SlideSorter& mrSlideSorter; - ::com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> mxSlides; - PageKind mePageKind; - EditMode meEditMode; - typedef ::std::vector<SharedPageDescriptor> DescriptorContainer; - mutable DescriptorContainer maPageDescriptors; - - /** Resize the descriptor container according to current values of - page kind and edit mode. - */ - void AdaptSize (void); - - SdPage* GetPage (const sal_Int32 nCoreIndex) const; - void InsertSlide (SdPage* pPage); - void DeleteSlide (const SdPage* pPage); - void UpdateIndices (const sal_Int32 nFirstIndex); -}; - -} } } // end of namespace ::sd::slidesorter::model - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/inc/model/SlsEnumeration.hxx b/sd/source/ui/slidesorter/inc/model/SlsEnumeration.hxx deleted file mode 100644 index ff3e45018..000000000 --- a/sd/source/ui/slidesorter/inc/model/SlsEnumeration.hxx +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_SLIDESORTER_ENUMERATION_HXX -#define SD_SLIDESORTER_ENUMERATION_HXX - -#include <memory> - -namespace sd { namespace slidesorter { namespace model { - - -/** Interface to generic enumerations. Designed to operate on shared - pointers. Therefore GetNextElement() returns T and not T&. -*/ -template <class T> -class Enumeration -{ -public: - virtual bool HasMoreElements (void) const = 0; - /** Returns T instead of T& so that it can handle shared pointers. - */ - virtual T GetNextElement (void) = 0; - virtual void Rewind (void) = 0; - virtual ::std::auto_ptr<Enumeration<T> > Clone (void) = 0; -}; - -} } } // end of namespace ::sd::slidesorter::model - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx deleted file mode 100644 index 31775b489..000000000 --- a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx +++ /dev/null @@ -1,166 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_SLIDESORTER_PAGE_DESCRIPTOR_HXX -#define SD_SLIDESORTER_PAGE_DESCRIPTOR_HXX - -#include "model/SlsVisualState.hxx" -#include <com/sun/star/drawing/XDrawPage.hpp> -#include <tools/gen.hxx> -#include <tools/link.hxx> -#include <vcl/bitmap.hxx> -#include <sfx2/viewfrm.hxx> - -#include <memory> -#include <boost/enable_shared_from_this.hpp> -#include <boost/scoped_ptr.hpp> - - -class SdPage; -class SdrPage; - -namespace sd { namespace slidesorter { namespace model { - -class SlideRenderer; - -namespace css = ::com::sun::star; - -/** Each PageDescriptor object represents the preview of one draw page, - slide, or master page of a Draw or Impress document as they are displayed - in the slide sorter. This class gives access to some associated - information like prerendered preview or position on the screen. - - <p>Bounding boxes of page objects come in four varieties: - Model and screen/pixel coordinates and the bounding boxes of the actual - page objects and the larger bounding boxes that include page names and - fade symbol.</p> -*/ -class PageDescriptor - : public ::boost::enable_shared_from_this<PageDescriptor> -{ -public: - /** Create a PageDescriptor for the given SdPage object. - @param rxPage - The page that is represented by the new PageDescriptor object. - @param pPage - The page pointer can in some situations not be detected from - rxPage, e.g. after undo of page deletion. Therefore supply it - seperately. - @param nIndex - This index is displayed in the view as page number. It is not - necessaryily the page index (not even when you add or subtract 1 - or use (x-1)/2 magic). - */ - PageDescriptor ( - const css::uno::Reference<css::drawing::XDrawPage>& rxPage, - SdPage* pPage, - const sal_Int32 nIndex); - - ~PageDescriptor (void); - - /** Return the page that is represented by the descriptor as SdPage pointer . - */ - SdPage* GetPage (void) const; - - /** Return the page that is represented by the descriptor as XDrawPage reference. - */ - css::uno::Reference<css::drawing::XDrawPage> GetXDrawPage (void) const; - - /** Returns the index of the page as it is displayed in the view as page - number. The value may differ from the index returned by the - XDrawPage when there are hidden slides and the XIndexAccess used to - access the model filters them out. - */ - sal_Int32 GetPageIndex (void) const; - void SetPageIndex (const sal_Int32 nIndex); - - bool UpdateMasterPage (void); - - enum State { ST_Visible, ST_Selected, ST_WasSelected, - ST_Focused, ST_MouseOver, ST_Current, ST_Excluded }; - - bool HasState (const State eState) const; - - bool SetState (const State eState, const bool bStateValue); - - /** Set the internal mbIsSelected flag to the selection state of the - page. Use this method to synchronize a page descriptor with the - page it describes and determine whether a redraw to update the - selection indicator is necessary. - @return - When the two selection states were different <TRUE/> is - returned. When they were the same this method returns - <FALSE/>. - */ - bool GetCoreSelection (void); - - /** Set the selection flags of the SdPage objects to the corresponding - selection states of the page descriptors. - */ - void SetCoreSelection (void); - - VisualState& GetVisualState (void); - - Rectangle GetBoundingBox (void) const; - Point GetLocation (const bool bIgnoreLocation = false) const; - void SetBoundingBox (const Rectangle& rBoundingBox); - -private: - SdPage* mpPage; - css::uno::Reference<css::drawing::XDrawPage> mxPage; - SdrPage const* mpMasterPage; - - /** This index is displayed as page number in the view. It may or may - not be the actual page index. - */ - sal_Int32 mnIndex; - - Rectangle maBoundingBox; - VisualState maVisualState; - - bool mbIsSelected : 1; - bool mbWasSelected : 1; - bool mbIsVisible : 1; - bool mbIsFocused : 1; - bool mbIsCurrent : 1; - bool mbIsMouseOver : 1; - - - // Do not use the copy constructor operator. It is not implemented. - PageDescriptor (const PageDescriptor& rDescriptor); - - // Do not use the assignment operator. It is not implemented - // (mrPage can not be assigned). - PageDescriptor& operator= (const PageDescriptor& rDescriptor); -}; - -} } } // end of namespace ::sd::slidesorter::model - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx deleted file mode 100644 index abbd121c1..000000000 --- a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx +++ /dev/null @@ -1,130 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_SLIDESORTER_PAGE_ENUMERATION_HXX -#define SD_SLIDESORTER_PAGE_ENUMERATION_HXX - -#include "pres.hxx" - - -#include "model/SlsEnumeration.hxx" -#include "model/SlsSharedPageDescriptor.hxx" - -#include <boost/function.hpp> -#include <memory> - -namespace sd { namespace slidesorter { namespace model { - -class SlideSorterModel; - - -/** Public class of page enumerations that delegates its calls to an - implementation object that can filter pages by using a given predicate. - - @see PageEnumerationProvider - The PageEnumerationProvider has methods for creating different types - of page enumerations. -*/ -class PageEnumeration - : public Enumeration<SharedPageDescriptor> -{ -public: - /** Create a new page enumeration that enumerates a subset of the pages - of the given model. - @param rModel - The new page enumeration enumerates the pages of this model. - @param rPredicate - This predicate determines which pages to include in the - enumeration. Pages for which rPredicate returns <FALSE/> are - exclude. - */ - typedef ::boost::function<bool(const SharedPageDescriptor&)> PagePredicate; - static PageEnumeration Create ( - const SlideSorterModel& rModel, - const PagePredicate& rPredicate); - - /** This copy constructor creates a copy of the given enumeration. - */ - PageEnumeration (const PageEnumeration& rEnumeration); - - virtual ~PageEnumeration(); - - /** Create a new enumeration object. The ownership of the - implementation object goes to the new object. Use this copy - constructor only when you know what you are doing. When in doubt, - use the one argument version. - @param bCloneImpl - When <TRUE/> is given this constructor behaves exactly like its - one argument version. When <FALSE/> is given then the - implementation object is not copied but moved from the given - enumeration to the newly created one. The given enumeration - thus becomes empty. - */ - PageEnumeration (PageEnumeration& rEnumeration, bool bCloneImpl); - - /** Create and return an exact copy of the called object. - */ - virtual ::std::auto_ptr<Enumeration<SharedPageDescriptor> > Clone (void); - - PageEnumeration& operator= (const PageEnumeration& rEnumeration); - - /** Return <TRUE/> when the enumeration has more elements, i.e. it is - save to call GetNextElement() at least one more time. - */ - virtual bool HasMoreElements (void) const; - - /** Return the next element of the enumeration. Call the - HasMoreElements() before to make sure that there exists at least one - more element. Calling this method with HasMoreElements() returning - <FALSE/> is an error. - */ - virtual SharedPageDescriptor GetNextElement (void); - - /** Rewind the enumeration so that the next call to GetNextElement() - will return its first element. - */ - virtual void Rewind (void); - -private: - /// Implementation object. - ::std::auto_ptr<Enumeration<SharedPageDescriptor> > mpImpl; - - /** This constructor expects an implementation object that holds - the predicate that filters the pages. - */ - PageEnumeration (::std::auto_ptr<Enumeration<SharedPageDescriptor> > pImpl); - - // Default constructor not implemented. - PageEnumeration (void); -}; - -} } } // end of namespace ::sd::slidesorter::model - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageEnumerationProvider.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageEnumerationProvider.hxx deleted file mode 100644 index f587586e5..000000000 --- a/sd/source/ui/slidesorter/inc/model/SlsPageEnumerationProvider.hxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_SLIDESORTER_PAGE_ENUMERATION_PROVIDER_HXX -#define SD_SLIDESORTER_PAGE_ENUMERATION_PROVIDER_HXX - -#include "model/SlsPageEnumeration.hxx" - -namespace sd { namespace slidesorter { namespace model { - -class SlideSorterModel; - -/** Collection of methods that create enumeration of slides. -*/ -class PageEnumerationProvider -{ -public: - /** The returned enumeration of slides iterates over all slides of the - given model. - */ - static PageEnumeration CreateAllPagesEnumeration (const SlideSorterModel& rModel); - - /** The returned enumeration of slides iterates over the currently - selected slides of the given model. - */ - static PageEnumeration CreateSelectedPagesEnumeration (const SlideSorterModel& rModel); - - /** The returned enumeration of slides iterates over the slides - (partially) inside the visible area. - */ - static PageEnumeration CreateVisiblePagesEnumeration (const SlideSorterModel& rModel); -}; - -} } } // end of namespace ::sd::slidesorter::model - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx deleted file mode 100644 index 746681530..000000000 --- a/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_SLIDESORTER_SHARED_PAGE_DESCRIPTOR_HXX -#define SD_SLIDESORTER_SHARED_PAGE_DESCRIPTOR_HXX - -#include <boost/shared_ptr.hpp> - -namespace sd { namespace slidesorter { namespace model { - -class PageDescriptor; - -typedef ::boost::shared_ptr<PageDescriptor> SharedPageDescriptor; - -} } } // end of namespace ::sd::slidesorter::model - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx deleted file mode 100644 index 31a4e0eb0..000000000 --- a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx +++ /dev/null @@ -1,101 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_SLIDESORTER_VISUAL_STATE_HXX -#define SD_SLIDESORTER_VISUAL_STATE_HXX - -#include <sal/types.h> -#include <tools/gen.hxx> -#include <boost/function.hpp> - -namespace sd { namespace slidesorter { namespace model { - -class PageDescriptor; - -/** This class gives access to values related to the visualization of page - objects. This includes animation state when blending from one state to - another. -*/ -class VisualState -{ -public: - enum State { - VS_Selected, - VS_Focused, - VS_Current, - VS_Excluded, - VS_None }; - - VisualState (const sal_Int32 nPageId); - ~VisualState (void); - - State GetCurrentVisualState (void) const; - State GetOldVisualState (void) const; - void SetVisualState (const State eState); - double GetVisualStateBlend (void) const; - void SetVisualStateBlend (const double nBlend); - - void UpdateVisualState (const PageDescriptor& rDescriptor); - - void SetMouseOverState (const bool bIsMouseOver); - - sal_Int32 GetStateAnimationId (void) const; - void SetStateAnimationId (const sal_Int32 nAnimationId); - - Point GetLocationOffset (void) const; - bool SetLocationOffset (const Point& rPoint); - sal_Int32 GetLocationAnimationId (void) const; - void SetLocationAnimationId (const sal_Int32 nAnimationId); - - double GetButtonAlpha (void) const; - void SetButtonAlpha (const double nAlpha); - double GetButtonBarAlpha (void) const; - void SetButtonBarAlpha (const double nAlpha); - sal_Int32 GetButtonAlphaAnimationId (void) const; - void SetButtonAlphaAnimationId (const sal_Int32 nAnimationId); - - sal_Int32 mnPageId; // For debugging - -private: - State meCurrentVisualState; - State meOldVisualState; - double mnVisualStateBlend; - sal_Int32 mnStateAnimationId; - bool mbOldMouseOverState; - bool mbCurrentMouseOverState; - - Point maLocationOffset; - sal_Int32 mnLocationAnimationId; - - double mnButtonAlpha; - double mnButtonBarAlpha; - sal_Int32 mnButtonAlphaAnimationId; -}; - -} } } // end of namespace ::sd::slidesorter::model - -#endif |