LibreOffice Module sd (master) 1
|
#include <annotationtag.hxx>
Public Member Functions | |
AnnotationTag (AnnotationManagerImpl &rManager, ::sd::View &rView, const css::uno::Reference< css::office::XAnnotation > &xAnnotation, Color const &rColor, int nIndex, const vcl::Font &rFont) | |
virtual | ~AnnotationTag () override |
virtual bool | MouseButtonDown (const MouseEvent &, SmartHdl &) override |
returns true if the AnnotationTag handled the event. More... | |
virtual bool | KeyInput (const KeyEvent &rKEvt) override |
returns true if the SmartTag consumes this event. More... | |
virtual bool | Command (const CommandEvent &rCEvt) override |
returns true if the SmartTag consumes this event. More... | |
virtual sal_Int32 | GetMarkablePointCount () const override |
virtual sal_Int32 | GetMarkedPointCount () const override |
virtual bool | MarkPoint (SdrHdl &rHdl, bool bUnmark) override |
virtual void | CheckPossibilities () override |
virtual bool | MarkPoints (const ::tools::Rectangle *pRect, bool bUnmark) override |
void | Move (int nDX, int nDY) |
bool | OnMove (const KeyEvent &rKEvt) |
BitmapEx | CreateAnnotationBitmap (bool) |
const css::uno::Reference< css::office::XAnnotation > & | GetAnnotation () const |
void | OpenPopup (bool bEdit) |
void | ClosePopup () |
Public Member Functions inherited from sd::SmartTag | |
SmartTag (::sd::View &rView) | |
virtual | ~SmartTag () override |
virtual bool | MouseButtonDown (const MouseEvent &, SmartHdl &) |
returns true if the SmartTag consumes this event. More... | |
virtual bool | KeyInput (const KeyEvent &rKEvt) |
returns true if the SmartTag consumes this event. More... | |
virtual bool | Command (const CommandEvent &rCEvt) |
returns true if the SmartTag consumes this event. More... | |
bool | isSelected () const |
returns true if this smart tag is currently selected More... | |
::sd::View & | getView () const |
Public Member Functions inherited from sd::SimpleReferenceComponent | |
SimpleReferenceComponent () | |
void | acquire () |
@ATTENTION The results are undefined if, for any individual instance of SimpleReferenceComponent, the total number of calls to acquire() exceeds the total number of calls to release() by a platform dependent amount (which, hopefully, is quite large). More... | |
void | release () |
void | Dispose () |
bool | isDisposed () const |
Private Member Functions | |
virtual void | addCustomHandles (SdrHdlList &rHandlerList) override |
virtual bool | getContext (SdrViewContext &rContext) override |
virtual void | disposing () override |
virtual void | select () override |
virtual void | deselect () override |
DECL_LINK (WindowEventHandler, VclWindowEvent &, void) | |
DECL_LINK (PopupModeEndHdl, weld::Popover &, void) | |
Private Attributes | |
AnnotationManagerImpl & | mrManager |
css::uno::Reference< css::office::XAnnotation > | mxAnnotation |
std::unique_ptr< AnnotationWindow > | mpAnnotationWindow |
Color | maColor |
int | mnIndex |
const vcl::Font & | mrFont |
Size | maSize |
VclPtr< vcl::Window > | mpListenWindow |
Point | maMouseDownPos |
Additional Inherited Members | |
virtual sal_Int32 | GetMarkablePointCount () const |
virtual sal_Int32 | GetMarkedPointCount () const |
virtual bool | MarkPoint (SdrHdl &rHdl, bool bUnmark) |
virtual void | CheckPossibilities () |
virtual bool | MarkPoints (const ::tools::Rectangle *pRect, bool bUnmark) |
virtual void | addCustomHandles (SdrHdlList &rHandlerList) |
virtual void | select () |
virtual void | deselect () |
virtual bool | getContext (SdrViewContext &rContext) |
virtual void | disposing () override |
Protected Member Functions inherited from sd::SimpleReferenceComponent | |
virtual void | disposing () |
virtual | ~SimpleReferenceComponent () |
Protected Attributes inherited from sd::SmartTag | |
::sd::View & | mrView |
bool | mbSelected |
Definition at line 34 of file annotationtag.hxx.
sd::AnnotationTag::AnnotationTag | ( | AnnotationManagerImpl & | rManager, |
::sd::View & | rView, | ||
const css::uno::Reference< css::office::XAnnotation > & | xAnnotation, | ||
Color const & | rColor, | ||
int | nIndex, | ||
const vcl::Font & | rFont | ||
) |
Definition at line 277 of file annotationtag.cxx.
|
overridevirtual |
Definition at line 288 of file annotationtag.cxx.
References DBG_ASSERT, sd::SimpleReferenceComponent::Dispose(), and mxAnnotation.
|
overrideprivatevirtual |
Reimplemented from sd::SmartTag.
Definition at line 468 of file annotationtag.cxx.
References SdrHdlList::AddHdl(), SdrPaintView::GetSdrPageView(), sd::SmartTag::mrView, mxAnnotation, and sd::SMART_TAG_HDL_NUM.
|
overridevirtual |
Reimplemented from sd::SmartTag.
Definition at line 439 of file annotationtag.cxx.
void sd::AnnotationTag::ClosePopup | ( | ) |
Definition at line 616 of file annotationtag.cxx.
References mpAnnotationWindow.
Referenced by deselect(), and disposing().
|
overridevirtual |
returns true if the SmartTag consumes this event.
Reimplemented from sd::SmartTag.
Definition at line 369 of file annotationtag.cxx.
References sd::AnnotationManagerImpl::ExecuteAnnotationTagContextMenu(), sd::ViewShell::GetActiveWindow(), CommandEvent::GetCommand(), CommandEvent::GetMousePosPixel(), weld::GetPopupParent(), sd::View::GetViewShell(), mrManager, sd::SmartTag::mrView, and mxAnnotation.
BitmapEx sd::AnnotationTag::CreateAnnotationBitmap | ( | bool | bSelected | ) |
Definition at line 523 of file annotationtag.cxx.
References COL_BLACK(), COL_WHITE(), Color::DecreaseLuminance(), sd::getInitials(), Color::IncreaseLuminance(), Color::Invert(), Color::IsDark(), maColor, maSize, mnIndex, mrFont, and mxAnnotation.
|
private |
|
private |
|
overrideprivatevirtual |
Reimplemented from sd::SmartTag.
Definition at line 514 of file annotationtag.cxx.
References ClosePopup(), sd::SmartTag::deselect(), mrManager, and sd::AnnotationManagerImpl::onTagDeselected().
|
overrideprivatevirtual |
Reimplemented from sd::SmartTag.
Definition at line 485 of file annotationtag.cxx.
References ClosePopup(), sd::SmartTag::disposing(), LINK, mpListenWindow, and mxAnnotation.
|
inline |
Definition at line 61 of file annotationtag.hxx.
References mxAnnotation.
Referenced by sd::AnnotationManagerImpl::onTagDeselected(), and sd::AnnotationManagerImpl::onTagSelected().
|
overrideprivatevirtual |
Reimplemented from sd::SmartTag.
Definition at line 463 of file annotationtag.cxx.
|
overridevirtual |
Reimplemented from sd::SmartTag.
Definition at line 443 of file annotationtag.cxx.
|
overridevirtual |
Reimplemented from sd::SmartTag.
Definition at line 448 of file annotationtag.cxx.
|
overridevirtual |
returns true if the SmartTag consumes this event.
Reimplemented from sd::SmartTag.
Definition at line 329 of file annotationtag.cxx.
References sd::AnnotationManagerImpl::DeleteAnnotation(), sd::SmartTagSet::deselect(), vcl::KeyCode::GetCode(), KeyEvent::GetKeyCode(), sd::View::getSmartTags(), vcl::KeyCode::IsShift(), KEY_DELETE, KEY_DOWN, KEY_ESCAPE, KEY_LEFT, KEY_RETURN, KEY_RIGHT, KEY_SPACE, KEY_TAB, KEY_UP, mrManager, sd::SmartTag::mrView, mxAnnotation, OnMove(), OpenPopup(), and sd::AnnotationManagerImpl::SelectNextAnnotation().
|
overridevirtual |
Reimplemented from sd::SmartTag.
Definition at line 453 of file annotationtag.cxx.
|
overridevirtual |
Reimplemented from sd::SmartTag.
Definition at line 458 of file annotationtag.cxx.
|
overridevirtual |
returns true if the AnnotationTag handled the event.
Reimplemented from sd::SmartTag.
Definition at line 295 of file annotationtag.cxx.
References sd::ViewShell::GetActiveWindow(), MouseEvent::GetPosPixel(), sd::View::getSmartTags(), sd::View::GetViewShell(), MouseEvent::IsLeft(), MouseEvent::IsRight(), sd::SmartTag::isSelected(), LINK, maMouseDownPos, mpListenWindow, sd::SmartTag::mrView, mxAnnotation, vcl::Window::PixelToLogic(), and sd::SmartTagSet::select().
Definition at line 383 of file annotationtag.cxx.
References SdrModel::BegUndo(), SdrModel::EndUndo(), sd::AnnotationManagerImpl::GetDoc(), SdrModel::IsUndoEnabled(), mrManager, sd::SmartTag::mrView, mxAnnotation, SdResId(), and sd::View::updateHandles().
Referenced by OnMove().
bool sd::AnnotationTag::OnMove | ( | const KeyEvent & | rKEvt | ) |
Definition at line 402 of file annotationtag.cxx.
References sd::ViewShell::GetActiveWindow(), vcl::KeyCode::GetCode(), KeyEvent::GetKeyCode(), vcl::Window::GetOutDev(), sd::View::GetViewShell(), Size::Height(), vcl::KeyCode::IsMod2(), KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, Move(), sd::SmartTag::mrView, pOut, and Size::Width().
Referenced by KeyInput().
void sd::AnnotationTag::OpenPopup | ( | bool | bEdit | ) |
Definition at line 582 of file annotationtag.cxx.
References Point::AdjustX(), Point::AdjustY(), sd::View::GetDocSh(), SdrPaintView::GetFirstOutputDevice(), weld::GetPopupParent(), sd::SmartTag::getView(), LINK, vcl::Window::LogicToPixel(), maSize, mpAnnotationWindow, sd::SmartTag::mrView, mxAnnotation, and pOut.
Referenced by KeyInput().
|
overrideprivatevirtual |
Reimplemented from sd::SmartTag.
Definition at line 497 of file annotationtag.cxx.
References sd::ViewShell::GetActiveWindow(), sd::View::GetViewShell(), SdrPaintView::MakeVisible(), maSize, mrManager, sd::SmartTag::mrView, mxAnnotation, sd::AnnotationManagerImpl::onTagSelected(), vcl::Window::PixelToLogic(), and sd::SmartTag::select().
|
private |
Definition at line 79 of file annotationtag.hxx.
Referenced by CreateAnnotationBitmap().
|
private |
Definition at line 84 of file annotationtag.hxx.
Referenced by MouseButtonDown().
|
private |
Definition at line 82 of file annotationtag.hxx.
Referenced by CreateAnnotationBitmap(), OpenPopup(), and select().
|
private |
Definition at line 80 of file annotationtag.hxx.
Referenced by CreateAnnotationBitmap().
|
private |
Definition at line 78 of file annotationtag.hxx.
Referenced by ClosePopup(), and OpenPopup().
|
private |
Definition at line 83 of file annotationtag.hxx.
Referenced by disposing(), and MouseButtonDown().
|
private |
Definition at line 81 of file annotationtag.hxx.
Referenced by CreateAnnotationBitmap().
|
private |
Definition at line 76 of file annotationtag.hxx.
Referenced by Command(), deselect(), KeyInput(), Move(), and select().
|
private |
Definition at line 77 of file annotationtag.hxx.
Referenced by addCustomHandles(), Command(), CreateAnnotationBitmap(), disposing(), GetAnnotation(), KeyInput(), MouseButtonDown(), Move(), OpenPopup(), select(), and ~AnnotationTag().