LibreOffice Module sd (master) 1
|
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< FontDescriptor > | SharedFontDescriptor |
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< PresenterBitmapContainer > | GetBitmapContainer () const |
SharedFontDescriptor | GetFont (const OUString &rsStyleName) const |
std::shared_ptr< PresenterConfigurationAccess > | GetNodeForViewStyle (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< Theme > | ReadTheme () |
Private Attributes | |
css::uno::Reference< css::uno::XComponentContext > | mxContext |
std::shared_ptr< Theme > | mpTheme |
css::uno::Reference< css::rendering::XCanvas > | mxCanvas |
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.
typedef std::shared_ptr<FontDescriptor> sdext::presenter::PresenterTheme::SharedFontDescriptor |
Definition at line 97 of file PresenterTheme.hxx.
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().
sdext::presenter::PresenterTheme::~PresenterTheme | ( | ) |
Definition at line 252 of file PresenterTheme.cxx.
|
static |
Definition at line 319 of file PresenterTheme.cxx.
SharedBitmapDescriptor sdext::presenter::PresenterTheme::GetBitmap | ( | const OUString & | rsBitmapName | ) | const |
Definition at line 403 of file PresenterTheme.cxx.
References mpTheme.
SharedBitmapDescriptor sdext::presenter::PresenterTheme::GetBitmap | ( | const OUString & | rsStyleName, |
const OUString & | rsBitmapName | ||
) | const |
Definition at line 361 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 |
Definition at line 334 of file PresenterTheme.cxx.
References sdext::presenter::PresenterConfigurationAccess::IsStringPropertyEqual(), mpTheme, mxContext, and sdext::presenter::PresenterConfigurationAccess::READ_WRITE.
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().
|
static |
Definition at line 312 of file PresenterTheme.cxx.
|
private |
Definition at line 256 of file PresenterTheme.cxx.
References mxCanvas, mxContext, and sdext::presenter::PresenterConfigurationAccess::READ_ONLY.
Referenced by PresenterTheme(), and ProvideCanvas().
|
private |
Definition at line 124 of file PresenterTheme.hxx.
Referenced by GetBitmap(), GetBitmapContainer(), GetBorderSize(), GetFont(), GetNodeForViewStyle(), GetStyleName(), and PresenterTheme().
|
private |
Definition at line 125 of file PresenterTheme.hxx.
Referenced by HasCanvas(), ProvideCanvas(), and ReadTheme().
|
private |
Definition at line 123 of file PresenterTheme.hxx.
Referenced by GetNodeForViewStyle(), and ReadTheme().