LibreOffice Module svx (master) 1
|
helper class to update a color in a toolbox button image More...
#include <tbxcolorupdate.hxx>
Public Member Functions | |
ToolboxButtonColorUpdaterBase (bool bWideButton, OUString aCommandLabel, OUString aCommandURL, sal_uInt16 nSlotId, css::uno::Reference< css::frame::XFrame > xFrame) | |
virtual | ~ToolboxButtonColorUpdaterBase () |
void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override |
void | SetRecentColor (const NamedColor &rNamedColor) |
void | Update (const NamedColor &rNamedColor) |
void | Update (const Color &rColor, bool bForceUpdate=false) |
Color const & | GetCurrentColor () const |
OUString | GetCurrentColorName () const |
Public Member Functions inherited from SfxListener | |
SfxListener () | |
SfxListener (const SfxListener &rCopy) | |
virtual | ~SfxListener () COVERITY_NOEXCEPT_FALSE |
void | StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected) |
void | EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false) |
void | EndListeningAll () |
bool | IsListening (SfxBroadcaster &rBroadcaster) const |
sal_uInt16 | GetBroadcasterCount () const |
SfxBroadcaster * | GetBroadcasterJOE (sal_uInt16 nNo) const |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) |
void | RemoveBroadcaster_Impl (SfxBroadcaster &rBC) |
virtual bool | IsSdrView () const |
Protected Member Functions | |
void | Init (sal_uInt16 nSlotId) |
virtual void | SetQuickHelpText (const OUString &rText)=0 |
virtual OUString | GetQuickHelpText () const =0 |
virtual void | SetImage (VirtualDevice *pVirDev)=0 |
virtual VclPtr< VirtualDevice > | CreateVirtualDevice () const =0 |
virtual bool | RecordVirtualDevice () const =0 |
virtual vcl::ImageType | GetImageSize () const =0 |
virtual Size | GetItemSize (const Size &rImageSize) const =0 |
Protected Attributes | |
bool | mbWideButton |
bool | mbWasHiContrastMode |
sal_uInt16 | mnSlotId |
Color | maCurColor |
tools::Rectangle | maUpdRect |
Size | maBmpSize |
vcl::ImageType | meImageType |
OUString | maCommandLabel |
OUString | maCommandURL |
css::uno::Reference< css::frame::XFrame > | mxFrame |
Private Member Functions | |
ToolboxButtonColorUpdaterBase (ToolboxButtonColorUpdaterBase const &)=delete | |
ToolboxButtonColorUpdaterBase & | operator= (ToolboxButtonColorUpdaterBase const &)=delete |
helper class to update a color in a toolbox button image
formerly known as SvxTbxButtonColorUpdater_Impl, residing in svx/source/tbxctrls/colorwindow.hxx.
Definition at line 52 of file tbxcolorupdate.hxx.
svx::ToolboxButtonColorUpdaterBase::ToolboxButtonColorUpdaterBase | ( | bool | bWideButton, |
OUString | aCommandLabel, | ||
OUString | aCommandURL, | ||
sal_uInt16 | nSlotId, | ||
css::uno::Reference< css::frame::XFrame > | xFrame | ||
) |
Definition at line 43 of file tbxcolorupdate.cxx.
References COL_TRANSPARENT(), Size16, and xFrame.
|
virtual |
Definition at line 175 of file tbxcolorupdate.cxx.
|
privatedelete |
|
protectedpure virtual |
Implemented in svx::VclToolboxButtonColorUpdater, and svx::ToolboxButtonColorUpdater.
Referenced by Update().
|
inline |
Definition at line 65 of file tbxcolorupdate.hxx.
References maCurColor.
OUString svx::ToolboxButtonColorUpdaterBase::GetCurrentColorName | ( | ) | const |
Definition at line 275 of file tbxcolorupdate.cxx.
References GetQuickHelpText(), and nLength.
|
protectedpure virtual |
Implemented in svx::VclToolboxButtonColorUpdater, and svx::ToolboxButtonColorUpdater.
Referenced by Update().
|
protectedpure virtual |
Implemented in svx::VclToolboxButtonColorUpdater, and svx::ToolboxButtonColorUpdater.
Referenced by Update().
|
protectedpure virtual |
Implemented in svx::VclToolboxButtonColorUpdater, and svx::ToolboxButtonColorUpdater.
Referenced by GetCurrentColorName().
|
protected |
Definition at line 57 of file tbxcolorupdate.cxx.
References COL_DEFAULT_FONT, COL_DEFAULT_FRAMELINE, COL_DEFAULT_HIGHLIGHT, COL_DEFAULT_SHAPE_FILLING, COL_DEFAULT_SHAPE_STROKE, COL_TRANSPARENT(), mbWideButton, mxFrame, SfxListener::StartListening(), SvxResId(), Update(), and xModel.
Referenced by svx::ToolboxButtonColorUpdater::ToolboxButtonColorUpdater(), and svx::VclToolboxButtonColorUpdater::VclToolboxButtonColorUpdater().
|
overridevirtual |
Reimplemented from SfxListener.
Definition at line 102 of file tbxcolorupdate.cxx.
References SfxListener::EndListeningAll(), SfxHint::GetId(), mnSlotId, and Update().
|
privatedelete |
|
protectedpure virtual |
Implemented in svx::VclToolboxButtonColorUpdater, and svx::ToolboxButtonColorUpdater.
Referenced by Update().
|
protectedpure virtual |
Implemented in svx::VclToolboxButtonColorUpdater, and svx::ToolboxButtonColorUpdater.
Referenced by Update().
|
protectedpure virtual |
Implemented in svx::VclToolboxButtonColorUpdater, and svx::ToolboxButtonColorUpdater.
Referenced by Update().
void svx::ToolboxButtonColorUpdaterBase::SetRecentColor | ( | const NamedColor & | rNamedColor | ) |
Definition at line 115 of file tbxcolorupdate.cxx.
References mbWideButton, mnSlotId, mxFrame, Update(), and xModel.
Referenced by PaletteManager::SetSplitButtonColor().
void svx::ToolboxButtonColorUpdaterBase::Update | ( | const Color & | rColor, |
bool | bForceUpdate = false |
||
) |
Definition at line 188 of file tbxcolorupdate.cxx.
References vcl::CLIPREGION, COL_AUTO(), COL_TRANSPARENT(), CreateVirtualDevice(), vcl::Region::Exclude(), VclPtr< class reference_type >::get(), StyleSettings::GetDisableColor(), StyleSettings::GetHighContrastMode(), GetImageSize(), GetItemSize(), Application::GetSettings(), Image::GetSizePixel(), AllSettings::GetStyleSettings(), vcl::CommandInfoProvider::GetXGraphicForCommand(), Size::Height(), Color::IsFullyTransparent(), maBmpSize, maCommandURL, maCurColor, maUpdRect, mbWasHiContrastMode, meImageType, mxFrame, RecordVirtualDevice(), SetImage(), vcl::Size32, and Size::Width().
void svx::ToolboxButtonColorUpdaterBase::Update | ( | const NamedColor & | rNamedColor | ) |
Definition at line 178 of file tbxcolorupdate.cxx.
References NamedColor::m_aColor, NamedColor::m_aName, maCommandLabel, SetQuickHelpText(), and Update().
Referenced by Init(), Notify(), SetRecentColor(), and Update().
|
protected |
Definition at line 78 of file tbxcolorupdate.hxx.
Referenced by Update().
|
protected |
Definition at line 80 of file tbxcolorupdate.hxx.
Referenced by Update().
|
protected |
Definition at line 81 of file tbxcolorupdate.hxx.
Referenced by Update().
|
protected |
Definition at line 76 of file tbxcolorupdate.hxx.
Referenced by GetCurrentColor(), and Update().
|
protected |
Definition at line 77 of file tbxcolorupdate.hxx.
Referenced by Update().
|
protected |
Definition at line 74 of file tbxcolorupdate.hxx.
Referenced by Update().
|
protected |
Definition at line 73 of file tbxcolorupdate.hxx.
Referenced by svx::VclToolboxButtonColorUpdater::GetItemSize(), svx::ToolboxButtonColorUpdater::GetItemSize(), Init(), and SetRecentColor().
|
protected |
Definition at line 79 of file tbxcolorupdate.hxx.
Referenced by Update().
|
protected |
Definition at line 75 of file tbxcolorupdate.hxx.
Referenced by Notify(), and SetRecentColor().
|
protected |
Definition at line 82 of file tbxcolorupdate.hxx.
Referenced by Init(), SetRecentColor(), and Update().