LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScListSubMenuControl Class Referencefinal

#include <checklistmenu.hxx>

Collaboration diagram for ScListSubMenuControl:
[legend]

Public Member Functions

 ScListSubMenuControl (weld::Widget *pParent, ScCheckListMenuControl &rParentControl, bool bColorMenu)
 
void setPopupStartAction (ScCheckListMenuControl::Action *p)
 
void GrabFocus ()
 
bool IsVisible () const
 
void StartPopupMode (weld::Widget *pParent, const tools::Rectangle &rRect)
 
void EndPopupMode ()
 
void addMenuItem (const OUString &rText, ScCheckListMenuControl::Action *pAction)
 
void addMenuColorItem (const OUString &rText, bool bActive, VirtualDevice &rImage, int nMenu, ScCheckListMenuControl::Action *pAction)
 
void addSeparator ()
 
void clearMenuItems ()
 
void resizeToFitMenuItems ()
 
ScViewDataGetViewData () const
 
ScCheckListMenuControl::ExtendedDatagetExtendedData ()
 
VclPtr< VirtualDevicecreate_virtual_device () const
 
void terminateAllPopupMenus ()
 Dismiss all visible popup menus and set focus back to the application window. More...
 

Private Member Functions

 DECL_LINK (RowActivatedHdl, weld::TreeView &rMEvt, bool)
 
 DECL_LINK (ColorSelChangedHdl, weld::TreeView &, void)
 
 DECL_LINK (MenuKeyInputHdl, const KeyEvent &, bool)
 
void SetupMenu (weld::TreeView &rMenu)
 
void executeMenuItem (ScCheckListMenuControl::Action *pAction)
 
void addItem (ScCheckListMenuControl::Action *pAction)
 

Private Attributes

std::unique_ptr< weld::BuildermxBuilder
 
std::unique_ptr< weld::PopovermxPopover
 
std::unique_ptr< weld::ContainermxContainer
 
std::unique_ptr< weld::TreeViewmxMenu
 
std::unique_ptr< weld::TreeViewmxBackColorMenu
 
std::unique_ptr< weld::TreeViewmxTextColorMenu
 
std::unique_ptr< weld::TreeItermxScratchIter
 
std::unique_ptr< ScCheckListMenuControl::ActionmxPopupStartAction
 
std::vector< ScCheckListMenuControl::MenuItemDatamaMenuItems
 
ScCheckListMenuControlmrParentControl
 
int mnBackColorMenuPrefHeight
 
int mnTextColorMenuPrefHeight
 
bool mbColorMenu
 

Detailed Description

Definition at line 325 of file checklistmenu.hxx.

Constructor & Destructor Documentation

◆ ScListSubMenuControl()

ScListSubMenuControl::ScListSubMenuControl ( weld::Widget pParent,
ScCheckListMenuControl rParentControl,
bool  bColorMenu 
)

Member Function Documentation

◆ addItem()

void ScListSubMenuControl::addItem ( ScCheckListMenuControl::Action pAction)
private

◆ addMenuColorItem()

void ScListSubMenuControl::addMenuColorItem ( const OUString &  rText,
bool  bActive,
VirtualDevice rImage,
int  nMenu,
ScCheckListMenuControl::Action pAction 
)

◆ addMenuItem()

void ScListSubMenuControl::addMenuItem ( const OUString &  rText,
ScCheckListMenuControl::Action pAction 
)

Definition at line 1589 of file checklistmenu.cxx.

References addItem(), mxMenu, and weld::toId().

Referenced by ScGridWindow::DPLaunchFieldPopupMenu().

◆ addSeparator()

void ScListSubMenuControl::addSeparator ( )

Definition at line 1623 of file checklistmenu.cxx.

References maMenuItems, and mxMenu.

◆ clearMenuItems()

void ScListSubMenuControl::clearMenuItems ( )

◆ create_virtual_device()

VclPtr< VirtualDevice > ScListSubMenuControl::create_virtual_device ( ) const
inline

Definition at line 348 of file checklistmenu.hxx.

References mxMenu.

◆ DECL_LINK() [1/3]

ScListSubMenuControl::DECL_LINK ( ColorSelChangedHdl  ,
weld::TreeView ,
void   
)
private

◆ DECL_LINK() [2/3]

ScListSubMenuControl::DECL_LINK ( MenuKeyInputHdl  ,
const KeyEvent ,
bool   
)
private

◆ DECL_LINK() [3/3]

ScListSubMenuControl::DECL_LINK ( RowActivatedHdl  ,
weld::TreeView rMEvt,
bool   
)
private

