LibreOffice Module extensions (master) 1
|
#include <browserlistbox.hxx>
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::ScrolledWindow > | m_xScrolledWindow |
std::unique_ptr< weld::Container > | m_xLinesPlayground |
std::unique_ptr< weld::SizeGroup > | m_xSizeGroup |
std::unique_ptr< InspectorHelpWindow > | m_xHelpWindow |
weld::Container * | m_pInitialControlParent |
ListBoxLines | m_aLines |
IPropertyLineListener * | m_pLineListener |
IPropertyControlObserver * | m_pControlObserver |
css::uno::Reference< css::inspection::XPropertyControl > | m_xActiveControl |
sal_uInt16 | m_nTheNameSize |
int | m_nRowHeight |
::rtl::Reference< PropertyControlContext_Impl > | m_pControlContextImpl |
Additional Inherited Members | |
Protected Member Functions inherited from pcr::IButtonClickListener | |
~IButtonClickListener () | |
Definition at line 67 of file browserlistbox.hxx.
|
explicit |
Definition at line 299 of file browserlistbox.cxx.
References m_xScrolledWindow.
pcr::OBrowserListBox::~OBrowserListBox | ( | ) |
Definition at line 314 of file browserlistbox.cxx.
References Clear(), IsModified(), and m_pControlContextImpl.
void pcr::OBrowserListBox::activateNextControl | ( | const css::uno::Reference< css::inspection::XPropertyControl > & | CurrentControl | ) |
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().
|
overrideprivatevirtual |
Implements pcr::IButtonClickListener.
Definition at line 535 of file browserlistbox.cxx.
References pcr::IPropertyLineListener::Clicked(), DBG_ASSERT, pcr::OBrowserLine::GetEntryName(), and m_pLineListener.
void pcr::OBrowserListBox::ChangeEntry | ( | const OLineDescriptor & | rPropertyData, |
ListBoxLines::size_type | nPos | ||
) |
Definition at line 713 of file browserlistbox.cxx.
References Any, pcr::OLineDescriptor::aValue, pcr::OLineDescriptor::bReadOnly, pcr::OLineDescriptor::bUnknownValue, DBG_ASSERT, EDITOR_LIST_REPLACE_EXISTING, pcr::HelpIdUrl::getHelpId(), GetPropertyPos(), impl_setControlAsPropertyValue(), m_aLines, m_nTheNameSize, m_pControlContextImpl, m_xLinesPlayground, nPos, pcr::ListBoxLine::pLine, weld::Entry::set_editable(), weld::Widget::set_sensitive(), pcr::OLineDescriptor::sName, UpdatePlayGround(), pcr::ListBoxLine::xHandler, and pcr::OLineDescriptor::xPropertyHandler.
Referenced by pcr::OPropertyEditor::ChangeEntry(), and InsertEntry().
void pcr::OBrowserListBox::Clear | ( | ) |
Definition at line 687 of file browserlistbox.cxx.
References pcr::clearContainer(), line, and m_aLines.
Referenced by ~OBrowserListBox().
void pcr::OBrowserListBox::CommitModified | ( | ) |
Definition at line 337 of file browserlistbox.cxx.
References DBG_UNHANDLED_EXCEPTION, pcr::PropertyControlContext_Impl::eAsynchronously, pcr::PropertyControlContext_Impl::eSynchronously, Exception, IsModified(), m_pControlContextImpl, and m_xActiveControl.
Referenced by pcr::OPropertyEditor::CommitModified(), and pcr::IMPL_LINK().
void pcr::OBrowserListBox::EnableHelpSection | ( | bool | _bEnable | ) |
Definition at line 366 of file browserlistbox.cxx.
References m_xHelpWindow.
Referenced by pcr::OPropertyEditor::enableHelpSection().
void pcr::OBrowserListBox::EnablePropertyControls | ( | const OUString & | _rEntryName, |
sal_Int16 | _nControls, | ||
bool | _bEnable | ||
) |
Definition at line 434 of file browserlistbox.cxx.
References impl_getBrowserLineForName().
Referenced by pcr::OPropertyEditor::EnablePropertyControls().
void pcr::OBrowserListBox::EnablePropertyLine | ( | const OUString & | _rEntryName, |
bool | _bEnable | ||
) |
Definition at line 441 of file browserlistbox.cxx.
References impl_getBrowserLineForName().
Referenced by pcr::OPropertyEditor::EnablePropertyLine().
void pcr::OBrowserListBox::focusGained | ( | const css::uno::Reference< css::inspection::XPropertyControl > & | Control | ) |
css::uno::RuntimeException |
Definition at line 607 of file browserlistbox.cxx.
References DBG_ASSERT, DBG_TESTSOLARMUTEX, pcr::IPropertyControlObserver::focusGained(), impl_getControlPos(), m_pControlObserver, m_xActiveControl, and ShowEntry().
Referenced by pcr::PropertyControlContext_Impl::impl_processEvent_throw().
Reference< XPropertyControl > pcr::OBrowserListBox::GetPropertyControl | ( | const OUString & | rEntryName | ) |
Definition at line 448 of file browserlistbox.cxx.
References impl_getBrowserLineForName().
Referenced by pcr::OPropertyEditor::GetPropertyControl().
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().
bool pcr::OBrowserListBox::HasHelpSection | ( | ) | const |
Definition at line 371 of file browserlistbox.cxx.
References m_xHelpWindow.
Referenced by SetHelpText().
|
private |
retrieves the ->BrowserLinePointer for a given entry name
_rEntryName | the name whose line is to be looked up |
_out_rpLine | contains, upon return, the found browser line, if any |
Definition at line 422 of file browserlistbox.cxx.
References line, and m_aLines.
Referenced by EnablePropertyControls(), EnablePropertyLine(), and GetPropertyControl().
|
staticprivate |
retrieves the value for the given control, as a property value, after converting it as necessary
_rLine | The 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().
|
private |
retrieves the index of a given control in our line list
_rxControl | The 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().
|
staticprivate |
sets the given property value at the given control, after converting it as necessary
_rLine | The line whose at which the value is to be set. |
_rPropertyValue | the 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().
void pcr::OBrowserListBox::InsertEntry | ( | const OLineDescriptor & | rPropertyData, |
sal_uInt16 | nPos | ||
) |
Definition at line 456 of file browserlistbox.cxx.
References _nPos, ChangeEntry(), line, m_aLines, m_nRowHeight, m_nTheNameSize, m_pInitialControlParent, m_xLinesPlayground, m_xScrolledWindow, m_xSizeGroup, pcr::OLineDescriptor::sName, and pcr::OLineDescriptor::xPropertyHandler.
Referenced by pcr::OPropertyEditor::InsertEntry().
bool pcr::OBrowserListBox::IsModified | ( | ) | const |
Definition at line 327 of file browserlistbox.cxx.
References m_xActiveControl, and m_xScrolledWindow.
Referenced by CommitModified(), pcr::OPropertyEditor::CommitModified(), pcr::IMPL_LINK(), and ~OBrowserListBox().
bool pcr::OBrowserListBox::RemoveEntry | ( | const OUString & | _rName | ) |
Definition at line 700 of file browserlistbox.cxx.
References m_aLines.
Referenced by pcr::OPropertyEditor::RemoveEntry().
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().
void pcr::OBrowserListBox::SetListener | ( | IPropertyLineListener * | _pListener | ) |
Definition at line 356 of file browserlistbox.cxx.
References m_pLineListener.
Referenced by pcr::OPropertyEditor::setPageLineListener().
void pcr::OBrowserListBox::SetObserver | ( | IPropertyControlObserver * | _pObserver | ) |
Definition at line 361 of file browserlistbox.cxx.
References m_pControlObserver.
Referenced by pcr::OPropertyEditor::setPageControlObserver().
void pcr::OBrowserListBox::SetPropertyValue | ( | const OUString & | rEntryName, |
const css::uno::Any & | rValue, | ||
bool | _bUnknownValue | ||
) |
Definition at line 388 of file browserlistbox.cxx.
References Any, impl_setControlAsPropertyValue(), line, and m_aLines.
Referenced by pcr::OPropertyEditor::SetPropertyValue().
|
private |
Definition at line 491 of file browserlistbox.cxx.
References m_aLines, m_nRowHeight, m_xScrolledWindow, and nPos.
Referenced by focusGained().
|
private |
Definition at line 382 of file browserlistbox.cxx.
References line, m_aLines, and m_nTheNameSize.
Referenced by ChangeEntry().
void pcr::OBrowserListBox::valueChanged | ( | const css::uno::Reference< css::inspection::XPropertyControl > & | Control | ) |
css::uno::RuntimeException |
Definition at line 623 of file browserlistbox.cxx.
References pcr::IPropertyLineListener::Commit(), DBG_ASSERT, DBG_TESTSOLARMUTEX, impl_getControlAsPropertyValue(), impl_getControlPos(), m_aLines, m_pControlObserver, m_pLineListener, pcr::ListBoxLine::pLine, and pcr::IPropertyControlObserver::valueChanged().
Referenced by pcr::PropertyControlContext_Impl::impl_processEvent_throw().
|
private |
Definition at line 74 of file browserlistbox.hxx.
Referenced by activateNextControl(), ChangeEntry(), Clear(), GetPropertyPos(), impl_getBrowserLineForName(), impl_getControlPos(), InsertEntry(), RemoveEntry(), SetPropertyValue(), ShowEntry(), UpdatePlayGround(), and valueChanged().
|
private |
Definition at line 80 of file browserlistbox.hxx.
Referenced by InsertEntry(), and ShowEntry().
|
private |
Definition at line 79 of file browserlistbox.hxx.
Referenced by ChangeEntry(), InsertEntry(), and UpdatePlayGround().
|
private |
Definition at line 82 of file browserlistbox.hxx.
Referenced by ChangeEntry(), CommitModified(), and ~OBrowserListBox().
|
private |
Definition at line 76 of file browserlistbox.hxx.
Referenced by focusGained(), SetObserver(), and valueChanged().
|
private |
Definition at line 73 of file browserlistbox.hxx.
Referenced by InsertEntry().
|
private |
Definition at line 75 of file browserlistbox.hxx.
Referenced by buttonClicked(), SetListener(), and valueChanged().
|
private |
Definition at line 78 of file browserlistbox.hxx.
Referenced by CommitModified(), focusGained(), and IsModified().
|
private |
Definition at line 72 of file browserlistbox.hxx.
Referenced by EnableHelpSection(), HasHelpSection(), and SetHelpText().
|
private |
Definition at line 70 of file browserlistbox.hxx.
Referenced by ChangeEntry(), and InsertEntry().
|
private |
Definition at line 69 of file browserlistbox.hxx.
Referenced by InsertEntry(), IsModified(), OBrowserListBox(), and ShowEntry().
|
private |
Definition at line 71 of file browserlistbox.hxx.
Referenced by InsertEntry().