LibreOffice Module vcl (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
GtkSalMenu Class Reference

#include <gtksalmenu.hxx>

Inheritance diagram for GtkSalMenu:
[legend]
Collaboration diagram for GtkSalMenu:
[legend]

Public Member Functions

 GtkSalMenu (bool bMenuBar)
 
virtual ~GtkSalMenu () override
 
virtual bool VisibleMenuBar () override
 
virtual void InsertItem (SalMenuItem *pSalMenuItem, unsigned nPos) override
 
virtual void RemoveItem (unsigned nPos) override
 
virtual void SetSubMenu (SalMenuItem *pSalMenuItem, SalMenu *pSubMenu, unsigned nPos) override
 
virtual void SetFrame (const SalFrame *pFrame) override
 
const GtkSalFrameGetFrame () const
 
virtual void CheckItem (unsigned nPos, bool bCheck) override
 
virtual void EnableItem (unsigned nPos, bool bEnable) override
 
virtual void ShowItem (unsigned nPos, bool bShow) override
 
virtual void SetItemText (unsigned nPos, SalMenuItem *pSalMenuItem, const OUString &rText) override
 
virtual void SetItemImage (unsigned nPos, SalMenuItem *pSalMenuItem, const Image &rImage) override
 
virtual void SetAccelerator (unsigned nPos, SalMenuItem *pSalMenuItem, const vcl::KeyCode &rKeyCode, const OUString &rKeyName) override
 
virtual void GetSystemMenuData (SystemMenuData *pData) override
 
void SetMenu (Menu *pMenu)
 
MenuGetMenu ()
 
void SetMenuModel (GMenuModel *pMenuModel)
 
unsigned GetItemCount ()
 
GtkSalMenuItemGetItemAtPos (unsigned nPos)
 
void SetActionGroup (GActionGroup *pActionGroup)
 
bool IsItemVisible (unsigned nPos)
 
void NativeSetItemText (unsigned nSection, unsigned nItemPos, const OUString &rText)
 
void NativeSetItemIcon (unsigned nSection, unsigned nItemPos, const Image &rImage)
 
bool NativeSetItemCommand (unsigned nSection, unsigned nItemPos, sal_uInt16 nId, const gchar *aCommand, MenuItemBits nBits, bool bChecked, bool bIsSubmenu)
 
void NativeSetEnableItem (gchar const *aCommand, gboolean bEnable)
 
void NativeCheckItem (unsigned nSection, unsigned nItemPos, MenuItemBits bits, gboolean bCheck)
 
void NativeSetAccelerator (unsigned nSection, unsigned nItemPos, const vcl::KeyCode &rKeyCode, const OUString &rKeyName)
 
void EnableUnity (bool bEnable)
 
virtual void ShowMenuBar (bool bVisible) override
 
bool PrepUpdate ()
 
virtual void Update () override
 
void UpdateFull ()
 
void ClearActionGroupAndMenuModel ()
 
GtkSalMenuGetTopLevel ()
 
void SetNeedsUpdate ()
 
GtkWidget * GetMenuBarContainerWidget () const
 
void CreateMenuBarWidget ()
 
void DestroyMenuBarWidget ()
 
gboolean SignalKey (GdkEventKey const *pEvent)
 
void ReturnFocus ()
 
virtual bool ShowNativePopupMenu (FloatingWindow *pWin, const tools::Rectangle &rRect, FloatWinPopupFlags nFlags) override
 
virtual void ShowCloseButton (bool bShow) override
 
virtual bool CanGetFocus () const override
 
virtual bool TakeFocus () override
 
virtual int GetMenuBarHeight () const override
 
virtual void ApplyPersona () override
 
- Public Member Functions inherited from SalMenu
 SalMenu ()
 
virtual ~SalMenu ()
 
virtual void SetItemBits (unsigned, MenuItemBits)
 
virtual bool AddMenuBarButton (const SalMenuButtonItem &)
 
virtual void RemoveMenuBarButton (sal_uInt16 nId)
 
virtual tools::Rectangle GetMenuBarButtonRectPixel (sal_uInt16 i_nItemId, SalFrame *i_pReferenceFrame)
 

Static Public Member Functions

static void DispatchCommand (const gchar *pMenuCommand)
 
static void Activate (const gchar *pMenuCommand)
 
static void Deactivate (const gchar *pMenuCommand)
 

Private Member Functions

void ImplUpdate (bool bRecurse, bool bRemoveDisabledEntries)
 
void ActivateAllSubmenus (Menu *pMenuBar)
 
 DECL_LINK (MenuBarHierarchyChangeHandler, Timer *, void)
 

Private Attributes

std::vector< GtkSalMenuItem * > maItems
 
Idle maUpdateMenuBarIdle
 
bool mbInActivateCallback
 
bool const mbMenuBar
 
bool mbNeedsUpdate
 
bool mbReturnFocusToDocument
 
bool mbAddedGrab
 
bool mbHasNullItemIcon = true
 Even setting null icon on a menuitem can be expensive, so cache state to avoid that call. More...
 
GtkWidget * mpMenuBarContainerWidget
 
std::unique_ptr< utl::TempFilemxPersonaImage
 
BitmapEx maPersonaBitmap
 
GtkWidget * mpMenuAllowShrinkWidget
 
GtkWidget * mpMenuBarWidget
 
GtkCssProvidermpMenuBarContainerProvider
 
GtkCssProvidermpMenuBarProvider
 
GtkWidget * mpCloseButton
 
VclPtr< MenumpVCLMenu
 
GtkSalMenumpParentSalMenu
 
GtkSalFramempFrame
 
GMenuModelmpMenuModel
 
GActionGroupmpActionGroup
 

Detailed Description

Definition at line 51 of file gtksalmenu.hxx.

Constructor & Destructor Documentation

GtkSalMenu::GtkSalMenu ( bool  bMenuBar)
virtual GtkSalMenu::~GtkSalMenu ( )
overridevirtual

Member Function Documentation

static void GtkSalMenu::Activate ( const gchar *  pMenuCommand)
static
void GtkSalMenu::ActivateAllSubmenus ( Menu pMenuBar)
private

Referenced by UpdateFull().

virtual void GtkSalMenu::ApplyPersona ( )
overridevirtual

Reimplemented from SalMenu.

virtual bool GtkSalMenu::CanGetFocus ( ) const
overridevirtual

Reimplemented from SalMenu.

virtual void GtkSalMenu::CheckItem ( unsigned  nPos,
bool  bCheck 
)
overridevirtual

Implements SalMenu.

void GtkSalMenu::ClearActionGroupAndMenuModel ( )
void GtkSalMenu::CreateMenuBarWidget ( )
static void GtkSalMenu::Deactivate ( const gchar *  pMenuCommand)
static
GtkSalMenu::DECL_LINK ( MenuBarHierarchyChangeHandler  ,
Timer ,
void   
)
private
void GtkSalMenu::DestroyMenuBarWidget ( )
static void GtkSalMenu::DispatchCommand ( const gchar *  pMenuCommand)
static
virtual void GtkSalMenu::EnableItem ( unsigned  nPos,
bool  bEnable 
)
overridevirtual

Implements SalMenu.

void GtkSalMenu::EnableUnity ( bool  bEnable)
const GtkSalFrame* GtkSalMenu::GetFrame ( ) const
GtkSalMenuItem* GtkSalMenu::GetItemAtPos ( unsigned  nPos)
inline

Definition at line 109 of file gtksalmenu.hxx.

unsigned GtkSalMenu::GetItemCount ( )
inline

Definition at line 108 of file gtksalmenu.hxx.

Menu* GtkSalMenu::GetMenu ( )
inline

Definition at line 106 of file gtksalmenu.hxx.

References mpVCLMenu.

GtkWidget* GtkSalMenu::GetMenuBarContainerWidget ( ) const
inline

Definition at line 140 of file gtksalmenu.hxx.

References mpMenuBarContainerWidget.

virtual int GtkSalMenu::GetMenuBarHeight ( ) const
overridevirtual

Reimplemented from SalMenu.

virtual void GtkSalMenu::GetSystemMenuData ( SystemMenuData pData)
overridevirtual

Implements SalMenu.

GtkSalMenu* GtkSalMenu::GetTopLevel ( )
void GtkSalMenu::ImplUpdate ( bool  bRecurse,
bool  bRemoveDisabledEntries 
)
private
virtual void GtkSalMenu::InsertItem ( SalMenuItem pSalMenuItem,
unsigned  nPos 
)
overridevirtual

Implements SalMenu.

bool GtkSalMenu::IsItemVisible ( unsigned  nPos)
void GtkSalMenu::NativeCheckItem ( unsigned  nSection,
unsigned  nItemPos,
MenuItemBits  bits,
gboolean  bCheck 
)
void GtkSalMenu::NativeSetAccelerator ( unsigned  nSection,
unsigned  nItemPos,
const vcl::KeyCode rKeyCode,
const OUString &  rKeyName 
)
void GtkSalMenu::NativeSetEnableItem ( gchar const *  aCommand,
gboolean  bEnable 
)
bool GtkSalMenu::NativeSetItemCommand ( unsigned  nSection,
unsigned  nItemPos,
sal_uInt16  nId,
const gchar *  aCommand,
MenuItemBits  nBits,
bool  bChecked,
bool  bIsSubmenu 
)
void GtkSalMenu::NativeSetItemIcon ( unsigned  nSection,
unsigned  nItemPos,
const Image rImage 
)
void GtkSalMenu::NativeSetItemText ( unsigned  nSection,
unsigned  nItemPos,
const OUString &  rText 
)
bool GtkSalMenu::PrepUpdate ( )
virtual void GtkSalMenu::RemoveItem ( unsigned  nPos)
overridevirtual

Implements SalMenu.

void GtkSalMenu::ReturnFocus ( )
virtual void GtkSalMenu::SetAccelerator ( unsigned  nPos,
SalMenuItem pSalMenuItem,
const vcl::KeyCode rKeyCode,
const OUString &  rKeyName 
)
overridevirtual

Implements SalMenu.

void GtkSalMenu::SetActionGroup ( GActionGroup pActionGroup)
inline

Definition at line 110 of file gtksalmenu.hxx.

virtual void GtkSalMenu::SetFrame ( const SalFrame pFrame)
overridevirtual

Implements SalMenu.

virtual void GtkSalMenu::SetItemImage ( unsigned  nPos,
SalMenuItem pSalMenuItem,
const Image rImage 
)
overridevirtual

Implements SalMenu.

virtual void GtkSalMenu::SetItemText ( unsigned  nPos,
SalMenuItem pSalMenuItem,
const OUString &  rText 
)
overridevirtual

Implements SalMenu.

void GtkSalMenu::SetMenu ( Menu pMenu)
inline

Definition at line 105 of file gtksalmenu.hxx.

void GtkSalMenu::SetMenuModel ( GMenuModel pMenuModel)
void GtkSalMenu::SetNeedsUpdate ( )
virtual void GtkSalMenu::SetSubMenu ( SalMenuItem pSalMenuItem,
SalMenu pSubMenu,
unsigned  nPos 
)
overridevirtual

Implements SalMenu.

virtual void GtkSalMenu::ShowCloseButton ( bool  bShow)
overridevirtual

Reimplemented from SalMenu.

virtual void GtkSalMenu::ShowItem ( unsigned  nPos,
bool  bShow 
)
overridevirtual

Reimplemented from SalMenu.

virtual void GtkSalMenu::ShowMenuBar ( bool  bVisible)
overridevirtual

Reimplemented from SalMenu.

virtual bool GtkSalMenu::ShowNativePopupMenu ( FloatingWindow pWin,
const tools::Rectangle rRect,
FloatWinPopupFlags  nFlags 
)
overridevirtual

Reimplemented from SalMenu.

gboolean GtkSalMenu::SignalKey ( GdkEventKey const *  pEvent)
virtual bool GtkSalMenu::TakeFocus ( )
overridevirtual

Reimplemented from SalMenu.

virtual void GtkSalMenu::Update ( )
overridevirtual

Reimplemented from SalMenu.

Referenced by UpdateFull().

void GtkSalMenu::UpdateFull ( )
inline

Definition at line 134 of file gtksalmenu.hxx.

References ActivateAllSubmenus(), and Update().

virtual bool GtkSalMenu::VisibleMenuBar ( )
overridevirtual

Implements SalMenu.

Member Data Documentation

std::vector< GtkSalMenuItem* > GtkSalMenu::maItems
private

Definition at line 54 of file gtksalmenu.hxx.

BitmapEx GtkSalMenu::maPersonaBitmap
private

Definition at line 66 of file gtksalmenu.hxx.

Idle GtkSalMenu::maUpdateMenuBarIdle
private

Definition at line 55 of file gtksalmenu.hxx.

bool GtkSalMenu::mbAddedGrab
private

Definition at line 61 of file gtksalmenu.hxx.

bool GtkSalMenu::mbHasNullItemIcon = true
private

Even setting null icon on a menuitem can be expensive, so cache state to avoid that call.

Definition at line 63 of file gtksalmenu.hxx.

bool GtkSalMenu::mbInActivateCallback
private

Definition at line 57 of file gtksalmenu.hxx.

bool const GtkSalMenu::mbMenuBar
private

Definition at line 58 of file gtksalmenu.hxx.

bool GtkSalMenu::mbNeedsUpdate
private

Definition at line 59 of file gtksalmenu.hxx.

bool GtkSalMenu::mbReturnFocusToDocument
private

Definition at line 60 of file gtksalmenu.hxx.

GActionGroup* GtkSalMenu::mpActionGroup
private

Definition at line 78 of file gtksalmenu.hxx.

GtkWidget* GtkSalMenu::mpCloseButton
private

Definition at line 71 of file gtksalmenu.hxx.

GtkSalFrame* GtkSalMenu::mpFrame
private

Definition at line 74 of file gtksalmenu.hxx.

GtkWidget* GtkSalMenu::mpMenuAllowShrinkWidget
private

Definition at line 67 of file gtksalmenu.hxx.

GtkCssProvider* GtkSalMenu::mpMenuBarContainerProvider
private

Definition at line 69 of file gtksalmenu.hxx.

GtkWidget* GtkSalMenu::mpMenuBarContainerWidget
private

Definition at line 64 of file gtksalmenu.hxx.

Referenced by GetMenuBarContainerWidget().

GtkCssProvider* GtkSalMenu::mpMenuBarProvider
private

Definition at line 70 of file gtksalmenu.hxx.

GtkWidget* GtkSalMenu::mpMenuBarWidget
private

Definition at line 68 of file gtksalmenu.hxx.

GMenuModel* GtkSalMenu::mpMenuModel
private

Definition at line 77 of file gtksalmenu.hxx.

GtkSalMenu* GtkSalMenu::mpParentSalMenu
private

Definition at line 73 of file gtksalmenu.hxx.

VclPtr<Menu> GtkSalMenu::mpVCLMenu
private

Definition at line 72 of file gtksalmenu.hxx.

Referenced by GetMenu().

std::unique_ptr<utl::TempFile> GtkSalMenu::mxPersonaImage
private

Definition at line 65 of file gtksalmenu.hxx.


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