LibreOffice Module vcl (master) 1
|
A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for references to vcl::Window subclasses. More...
#include <vclptr.hxx>
Public Member Functions | |
VclPtr () | |
Constructor... More... | |
VclPtr (reference_type *pBody) | |
Constructor... More... | |
VclPtr (reference_type *pBody, __sal_NoAcquire) | |
Constructor... that doesn't take a ref. More... | |
template<class derived_type > | |
VclPtr (const VclPtr< derived_type > &rRef, typename std::enable_if< std::is_base_of< reference_type, derived_type >::value, int >::type=0) | |
Up-casting conversion constructor: Copies interface reference. More... | |
~VclPtr () | |
VclPtr (VclPtr const &)=default | |
VclPtr (VclPtr &&)=default | |
VclPtr & | operator= (VclPtr const &)=default |
VclPtr & | operator= (VclPtr &&)=default |
reference_type * | operator-> () const |
Probably most common used: handle->someBodyOp(). More... | |
reference_type * | get () const |
Get the body. More... | |
void | set (reference_type *pBody) |
void | reset (reference_type *pBody) |
template<typename derived_type > | |
std::enable_if< std::is_base_of< reference_type, derived_type >::value, VclPtr & >::type | operator= (VclPtr< derived_type > const &rRef) |
Up-casting copy assignment operator. More... | |
VclPtr & | operator= (reference_type *pBody) |
operator reference_type * () const | |
operator bool () const | |
void | clear () |
void | reset () |
void | disposeAndClear () |
bool | operator< (const VclPtr< reference_type > &handle) const |
Needed to place VclPtr's into STL collection. More... | |
Static Public Member Functions | |
template<typename... Arg> | |
static VclPtr< reference_type > | Create (Arg &&... arg) |
A construction helper for VclPtr. More... | |
Private Attributes | |
::rtl::Reference< reference_type > | m_rInnerRef |
A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for references to vcl::Window subclasses.
For more details on the design please see vcl/README.lifecycle
reference_type | must be a subclass of vcl::Window |
Definition at line 57 of file vclptr.hxx.
Constructor...
Definition at line 69 of file vclptr.hxx.
Constructor...
Definition at line 75 of file vclptr.hxx.
|
inline |
Constructor... that doesn't take a ref.
Definition at line 81 of file vclptr.hxx.
|
inline |
Up-casting conversion constructor: Copies interface reference.
Does not work for up-casts to ambiguous bases. For the special case of up-casting to Reference< XInterface >, see the corresponding conversion operator.
rRef | another reference |
Definition at line 94 of file vclptr.hxx.
Definition at line 104 of file vclptr.hxx.
References vclmain::isAlive(), and VclPtr< reference_type >::m_rInnerRef.
|
default |
|
default |
|
inline |
Definition at line 190 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
Referenced by FormatterBase::ClearField(), Edit::Command(), TextWindow::Command(), ImplEntryList::dispose(), Control::dispose(), DockingWindow::dispose(), DropdownDockingWindow::dispose(), ResizableDockingWindow::dispose(), VclFrame::dispose(), Menu::dispose(), NotebookBar::dispose(), OutputDevice::dispose(), Printer::dispose(), Splitter::dispose(), SystemWindow::dispose(), ToolBox::dispose(), Dialog::dispose(), FixedText::dispose(), FloatingWindow::dispose(), MenuButton::dispose(), TextWindow::dispose(), ImplBorderWindow::dispose(), ImplListBoxFloatingWindow::dispose(), NotebookbarPopup::dispose(), vcl::WindowOutputDevice::dispose(), vcl::RoadmapWizard::dispose(), MenuBarWindow::dispose(), MenuFloatingWindow::dispose(), VclBuilder::disposeBuilder(), NotebookBarContextChangeEventListener::disposing(), Dialog::Execute(), Dialog::ImplInitDialogData(), SplitWindow::RemoveItem(), Application::RemoveUserEvent(), and SalInstanceDialog::undo_collapse().
|
inlinestatic |
A construction helper for VclPtr.
Since VclPtr types are created with a reference-count of one - to help fit into the existing code-flow; this helps us to construct them easily.
For more details on the design please see vcl/README.lifecycle
reference_type | must be a subclass of vcl::Window |
Definition at line 127 of file vclptr.hxx.
References Arg.
Referenced by DXF2GDIMetaFile::Convert(), MessageDialog::create_message_area(), SalInstanceComboBox< vcl_type >::create_render_virtual_device(), SalInstanceEntryTreeView::create_render_virtual_device(), SalInstanceBuilder::create_screenshot_window(), SalInstanceWidget::create_virtual_device(), SalInstanceContainer::CreateChildFrame(), AnimationRenderer::draw(), DropdownBox::DropdownBox(), MenuBarUpdateIconManager::GetBubbleWindow(), VclBuilder::handleMenu(), IMPL_LINK(), vcl::RoadmapWizard::implConstruct(), ImplCopyItem(), MenuBar::ImplCreate(), MenuBarWindow::ImplCreatePopup(), OutputDevice::ImplDrawRotateText(), ImplGetDefaultContextWindow(), StatusBar::ImplInit(), TabControl::ImplInit(), ComboBox::ImplInit(), ListBox::ImplInit(), Printer::ImplInitDisplay(), FloatingWindow::ImplInitFloating(), ImplListBox::ImplListBox(), VirtualDevice::ImplSetOutputSizePixel(), ImplShowHelpWindow(), DockingWindow::ImplStartDocking(), ImplDockingWindowWrapper::ImplStartDocking(), ImplToolBoxPrivateData::ImplToolBoxPrivateData(), InterimItemWindow::InterimItemWindow(), VclBuilder::makeObject(), NotebookBarAddonsMerger::MergeNotebookBarAddons(), NotebookBar::NotebookBar(), PriorityMergedHBox::PriorityMergedHBox(), vcl::RoadmapItem::RoadmapItem(), SalInstanceComboBox< vcl_type >::set_item_menu(), ImplBorderWindow::SetNotebookBar(), CalendarField::ShowDropDown(), vcl::Window::StartAutoScroll(), SvInplaceEdit2::SvInplaceEdit2(), TextEngine::TextEngine(), WindowImpl::WindowImpl(), and WMFWriter::WriteWMF().
|
inline |
Definition at line 200 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
Referenced by ToolBox::CalcMinimumWindowSizePixel(), DecoToolBox::calcMinSize(), ImplBorderWindow::CloseNotebookBar(), DXF2GDIMetaFile::Convert(), DeInitVCL(), OpenGLContext::dispose(), InterimItemWindow::dispose(), VclPaned::dispose(), VclExpander::dispose(), VclScrolledWindow::dispose(), NotebookBar::dispose(), OutputDevice::dispose(), Printer::dispose(), TabPage::dispose(), CalendarField::dispose(), ComboBox::dispose(), Edit::dispose(), ListBox::dispose(), SpinField::dispose(), vcl::Window::dispose(), ImplBorderWindow::dispose(), DropdownBox::dispose(), ImplListBox::dispose(), MessageDialog::dispose(), NotebookbarPopup::dispose(), PriorityMergedHBox::dispose(), VerticalTabControl::dispose(), vcl::RoadmapWizard::dispose(), MenuBarWindow::dispose(), ScopedVclPtr< reference_type >::disposeAndReset(), Dialog::disposeOwnedButtons(), SalInstanceWidget::DoRecursivePaint(), AnimationRenderer::draw(), OutputDevice::DrawTransparent(), vcl::Window::EndAutoScroll(), PopupMenu::FinishRun(), Help::HidePopover(), MenuBarWindow::ImplCreatePopup(), ImplDestroyHelpWindow(), ComboBox::Impl::ImplInitComboBoxData(), SpinField::ImplInitSpinFieldData(), vcl::Window::ImplPaintToDevice(), VirtualDevice::ImplSetOutputSizePixel(), DockingWindow::ImplStartDocking(), ImplDockingWindowWrapper::ImplStartDocking(), OpenGLContext::init(), MenuBarWindow::KillActivePopup(), MenuFloatingWindow::KillActivePopup(), vcl::PDFWriterImpl::playMetafile(), MenuBarUpdateIconManager::RemoveBubbleWindow(), vcl::Window::SetBorderStyle(), DockingWindow::SetFloatingMode(), ImplDockingWindowWrapper::SetFloatingMode(), ImplBorderWindow::SetNotebookBar(), Printer::SetPrinterProps(), Edit::SetSubEdit(), Dialog::StartExecuteAsync(), WMFWriter::WriteWMF(), AnimationRenderer::~AnimationRenderer(), ImplToolBoxPrivateData::~ImplToolBoxPrivateData(), ImpVclMEdit::~ImpVclMEdit(), MenuItemData::~MenuItemData(), OpenGLContext::~OpenGLContext(), vcl::RoadmapItem::~RoadmapItem(), SalInstanceBuilder::~SalInstanceBuilder(), SalInstanceMenu::~SalInstanceMenu(), SalInstanceWidget::~SalInstanceWidget(), ScopedVclPtr< reference_type >::~ScopedVclPtr(), SvImpLBox::~SvImpLBox(), SvInplaceEdit2::~SvInplaceEdit2(), SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl(), and TextEngine::~TextEngine().
|
inline |
Get the body.
Can be used instead of operator->(). I.e. handle->someBodyOp() and handle.get()->someBodyOp() are the same.
Definition at line 143 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
Referenced by vcl::WindowOutputDevice::AcquireGraphics(), SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey(), VclExpander::calculateRequisition(), MenuButton::CancelMenu(), vcl::Window::CaptureMouse(), MenuBarWindow::ChangeHighlightItem(), GDIMetaFile::Clip(), SvImpLBox::Command(), MessageDialog::create_message_area(), SalInstanceContainer::CreateChildFrame(), Menu::dispose(), vcl::Window::dispose(), ScopedVclPtr< reference_type >::disposeAndReset(), PaintHelper::DoPaint(), DNDEventDispatcher::dragOver(), AnimationRenderer::draw(), AnimationRenderer::drawToIndex(), DNDEventDispatcher::drop(), DNDEventDispatcher::dropActionChanged(), WindowUIObject::dumpHierarchy(), vcl::Window::EndAutoScroll(), MenuFloatingWindow::EndExecute(), vcl::Window::EndTracking(), MenuFloatingWindow::Execute(), ButtonUIObject::execute(), MenuButton::ExecuteMenu(), VclBuilder::get(), SalInstanceDrawingArea::get_accessible_relation_set(), VclEventBox::get_child(), WindowUIObject::get_child(), WindowUIObject::get_children(), SalInstanceTreeView::get_column_title(), SalInstanceTreeView::get_column_width(), SalInstanceTreeView::get_dest_row_at_pos(), MessageDialog::get_message_area(), SalInstanceTreeView::get_sort_indicator(), WindowUIObject::get_state(), WindowUIObject::get_visible_child(), SalInstanceWindow::get_window_state(), GDIMetaFile::GetBoundRect(), NotebookbarPopup::getBox(), IconViewImpl::GetEntrySize(), ImplListBox::GetMainWindow(), SalInstanceMenu::getMenu(), MenuBar::getMenuBarWindow(), vcl::WindowOutputDevice::GetOwnerWindow(), VerticalTabControl::GetPageParent(), MenuButton::GetPopover(), Application::GetTopWindow(), Application::GetTopWindowCount(), VclBuilder::handleChild(), ImpVclMEdit::HandleCommand(), VclBuilder::handleObject(), vcl::Window::HasActiveChildFrame(), SalInstanceWindow::help(), SalInstanceTreeView::hide(), Menu::HighlightItem(), IMPL_LINK(), GDIMetaFile::ImplAddGradientEx(), Menu::ImplCalcSize(), vcl::Window::ImplCallFocusChangeActivate(), ImplCFieldFloatWin::ImplCFieldFloatWin(), TabControl::ImplChangeTabPage(), MenuBarWindow::ImplCreatePopup(), MenuFloatingWindow::ImplCursorUpDown(), ImplDockingWindowWrapper::ImplDockingWindowWrapper(), Menu::ImplFillLayoutData(), ImplFrameData::ImplFrameData(), ImplGetKeyInputWindow(), vcl::Window::ImplGrabFocus(), ImplHandleKey(), ImplHandleMouseEvent(), ToolBox::ImplHideFocus(), ImplDockingWindowWrapper::ImplPreparePopupMode(), Printer::ImplReleaseGraphics(), MenuFloatingWindow::ImplScroll(), ToolBox::ImplShowFocus(), OpenGLContext::init(), MenuButton::InPopupMode(), VclBuilder::insertObject(), Menu::IsHighlighted(), MenuFloatingWindow::KeyInput(), MenuBarWindow::KillActivePopup(), MenuFloatingWindow::KillActivePopup(), MenuBarWindow::LayoutChanged(), TabPage::lcl_Scroll(), UITestLogger::logAction(), UITestLogger::logKeyInput(), VclBuilder::makeObject(), NotebookBarAddonsMerger::MergeNotebookBarAddons(), GDIMetaFile::Move(), vcl::BufferDevice::operator->(), VclPtr< reference_type >::operator=(), ScopedVclPtr< reference_type >::operator=(), operator==(), TabControl::Paint(), IconViewImpl::Paint(), vcl::PDFWriterImpl::playMetafile(), SalInstanceWindow::recursively_unset_default_buttons(), vcl::WindowOutputDevice::ReleaseGraphics(), OutputDevice::RemoveTransparenciesFromMetaFile(), vcl::Window::RemoveUserEvent(), SalInstanceWindow::resize_to_request(), SalInstancePopover::resize_to_request(), GDIMetaFile::Rotate(), PopupMenu::Run(), SalInstanceTreeView::SalInstanceTreeView(), SalInstanceTreeView::set_column_title(), SalInstanceTreeView::set_header_item_width(), SalInstanceLabel::set_mnemonic_widget(), MessageDialog::set_primary_text(), MessageDialog::set_secondary_text(), SalInstanceTreeView::set_sort_indicator(), JSTreeView::set_toggle(), SalInstanceWindow::set_window_state(), VclExpander::setAllocation(), DockingWindow::SetFloatingMode(), ImplDockingWindowWrapper::SetFloatingMode(), vcl::Window::setPosSizePixel(), TabControl::SetTabPage(), vcl::Cursor::SetWindow(), SalInstanceTreeView::show(), Help::ShowPopover(), vcl::Window::StartAutoScroll(), vcl::Window::StartTracking(), ImplStdBorderWindowView::Tracking(), ImplMenuDelData::~ImplMenuDelData(), SalInstanceBuilder::~SalInstanceBuilder(), and SalInstanceTreeView::~SalInstanceTreeView().
|
inlineexplicit |
Definition at line 185 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
|
inline |
Definition at line 180 of file vclptr.hxx.
|
inline |
Probably most common used: handle->someBodyOp().
Definition at line 134 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
|
inline |
Needed to place VclPtr's into STL collection.
Definition at line 213 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
|
inline |
Definition at line 174 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
|
default |
|
default |
|
inline |
Up-casting copy assignment operator.
Does not work for up-casts to ambiguous bases.
rRef | another reference |
Definition at line 168 of file vclptr.hxx.
References VclPtr< reference_type >::get(), and VclPtr< reference_type >::m_rInnerRef.
|
inline |
Definition at line 195 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
|
inline |
Definition at line 153 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
Referenced by AnimationRenderer::draw(), OpenGLContext::init(), SetSVHelpData(), and SetSVWinData().
|
inline |
Definition at line 148 of file vclptr.hxx.
References VclPtr< reference_type >::m_rInnerRef.
Referenced by MessageDialog::create_message_area(), MessageDialog::create_owned_areas(), SalInstanceBuilder::create_screenshot_window(), ScopedVclPtr< reference_type >::disposeAndReset(), TabPage::ImplInit(), SpinField::ImplInit(), Dialog::set_action_area(), Dialog::set_content_area(), Edit::SetSubEdit(), SalInstanceBuilder::weld_assistant(), SalInstanceBuilder::weld_dialog(), SalInstanceBuilder::weld_message_dialog(), and SalInstanceBuilder::weld_popover().
|
private |
Definition at line 64 of file vclptr.hxx.
Referenced by VclPtr< reference_type >::clear(), VclPtr< reference_type >::disposeAndClear(), VclPtr< reference_type >::get(), VclPtr< AbstractHangulHanjaConversionDialog >::operator AbstractHangulHanjaConversionDialog *(), VclPtr< reference_type >::operator bool(), VclPtr< reference_type >::operator->(), VclPtr< reference_type >::operator<(), VclPtr< reference_type >::operator=(), VclPtr< reference_type >::reset(), VclPtr< reference_type >::set(), and VclPtr< reference_type >::~VclPtr().