LibreOffice Module sdext (master)  1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
sdext::presenter::PresenterTheme Class Reference

A theme is a set of properties describing fonts, colors, and bitmaps to be used to draw background, pane borders, and view content. More...

#include <PresenterTheme.hxx>


class  FontDescriptor
class  Theme

Public Types

typedef std::shared_ptr< FontDescriptorSharedFontDescriptor

Public Member Functions

 PresenterTheme (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::rendering::XCanvas > &rxCanvas)
 ~PresenterTheme ()
bool HasCanvas () const
void ProvideCanvas (const css::uno::Reference< css::rendering::XCanvas > &rxCanvas)
OUString GetStyleName (const OUString &rsResourceURL) const
::std::vector< sal_Int32 > GetBorderSize (const OUString &rsStyleName, const bool bOuter) const
SharedBitmapDescriptor GetBitmap (const OUString &rsStyleName, const OUString &rsBitmapName) const
SharedBitmapDescriptor GetBitmap (const OUString &rsBitmapName) const
std::shared_ptr< PresenterBitmapContainerGetBitmapContainer () const
SharedFontDescriptor GetFont (const OUString &rsStyleName) const
std::shared_ptr< PresenterConfigurationAccessGetNodeForViewStyle (const OUString &rsStyleName) const

Static Public Member Functions

static SharedFontDescriptor ReadFont (const css::uno::Reference< css::container::XHierarchicalNameAccess > &rxNode, const SharedFontDescriptor &rDefaultFount)
static bool ConvertToColor (const css::uno::Any &rColorSequence, sal_uInt32 &rColor)

Private Member Functions

std::shared_ptr< ThemeReadTheme ()

Private Attributes

css::uno::Reference< css::uno::XComponentContext > mxContext
std::shared_ptr< ThemempTheme
css::uno::Reference< css::rendering::XCanvas > mxCanvas

Detailed Description

A theme is a set of properties describing fonts, colors, and bitmaps to be used to draw background, pane borders, and view content.

At the moment the properties can be accessed via the getPropertyValue() method.

For a resource URL of a pane or a view you get the name of the associated PaneStyle or ViewStyle.

For the name of pane or view style suffixed with and underscore and the name of configuration property, and maybe additionally suffixed by another underscore and sub property name you get the associated property.

Example: you want to access the top left bitmap of a pane border (simplified code):

OUString sStyleName = getPropertyValue("private:resource/pane/Presenter/Pane1"); XBitmap xBitmap = getPropertyValue(sStyleName + "_TopLeftBitmap");

For the offset of the bitmap you can call Point aOffset = getPropertyValue(sStyleName + "_TopLeftOffset");

This is work in progress.

Definition at line 56 of file PresenterTheme.hxx.

Member Typedef Documentation

Definition at line 97 of file PresenterTheme.hxx.

Constructor & Destructor Documentation

sdext::presenter::PresenterTheme::PresenterTheme ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas 

Definition at line 243 of file PresenterTheme.cxx.

References mpTheme, mxContext, and ReadTheme().

sdext::presenter::PresenterTheme::~PresenterTheme ( )

Definition at line 252 of file PresenterTheme.cxx.

Member Function Documentation

bool sdext::presenter::PresenterTheme::ConvertToColor ( const css::uno::Any &  rColorSequence,
sal_uInt32 &  rColor 

Definition at line 319 of file PresenterTheme.cxx.

SharedBitmapDescriptor sdext::presenter::PresenterTheme::GetBitmap ( const OUString &  rsStyleName,
const OUString &  rsBitmapName 
) const

Definition at line 361 of file PresenterTheme.cxx.

References mpTheme.

SharedBitmapDescriptor sdext::presenter::PresenterTheme::GetBitmap ( const OUString &  rsBitmapName) const

Definition at line 403 of file PresenterTheme.cxx.

References mpTheme.

std::shared_ptr< PresenterBitmapContainer > sdext::presenter::PresenterTheme::GetBitmapContainer ( ) const

Definition at line 428 of file PresenterTheme.cxx.

References mpTheme.

std::vector< sal_Int32 > sdext::presenter::PresenterTheme::GetBorderSize ( const OUString &  rsStyleName,
const bool  bOuter 
) const

Definition at line 294 of file PresenterTheme.cxx.

References mpTheme.

PresenterTheme::SharedFontDescriptor sdext::presenter::PresenterTheme::GetFont ( const OUString &  rsStyleName) const

Definition at line 436 of file PresenterTheme.cxx.

References mpTheme.

std::shared_ptr< PresenterConfigurationAccess > sdext::presenter::PresenterTheme::GetNodeForViewStyle ( const OUString &  rsStyleName) const
OUString sdext::presenter::PresenterTheme::GetStyleName ( const OUString &  rsResourceURL) const

Definition at line 282 of file PresenterTheme.cxx.

References mpTheme.

bool sdext::presenter::PresenterTheme::HasCanvas ( ) const

Definition at line 268 of file PresenterTheme.cxx.

References mxCanvas.

void sdext::presenter::PresenterTheme::ProvideCanvas ( const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas)

Definition at line 273 of file PresenterTheme.cxx.

References mxCanvas, and ReadTheme().

PresenterTheme::SharedFontDescriptor sdext::presenter::PresenterTheme::ReadFont ( const css::uno::Reference< css::container::XHierarchicalNameAccess > &  rxNode,
const SharedFontDescriptor rDefaultFount 

Definition at line 312 of file PresenterTheme.cxx.

std::shared_ptr< PresenterTheme::Theme > sdext::presenter::PresenterTheme::ReadTheme ( )

Member Data Documentation

std::shared_ptr<Theme> sdext::presenter::PresenterTheme::mpTheme
css::uno::Reference<css::rendering::XCanvas> sdext::presenter::PresenterTheme::mxCanvas

Definition at line 125 of file PresenterTheme.hxx.

Referenced by HasCanvas(), ProvideCanvas(), and ReadTheme().

css::uno::Reference<css::uno::XComponentContext> sdext::presenter::PresenterTheme::mxContext

Definition at line 123 of file PresenterTheme.hxx.

Referenced by GetNodeForViewStyle(), and ReadTheme().

The documentation for this class was generated from the following files: