LibreOffice Module sfx2 (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sfx2::sidebar::Panel Class Referencefinal

Multiple panels form a single deck. More...

#include <Panel.hxx>

Collaboration diagram for sfx2::sidebar::Panel:
[legend]

Public Member Functions

 Panel (const PanelDescriptor &rPanelDescriptor, weld::Widget *pParentWindow, const bool bIsInitiallyExpanded, Deck *pDeck, std::function< Context()> aContextAccess, const css::uno::Reference< css::frame::XFrame > &rxFrame)
 
 ~Panel ()
 
PanelTitleBarGetTitleBar () const
 
weld::BoxGetContents () const
 
void Show (bool bShow)
 
bool IsTitleBarOptional () const
 
void SetUIElement (const css::uno::Reference< css::ui::XUIElement > &rxElement)
 
const css::uno::Reference< css::ui::XSidebarPanel > & GetPanelComponent () const
 
const css::uno::Reference< css::awt::XWindow > & GetElementParentWindow ()
 
css::uno::Reference< css::awt::XWindow > GetElementWindow ()
 
void SetExpanded (const bool bIsExpanded)
 
bool IsExpanded () const
 
bool HasIdPredicate (std::u16string_view rsId) const
 
const OUString & GetId () const
 
const OUString & GetTitle () const
 
void TriggerDeckLayouting ()
 
void SetHeightPixel (int nHeight)
 
bool get_extents (tools::Rectangle &rExtents) const
 
void SetLurkMode (bool bLurk)
 Set whether a panel should be present but invisible / inactive. More...
 
bool IsLurking () const
 
void set_margin_top (int nMargin)
 
void set_margin_bottom (int nMargin)
 
void set_vexpand (bool bExpand)
 
weld::WindowGetFrameWeld ()
 
void DataChanged ()
 

Private Member Functions

 DECL_DLLPRIVATE_LINK (DumpAsPropertyTreeHdl, tools::JsonWriter &, void)
 

Private Attributes

std::unique_ptr< weld::BuildermxBuilder
 
const OUString msPanelId
 
const OUString msTitle
 
const bool mbIsTitleBarOptional
 
const bool mbWantsAWT
 
css::uno::Reference< css::ui::XUIElement > mxElement
 
css::uno::Reference< css::ui::XSidebarPanel > mxPanelComponent
 
bool mbIsExpanded
 
bool mbLurking
 
const std::function< Context()> maContextAccess
 
const css::uno::Reference< css::frame::XFrame > & mxFrame
 
weld::WidgetmpParentWindow
 
VclPtr< DeckmxDeck
 
std::unique_ptr< weld::BoxmxContainer
 
std::unique_ptr< PanelTitleBarmxTitleBar
 
std::unique_ptr< weld::BoxmxContents
 
css::uno::Reference< css::awt::XWindow > mxXWindow
 

Detailed Description

Multiple panels form a single deck.

E.g. the Properties deck has panels like Styles, Character, paragraph.

Definition at line 53 of file Panel.hxx.

Constructor & Destructor Documentation

◆ Panel()

sfx2::sidebar::Panel::Panel ( const PanelDescriptor rPanelDescriptor,
weld::Widget pParentWindow,
const bool  bIsInitiallyExpanded,
Deck pDeck,
std::function< Context()>  aContextAccess,
const css::uno::Reference< css::frame::XFrame > &  rxFrame 
)

Definition at line 47 of file Panel.cxx.

References LINK, mbIsExpanded, mxContainer, mxContainer, and mxContents.

◆ ~Panel()

sfx2::sidebar::Panel::~Panel ( )

Definition at line 116 of file Panel.cxx.

References GetElementWindow(), mxContents, mxElement, mxPanelComponent, mxTitleBar, and mxXWindow.

Member Function Documentation

◆ DataChanged()

void sfx2::sidebar::Panel::DataChanged ( )

Definition at line 210 of file Panel.cxx.

References mxTitleBar.

◆ DECL_DLLPRIVATE_LINK()

sfx2::sidebar::Panel::DECL_DLLPRIVATE_LINK ( DumpAsPropertyTreeHdl  ,
tools::JsonWriter ,
void   
)
private

◆ get_extents()

bool sfx2::sidebar::Panel::get_extents ( tools::Rectangle rExtents) const

Definition at line 72 of file Panel.cxx.

References mpParentWindow, mxContainer, x, and y.

Referenced by sfx2::sidebar::Deck::ShowPanel().

◆ GetContents()

weld::Box * sfx2::sidebar::Panel::GetContents ( ) const

Definition at line 150 of file Panel.cxx.

References mxContents.

◆ GetElementParentWindow()

const Reference< awt::XWindow > & sfx2::sidebar::Panel::GetElementParentWindow ( )

Definition at line 227 of file Panel.cxx.

References mbWantsAWT, mxContents, and mxXWindow.

◆ GetElementWindow()

Reference< awt::XWindow > sfx2::sidebar::Panel::GetElementWindow ( )

Definition at line 215 of file Panel.cxx.

References mxElement.

Referenced by ~Panel().

◆ GetFrameWeld()

weld::Window * sfx2::sidebar::Panel::GetFrameWeld ( )

Definition at line 178 of file Panel.cxx.

References mxDeck.

Referenced by PanelLayout::GetFrameWeld().

◆ GetId()

const OUString & sfx2::sidebar::Panel::GetId ( ) const
inline

Definition at line 76 of file Panel.hxx.

◆ GetPanelComponent()

const css::uno::Reference< css::ui::XSidebarPanel > & sfx2::sidebar::Panel::GetPanelComponent ( ) const
inline

Definition at line 67 of file Panel.hxx.

◆ GetTitle()

const OUString & sfx2::sidebar::Panel::GetTitle ( ) const
inline

Definition at line 77 of file Panel.hxx.

◆ GetTitleBar()

PanelTitleBar * sfx2::sidebar::Panel::GetTitleBar ( ) const

Definition at line 145 of file Panel.cxx.

References mxTitleBar.

Referenced by sfx2::sidebar::FocusManager::FocusPanel().

◆ HasIdPredicate()

bool sfx2::sidebar::Panel::HasIdPredicate ( std::u16string_view  rsId) const

Definition at line 205 of file Panel.cxx.

References msPanelId.

◆ IsExpanded()

bool sfx2::sidebar::Panel::IsExpanded ( ) const
inline

Definition at line 74 of file Panel.hxx.

Referenced by sfx2::sidebar::PanelTitleBar::UpdateExpandedState().

◆ IsLurking()

bool sfx2::sidebar::Panel::IsLurking ( ) const
inline

Definition at line 86 of file Panel.hxx.

◆ IsTitleBarOptional()

bool sfx2::sidebar::Panel::IsTitleBarOptional ( ) const
inline

Definition at line 65 of file Panel.hxx.

◆ set_margin_bottom()

void sfx2::sidebar::Panel::set_margin_bottom ( int  nMargin)

Definition at line 94 of file Panel.cxx.

References mxContainer.

◆ set_margin_top()

void sfx2::sidebar::Panel::set_margin_top ( int  nMargin)

Definition at line 89 of file Panel.cxx.

References mxContainer.

◆ set_vexpand()

void sfx2::sidebar::Panel::set_vexpand ( bool  bExpand)

Definition at line 99 of file Panel.cxx.

References mxContainer.

◆ SetExpanded()

void sfx2::sidebar::Panel::SetExpanded ( const bool  bIsExpanded)

◆ SetHeightPixel()

void sfx2::sidebar::Panel::SetHeightPixel ( int  nHeight)

Definition at line 84 of file Panel.cxx.

References mxContainer.

◆ SetLurkMode()

void sfx2::sidebar::Panel::SetLurkMode ( bool  bLurk)

Set whether a panel should be present but invisible / inactive.

Definition at line 104 of file Panel.cxx.

References mbLurking.

◆ SetUIElement()

void sfx2::sidebar::Panel::SetUIElement ( const css::uno::Reference< css::ui::XUIElement > &  rxElement)

◆ Show()

void sfx2::sidebar::Panel::Show ( bool  bShow)

Definition at line 155 of file Panel.cxx.

References mxContainer.

◆ TriggerDeckLayouting()

void sfx2::sidebar::Panel::TriggerDeckLayouting ( )

Definition at line 173 of file Panel.cxx.

References mxDeck.

Referenced by SetExpanded().

Member Data Documentation

◆ maContextAccess

const std::function<Context()> sfx2::sidebar::Panel::maContextAccess
private

Definition at line 106 of file Panel.hxx.

Referenced by SetExpanded().

◆ mbIsExpanded

bool sfx2::sidebar::Panel::mbIsExpanded
private

Definition at line 104 of file Panel.hxx.

Referenced by Panel(), and SetExpanded().

◆ mbIsTitleBarOptional

const bool sfx2::sidebar::Panel::mbIsTitleBarOptional
private

Definition at line 100 of file Panel.hxx.

◆ mbLurking

bool sfx2::sidebar::Panel::mbLurking
private

Definition at line 105 of file Panel.hxx.

Referenced by SetLurkMode().

◆ mbWantsAWT

const bool sfx2::sidebar::Panel::mbWantsAWT
private

Definition at line 101 of file Panel.hxx.

Referenced by GetElementParentWindow(), and SetUIElement().

◆ mpParentWindow

weld::Widget* sfx2::sidebar::Panel::mpParentWindow
private

Definition at line 108 of file Panel.hxx.

Referenced by get_extents().

◆ msPanelId

const OUString sfx2::sidebar::Panel::msPanelId
private

Definition at line 98 of file Panel.hxx.

Referenced by HasIdPredicate(), and SetExpanded().

◆ msTitle

const OUString sfx2::sidebar::Panel::msTitle
private

Definition at line 99 of file Panel.hxx.

◆ mxBuilder

std::unique_ptr<weld::Builder> sfx2::sidebar::Panel::mxBuilder
private

Definition at line 97 of file Panel.hxx.

◆ mxContainer

std::unique_ptr<weld::Box> sfx2::sidebar::Panel::mxContainer
private

◆ mxContents

std::unique_ptr<weld::Box> sfx2::sidebar::Panel::mxContents
private

Definition at line 112 of file Panel.hxx.

Referenced by GetContents(), GetElementParentWindow(), Panel(), SetExpanded(), and ~Panel().

◆ mxDeck

VclPtr<Deck> sfx2::sidebar::Panel::mxDeck
private

Definition at line 109 of file Panel.hxx.

Referenced by GetFrameWeld(), and TriggerDeckLayouting().

◆ mxElement

css::uno::Reference<css::ui::XUIElement> sfx2::sidebar::Panel::mxElement
private

Definition at line 102 of file Panel.hxx.

Referenced by GetElementWindow(), SetUIElement(), and ~Panel().

◆ mxFrame

const css::uno::Reference<css::frame::XFrame>& sfx2::sidebar::Panel::mxFrame
private

Definition at line 107 of file Panel.hxx.

Referenced by SetExpanded().

◆ mxPanelComponent

css::uno::Reference<css::ui::XSidebarPanel> sfx2::sidebar::Panel::mxPanelComponent
private

Definition at line 103 of file Panel.hxx.

Referenced by SetUIElement(), and ~Panel().

◆ mxTitleBar

std::unique_ptr<PanelTitleBar> sfx2::sidebar::Panel::mxTitleBar
private

Definition at line 111 of file Panel.hxx.

Referenced by DataChanged(), GetTitleBar(), SetExpanded(), and ~Panel().

◆ mxXWindow

css::uno::Reference<css::awt::XWindow> sfx2::sidebar::Panel::mxXWindow
private

Definition at line 113 of file Panel.hxx.

Referenced by GetElementParentWindow(), and ~Panel().


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