LibreOffice Module sdext (master)  1
PresenterNotesView.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <vcl/settings.hxx>
21 #include "PresenterNotesView.hxx"
22 #include "PresenterButton.hxx"
26 #include "PresenterScrollBar.hxx"
27 #include "PresenterTextView.hxx"
28 #include <com/sun/star/accessibility/AccessibleTextType.hpp>
29 #include <com/sun/star/awt/Key.hpp>
30 #include <com/sun/star/awt/KeyModifier.hpp>
31 #include <com/sun/star/awt/PosSize.hpp>
32 #include <com/sun/star/drawing/framework/XControllerManager.hpp>
33 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
34 #include <com/sun/star/drawing/framework/XPane.hpp>
35 #include <com/sun/star/lang/XServiceName.hpp>
36 #include <com/sun/star/presentation/XPresentationPage.hpp>
37 #include <com/sun/star/rendering/CompositeOperation.hpp>
38 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
39 #include <com/sun/star/text/XTextRange.hpp>
40 
41 using namespace ::com::sun::star;
42 using namespace ::com::sun::star::uno;
43 using namespace ::com::sun::star::drawing::framework;
44 
45 static const sal_Int32 gnSpaceBelowSeparator (10);
46 static const sal_Int32 gnSpaceAboveSeparator (10);
47 static const double gnLineScrollFactor (1.2);
48 
49 namespace sdext::presenter {
50 
51 //===== PresenterNotesView ====================================================
52 
54  const Reference<XComponentContext>& rxComponentContext,
55  const Reference<XResourceId>& rxViewId,
56  const Reference<frame::XController>& rxController,
57  const ::rtl::Reference<PresenterController>& rpPresenterController)
59  mxViewId(rxViewId),
60  mpPresenterController(rpPresenterController),
61  mxCanvas(),
62  mxCurrentNotesPage(),
63  mpScrollBar(),
64  mxToolBarWindow(),
65  mxToolBarCanvas(),
66  mpToolBar(),
67  mpCloseButton(),
68  maSeparatorColor(0xffffff),
69  mnSeparatorYLocation(0),
70  maTextBoundingBox(),
71  mpBackground(),
72  mnTop(0),
73  mpFont(),
74  mpTextView()
75 {
76  try
77  {
78  Reference<XControllerManager> xCM (rxController, UNO_QUERY_THROW);
79  Reference<XConfigurationController> xCC (xCM->getConfigurationController(), UNO_SET_THROW);
80  Reference<XPane> xPane (xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW);
81 
82  mxParentWindow = xPane->getWindow();
83  mxCanvas = xPane->getCanvas();
84  mpTextView = std::make_shared<PresenterTextView>(
85  rxComponentContext,
86  mxCanvas,
87  mpPresenterController->GetPaintManager()->GetInvalidator(mxParentWindow));
88 
89  const OUString sResourceURL (mxViewId->getResourceURL());
90  mpFont = std::make_shared<PresenterTheme::FontDescriptor>(
91  rpPresenterController->GetViewFont(sResourceURL));
92  maSeparatorColor = mpFont->mnColor;
93  mpTextView->SetFont(mpFont);
94 
95  CreateToolBar(rxComponentContext, rpPresenterController);
96 
98  rxComponentContext,
100  mpPresenterController->GetTheme(),
102  mxCanvas,
103  "NotesViewCloser");
104 
105  if (mxParentWindow.is())
106  {
107  mxParentWindow->addWindowListener(this);
108  mxParentWindow->addPaintListener(this);
109  mxParentWindow->addKeyListener(this);
110  mxParentWindow->setVisible(true);
111  }
112 
114  rxComponentContext,
116  mpPresenterController->GetPaintManager(),
117  [this](double f) { return this->SetTop(f); });
118  mpScrollBar->SetBackground(
119  mpPresenterController->GetViewBackground(mxViewId->getResourceURL()));
120 
121  mpScrollBar->SetCanvas(mxCanvas);
122 
123  Layout();
124  }
125  catch (RuntimeException&)
126  {
128  throw;
129  }
130 }
131 
133 {
134 }
135 
137 {
138  if (mxParentWindow.is())
139  {
140  mxParentWindow->removeWindowListener(this);
141  mxParentWindow->removePaintListener(this);
142  mxParentWindow->removeKeyListener(this);
143  mxParentWindow = nullptr;
144  }
145 
146  // Dispose tool bar.
147  {
148  Reference<XComponent> xComponent (static_cast<XWeak*>(mpToolBar.get()), UNO_QUERY);
149  mpToolBar = nullptr;
150  if (xComponent.is())
151  xComponent->dispose();
152  }
153  {
154  Reference<XComponent> xComponent (mxToolBarCanvas, UNO_QUERY);
155  mxToolBarCanvas = nullptr;
156  if (xComponent.is())
157  xComponent->dispose();
158  }
159  {
160  Reference<XComponent> xComponent = mxToolBarWindow;
161  mxToolBarWindow = nullptr;
162  if (xComponent.is())
163  xComponent->dispose();
164  }
165 
166  // Dispose close button
167  {
168  Reference<XComponent> xComponent (static_cast<XWeak*>(mpCloseButton.get()), UNO_QUERY);
169  mpCloseButton = nullptr;
170  if (xComponent.is())
171  xComponent->dispose();
172  }
173 
174  // Create the tool bar.
175 
176  mpScrollBar = nullptr;
177 
178  mxViewId = nullptr;
179 }
180 
182  const css::uno::Reference<css::uno::XComponentContext>& rxContext,
183  const ::rtl::Reference<PresenterController>& rpPresenterController)
184 {
185  if (rpPresenterController.get() == nullptr)
186  return;
187 
188  Reference<drawing::XPresenterHelper> xPresenterHelper (
189  rpPresenterController->GetPresenterHelper());
190  if ( ! xPresenterHelper.is())
191  return;
192 
193  // Create a new window as container of the tool bar.
194  mxToolBarWindow = xPresenterHelper->createWindow(
196  false,
197  true,
198  false,
199  false);
200  mxToolBarCanvas = xPresenterHelper->createSharedCanvas (
201  Reference<rendering::XSpriteCanvas>(mxCanvas, UNO_QUERY),
203  mxCanvas,
206 
207  // Create the tool bar.
209  rxContext,
212  rpPresenterController,
214  mpToolBar->Initialize(
215  "PresenterScreenSettings/ToolBars/NotesToolBar");
216 }
217 
219 {
220  static const OUString sNotesShapeName (
221  "com.sun.star.presentation.NotesShape");
222  static const OUString sTextShapeName (
223  "com.sun.star.drawing.TextShape");
224 
225  if (!rxNotesPage.is())
226  return;
227 
228  // Iterate over all shapes and find the one that holds the text.
229  sal_Int32 nCount (rxNotesPage->getCount());
230  for (sal_Int32 nIndex=0; nIndex<nCount; ++nIndex)
231  {
232 
233  Reference<lang::XServiceName> xServiceName (
234  rxNotesPage->getByIndex(nIndex), UNO_QUERY);
235  if (xServiceName.is()
236  && xServiceName->getServiceName() == sNotesShapeName)
237  {
238  }
239  else
240  {
241  Reference<drawing::XShapeDescriptor> xShapeDescriptor (
242  rxNotesPage->getByIndex(nIndex), UNO_QUERY);
243  if (xShapeDescriptor.is())
244  {
245  OUString sType (xShapeDescriptor->getShapeType());
246  if (sType == sNotesShapeName || sType == sTextShapeName)
247  {
248  Reference<text::XTextRange> xText (
249  rxNotesPage->getByIndex(nIndex), UNO_QUERY);
250  if (xText.is())
251  {
252  mpTextView->SetText(Reference<text::XText>(xText, UNO_QUERY));
253  }
254  }
255  }
256  }
257  }
258 
259  Layout();
260 
261  if (mpScrollBar.get() != nullptr)
262  {
263  mpScrollBar->SetThumbPosition(0, false);
264  UpdateScrollBar();
265  }
266 
267  Invalidate();
268 }
269 
270 //----- lang::XEventListener -------------------------------------------------
271 
272 void SAL_CALL PresenterNotesView::disposing (const lang::EventObject& rEventObject)
273 {
274  if (rEventObject.Source == mxParentWindow)
275  mxParentWindow = nullptr;
276 }
277 
278 //----- XWindowListener -------------------------------------------------------
279 
280 void SAL_CALL PresenterNotesView::windowResized (const awt::WindowEvent&)
281 {
282  Layout();
283 }
284 
285 void SAL_CALL PresenterNotesView::windowMoved (const awt::WindowEvent&) {}
286 
287 void SAL_CALL PresenterNotesView::windowShown (const lang::EventObject&) {}
288 
289 void SAL_CALL PresenterNotesView::windowHidden (const lang::EventObject&) {}
290 
291 //----- XPaintListener --------------------------------------------------------
292 
293 void SAL_CALL PresenterNotesView::windowPaint (const awt::PaintEvent& rEvent)
294 {
295  if (rBHelper.bDisposed || rBHelper.bInDispose)
296  {
297  throw lang::DisposedException (
298  "PresenterNotesView object has already been disposed",
299  static_cast<uno::XWeak*>(this));
300  }
301 
303  return;
304 
305  ::osl::MutexGuard aSolarGuard (::osl::Mutex::getGlobalMutex());
306  Paint(rEvent.UpdateRect);
307 }
308 
309 //----- XResourceId -----------------------------------------------------------
310 
311 Reference<XResourceId> SAL_CALL PresenterNotesView::getResourceId()
312 {
313  return mxViewId;
314 }
315 
317 {
318  return false;
319 }
320 
321 //----- XDrawView -------------------------------------------------------------
322 
324 {
325  // Get the associated notes page.
326  mxCurrentNotesPage = nullptr;
327  try
328  {
329  Reference<presentation::XPresentationPage> xPresentationPage(rxSlide, UNO_QUERY);
330  if (xPresentationPage.is())
331  mxCurrentNotesPage = xPresentationPage->getNotesPage();
332  }
333  catch (RuntimeException&)
334  {
335  }
336 
338 }
339 
341 {
342  return nullptr;
343 }
344 
345 //----- XKeyListener ----------------------------------------------------------
346 
347 void SAL_CALL PresenterNotesView::keyPressed (const awt::KeyEvent& rEvent)
348 {
349  switch (rEvent.KeyCode)
350  {
351  case awt::Key::A:
352  Scroll(-gnLineScrollFactor * mpFont->mnSize);
353  break;
354 
355  case awt::Key::Y:
356  case awt::Key::Z:
357  Scroll(+gnLineScrollFactor * mpFont->mnSize);
358  break;
359 
360  case awt::Key::S:
361  ChangeFontSize(-1);
362  break;
363 
364  case awt::Key::G:
365  ChangeFontSize(+1);
366  break;
367 
368  case awt::Key::H:
369  if (mpTextView)
370  mpTextView->MoveCaret(
371  -1,
372  (rEvent.Modifiers == awt::KeyModifier::SHIFT)
373  ? css::accessibility::AccessibleTextType::CHARACTER
374  : css::accessibility::AccessibleTextType::WORD);
375  break;
376 
377  case awt::Key::L:
378  if (mpTextView)
379  mpTextView->MoveCaret(
380  +1,
381  (rEvent.Modifiers == awt::KeyModifier::SHIFT)
382  ? css::accessibility::AccessibleTextType::CHARACTER
383  : css::accessibility::AccessibleTextType::WORD);
384  break;
385  }
386 }
387 
388 void SAL_CALL PresenterNotesView::keyReleased (const awt::KeyEvent&) {}
389 
390 
392 {
393  if ( ! mxParentWindow.is())
394  return;
395  awt::Rectangle aWindowBox (mxParentWindow->getPosSize());
396  geometry::RealRectangle2D aNewTextBoundingBox (0,0,aWindowBox.Width, aWindowBox.Height);
397  // Size the tool bar and the horizontal separator above it.
398  if (mxToolBarWindow.is())
399  {
400  const geometry::RealSize2D aToolBarSize (mpToolBar->GetMinimalSize());
401  const sal_Int32 nToolBarHeight = sal_Int32(aToolBarSize.Height + 0.5);
402  mxToolBarWindow->setPosSize(0, aWindowBox.Height - nToolBarHeight,
403  sal_Int32(aToolBarSize.Width + 0.5), nToolBarHeight,
404  awt::PosSize::POSSIZE);
405  mnSeparatorYLocation = aWindowBox.Height - nToolBarHeight - gnSpaceBelowSeparator;
406  aNewTextBoundingBox.Y2 = mnSeparatorYLocation - gnSpaceAboveSeparator;
407  // Place the close button.
408  if (mpCloseButton.get() != nullptr)
409  mpCloseButton->SetCenter(geometry::RealPoint2D(
410  (aWindowBox.Width + aToolBarSize.Width) / 2,
411  aWindowBox.Height - aToolBarSize.Height/2));
412  }
413  // Check whether the vertical scroll bar is necessary.
414  if (mpScrollBar.get() != nullptr)
415  {
416  bool bShowVerticalScrollbar (false);
417  try
418  {
419  const double nTextBoxHeight (aNewTextBoundingBox.Y2 - aNewTextBoundingBox.Y1);
420  const double nHeight (mpTextView->GetTotalTextHeight());
421  if (nHeight > nTextBoxHeight)
422  {
423  bShowVerticalScrollbar = true;
425  aNewTextBoundingBox.X2 -= mpScrollBar->GetSize();
426  else
427  aNewTextBoundingBox.X1 += mpScrollBar->GetSize();
428  }
429  mpScrollBar->SetTotalSize(nHeight);
430  }
431  catch(beans::UnknownPropertyException&)
432  {
433  OSL_ASSERT(false);
434  }
436  {
437  mpScrollBar->SetVisible(bShowVerticalScrollbar);
438  mpScrollBar->SetPosSize(
439  geometry::RealRectangle2D(
440  aNewTextBoundingBox.X1 - mpScrollBar->GetSize(),
441  aNewTextBoundingBox.Y1,
442  aNewTextBoundingBox.X1,
443  aNewTextBoundingBox.Y2));
444  if( ! bShowVerticalScrollbar)
445  mpScrollBar->SetThumbPosition(0, false);
446  UpdateScrollBar();
447  }
448  else
449  {
450  mpScrollBar->SetVisible(bShowVerticalScrollbar);
451  mpScrollBar->SetPosSize(
452  geometry::RealRectangle2D(
453  aWindowBox.Width - mpScrollBar->GetSize(),
454  aNewTextBoundingBox.Y1,
455  aNewTextBoundingBox.X2 + mpScrollBar->GetSize(),
456  aNewTextBoundingBox.Y2));
457  if( ! bShowVerticalScrollbar)
458  mpScrollBar->SetThumbPosition(0, false);
459  UpdateScrollBar();
460  }
461  }
462  // Has the text area has changed it position or size?
463  if (aNewTextBoundingBox.X1 != maTextBoundingBox.X1
464  || aNewTextBoundingBox.Y1 != maTextBoundingBox.Y1
465  || aNewTextBoundingBox.X2 != maTextBoundingBox.X2
466  || aNewTextBoundingBox.Y2 != maTextBoundingBox.Y2)
467  {
468  maTextBoundingBox = aNewTextBoundingBox;
469  mpTextView->SetLocation(
470  geometry::RealPoint2D(
471  aNewTextBoundingBox.X1,
472  aNewTextBoundingBox.Y1));
473  mpTextView->SetSize(
474  geometry::RealSize2D(
475  aNewTextBoundingBox.X2 - aNewTextBoundingBox.X1,
476  aNewTextBoundingBox.Y2 - aNewTextBoundingBox.Y1));
477  }
478 }
479 
480 void PresenterNotesView::Paint (const awt::Rectangle& rUpdateBox)
481 {
482  if ( ! mxParentWindow.is())
483  return;
484  if ( ! mxCanvas.is())
485  return;
486 
487  if (mpBackground.get() == nullptr)
488  mpBackground = mpPresenterController->GetViewBackground(mxViewId->getResourceURL());
489 
490  if (rUpdateBox.Y < maTextBoundingBox.Y2
491  && rUpdateBox.X < maTextBoundingBox.X2)
492  {
493  PaintText(rUpdateBox);
494  }
495 
496  mpTextView->Paint(rUpdateBox);
497 
498  if (rUpdateBox.Y + rUpdateBox.Height > maTextBoundingBox.Y2)
499  {
500  PaintToolBar(rUpdateBox);
501  }
502 }
503 
504 void PresenterNotesView::PaintToolBar (const awt::Rectangle& rUpdateBox)
505 {
506  awt::Rectangle aWindowBox (mxParentWindow->getPosSize());
507 
508  rendering::ViewState aViewState (
509  geometry::AffineMatrix2D(1,0,0, 0,1,0),
510  nullptr);
511  rendering::RenderState aRenderState(
512  geometry::AffineMatrix2D(1,0,0, 0,1,0),
513  nullptr,
514  Sequence<double>(4),
515  rendering::CompositeOperation::SOURCE);
516 
517  if (mpBackground.get() != nullptr)
518  {
519  // Paint the background.
520  mpPresenterController->GetCanvasHelper()->Paint(
521  mpBackground,
522  mxCanvas,
523  rUpdateBox,
524  awt::Rectangle(0,sal_Int32(maTextBoundingBox.Y2),aWindowBox.Width,aWindowBox.Height),
525  awt::Rectangle());
526  }
527 
528  // Paint the horizontal separator.
529  OSL_ASSERT(mxViewId.is());
531 
532  mxCanvas->drawLine(
533  geometry::RealPoint2D(0,mnSeparatorYLocation),
534  geometry::RealPoint2D(aWindowBox.Width,mnSeparatorYLocation),
535  aViewState,
536  aRenderState);
537 }
538 
539 void PresenterNotesView::PaintText (const awt::Rectangle& rUpdateBox)
540 {
541  const awt::Rectangle aBox (PresenterGeometryHelper::Intersection(rUpdateBox,
543 
544  if (aBox.Width <= 0 || aBox.Height <= 0)
545  return;
546 
547  if (mpBackground.get() != nullptr)
548  {
549  // Paint the background.
550  mpPresenterController->GetCanvasHelper()->Paint(
551  mpBackground,
552  mxCanvas,
553  rUpdateBox,
554  aBox,
555  awt::Rectangle());
556  }
557 
558  Reference<rendering::XSpriteCanvas> xSpriteCanvas (mxCanvas, UNO_QUERY);
559  if (xSpriteCanvas.is())
560  xSpriteCanvas->updateScreen(false);
561 }
562 
564 {
565  mpPresenterController->GetPaintManager()->Invalidate(
568 }
569 
570 void PresenterNotesView::Scroll (const double rnDistance)
571 {
572  try
573  {
574  mnTop += rnDistance;
575  mpTextView->SetOffset(0, mnTop);
576 
577  UpdateScrollBar();
578  Invalidate();
579  }
580  catch (beans::UnknownPropertyException&)
581  {}
582 }
583 
584 void PresenterNotesView::SetTop (const double nTop)
585 {
586  try
587  {
588  mnTop = nTop;
589  mpTextView->SetOffset(0, mnTop);
590 
591  UpdateScrollBar();
592  Invalidate();
593  }
594  catch (beans::UnknownPropertyException&)
595  {}
596 }
597 
598 void PresenterNotesView::ChangeFontSize (const sal_Int32 nSizeChange)
599 {
600  const sal_Int32 nNewSize (mpFont->mnSize + nSizeChange);
601  if (nNewSize <= 5)
602  return;
603 
604  mpFont->mnSize = nNewSize;
605  mpFont->mxFont = nullptr;
606  mpTextView->SetFont(mpFont);
607 
608  Layout();
609  UpdateScrollBar();
610  Invalidate();
611 
612  // Write the new font size to the configuration to make it persistent.
613  try
614  {
615  const OUString sStyleName (mpPresenterController->GetTheme()->GetStyleName(
616  mxViewId->getResourceURL()));
617  std::shared_ptr<PresenterConfigurationAccess> pConfiguration (
618  mpPresenterController->GetTheme()->GetNodeForViewStyle(
619  sStyleName));
620  if (pConfiguration == nullptr || !pConfiguration->IsValid())
621  return;
622 
623  pConfiguration->GoToChild("Font");
624  pConfiguration->SetProperty("Size", Any(static_cast<sal_Int32>(nNewSize+0.5)));
625  pConfiguration->CommitChanges();
626  }
627  catch (Exception&)
628  {
629  OSL_ASSERT(false);
630  }
631 }
632 
633 const std::shared_ptr<PresenterTextView>& PresenterNotesView::GetTextView() const
634 {
635  return mpTextView;
636 }
637 
639 {
640  if (mpScrollBar.get() == nullptr)
641  return;
642 
643  try
644  {
645  mpScrollBar->SetTotalSize(mpTextView->GetTotalTextHeight());
646  }
647  catch(beans::UnknownPropertyException&)
648  {
649  OSL_ASSERT(false);
650  }
651 
652  mpScrollBar->SetLineHeight(mpFont->mnSize*1.2);
653  mpScrollBar->SetThumbPosition(mnTop, false);
654 
655  mpScrollBar->SetThumbSize(maTextBoundingBox.Y2 - maTextBoundingBox.Y1);
656  mpScrollBar->CheckValues();
657 }
658 
659 } // end of namespace ::sdext::presenter
660 
661 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::rtl::Reference< PresenterToolBar > mpToolBar
Reference< rendering::XCanvas > mxCanvas
sal_Int32 nIndex
::rtl::Reference< PresenterController > mpPresenterController
osl::Mutex m_aMutex
SharedBitmapDescriptor mpBackground
const std::shared_ptr< PresenterTextView > & GetTextView() const
void ChangeFontSize(const sal_Int32 nSizeChange)
static const sal_Int32 gnSpaceAboveSeparator(10)
void SetSlide(const css::uno::Reference< css::drawing::XDrawPage > &rxNotesPage)
Typically called from setCurrentSlide() with the notes page that is associated with the slide given t...
css::uno::Reference< css::awt::XWindow > mxParentWindow
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &rEvent) override
virtual void SAL_CALL windowShown(const css::lang::EventObject &rEvent) override
virtual void SAL_CALL keyPressed(const css::awt::KeyEvent &rEvent) override
void PaintText(const css::awt::Rectangle &rUpdateBox)
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getCurrentPage() override
int nCount
cppu::WeakComponentImplHelper< css::awt::XWindowListener, css::awt::XPaintListener, css::drawing::framework::XView, css::drawing::XDrawView, css::awt::XKeyListener > PresenterNotesViewInterfaceBase
css::uno::Reference< css::awt::XWindow > mxToolBarWindow
static const double gnLineScrollFactor(1.2)
::rtl::Reference< PresenterScrollBar > mpScrollBar
css::uno::Reference< css::lang::XComponent > xComponent
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &rEvent) override
PresenterTheme::SharedFontDescriptor mpFont
void Paint(const css::awt::Rectangle &rUpdateBox)
OptionalString sType
css::uno::Reference< css::rendering::XCanvas > mxToolBarCanvas
std::shared_ptr< PresenterTextView > mpTextView
std::shared_ptr< PresenterTextView > mpTextView
unsigned char sal_Bool
static bool GetLayoutRTL()
virtual sal_Bool SAL_CALL isAnchorOnly() override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL windowPaint(const css::awt::PaintEvent &rEvent) override
css::geometry::RealRectangle2D maTextBoundingBox
::rtl::Reference< PresenterToolBar > mpToolBar
static css::awt::Rectangle ConvertRectangle(const css::geometry::RealRectangle2D &rBox)
Return the bounding box with integer coordinates of the given rectangle.
sal_Int32 mnTop
A simple tool bar that can display bitmapped buttons and labels.
static css::awt::Rectangle Intersection(const css::awt::Rectangle &rBox1, const css::awt::Rectangle &rBox2)
PresenterTheme::SharedFontDescriptor mpFont
virtual void SAL_CALL setCurrentPage(const css::uno::Reference< css::drawing::XDrawPage > &rxSlide) override
rtl::Reference< PresenterController > mpPresenterController
void PaintToolBar(const css::awt::Rectangle &rUpdateBox)
css::uno::Reference< css::drawing::XDrawPage > mxCurrentNotesPage
static void SetDeviceColor(css::rendering::RenderState &rRenderState, const css::util::Color aColor)
void CreateToolBar(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const ::rtl::Reference< PresenterController > &rpPresenterController)
void Scroll(const double nDistance)
virtual css::uno::Reference< css::drawing::framework::XResourceId > SAL_CALL getResourceId() override
virtual void SAL_CALL windowHidden(const css::lang::EventObject &rEvent) override
static const sal_Int32 gnSpaceBelowSeparator(10)
void(* f)(TrueTypeTable *)
PresenterNotesView(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::drawing::framework::XResourceId > &rxViewId, const css::uno::Reference< css::frame::XController > &rxController, const ::rtl::Reference< PresenterController > &rpPresenterController)
::rtl::Reference< PresenterButton > mpCloseButton
static::rtl::Reference< PresenterButton > Create(const css::uno::Reference< css::uno::XComponentContext > &rxComponentContext, const ::rtl::Reference< PresenterController > &rpPresenterController, const std::shared_ptr< PresenterTheme > &rpTheme, const css::uno::Reference< css::awt::XWindow > &rxParentWindow, const css::uno::Reference< css::rendering::XCanvas > &rxParentCanvas, const OUString &rsConfigurationName)
virtual void SAL_CALL keyReleased(const css::awt::KeyEvent &rEvent) override
css::uno::Reference< css::rendering::XCanvas > mxCanvas
css::uno::Reference< css::drawing::framework::XResourceId > mxViewId