summaryrefslogtreecommitdiff
path: root/framework/source/lomenubar/MenuItemStatusListener.h
blob: 56cf5e8332659f5acb49bb2764e018895d87f108 (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_H__
#define __MENU_ITEM_STATUS_LISTENER_H__

#include "FrameHelper.h"

#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 id;
    FrameHelper *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