LibreOffice Module sfx2 (master) 1
|
Simple collection of colors, gradients, fonts that define the look of the sidebar and its controls. More...
#include <Theme.hxx>
Public Types | |
enum | ThemeItem { Begin_ , Pre_Color_ = Begin_ , AnyItem_ = Pre_Color_ , Image_Color_ , Color_Highlight , Color_HighlightText , Color_DeckBackground , Color_DeckTitleBarBackground , Color_PanelBackground , Color_PanelTitleBarBackground , Color_TabBarBackground , Color_Int_ , Int_DeckBorderSize , Int_DeckSeparatorHeight , Int_DeckLeftPadding , Int_DeckTopPadding , Int_DeckRightPadding , Int_DeckBottomPadding , Int_Bool_ , Bool_UseSystemColors , Bool_IsHighContrastModeActive , Post_Bool_ , End_ =Post_Bool_ } |
Public Member Functions | |
void | InitializeTheme () |
Theme () | |
virtual | ~Theme () override |
Theme (const Theme &)=delete | |
Theme & | operator= (const Theme &)=delete |
virtual void | disposing (std::unique_lock< std::mutex > &) override |
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL | getPropertySetInfo () override |
virtual void SAL_CALL | setPropertyValue (const OUString &rsPropertyName, const css::uno::Any &rValue) override |
virtual css::uno::Any SAL_CALL | getPropertyValue (const OUString &rsPropertyName) override |
virtual void SAL_CALL | addPropertyChangeListener (const OUString &rsPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &rxListener) override |
virtual void SAL_CALL | removePropertyChangeListener (const OUString &rsPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &rxListener) override |
virtual void SAL_CALL | addVetoableChangeListener (const OUString &rsPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rxListener) override |
virtual void SAL_CALL | removeVetoableChangeListener (const OUString &rsPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rxListener) override |
virtual css::uno::Sequence< css::beans::Property > SAL_CALL | getProperties () override |
virtual css::beans::Property SAL_CALL | getPropertyByName (const OUString &rsName) override |
virtual sal_Bool SAL_CALL | hasPropertyByName (const OUString &rsName) override |
Public Member Functions inherited from comphelper::WeakComponentImplHelper< typename... Ifc > | |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual void SAL_CALL | dispose () noexcept final override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
Public Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
virtual | ~WeakComponentImplHelperBase () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual void | disposing (std::unique_lock< std::mutex > &) |
Public Member Functions inherited from comphelper::UnoImplBase | |
virtual | ~UnoImplBase () |
Static Public Member Functions | |
static Color | GetColor (const ThemeItem eItem) |
static sal_Int32 | GetInteger (const ThemeItem eItem) |
static bool | IsHighContrastMode () |
static void | HandleDataChange () |
static css::uno::Reference< css::beans::XPropertySet > | GetPropertySet () |
Private Types | |
enum | PropertyType { PT_Color , PT_Integer , PT_Boolean , PT_Invalid } |
typedef std::unordered_map< OUString, ThemeItem > | PropertyNameToIdMap |
typedef std::vector< OUString > | PropertyIdToNameMap |
typedef ::std::vector< css::uno::Any > | RawValueContainer |
typedef std::vector< css::uno::Reference< css::beans::XPropertyChangeListener > > | ChangeListenerContainer |
typedef std::map< ThemeItem, ChangeListenerContainer > | ChangeListeners |
typedef std::vector< css::uno::Reference< css::beans::XVetoableChangeListener > > | VetoableListenerContainer |
typedef std::map< ThemeItem, VetoableListenerContainer > | VetoableListeners |
Private Member Functions | |
void | SetupPropertyMaps () |
void | UpdateTheme () |
VetoableListenerContainer * | GetVetoableListeners (const ThemeItem eItem, const bool bCreate) |
ChangeListenerContainer * | GetChangeListeners (const ThemeItem eItem, const bool bCreate) |
void | ProcessNewValue (const css::uno::Any &rValue, const ThemeItem eItem, const PropertyType eType) |
Static Private Member Functions | |
static Theme & | GetCurrentTheme () |
static PropertyType | GetPropertyType (const ThemeItem eItem) |
static css::uno::Type const & | GetCppuType (const PropertyType eType) |
static sal_Int32 | GetIndex (const ThemeItem eItem, const PropertyType eType) |
static bool | DoVetoableListenersVeto (const VetoableListenerContainer *pListeners, const css::beans::PropertyChangeEvent &rEvent) |
static void | BroadcastPropertyChange (const ChangeListenerContainer *pListeners, const css::beans::PropertyChangeEvent &rEvent) |
Private Attributes | |
std::vector< Color > | maColors |
std::vector< sal_Int32 > | maIntegers |
std::vector< bool > | maBooleans |
bool | mbIsHighContrastMode |
bool | mbIsHighContrastModeSetManually |
PropertyNameToIdMap | maPropertyNameToIdMap |
PropertyIdToNameMap | maPropertyIdToNameMap |
RawValueContainer | maRawValues |
ChangeListeners | maChangeListeners |
VetoableListeners | maVetoableListeners |
Additional Inherited Members | |
Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
void | throwIfDisposed (std::unique_lock< std::mutex > &) |
Protected Attributes inherited from comphelper::WeakComponentImplHelperBase | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | maEventListeners |
Protected Attributes inherited from comphelper::UnoImplBase | |
std::mutex | m_aMutex |
bool | m_bDisposed |
Simple collection of colors, gradients, fonts that define the look of the sidebar and its controls.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
sfx2::sidebar::Theme::Theme | ( | ) |
Definition at line 38 of file Theme.cxx.
References SetupPropertyMaps().
|
delete |
|
overridevirtual |
Definition at line 244 of file Theme.cxx.
References AnyItem_, eType, GetChangeListeners(), GetPropertyType(), maPropertyNameToIdMap, and PT_Invalid.
|
overridevirtual |
Definition at line 302 of file Theme.cxx.
References AnyItem_, eType, GetPropertyType(), GetVetoableListeners(), maPropertyNameToIdMap, and PT_Invalid.
|
staticprivate |
Definition at line 603 of file Theme.cxx.
References aListeners, and Exception.
Referenced by setPropertyValue().
|
overridevirtual |
Reimplemented from comphelper::WeakComponentImplHelperBase.
Definition at line 144 of file Theme.cxx.
References aEvent, aListeners, Exception, and maChangeListeners.
|
staticprivate |
Definition at line 577 of file Theme.cxx.
References aListeners, and Exception.
Referenced by setPropertyValue().
|
private |
Definition at line 561 of file Theme.cxx.
References maChangeListeners.
Referenced by addPropertyChangeListener(), removePropertyChangeListener(), and setPropertyValue().
Definition at line 49 of file Theme.cxx.
References COL_WHITE(), eType, GetCurrentTheme(), GetIndex(), GetPropertyType(), maColors, nIndex, and PT_Color.
Referenced by sfx2::sidebar::TabBar::DataChanged(), sfx2::sidebar::Deck::Deck(), sfx2::sidebar::GripWidget::Paint(), and sfx2::sidebar::TitleBar::SetBackground().
|
staticprivate |
Definition at line 510 of file Theme.cxx.
References eType, cppu::UnoType< typename T >::get(), PT_Boolean, PT_Color, PT_Integer, and PT_Invalid.
Referenced by getProperties(), and getPropertyByName().
|
staticprivate |
Definition at line 32 of file Theme.cxx.
References SfxApplication::GetSidebarTheme(), and SfxGetpApp().
Referenced by GetColor(), GetInteger(), GetPropertySet(), HandleDataChange(), and IsHighContrastMode().
|
staticprivate |
Definition at line 529 of file Theme.cxx.
References Color_Int_, eType, Int_Bool_, Pre_Color_, PT_Boolean, PT_Color, and PT_Integer.
Referenced by GetColor(), GetInteger(), and ProcessNewValue().
|
static |
Definition at line 61 of file Theme.cxx.
References eType, GetCurrentTheme(), GetIndex(), GetPropertyType(), maIntegers, nIndex, and PT_Integer.
Referenced by sfx2::sidebar::Deck::GetContentArea().
|
overridevirtual |
Definition at line 359 of file Theme.cxx.
References aProperties, Begin_, End_, eType, GetCppuType(), GetPropertyType(), maPropertyIdToNameMap, and PT_Invalid.
|
overridevirtual |
Definition at line 386 of file Theme.cxx.
References eType, GetCppuType(), GetPropertyType(), maPropertyNameToIdMap, and PT_Invalid.
|
static |
Definition at line 168 of file Theme.cxx.
References GetCurrentTheme(), and SfxGetpApp().
Referenced by sfx2::sidebar::SidebarController::create(), and sfx2::sidebar::SidebarController::CreateUIElement().
|
overridevirtual |
|
staticprivate |
Definition at line 480 of file Theme.cxx.
References Bool_IsHighContrastModeActive, Bool_UseSystemColors, Color_DeckBackground, Color_DeckTitleBarBackground, Color_Highlight, Color_HighlightText, Color_PanelBackground, Color_PanelTitleBarBackground, Color_TabBarBackground, Int_DeckBorderSize, Int_DeckBottomPadding, Int_DeckLeftPadding, Int_DeckRightPadding, Int_DeckSeparatorHeight, Int_DeckTopPadding, PT_Boolean, PT_Color, PT_Integer, and PT_Invalid.
Referenced by addPropertyChangeListener(), addVetoableChangeListener(), GetColor(), GetInteger(), getProperties(), getPropertyByName(), getPropertyValue(), hasPropertyByName(), removePropertyChangeListener(), removeVetoableChangeListener(), and setPropertyValue().
|
overridevirtual |
Definition at line 226 of file Theme.cxx.
References Any, eType, GetPropertyType(), maPropertyNameToIdMap, maRawValues, and PT_Invalid.
|
private |
Definition at line 545 of file Theme.cxx.
References maVetoableListeners.
Referenced by addVetoableChangeListener(), removeVetoableChangeListener(), and setPropertyValue().
|
static |
Definition at line 76 of file Theme.cxx.
References Bool_IsHighContrastModeActive, GetCurrentTheme(), StyleSettings::GetHighContrastMode(), Application::GetSettings(), AllSettings::GetStyleSettings(), maRawValues, mbIsHighContrastMode, mbIsHighContrastModeSetManually, and UpdateTheme().
Referenced by sfx2::sidebar::IMPL_LINK(), and ProcessNewValue().
|
overridevirtual |
Definition at line 407 of file Theme.cxx.
References eType, GetPropertyType(), maPropertyNameToIdMap, and PT_Invalid.
void sfx2::sidebar::Theme::InitializeTheme | ( | ) |
Definition at line 90 of file Theme.cxx.
References Any, Bool_UseSystemColors, maPropertyIdToNameMap, and setPropertyValue().
|
static |
Definition at line 70 of file Theme.cxx.
References GetCurrentTheme(), and mbIsHighContrastMode.
Referenced by sfx2::sidebar::SidebarController::UpdateTitleBarIcons().
References getPropertyValue(), and setPropertyValue().
|
private |
Definition at line 624 of file Theme.cxx.
References Bool_IsHighContrastModeActive, Bool_UseSystemColors, eType, GetIndex(), HandleDataChange(), maBooleans, maColors, maIntegers, mbIsHighContrastMode, mbIsHighContrastModeSetManually, nIndex, nValue, PT_Boolean, PT_Color, PT_Integer, and PT_Invalid.
Referenced by setPropertyValue().
|
overridevirtual |
Definition at line 268 of file Theme.cxx.
References AnyItem_, eType, GetChangeListeners(), GetPropertyType(), maChangeListeners, maPropertyNameToIdMap, and PT_Invalid.
|
overridevirtual |
Definition at line 326 of file Theme.cxx.
References AnyItem_, eType, GetPropertyType(), GetVetoableListeners(), maPropertyNameToIdMap, maVetoableListeners, and PT_Invalid.
|
overridevirtual |
Definition at line 181 of file Theme.cxx.
References aEvent, Any, AnyItem_, BroadcastPropertyChange(), DoVetoableListenersVeto(), eType, GetChangeListeners(), GetPropertyType(), GetVetoableListeners(), maPropertyNameToIdMap, maRawValues, ProcessNewValue(), and PT_Invalid.
Referenced by InitializeTheme(), and UpdateTheme().
|
private |
Definition at line 422 of file Theme.cxx.
References Bool_IsHighContrastModeActive, Bool_UseSystemColors, Color_DeckBackground, Color_DeckTitleBarBackground, Color_Highlight, Color_HighlightText, Color_Int_, Color_PanelBackground, Color_PanelTitleBarBackground, Color_TabBarBackground, Int_Bool_, Int_DeckBorderSize, Int_DeckBottomPadding, Int_DeckLeftPadding, Int_DeckRightPadding, Int_DeckSeparatorHeight, Int_DeckTopPadding, maBooleans, maColors, maIntegers, maPropertyIdToNameMap, maPropertyNameToIdMap, maRawValues, Post_Bool_, and Pre_Color_.
Referenced by Theme().
|
private |
Definition at line 97 of file Theme.cxx.
References Any, Color_DeckBackground, Color_DeckTitleBarBackground, Color_Highlight, Color_HighlightText, Color_PanelBackground, Color_PanelTitleBarBackground, Color_TabBarBackground, DBG_UNHANDLED_EXCEPTION, Color::DecreaseLuminance(), StyleSettings::GetDialogColor(), StyleSettings::GetHighlightColor(), StyleSettings::GetHighlightTextColor(), Color::GetRGBColor(), Application::GetSettings(), Int_DeckSeparatorHeight, maPropertyIdToNameMap, and setPropertyValue().
Referenced by HandleDataChange().
|
private |
Definition at line 129 of file Theme.hxx.
Referenced by ProcessNewValue(), and SetupPropertyMaps().
|
private |
Definition at line 142 of file Theme.hxx.
Referenced by disposing(), GetChangeListeners(), and removePropertyChangeListener().
|
private |
Definition at line 127 of file Theme.hxx.
Referenced by GetColor(), ProcessNewValue(), and SetupPropertyMaps().
|
private |
Definition at line 128 of file Theme.hxx.
Referenced by GetInteger(), ProcessNewValue(), and SetupPropertyMaps().
|
private |
Definition at line 136 of file Theme.hxx.
Referenced by getProperties(), InitializeTheme(), SetupPropertyMaps(), and UpdateTheme().
|
private |
Definition at line 134 of file Theme.hxx.
Referenced by addPropertyChangeListener(), addVetoableChangeListener(), getPropertyByName(), getPropertyValue(), hasPropertyByName(), removePropertyChangeListener(), removeVetoableChangeListener(), setPropertyValue(), and SetupPropertyMaps().
|
private |
Definition at line 138 of file Theme.hxx.
Referenced by getPropertyValue(), HandleDataChange(), setPropertyValue(), and SetupPropertyMaps().
|
private |
Definition at line 145 of file Theme.hxx.
Referenced by GetVetoableListeners(), and removeVetoableChangeListener().
|
private |
Definition at line 130 of file Theme.hxx.
Referenced by HandleDataChange(), IsHighContrastMode(), and ProcessNewValue().
|
private |
Definition at line 131 of file Theme.hxx.
Referenced by HandleDataChange(), and ProcessNewValue().