LibreOffice Module extensions (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
pcr::OBrowserListBox Class Referencefinal

#include <browserlistbox.hxx>

Inheritance diagram for pcr::OBrowserListBox:
[legend]
Collaboration diagram for pcr::OBrowserListBox:
[legend]

Public Member Functions

 OBrowserListBox (weld::Builder &rBuilder, weld::Container *pContainer)
 
 ~OBrowserListBox ()
 
void SetListener (IPropertyLineListener *_pListener)
 
void SetObserver (IPropertyControlObserver *_pObserver)
 
void EnableHelpSection (bool _bEnable)
 
bool HasHelpSection () const
 
void SetHelpText (const OUString &_rHelpText)
 
void Clear ()
 
void InsertEntry (const OLineDescriptor &, sal_uInt16 nPos)
 
bool RemoveEntry (const OUString &_rName)
 
void ChangeEntry (const OLineDescriptor &, ListBoxLines::size_type nPos)
 
void SetPropertyValue (const OUString &rEntryName, const css::uno::Any &rValue, bool _bUnknownValue)
 
sal_uInt16 GetPropertyPos (std::u16string_view rEntryName) const
 
css::uno::Reference< css::inspection::XPropertyControl > GetPropertyControl (const OUString &rEntryName)
 
void EnablePropertyControls (const OUString &_rEntryName, sal_Int16 _nControls, bool _bEnable)
 
void EnablePropertyLine (const OUString &_rEntryName, bool _bEnable)
 
bool IsModified () const
 
void CommitModified ()
 
void focusGained (const css::uno::Reference< css::inspection::XPropertyControl > &Control)
 
void valueChanged (const css::uno::Reference< css::inspection::XPropertyControl > &Control)
 
void activateNextControl (const css::uno::Reference< css::inspection::XPropertyControl > &CurrentControl)
 
virtual void buttonClicked (OBrowserLine *pLine, bool bPrimary)=0
 

Private Member Functions

void UpdatePlayGround ()
 
void ShowEntry (sal_uInt16 nPos)
 
void buttonClicked (OBrowserLine *_pLine, bool _bPrimary) override
 
sal_uInt16 impl_getControlPos (const css::uno::Reference< css::inspection::XPropertyControl > &_rxControl) const
 retrieves the index of a given control in our line list More...
 
bool impl_getBrowserLineForName (const OUString &_rEntryName, BrowserLinePointer &_out_rpLine) const
 retrieves the ->BrowserLinePointer for a given entry name More...
 

Static Private Member Functions

static void impl_setControlAsPropertyValue (const ListBoxLine &_rLine, const css::uno::Any &_rPropertyValue)
 sets the given property value at the given control, after converting it as necessary More...
 
static css::uno::Any impl_getControlAsPropertyValue (const ListBoxLine &_rLine)
 retrieves the value for the given control, as a property value, after converting it as necessary More...
 

Private Attributes

std::unique_ptr< weld::ScrolledWindowm_xScrolledWindow
 
std::unique_ptr< weld::Containerm_xLinesPlayground
 
std::unique_ptr< weld::SizeGroupm_xSizeGroup
 
std::unique_ptr< InspectorHelpWindowm_xHelpWindow
 
weld::Containerm_pInitialControlParent
 
ListBoxLines m_aLines
 
IPropertyLineListenerm_pLineListener
 
IPropertyControlObserverm_pControlObserver
 
css::uno::Reference< css::inspection::XPropertyControl > m_xActiveControl
 
sal_uInt16 m_nTheNameSize
 
int m_nRowHeight
 
::rtl::Reference< PropertyControlContext_Implm_pControlContextImpl
 

Additional Inherited Members

- Protected Member Functions inherited from pcr::IButtonClickListener
 ~IButtonClickListener ()
 

Detailed Description

Definition at line 67 of file browserlistbox.hxx.

Constructor & Destructor Documentation

◆ OBrowserListBox()

pcr::OBrowserListBox::OBrowserListBox ( weld::Builder rBuilder,
weld::Container pContainer 
)
explicit

Definition at line 299 of file browserlistbox.cxx.

References m_xScrolledWindow.

◆ ~OBrowserListBox()

pcr::OBrowserListBox::~OBrowserListBox ( )

Definition at line 314 of file browserlistbox.cxx.

References Clear(), IsModified(), and m_pControlContextImpl.

Member Function Documentation

◆ activateNextControl()

void pcr::OBrowserListBox::activateNextControl ( const css::uno::Reference< css::inspection::XPropertyControl > &  CurrentControl)
Exceptions
css::uno::RuntimeException

Definition at line 645 of file browserlistbox.cxx.

References DBG_TESTSOLARMUTEX, impl_getControlPos(), and m_aLines.

Referenced by pcr::PropertyControlContext_Impl::impl_processEvent_throw().

◆ buttonClicked()

void pcr::OBrowserListBox::buttonClicked ( OBrowserLine _pLine,
bool  _bPrimary 
)
overrideprivatevirtual

◆ ChangeEntry()

void pcr::OBrowserListBox::ChangeEntry ( const OLineDescriptor rPropertyData,
ListBoxLines::size_type  nPos 
)

◆ Clear()

void pcr::OBrowserListBox::Clear ( )

Definition at line 687 of file browserlistbox.cxx.

References pcr::clearContainer(), line, and m_aLines.

Referenced by ~OBrowserListBox().

◆ CommitModified()

void pcr::OBrowserListBox::CommitModified ( )

◆ EnableHelpSection()

void pcr::OBrowserListBox::EnableHelpSection ( bool  _bEnable)

Definition at line 366 of file browserlistbox.cxx.

References m_xHelpWindow.

Referenced by pcr::OPropertyEditor::enableHelpSection().

◆ EnablePropertyControls()

void pcr::OBrowserListBox::EnablePropertyControls ( const OUString &  _rEntryName,
sal_Int16  _nControls,
bool  _bEnable 
)

◆ EnablePropertyLine()

void pcr::OBrowserListBox::EnablePropertyLine ( const OUString &  _rEntryName,
bool  _bEnable 
)

◆ focusGained()

void pcr::OBrowserListBox::focusGained ( const css::uno::Reference< css::inspection::XPropertyControl > &  Control)

◆ GetPropertyControl()

Reference< XPropertyControl > pcr::OBrowserListBox::GetPropertyControl ( const OUString &  rEntryName)

◆ GetPropertyPos()

sal_uInt16 pcr::OBrowserListBox::GetPropertyPos ( std::u16string_view  rEntryName) const

Definition at line 407 of file browserlistbox.cxx.

References EDITOR_LIST_ENTRY_NOTFOUND, line, m_aLines, and nPos.

Referenced by ChangeEntry(), and pcr::OPropertyEditor::GetPropertyPos().

◆ HasHelpSection()

bool pcr::OBrowserListBox::HasHelpSection ( ) const

Definition at line 371 of file browserlistbox.cxx.

References m_xHelpWindow.

Referenced by SetHelpText().

◆ impl_getBrowserLineForName()

bool pcr::OBrowserListBox::impl_getBrowserLineForName ( const OUString &  _rEntryName,
BrowserLinePointer _out_rpLine 
) const
private

retrieves the ->BrowserLinePointer for a given entry name

Parameters
_rEntryNamethe name whose line is to be looked up
_out_rpLinecontains, upon return, the found browser line, if any
Returns
<TRUE> if and only if a non-<NULL> line for the given entry name could be found.

Definition at line 422 of file browserlistbox.cxx.

References line, and m_aLines.

Referenced by EnablePropertyControls(), EnablePropertyLine(), and GetPropertyControl().

◆ impl_getControlAsPropertyValue()

Any pcr::OBrowserListBox::impl_getControlAsPropertyValue ( const ListBoxLine _rLine)
staticprivate

retrieves the value for the given control, as a property value, after converting it as necessary

Parameters
_rLineThe line whose at which the value is to be set.

Definition at line 572 of file browserlistbox.cxx.

References Any, DBG_UNHANDLED_EXCEPTION, Exception, pcr::ListBoxLine::pLine, SAL_WARN_IF, and pcr::ListBoxLine::xHandler.

Referenced by valueChanged().

◆ impl_getControlPos()

sal_uInt16 pcr::OBrowserListBox::impl_getControlPos ( const css::uno::Reference< css::inspection::XPropertyControl > &  _rxControl) const
private

retrieves the index of a given control in our line list

Parameters
_rxControlThe control to lookup. Must denote a control of one of the lines in ->m_aLines

Definition at line 593 of file browserlistbox.cxx.

References m_aLines, and nPos.

Referenced by activateNextControl(), focusGained(), and valueChanged().

◆ impl_setControlAsPropertyValue()

void pcr::OBrowserListBox::impl_setControlAsPropertyValue ( const ListBoxLine _rLine,
const css::uno::Any &  _rPropertyValue 
)
staticprivate

sets the given property value at the given control, after converting it as necessary

Parameters
_rLineThe line whose at which the value is to be set.
_rPropertyValuethe property value to set. If it's not compatible with the control value, it will be converted, using <member>XPropertyHandler::convertToControlValue</member>

Definition at line 544 of file browserlistbox.cxx.

References Any, DBG_UNHANDLED_EXCEPTION, Exception, pcr::ListBoxLine::pLine, SAL_WARN_IF, and pcr::ListBoxLine::xHandler.

Referenced by ChangeEntry(), and SetPropertyValue().

◆ InsertEntry()

void pcr::OBrowserListBox::InsertEntry ( const OLineDescriptor rPropertyData,
sal_uInt16  nPos 
)

◆ IsModified()

bool pcr::OBrowserListBox::IsModified ( ) const

◆ RemoveEntry()

bool pcr::OBrowserListBox::RemoveEntry ( const OUString &  _rName)

Definition at line 700 of file browserlistbox.cxx.

References m_aLines.

Referenced by pcr::OPropertyEditor::RemoveEntry().

◆ SetHelpText()

void pcr::OBrowserListBox::SetHelpText ( const OUString &  _rHelpText)

Definition at line 376 of file browserlistbox.cxx.

References HasHelpSection(), and m_xHelpWindow.

Referenced by pcr::OPropertyEditor::setHelpSectionText().

◆ SetListener()

void pcr::OBrowserListBox::SetListener ( IPropertyLineListener _pListener)

Definition at line 356 of file browserlistbox.cxx.

References m_pLineListener.

Referenced by pcr::OPropertyEditor::setPageLineListener().

◆ SetObserver()

void pcr::OBrowserListBox::SetObserver ( IPropertyControlObserver _pObserver)

Definition at line 361 of file browserlistbox.cxx.

References m_pControlObserver.

Referenced by pcr::OPropertyEditor::setPageControlObserver().

◆ SetPropertyValue()

void pcr::OBrowserListBox::SetPropertyValue ( const OUString &  rEntryName,
const css::uno::Any &  rValue,
bool  _bUnknownValue 
)

◆ ShowEntry()

void pcr::OBrowserListBox::ShowEntry ( sal_uInt16  nPos)
private

Definition at line 491 of file browserlistbox.cxx.

References m_aLines, m_nRowHeight, m_xScrolledWindow, and nPos.

Referenced by focusGained().

◆ UpdatePlayGround()

void pcr::OBrowserListBox::UpdatePlayGround ( )
private

Definition at line 382 of file browserlistbox.cxx.

References line, m_aLines, and m_nTheNameSize.

Referenced by ChangeEntry().

◆ valueChanged()

void pcr::OBrowserListBox::valueChanged ( const css::uno::Reference< css::inspection::XPropertyControl > &  Control)

Member Data Documentation

◆ m_aLines

ListBoxLines pcr::OBrowserListBox::m_aLines
private

◆ m_nRowHeight

int pcr::OBrowserListBox::m_nRowHeight
private

Definition at line 80 of file browserlistbox.hxx.

Referenced by InsertEntry(), and ShowEntry().

◆ m_nTheNameSize

sal_uInt16 pcr::OBrowserListBox::m_nTheNameSize
private

Definition at line 79 of file browserlistbox.hxx.

Referenced by ChangeEntry(), InsertEntry(), and UpdatePlayGround().

◆ m_pControlContextImpl

::rtl::Reference< PropertyControlContext_Impl > pcr::OBrowserListBox::m_pControlContextImpl
private

Definition at line 82 of file browserlistbox.hxx.

Referenced by ChangeEntry(), CommitModified(), and ~OBrowserListBox().

◆ m_pControlObserver

IPropertyControlObserver* pcr::OBrowserListBox::m_pControlObserver
private

Definition at line 76 of file browserlistbox.hxx.

Referenced by focusGained(), SetObserver(), and valueChanged().

◆ m_pInitialControlParent

weld::Container* pcr::OBrowserListBox::m_pInitialControlParent
private

Definition at line 73 of file browserlistbox.hxx.

Referenced by InsertEntry().

◆ m_pLineListener

IPropertyLineListener* pcr::OBrowserListBox::m_pLineListener
private

Definition at line 75 of file browserlistbox.hxx.

Referenced by buttonClicked(), SetListener(), and valueChanged().

◆ m_xActiveControl

css::uno::Reference< css::inspection::XPropertyControl > pcr::OBrowserListBox::m_xActiveControl
private

Definition at line 78 of file browserlistbox.hxx.

Referenced by CommitModified(), focusGained(), and IsModified().

◆ m_xHelpWindow

std::unique_ptr<InspectorHelpWindow> pcr::OBrowserListBox::m_xHelpWindow
private

Definition at line 72 of file browserlistbox.hxx.

Referenced by EnableHelpSection(), HasHelpSection(), and SetHelpText().

◆ m_xLinesPlayground

std::unique_ptr<weld::Container> pcr::OBrowserListBox::m_xLinesPlayground
private

Definition at line 70 of file browserlistbox.hxx.

Referenced by ChangeEntry(), and InsertEntry().

◆ m_xScrolledWindow

std::unique_ptr<weld::ScrolledWindow> pcr::OBrowserListBox::m_xScrolledWindow
private

Definition at line 69 of file browserlistbox.hxx.

Referenced by InsertEntry(), IsModified(), OBrowserListBox(), and ShowEntry().

◆ m_xSizeGroup

std::unique_ptr<weld::SizeGroup> pcr::OBrowserListBox::m_xSizeGroup
private

Definition at line 71 of file browserlistbox.hxx.

Referenced by InsertEntry().


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