◆ EndPopupMode()

void ScListSubMenuControl::EndPopupMode ( )

◆ executeMenuItem()

void ScListSubMenuControl::executeMenuItem ( ScCheckListMenuControl::Action pAction)
private

◆ getExtendedData()

ScCheckListMenuControl::ExtendedData * ScListSubMenuControl::getExtendedData ( )
inline

◆ GetViewData()

ScViewData & ScListSubMenuControl::GetViewData ( ) const
inline

Definition at line 346 of file checklistmenu.hxx.

References ScCheckListMenuControl::GetViewData(), and mrParentControl.

◆ GrabFocus()

void ScListSubMenuControl::GrabFocus ( )

◆ IsVisible()

bool ScListSubMenuControl::IsVisible ( ) const

Definition at line 1559 of file checklistmenu.cxx.

References mxPopover.

◆ resizeToFitMenuItems()

void ScListSubMenuControl::resizeToFitMenuItems ( )

◆ setPopupStartAction()

void ScListSubMenuControl::setPopupStartAction ( ScCheckListMenuControl::Action p)

Definition at line 1726 of file checklistmenu.cxx.

References mxPopupStartAction, and p.

◆ SetupMenu()

void ScListSubMenuControl::SetupMenu ( weld::TreeView rMenu)
private

◆ StartPopupMode()

void ScListSubMenuControl::StartPopupMode ( weld::Widget pParent,
const tools::Rectangle rRect 
)

◆ terminateAllPopupMenus()

void ScListSubMenuControl::terminateAllPopupMenus ( )

Dismiss all visible popup menus and set focus back to the application window.

This method is called e.g. when a menu action is fired.

Definition at line 1731 of file checklistmenu.cxx.

References EndPopupMode(), mrParentControl, and ScCheckListMenuControl::terminateAllPopupMenus().

Referenced by executeMenuItem().

Member Data Documentation

◆ maMenuItems

std::vector<ScCheckListMenuControl::MenuItemData> ScListSubMenuControl::maMenuItems
private

Definition at line 365 of file checklistmenu.hxx.

Referenced by addItem(), addSeparator(), and clearMenuItems().

◆ mbColorMenu

bool ScListSubMenuControl::mbColorMenu
private

Definition at line 369 of file checklistmenu.hxx.

Referenced by GrabFocus(), resizeToFitMenuItems(), and StartPopupMode().

◆ mnBackColorMenuPrefHeight

int ScListSubMenuControl::mnBackColorMenuPrefHeight
private

Definition at line 367 of file checklistmenu.hxx.

Referenced by addMenuColorItem(), clearMenuItems(), and resizeToFitMenuItems().

◆ mnTextColorMenuPrefHeight

int ScListSubMenuControl::mnTextColorMenuPrefHeight
private

Definition at line 368 of file checklistmenu.hxx.

Referenced by addMenuColorItem(), clearMenuItems(), and resizeToFitMenuItems().

◆ mrParentControl

ScCheckListMenuControl& ScListSubMenuControl::mrParentControl
private

◆ mxBackColorMenu

std::unique_ptr<weld::TreeView> ScListSubMenuControl::mxBackColorMenu
private

◆ mxBuilder

std::unique_ptr<weld::Builder> ScListSubMenuControl::mxBuilder
private

Definition at line 357 of file checklistmenu.hxx.

◆ mxContainer

std::unique_ptr<weld::Container> ScListSubMenuControl::mxContainer
private

Definition at line 359 of file checklistmenu.hxx.

◆ mxMenu

std::unique_ptr<weld::TreeView> ScListSubMenuControl::mxMenu
private

◆ mxPopover

std::unique_ptr<weld::Popover> ScListSubMenuControl::mxPopover
private

Definition at line 358 of file checklistmenu.hxx.

Referenced by EndPopupMode(), IsVisible(), and StartPopupMode().

◆ mxPopupStartAction

std::unique_ptr<ScCheckListMenuControl::Action> ScListSubMenuControl::mxPopupStartAction
private

Definition at line 364 of file checklistmenu.hxx.

Referenced by setPopupStartAction(), and StartPopupMode().

◆ mxScratchIter

std::unique_ptr<weld::TreeIter> ScListSubMenuControl::mxScratchIter
private

Definition at line 363 of file checklistmenu.hxx.

Referenced by addMenuColorItem().

◆ mxTextColorMenu

std::unique_ptr<weld::TreeView> ScListSubMenuControl::mxTextColorMenu
private

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