LibreOffice Module sd (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>

Classes

class  FontDescriptor
 
class  Theme
 

Public Types

typedef std::shared_ptr< FontDescriptorSharedFontDescriptor
 

Public Member Functions

 PresenterTheme (css::uno::Reference< css::uno::XComponentContext > xContext, css::uno::Reference< css::rendering::XCanvas > xCanvas)
 
 ~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

◆ SharedFontDescriptor

Definition at line 97 of file PresenterTheme.hxx.

Constructor & Destructor Documentation

◆ PresenterTheme()

sdext::presenter::PresenterTheme::PresenterTheme ( css::uno::Reference< css::uno::XComponentContext >  xContext,
css::uno::Reference< css::rendering::XCanvas >  xCanvas 
)

Definition at line 243 of file PresenterTheme.cxx.

References mpTheme, mxContext, and ReadTheme().

◆ ~PresenterTheme()

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

Definition at line 252 of file PresenterTheme.cxx.

Member Function Documentation

◆ ConvertToColor()

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

Definition at line 319 of file PresenterTheme.cxx.

◆ GetBitmap() [1/2]

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

Definition at line 403 of file PresenterTheme.cxx.

References mpTheme.

◆ GetBitmap() [2/2]

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

Definition at line 361 of file PresenterTheme.cxx.

References mpTheme.

◆ GetBitmapContainer()

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

Definition at line 428 of file PresenterTheme.cxx.

References mpTheme.

◆ GetBorderSize()

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.

◆ GetFont()

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

Definition at line 436 of file PresenterTheme.cxx.

References mpTheme.

◆ GetNodeForViewStyle()

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

◆ GetStyleName()

OUString sdext::presenter::PresenterTheme::GetStyleName ( const OUString &  rsResourceURL) const

Definition at line 282 of file PresenterTheme.cxx.

References mpTheme.

◆ HasCanvas()

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

Definition at line 268 of file PresenterTheme.cxx.

References mxCanvas.

◆ ProvideCanvas()

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().

◆ ReadFont()

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

Definition at line 312 of file PresenterTheme.cxx.

◆ ReadTheme()

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

Member Data Documentation

◆ mpTheme

std::shared_ptr<Theme> sdext::presenter::PresenterTheme::mpTheme
private

◆ mxCanvas

css::uno::Reference<css::rendering::XCanvas> sdext::presenter::PresenterTheme::mxCanvas
private

Definition at line 125 of file PresenterTheme.hxx.

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

◆ mxContext

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

Definition at line 123 of file PresenterTheme.hxx.

Referenced by GetNodeForViewStyle(), and ReadTheme().


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