LibreOffice Module vcl (master)  1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
VclPtr< reference_type > Class Template Reference

A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for references to vcl::Window subclasses. More...

#include <button.hxx>

Inheritance diagram for VclPtr< reference_type >:
[legend]
Collaboration diagram for VclPtr< reference_type >:
[legend]

Public Member Functions

 VclPtr ()
 Constructor... More...
 
 VclPtr (reference_type *pBody)
 Constructor... More...
 
 VclPtr (reference_type *pBody, __sal_NoAcquire)
 Constructor... 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...
 
virtual ~VclPtr ()
 
 VclPtr (VclPtr const &)=default
 
 VclPtr (VclPtr &&)=default
 
VclPtroperator= (VclPtr const &)=default
 
VclPtroperator= (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...
 
VclPtroperator= (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
 

Detailed Description

template<class reference_type>
class VclPtr< reference_type >

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

Parameters
reference_typemust be a subclass of vcl::Window

Definition at line 32 of file button.hxx.

Constructor & Destructor Documentation

template<class reference_type>
VclPtr< reference_type >::VclPtr ( )
inline

Constructor...

Definition at line 69 of file vclptr.hxx.

template<class reference_type>
VclPtr< reference_type >::VclPtr ( reference_type *  pBody)
inline

Constructor...

Definition at line 75 of file vclptr.hxx.

template<class reference_type>
VclPtr< reference_type >::VclPtr ( reference_type *  pBody,
__sal_NoAcquire   
)
inline

Constructor...

that doesn't take a ref.

Definition at line 81 of file vclptr.hxx.

template<class reference_type>
template<class derived_type >
VclPtr< reference_type >::VclPtr ( const VclPtr< derived_type > &  rRef,
typename std::enable_if< std::is_base_of< reference_type, derived_type >::value, int >::type  = 0 
)
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.

Parameters
rRefanother reference

Definition at line 94 of file vclptr.hxx.

template<class reference_type>
virtual VclPtr< reference_type >::~VclPtr ( )
inlinevirtual

Definition at line 104 of file vclptr.hxx.

template<class reference_type>
VclPtr< reference_type >::VclPtr ( VclPtr< reference_type > const &  )
default
template<class reference_type>
VclPtr< reference_type >::VclPtr ( VclPtr< reference_type > &&  )
default

Member Function Documentation

template<class reference_type>
void VclPtr< reference_type >::clear ( )
inline
template<class reference_type>
template<typename... Arg>
static VclPtr< reference_type > VclPtr< reference_type >::Create ( Arg &&...  arg)
inlinestatic
template<class reference_type>
void VclPtr< reference_type >::disposeAndClear ( )
inline

Definition at line 200 of file vclptr.hxx.

Referenced by ToolBox::CalcMinimumWindowSizePixel(), DecoToolBox::calcMinSize(), ImplBorderWindow::CloseNotebookBar(), SvImpLBox::Command(), DeInitVCL(), SpinField::dispose(), TabDialog::dispose(), ListControl::dispose(), MessageDialog::dispose(), ComboBox::dispose(), OpenGLContext::dispose(), MenuBarWindow::dispose(), ImplBorderWindow::dispose(), ListBox::dispose(), Edit::dispose(), vcl::OWizardMachine::dispose(), NotebookbarTabControlBase::dispose(), Printer::dispose(), VerticalTabControl::dispose(), VclVPaned::dispose(), OutputDevice::dispose(), ImplListBox::dispose(), VclExpander::dispose(), VclScrolledWindow::dispose(), ScopedVclPtr< VirtualDevice >::disposeAndReset(), Dialog::disposeOwnedButtons(), ImplAnimView::draw(), OutputDevice::DrawTransparent(), vcl::Window::EndAutoScroll(), SvxIconChoiceCtrl_Impl::FontModified(), Help::HidePopover(), MenuBarWindow::ImplCreatePopup(), ImplDestroyHelpWindow(), PopupMenu::ImplExecute(), ComboBox::Impl::ImplInitComboBoxData(), SpinField::ImplInitSpinFieldData(), vcl::Window::ImplPaintToDevice(), VirtualDevice::ImplSetOutputSizePixel(), ImplDockingWindowWrapper::ImplStartDocking(), DockingWindow::ImplStartDocking(), OpenGLContext::init(), UIPreviewApp::Main(), vcl::Window::SetBorderStyle(), ImplDockingWindowWrapper::SetFloatingMode(), DockingWindow::SetFloatingMode(), ImplBorderWindow::SetNotebookBar(), Printer::SetPrinterProps(), Edit::SetSubEdit(), Dialog::StartExecuteAsync(), WMFWriter::WriteWMF(), ImplAnimView::~ImplAnimView(), ImpVclMEdit::~ImpVclMEdit(), OpenGLContext::~OpenGLContext(), SalInstanceBuilder::~SalInstanceBuilder(), SalInstanceMenu::~SalInstanceMenu(), SalInstanceWidget::~SalInstanceWidget(), ScopedVclPtr< VirtualDevice >::~ScopedVclPtr(), SvImpLBox::~SvImpLBox(), SvInplaceEdit2::~SvInplaceEdit2(), SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl(), and TextEngine::~TextEngine().

template<class reference_type>
reference_type* VclPtr< reference_type >::get ( ) const
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.

Referenced by VclExpander::calculateRequisition(), MenuButton::CancelMenu(), vcl::Window::CaptureMouse(), MenuBarWindow::ChangeHighlightItem(), GDIMetaFile::Clip(), SvImpLBox::Command(), MessageDialog::create_message_area(), GDIMetaFile::CreateThumbnail(), DelayedCloseEventLink(), IntroWindow::dispose(), Menu::dispose(), vcl::Window::dispose(), PaintHelper::DoPaint(), DNDEventDispatcher::dragOver(), ImplAnimView::draw(), DecorationView::DrawSeparator(), ImplAnimView::drawToPos(), OutputDevice::DrawTransparent(), DNDEventDispatcher::drop(), DNDEventDispatcher::dropActionChanged(), WindowUIObject::dumpHierarchy(), vcl::Window::EndAutoScroll(), MenuFloatingWindow::EndExecute(), vcl::Window::EndTracking(), ListControl::EventNotify(), MenuFloatingWindow::Execute(), ButtonUIObject::execute(), MenuButton::ExecuteMenu(), GraphicFilter::ExportGraphic(), VclBuilder::get(), SalInstanceDrawingArea::get_accessible_relation_set(), WindowUIObject::get_child(), VclEventBox::get_child(), WindowUIObject::get_children(), SalInstanceTreeView::get_column_title(), SalInstanceTreeView::get_column_width(), MessageDialog::get_message_area(), SalInstanceTreeView::get_sort_indicator(), WindowUIObject::get_state(), SalInstanceWindow::get_window_state(), GDIMetaFile::GetBoundRect(), weld::GenericDialogController::getDialog(), weld::MessageDialogController::getDialog(), ImplListBox::GetMainWindow(), MenuBar::getMenuBarWindow(), VerticalTabControl::GetPageParent(), Menu::GetPopupMenu(), Application::GetTopWindow(), Application::GetTopWindowCount(), ImpVclMEdit::HandleCommand(), HandleWheelEvent::HandleEvent(), VclBuilder::handleObject(), vcl::Window::HasActiveChildFrame(), SalInstanceTreeView::hide(), Menu::HighlightItem(), IMPL_LINK(), GDIMetaFile::ImplAddGradientEx(), Menu::ImplCalcSize(), vcl::Window::ImplCallFocusChangeActivate(), TabControl::ImplChangeTabPage(), MenuBarWindow::ImplCreatePopup(), MenuFloatingWindow::ImplCursorUpDown(), ImplDockingWindowWrapper::ImplDockingWindowWrapper(), FloatingWindow::ImplEndPopupMode(), PopupMenu::ImplExecute(), Menu::ImplFillLayoutData(), ImplFrameData::ImplFrameData(), ImpGraphic::ImplGetBitmap(), vcl::Window::ImplGrabFocus(), ImplHandleMouseEvent(), ImplHandleResize(), ToolBox::ImplHideFocus(), ImplBorderWindowView::ImplInitTitle(), Menu::ImplPaint(), ImplDockingWindowWrapper::ImplPreparePopupMode(), MenuFloatingWindow::ImplScroll(), ToolBox::ImplShowFocus(), EMFWriter::ImplWriteTextRecord(), OpenGLContext::init(), ImplSmallBorderWindowView::Init(), VclBuilder::insertObject(), Menu::IsHighlighted(), MenuFloatingWindow::KeyInput(), MenuBarWindow::LayoutChanged(), UITestLogger::logAction(), UITestLogger::logKeyInput(), VclBuilder::makeObject(), MenuButton::MenuShown(), GDIMetaFile::Move(), vcl::BufferDevice::operator->(), VclPtr< ::svt::OFileURLControl >::operator=(), ScopedVclPtr< VirtualDevice >::operator=(), operator==(), TabControl::Paint(), vcl::PDFWriterImpl::playMetafile(), vcl::PrintDialog::PrintPreviewWindow::preparePreviewBitmap(), OutputDevice::RemoveTransparenciesFromMetaFile(), vcl::Window::RemoveUserEvent(), SalInstanceWindow::resize_to_request(), GDIMetaFile::Rotate(), SalInstanceTreeView::SalInstanceTreeView(), SalInstanceTreeView::set_column_fixed_widths(), SalInstanceTreeView::set_column_title(), SalInstanceLabel::set_mnemonic_widget(), MessageDialog::set_primary_text(), MessageDialog::set_secondary_text(), SalInstanceTreeView::set_sort_indicator(), SalInstanceWindow::set_window_state(), VclExpander::setAllocation(), ImplDockingWindowWrapper::SetFloatingMode(), DockingWindow::SetFloatingMode(), Menu::SetPopupMenu(), vcl::Window::setPosSizePixel(), TabControl::SetTabPage(), vcl::PrinterController::setupPrinter(), vcl::Cursor::SetWindow(), SalInstanceTreeView::show(), Help::ShowPopover(), vcl::Window::StartAutoScroll(), vcl::Window::StartTracking(), ImplStdBorderWindowView::Tracking(), ImplMenuDelData::~ImplMenuDelData(), PaintBufferGuard::~PaintBufferGuard(), SalInstanceBuilder::~SalInstanceBuilder(), and SalInstanceTreeView::~SalInstanceTreeView().

template<class reference_type>
VclPtr< reference_type >::operator bool ( ) const
inlineexplicit

Definition at line 185 of file vclptr.hxx.

template<class reference_type>
VclPtr< reference_type >::operator reference_type * ( ) const
inline

Definition at line 180 of file vclptr.hxx.

template<class reference_type>
reference_type* VclPtr< reference_type >::operator-> ( ) const
inline

Probably most common used: handle->someBodyOp().

Definition at line 134 of file vclptr.hxx.

template<class reference_type>
bool VclPtr< reference_type >::operator< ( const VclPtr< reference_type > &  handle) const
inline

Needed to place VclPtr's into STL collection.

Definition at line 212 of file vclptr.hxx.

template<class reference_type>
VclPtr& VclPtr< reference_type >::operator= ( VclPtr< reference_type > const &  )
default
template<class reference_type>
VclPtr& VclPtr< reference_type >::operator= ( VclPtr< reference_type > &&  )
default
template<class reference_type>
template<typename derived_type >
std::enable_if< std::is_base_of<reference_type, derived_type>::value, VclPtr &>::type VclPtr< reference_type >::operator= ( VclPtr< derived_type > const &  rRef)
inline

Up-casting copy assignment operator.

Does not work for up-casts to ambiguous bases.

Parameters
rRefanother reference

Definition at line 168 of file vclptr.hxx.

template<class reference_type>
VclPtr& VclPtr< reference_type >::operator= ( reference_type *  pBody)
inline

Definition at line 174 of file vclptr.hxx.

template<class reference_type>
void VclPtr< reference_type >::reset ( reference_type *  pBody)
inline

Definition at line 153 of file vclptr.hxx.

Referenced by SalInstanceVerticalNotebook::get_page(), and OpenGLContext::init().

template<class reference_type>
void VclPtr< reference_type >::reset ( )
inline

Definition at line 195 of file vclptr.hxx.

template<class reference_type>
void VclPtr< reference_type >::set ( reference_type *  pBody)
inline

Member Data Documentation

template<class reference_type>
::rtl::Reference<reference_type> VclPtr< reference_type >::m_rInnerRef
private

Definition at line 62 of file vclptr.hxx.


The documentation for this class was generated from the following files: