Alarm browser improved
[public/netxms.git] / src / client / console / plugins / AlarmBrowser / alarm_browser.h
CommitLineData
f2a439ef
VK
1/*
2** NetXMS - Network Management System
3** Portable management console - Alarm Browser plugin
4** Copyright (C) 2007 Victor Kirhenshtein
5**
6** This program is free software; you can redistribute it and/or modify
7** it under the terms of the GNU General Public License as published by
8** the Free Software Foundation; either version 2 of the License, or
9** (at your option) any later version.
10**
11** This program is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14** GNU General Public License for more details.
15**
16** You should have received a copy of the GNU General Public License
17** along with this program; if not, write to the Free Software
18** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19**
20** File: alarm_browser.h
21**
22**/
23
24#ifndef _alarm_browser_h_
25#define _alarm_browser_h_
26
27#include <nms_common.h>
28#include <nms_util.h>
29#include <nxclapi.h>
30#include <nxmc_api.h>
31
32
33//
34// Alarm view class
35//
36
37class nxAlarmView : public wxWindow
38{
39private:
e1ebe70d
VK
40 wxListView *m_wndListCtrl;
41 long m_sortMode;
42 long m_sortDir;
7bdfc49b 43 wxString m_context;
f2a439ef
VK
44
45 void AddAlarm(NXC_ALARM *alarm);
46 void UpdateAlarm(long item, NXC_ALARM *alarm);
7bdfc49b 47 void SortAlarmList();
f2a439ef
VK
48
49public:
7bdfc49b
VK
50 nxAlarmView(wxWindow *parent, const TCHAR *context);
51 virtual ~nxAlarmView();
f2a439ef
VK
52
53 void RefreshView();
54
55 // Event handlers
56protected:
57 void OnSize(wxSizeEvent &event);
58 void OnListItemRightClick(wxListEvent &event);
e1ebe70d 59 void OnListColumnClick(wxListEvent &event);
f2a439ef
VK
60
61 DECLARE_EVENT_TABLE()
62};
63
64
65//
66// Alarm browser class
67//
68
69class nxAlarmBrowser : public nxView
70{
71private:
72 nxAlarmView *m_view;
73
74public:
75 nxAlarmBrowser();
76 virtual ~nxAlarmBrowser();
77
78 // Event handlers
79protected:
80 void OnSize(wxSizeEvent &event);
81 void OnViewRefresh(wxCommandEvent &event);
82
83 DECLARE_EVENT_TABLE()
84};
85
86#endif