summaryrefslogtreecommitdiff
path: root/framework/source/lomenubar/MenuItemStatusListener.hxx
blob: df0353739cd73fe12f015e502ca9ac53554bb4fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef __MENU_ITEM_STATUS_LISTENER_HXX__
#define __MENU_ITEM_STATUS_LISTENER_HXX__

#include "FrameHelper.hxx"

#include <glib.h>

#include <com/sun/star/frame/XStatusListener.hpp>
#include <cppuhelper/implbase1.hxx>

#include <rtl/process.h>

using com::sun::star::frame::FeatureStateEvent;
using com::sun::star::frame::XStatusListener;
using com::sun::star::lang::EventObject;

// This class listens for changes in each menuitem and notifies FrameHelper about it
class MenuItemStatusListener : public cppu::WeakImplHelper1 < XStatusListener >
{
  private:
    guint16 m_id;
    FrameHelper *m_helper;

  public:
    MenuItemStatusListener (FrameHelper *helper);
    ~MenuItemStatusListener () {}

    virtual void SAL_CALL
    statusChanged(const FeatureStateEvent& Event)
      throw (RuntimeException);

    virtual void SAL_CALL disposing(const EventObject& /*aEvent*/)
      throw (RuntimeException) {}
};
#endif