LibreOffice Module sd (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sd::FormShellManager Class Referencefinal

This simple class is responsible for putting the form shell above or below the main view shell on the shell stack maintained by the ObjectBarManager. More...

#include <FormShellManager.hxx>

Inheritance diagram for sd::FormShellManager:
[legend]
Collaboration diagram for sd::FormShellManager:
[legend]

Public Member Functions

 FormShellManager (ViewShellBase &rBase)
 
virtual ~FormShellManager () override
 
void SetFormShell (FmFormShell *pFormShell)
 Typically called by a ShellFactory. More...
 
FmFormShellGetFormShell ()
 Return the form shell last set with SetFormShell(). More...
 
- Public Member Functions inherited from SfxListener
 SfxListener ()
 
 SfxListener (const SfxListener &rCopy)
 
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
 
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
 
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
 
void EndListeningAll ()
 
bool IsListening (SfxBroadcaster &rBroadcaster) const
 
sal_uInt16 GetBroadcasterCount () const
 
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint)
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 
virtual bool IsSdrView () const
 

Private Member Functions

void RegisterAtCenterPane ()
 Register at window of center pane and at the form shell that represents the form tool bar. More...
 
void UnregisterAtCenterPane ()
 Unregister the listeners that were registered in RegisterAtCenterPane(). More...
 
 DECL_LINK (WindowEventHandler, VclWindowEvent &, void)
 This call back is called by the application window (among others) when the window gets the focus. More...
 
 DECL_LINK (ConfigurationUpdateHandler, ::sd::tools::EventMultiplexerEvent &, void)
 This call back is called when view in the center pane is replaced. More...
 
 DECL_LINK (FormControlActivated, LinkParamNone *, void)
 This call back is called by the form shell when it gets the focus. More...
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override
 This method is called by the form shell when that is destroyed. More...
 
void ImplDestroy ()
 dtor body More...
 

Private Attributes

ViewShellBasemrBase
 
FmFormShellmpFormShell
 Ownership of the form shell lies with the ViewShellManager. More...
 
bool mbFormShellAboveViewShell
 Remember whether the form shell is currently above or below the main view shell. More...
 
ViewShellManager::SharedShellFactory mpSubShellFactory
 The factory is remembered so that it removed from the ViewShellManager when the FormShellManager is destroyed. More...
 
bool mbIsMainViewChangePending
 
VclPtr< vcl::WindowmpMainViewShellWindow
 

Detailed Description

This simple class is responsible for putting the form shell above or below the main view shell on the shell stack maintained by the ObjectBarManager.

The form shell is moved above the view shell when the form shell is activated, i.e. the FormControlActivated handler is called.

It is moved below the view shell when the main window of the main view shell is focused.

The form shell is created and destroyed by the ViewShellManager by using a factory object provided by the FormShellManager.

Definition at line 56 of file FormShellManager.hxx.

Constructor & Destructor Documentation

◆ FormShellManager()

sd::FormShellManager::FormShellManager ( ViewShellBase rBase)

◆ ~FormShellManager()

sd::FormShellManager::~FormShellManager ( )
overridevirtual

Definition at line 84 of file FormShellManager.cxx.

References ImplDestroy(), and suppress_fun_call_w_exception.

Member Function Documentation

◆ DECL_LINK() [1/3]

sd::FormShellManager::DECL_LINK ( ConfigurationUpdateHandler  ,
::sd::tools::EventMultiplexerEvent ,
void   
)
private

This call back is called when view in the center pane is replaced.

When this happens then we unregister at the window of the old and register at the window of the new shell.

◆ DECL_LINK() [2/3]

sd::FormShellManager::DECL_LINK ( FormControlActivated  ,
LinkParamNone ,
void   
)
private

This call back is called by the form shell when it gets the focus.

In this case the form shell is moved to the top of the shell stack.

◆ DECL_LINK() [3/3]

sd::FormShellManager::DECL_LINK ( WindowEventHandler  ,
VclWindowEvent ,
void   
)
private

This call back is called by the application window (among others) when the window gets the focus.

In this case the form shell is moved to the bottom of the shell stack.

◆ GetFormShell()

FmFormShell * sd::FormShellManager::GetFormShell ( )
inline

Return the form shell last set with SetFormShell().

Returns
The result may be <NULL> when the SetFormShell() method has not yet been called or was last called with <NULL>.

Definition at line 75 of file FormShellManager.hxx.

References mpFormShell.

◆ ImplDestroy()

void sd::FormShellManager::ImplDestroy ( )
private

◆ Notify()

void sd::FormShellManager::Notify ( SfxBroadcaster rBC,
const SfxHint rHint 
)
overrideprivatevirtual

This method is called by the form shell when that is destroyed.

It acts as a last resort against referencing a dead form shell. With the factory working properly this method should not be necessary (and may be removed in the future.)

Reimplemented from SfxListener.

Definition at line 266 of file FormShellManager.cxx.

References SfxHint::GetId(), sd::ViewShellBase::GetMainViewShell(), sd::ViewShellBase::GetViewShellManager(), mpFormShell, and mrBase.

◆ RegisterAtCenterPane()

void sd::FormShellManager::RegisterAtCenterPane ( )
private

Register at window of center pane and at the form shell that represents the form tool bar.

The former informs this manager about the deselection of the form shell. The later informs about its selection.

Definition at line 131 of file FormShellManager.cxx.

References sd::ViewShell::GetActiveWindow(), sd::ViewShellBase::GetMainViewShell(), sd::ViewShell::GetShellType(), sd::ViewShellBase::GetViewShellManager(), LINK, mpMainViewShellWindow, mpSubShellFactory, mrBase, and sd::ViewShell::ST_SLIDE_SORTER.

Referenced by FormShellManager().

◆ SetFormShell()

void sd::FormShellManager::SetFormShell ( FmFormShell pFormShell)

◆ UnregisterAtCenterPane()

void sd::FormShellManager::UnregisterAtCenterPane ( )
private

Member Data Documentation

◆ mbFormShellAboveViewShell

bool sd::FormShellManager::mbFormShellAboveViewShell
private

Remember whether the form shell is currently above or below the main view shell.

Definition at line 89 of file FormShellManager.hxx.

Referenced by SetFormShell().

◆ mbIsMainViewChangePending

bool sd::FormShellManager::mbIsMainViewChangePending
private

Definition at line 96 of file FormShellManager.hxx.

◆ mpFormShell

FmFormShell* sd::FormShellManager::mpFormShell
private

Ownership of the form shell lies with the ViewShellManager.

This reference is kept so that the FormShellManager can detect when a new form shell is passed to SetFormShell().

Definition at line 84 of file FormShellManager.hxx.

Referenced by GetFormShell(), Notify(), and SetFormShell().

◆ mpMainViewShellWindow

VclPtr<vcl::Window> sd::FormShellManager::mpMainViewShellWindow
private

Definition at line 98 of file FormShellManager.hxx.

Referenced by RegisterAtCenterPane(), and UnregisterAtCenterPane().

◆ mpSubShellFactory

ViewShellManager::SharedShellFactory sd::FormShellManager::mpSubShellFactory
private

The factory is remembered so that it removed from the ViewShellManager when the FormShellManager is destroyed.

Definition at line 94 of file FormShellManager.hxx.

Referenced by ImplDestroy(), RegisterAtCenterPane(), and UnregisterAtCenterPane().

◆ mrBase

ViewShellBase& sd::FormShellManager::mrBase
private

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