EventMonitor Doxygen documentation update
This commit is contained in:
parent
cebcf7506e
commit
0afbdadea7
@ -19,8 +19,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
///
|
///
|
||||||
/// EventMonitor application
|
/// \defgroup EventMonitor Event Monitor
|
||||||
|
/// Real-time log of application events
|
||||||
///
|
///
|
||||||
|
|
||||||
class wxEventMonitorApp;
|
class wxEventMonitorApp;
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -32,6 +34,12 @@ class wxEventMonitorApp;
|
|||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
|
|
||||||
|
/// \addtogroup EventMonitor
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
///
|
||||||
|
/// EventMonitor application
|
||||||
|
///
|
||||||
class wxEventMonitorApp : public wxApp
|
class wxEventMonitorApp : public wxApp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -57,4 +65,6 @@ public:
|
|||||||
wxLocale m_locale; ///< Current locale
|
wxLocale m_locale; ///< Current locale
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
wxDECLARE_APP(wxEventMonitorApp);
|
wxDECLARE_APP(wxEventMonitorApp);
|
||||||
|
@ -115,6 +115,8 @@ void wxEventTraceProcessorThread::Abort()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// \cond internal
|
||||||
|
|
||||||
wxThread::ExitCode wxEventTraceProcessorThread::Entry()
|
wxThread::ExitCode wxEventTraceProcessorThread::Entry()
|
||||||
{
|
{
|
||||||
// Process events.
|
// Process events.
|
||||||
@ -139,6 +141,8 @@ VOID WINAPI wxEventTraceProcessorThread::EventRecordCallback(_In_ PEVENT_RECORD
|
|||||||
_this->m_parent->QueueEvent(new wxETWEvent(wxEVT_ETW_EVENT, *pEvent));
|
_this->m_parent->QueueEvent(new wxETWEvent(wxEVT_ETW_EVENT, *pEvent));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// \endcond
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// wxETWListCtrl
|
// wxETWListCtrl
|
||||||
@ -460,6 +464,8 @@ void wxETWListCtrl::RebuildItems()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// \cond internal
|
||||||
|
|
||||||
bool wxETWListCtrl::IsVisible(const EVENT_RECORD &rec) const
|
bool wxETWListCtrl::IsVisible(const EVENT_RECORD &rec) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
@ -561,7 +567,7 @@ wxString wxETWListCtrl::OnGetItemText(long item, long column) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString wxETWListCtrl::OnGetItemText(const event_rec &rec, long column) const
|
wxString wxETWListCtrl::OnGetItemText(const winstd::event_rec &rec, long column) const
|
||||||
{
|
{
|
||||||
switch (column) {
|
switch (column) {
|
||||||
case 0: {
|
case 0: {
|
||||||
@ -678,6 +684,8 @@ void wxETWListCtrl::OnETWEvent(wxETWEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// \endcond
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// wxPersistentETWListCtrl
|
// wxPersistentETWListCtrl
|
||||||
|
@ -20,32 +20,23 @@
|
|||||||
|
|
||||||
#include <wx/event.h>
|
#include <wx/event.h>
|
||||||
|
|
||||||
|
/// \addtogroup EventMonitor
|
||||||
|
/// @{
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Maximum number of event records kept
|
/// Maximum number of event records kept
|
||||||
///
|
///
|
||||||
#define wxETWEVENT_RECORDS_MAX 1000000
|
#define wxETWEVENT_RECORDS_MAX 1000000
|
||||||
|
|
||||||
///
|
/// @}
|
||||||
/// ETW event
|
|
||||||
///
|
|
||||||
class wxETWEvent;
|
class wxETWEvent;
|
||||||
wxDECLARE_EVENT(wxEVT_ETW_EVENT, wxETWEvent);
|
wxDECLARE_EVENT(wxEVT_ETW_EVENT, wxETWEvent);
|
||||||
#define wxETWEventHandler(func) wxEVENT_HANDLER_CAST(wxETWEventFunction, func)
|
#define wxETWEventHandler(func) wxEVENT_HANDLER_CAST(wxETWEventFunction, func)
|
||||||
#define EVT_ETW_EVENT(func) wx__DECLARE_EVT0(wxEVT_ETW_EVENT, wxETWEventHandler(func))
|
#define EVT_ETW_EVENT(func) wx__DECLARE_EVT0(wxEVT_ETW_EVENT, wxETWEventHandler(func))
|
||||||
|
|
||||||
///
|
|
||||||
/// Event trace processor
|
|
||||||
///
|
|
||||||
class wxEventTraceProcessorThread;
|
class wxEventTraceProcessorThread;
|
||||||
|
|
||||||
///
|
|
||||||
/// Event list control
|
|
||||||
///
|
|
||||||
class wxETWListCtrl;
|
class wxETWListCtrl;
|
||||||
|
|
||||||
///
|
|
||||||
/// Supports saving/restoring wxETWListCtrl state
|
|
||||||
///
|
|
||||||
class wxPersistentETWListCtrl;
|
class wxPersistentETWListCtrl;
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -61,47 +52,106 @@ class wxPersistentETWListCtrl;
|
|||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
|
||||||
|
/// \addtogroup EventMonitor
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
///
|
||||||
|
/// ETW event
|
||||||
|
///
|
||||||
class wxETWEvent : public wxEvent
|
class wxETWEvent : public wxEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
///
|
||||||
|
/// Creates ETW event
|
||||||
|
///
|
||||||
|
/// \param[in] type The unique type of event
|
||||||
|
/// \param[in] record ETW event record
|
||||||
|
///
|
||||||
wxETWEvent(wxEventType type = wxEVT_NULL, const EVENT_RECORD &record = s_record_null);
|
wxETWEvent(wxEventType type = wxEVT_NULL, const EVENT_RECORD &record = s_record_null);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Copies an ETW event
|
||||||
|
///
|
||||||
|
/// \param[in] event ETW event to copy from
|
||||||
|
///
|
||||||
wxETWEvent(const wxETWEvent& event);
|
wxETWEvent(const wxETWEvent& event);
|
||||||
virtual wxEvent *Clone() const { return new wxETWEvent(*this); }
|
|
||||||
|
|
||||||
inline const winstd::event_rec& GetRecord() const { return m_record; }
|
///
|
||||||
inline winstd::event_rec& GetRecord() { return m_record; }
|
/// Clones the ETW event
|
||||||
|
///
|
||||||
|
/// \returns Event copy
|
||||||
|
///
|
||||||
|
virtual wxEvent *Clone() const
|
||||||
|
{
|
||||||
|
return new wxETWEvent(*this);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
///
|
||||||
bool DoSetExtendedData(size_t extended_data_count, const EVENT_HEADER_EXTENDED_DATA_ITEM *extended_data);
|
/// Returns ETW event record assosiated with event
|
||||||
bool DoSetUserData(size_t user_data_length, const void *user_data);
|
///
|
||||||
|
inline const winstd::event_rec& GetRecord() const
|
||||||
|
{
|
||||||
|
return m_record;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns ETW event record assosiated with event
|
||||||
|
///
|
||||||
|
inline winstd::event_rec& GetRecord()
|
||||||
|
{
|
||||||
|
return m_record;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxETWEvent)
|
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxETWEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const EVENT_RECORD s_record_null;
|
static const EVENT_RECORD s_record_null; ///< Blank ETW event record
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
winstd::event_rec m_record; ///< ETW event record
|
winstd::event_rec m_record; ///< ETW event record
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Prototype of the function consuming `wxETWEvent` events
|
||||||
|
///
|
||||||
typedef void (wxEvtHandler::*wxETWEventFunction)(wxETWEvent&);
|
typedef void (wxEvtHandler::*wxETWEventFunction)(wxETWEvent&);
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Monitors ETW events and forwards them as `wxETWEvent` event
|
||||||
|
///
|
||||||
class wxEventTraceProcessorThread : public wxThread
|
class wxEventTraceProcessorThread : public wxThread
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
///
|
||||||
|
/// A thread to process ETW events
|
||||||
|
///
|
||||||
|
/// \param[in] parent Event handler this thread will send record notifications
|
||||||
|
/// \param[in] sessions An array of sessions to monitor
|
||||||
|
///
|
||||||
wxEventTraceProcessorThread(wxEvtHandler *parent, const wxArrayString &sessions);
|
wxEventTraceProcessorThread(wxEvtHandler *parent, const wxArrayString &sessions);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Destructor
|
||||||
|
///
|
||||||
virtual ~wxEventTraceProcessorThread();
|
virtual ~wxEventTraceProcessorThread();
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Closes all session handles to allow graceful thread termination
|
||||||
|
///
|
||||||
void Abort();
|
void Abort();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/// \cond internal
|
||||||
virtual ExitCode Entry();
|
virtual ExitCode Entry();
|
||||||
|
/// \endcond
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/// \cond internal
|
||||||
static VOID WINAPI EventRecordCallback(PEVENT_RECORD pEvent);
|
static VOID WINAPI EventRecordCallback(PEVENT_RECORD pEvent);
|
||||||
|
/// \endcond
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::vector<TRACEHANDLE> m_traces; ///< An array of tracing sessions this thread is monitoring
|
std::vector<TRACEHANDLE> m_traces; ///< An array of tracing sessions this thread is monitoring
|
||||||
@ -109,6 +159,9 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Event list control
|
||||||
|
///
|
||||||
class wxETWListCtrl : public wxListCtrl
|
class wxETWListCtrl : public wxListCtrl
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
@ -117,6 +170,9 @@ protected:
|
|||||||
///
|
///
|
||||||
struct less_guid : public std::binary_function<GUID, GUID, bool>
|
struct less_guid : public std::binary_function<GUID, GUID, bool>
|
||||||
{
|
{
|
||||||
|
///
|
||||||
|
/// Compares two GUIDs
|
||||||
|
///
|
||||||
bool operator()(const GUID &a, const GUID &b) const
|
bool operator()(const GUID &a, const GUID &b) const
|
||||||
{
|
{
|
||||||
if (a.Data1 < b.Data1) return true;
|
if (a.Data1 < b.Data1) return true;
|
||||||
@ -136,6 +192,17 @@ protected:
|
|||||||
typedef std::set<GUID, less_guid> guidset;
|
typedef std::set<GUID, less_guid> guidset;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
///
|
||||||
|
/// Creates a list control for ETW log display
|
||||||
|
///
|
||||||
|
/// \param[in] parent Parent window. Must not be \c NULL.
|
||||||
|
/// \param[in] id Window identifier. The value \c wxID_ANY indicates a default value.
|
||||||
|
/// \param[in] pos Window position. If \c wxDefaultPosition is specified then a default position is chosen.
|
||||||
|
/// \param[in] size Window size. If \c wxDefaultSize is specified then the window is sized appropriately.
|
||||||
|
/// \param[in] style Window style. See \c wxListCtrl.
|
||||||
|
/// \param[in] validator Window validator
|
||||||
|
/// \param[in] name Window name
|
||||||
|
///
|
||||||
wxETWListCtrl(
|
wxETWListCtrl(
|
||||||
wxWindow *parent,
|
wxWindow *parent,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
@ -144,21 +211,70 @@ public:
|
|||||||
long style = wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_VIRTUAL|wxNO_BORDER,
|
long style = wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_VIRTUAL|wxNO_BORDER,
|
||||||
const wxValidator &validator = wxDefaultValidator,
|
const wxValidator &validator = wxDefaultValidator,
|
||||||
const wxString &name = wxListCtrlNameStr);
|
const wxString &name = wxListCtrlNameStr);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Destructor
|
||||||
|
///
|
||||||
virtual ~wxETWListCtrl();
|
virtual ~wxETWListCtrl();
|
||||||
|
|
||||||
inline bool IsEmpty() const { return m_rec_db.empty(); }
|
///
|
||||||
|
/// Returns true if the list is empty
|
||||||
|
///
|
||||||
|
inline bool IsEmpty() const
|
||||||
|
{
|
||||||
|
return m_rec_db.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Copies selected rows to clipboard
|
||||||
|
///
|
||||||
void CopySelected() const;
|
void CopySelected() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Copies all rows (including hidden ones) to clipboard
|
||||||
|
///
|
||||||
void CopyAll() const;
|
void CopyAll() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Empties the list
|
||||||
|
///
|
||||||
void ClearAll();
|
void ClearAll();
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Selects all rows
|
||||||
|
///
|
||||||
void SelectAll();
|
void SelectAll();
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Clears row selection
|
||||||
|
///
|
||||||
void SelectNone();
|
void SelectNone();
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Rebuilds the list
|
||||||
|
///
|
||||||
void RebuildItems();
|
void RebuildItems();
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Checks if given ETW source is enabled
|
||||||
|
///
|
||||||
|
/// \param[in] guid GUID of ETW source
|
||||||
|
///
|
||||||
|
/// \returns
|
||||||
|
/// - \c true if ETW source with \p guid GUID is enabled;
|
||||||
|
/// - \c false otherwise.
|
||||||
|
///
|
||||||
inline bool IsSourceEnabled(const GUID &guid) const
|
inline bool IsSourceEnabled(const GUID &guid) const
|
||||||
{
|
{
|
||||||
return m_sources.find(guid) != m_sources.end();
|
return m_sources.find(guid) != m_sources.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Enables/Disables ETW source
|
||||||
|
///
|
||||||
|
/// \param[in] guid GUID of ETW source
|
||||||
|
/// \param[in] enable \c true to enable, \c false to disable
|
||||||
|
///
|
||||||
inline void EnableSource(const GUID &guid, bool enable = true)
|
inline void EnableSource(const GUID &guid, bool enable = true)
|
||||||
{
|
{
|
||||||
auto s = m_sources.find(guid);
|
auto s = m_sources.find(guid);
|
||||||
@ -178,6 +294,7 @@ public:
|
|||||||
friend class wxPersistentETWListCtrl; // Allow saving/restoring window state.
|
friend class wxPersistentETWListCtrl; // Allow saving/restoring window state.
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/// \cond internal
|
||||||
bool IsVisible(const EVENT_RECORD &rec) const;
|
bool IsVisible(const EVENT_RECORD &rec) const;
|
||||||
void FormatRow(const winstd::event_rec &rec, std::string &rowA, std::wstring &rowW) const;
|
void FormatRow(const winstd::event_rec &rec, std::string &rowA, std::wstring &rowW) const;
|
||||||
bool CopyToClipboard(const std::string &dataA, const std::wstring &dataW) const;
|
bool CopyToClipboard(const std::string &dataA, const std::wstring &dataW) const;
|
||||||
@ -186,6 +303,8 @@ protected:
|
|||||||
virtual wxString OnGetItemText(long item, long column) const;
|
virtual wxString OnGetItemText(long item, long column) const;
|
||||||
virtual wxString OnGetItemText(const winstd::event_rec &rec, long column) const;
|
virtual wxString OnGetItemText(const winstd::event_rec &rec, long column) const;
|
||||||
void OnETWEvent(wxETWEvent& event);
|
void OnETWEvent(wxETWEvent& event);
|
||||||
|
/// \endcond
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -209,18 +328,48 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Supports saving/restoring `wxETWListCtrl` state
|
||||||
|
///
|
||||||
class wxPersistentETWListCtrl : public wxPersistentWindow<wxETWListCtrl>
|
class wxPersistentETWListCtrl : public wxPersistentWindow<wxETWListCtrl>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
///
|
||||||
|
/// Constructor for a persistent window object
|
||||||
|
///
|
||||||
|
/// \param[in] wnd Window this object will save/restore
|
||||||
|
///
|
||||||
wxPersistentETWListCtrl(wxETWListCtrl *wnd);
|
wxPersistentETWListCtrl(wxETWListCtrl *wnd);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns the string uniquely identifying the objects supported by this adapter.
|
||||||
|
///
|
||||||
|
/// \returns This implementation always returns `wxT(wxPERSIST_TLW_KIND)`
|
||||||
|
///
|
||||||
virtual wxString GetKind() const;
|
virtual wxString GetKind() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Saves the object properties
|
||||||
|
///
|
||||||
virtual void Save() const;
|
virtual void Save() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Restores the object properties
|
||||||
|
///
|
||||||
|
/// \returns
|
||||||
|
/// - \c true if the properties were successfully restored;
|
||||||
|
/// - \c false otherwise.
|
||||||
|
///
|
||||||
virtual bool Restore();
|
virtual bool Restore();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Creates persistent window object for `wxETWListCtrl` class window
|
||||||
|
///
|
||||||
inline wxPersistentObject *wxCreatePersistentObject(wxETWListCtrl *wnd)
|
inline wxPersistentObject *wxCreatePersistentObject(wxETWListCtrl *wnd)
|
||||||
{
|
{
|
||||||
return new wxPersistentETWListCtrl(wnd);
|
return new wxPersistentETWListCtrl(wnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
@ -261,6 +261,8 @@ wxEventMonitorFrame::~wxEventMonitorFrame()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// \cond internal
|
||||||
|
|
||||||
void wxEventMonitorFrame::OnExit(wxCommandEvent& event)
|
void wxEventMonitorFrame::OnExit(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
@ -408,6 +410,8 @@ void wxEventMonitorFrame::OnViewToolbar(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// \endcond
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// wxPersistentEventMonitorFrame
|
// wxPersistentEventMonitorFrame
|
||||||
|
@ -18,14 +18,7 @@
|
|||||||
along with GÉANTLink. If not, see <http://www.gnu.org/licenses/>.
|
along with GÉANTLink. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
///
|
|
||||||
/// EventMonitor main frame
|
|
||||||
///
|
|
||||||
class wxEventMonitorFrame;
|
class wxEventMonitorFrame;
|
||||||
|
|
||||||
///
|
|
||||||
/// Supports saving/restoring wxEventMonitorFrame GUI state
|
|
||||||
///
|
|
||||||
class wxPersistentEventMonitorFrame;
|
class wxPersistentEventMonitorFrame;
|
||||||
|
|
||||||
#pragma once;
|
#pragma once;
|
||||||
@ -42,6 +35,12 @@ class wxPersistentEventMonitorFrame;
|
|||||||
#include <WinStd/Win.h>
|
#include <WinStd/Win.h>
|
||||||
|
|
||||||
|
|
||||||
|
/// \addtogroup EventMonitor
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
///
|
||||||
|
/// EventMonitor main frame
|
||||||
|
///
|
||||||
class wxEventMonitorFrame : public wxFrame
|
class wxEventMonitorFrame : public wxFrame
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
@ -62,12 +61,28 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
///
|
||||||
|
/// Creates an EventMonitor frame window
|
||||||
|
///
|
||||||
|
/// \param[in] parent The window parent. This may be \c NULL. If it is non-NULL, the frame will always be displayed on top of the parent window on Windows.
|
||||||
|
/// \param[in] id The window identifier. It may take a value of \c wxID_ANY to indicate a default value.
|
||||||
|
/// \param[in] title The caption to be displayed on the frame's title bar.
|
||||||
|
/// \param[in] pos The window position. The value \c wxDefaultPosition indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform.
|
||||||
|
/// \param[in] size The window size. The value \c wxDefaultSize indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform.
|
||||||
|
/// \param[in] style The window style. See `wxFrame` class description.
|
||||||
|
/// \param[in] name The name of the window. This parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual windows.
|
||||||
|
///
|
||||||
wxEventMonitorFrame(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Event Monitor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(600,400), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("EventMonitor"));
|
wxEventMonitorFrame(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Event Monitor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(600,400), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("EventMonitor"));
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Destructor
|
||||||
|
///
|
||||||
~wxEventMonitorFrame();
|
~wxEventMonitorFrame();
|
||||||
|
|
||||||
friend class wxPersistentEventMonitorFrame;
|
friend class wxPersistentEventMonitorFrame;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/// \cond internal
|
||||||
void OnExit(wxCommandEvent& event);
|
void OnExit(wxCommandEvent& event);
|
||||||
void OnEditCopyUpdate(wxUpdateUIEvent& event);
|
void OnEditCopyUpdate(wxUpdateUIEvent& event);
|
||||||
void OnEditCopy(wxCommandEvent& event);
|
void OnEditCopy(wxCommandEvent& event);
|
||||||
@ -87,8 +102,10 @@ protected:
|
|||||||
void OnViewLevel(wxCommandEvent& event);
|
void OnViewLevel(wxCommandEvent& event);
|
||||||
void OnViewToolbarUpdate(wxUpdateUIEvent& event);
|
void OnViewToolbarUpdate(wxUpdateUIEvent& event);
|
||||||
void OnViewToolbar(wxCommandEvent& event);
|
void OnViewToolbar(wxCommandEvent& event);
|
||||||
|
/// \endcond
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/// \cond internal
|
||||||
wxMenuBar* m_menubar;
|
wxMenuBar* m_menubar;
|
||||||
wxMenu* m_menuProgram;
|
wxMenu* m_menuProgram;
|
||||||
wxMenu* m_menuEdit;
|
wxMenu* m_menuEdit;
|
||||||
@ -114,20 +131,45 @@ protected:
|
|||||||
wxStatusBar* m_statusBar;
|
wxStatusBar* m_statusBar;
|
||||||
wxEventMonitorLogPanel* m_panel;
|
wxEventMonitorLogPanel* m_panel;
|
||||||
wxAuiManager m_mgr;
|
wxAuiManager m_mgr;
|
||||||
|
/// \endcond
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Supports saving/restoring `wxEventMonitorFrame` GUI state
|
||||||
|
///
|
||||||
class wxPersistentEventMonitorFrame : public wxPersistentTLW
|
class wxPersistentEventMonitorFrame : public wxPersistentTLW
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
///
|
||||||
|
/// Constructor for a persistent window object
|
||||||
|
///
|
||||||
|
/// \param[in] wnd Window this object will save/restore
|
||||||
|
///
|
||||||
wxPersistentEventMonitorFrame(wxEventMonitorFrame *wnd);
|
wxPersistentEventMonitorFrame(wxEventMonitorFrame *wnd);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Saves the object properties
|
||||||
|
///
|
||||||
virtual void Save() const;
|
virtual void Save() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Restores the object properties
|
||||||
|
///
|
||||||
|
/// \returns
|
||||||
|
/// - \c true if the properties were successfully restored;
|
||||||
|
/// - \c false otherwise.
|
||||||
|
///
|
||||||
virtual bool Restore();
|
virtual bool Restore();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Creates persistent window object for `wxETWListCtrl` class window
|
||||||
|
///
|
||||||
inline wxPersistentObject *wxCreatePersistentObject(wxEventMonitorFrame *wnd)
|
inline wxPersistentObject *wxCreatePersistentObject(wxEventMonitorFrame *wnd)
|
||||||
{
|
{
|
||||||
return new wxPersistentEventMonitorFrame(wnd);
|
return new wxPersistentEventMonitorFrame(wnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
@ -18,14 +18,7 @@
|
|||||||
along with GÉANTLink. If not, see <http://www.gnu.org/licenses/>.
|
along with GÉANTLink. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
///
|
|
||||||
/// EventMonitor trace log panel
|
|
||||||
///
|
|
||||||
class wxEventMonitorLogPanel;
|
class wxEventMonitorLogPanel;
|
||||||
|
|
||||||
///
|
|
||||||
/// Supports saving/restoring wxEventMonitorLogPanel state
|
|
||||||
///
|
|
||||||
class wxPersistentEventMonitorLogPanel;
|
class wxPersistentEventMonitorLogPanel;
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -34,27 +27,68 @@ class wxPersistentEventMonitorLogPanel;
|
|||||||
#include <wx/persist/window.h>
|
#include <wx/persist/window.h>
|
||||||
|
|
||||||
|
|
||||||
|
/// \addtogroup EventMonitor
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
///
|
||||||
|
/// EventMonitor trace log panel
|
||||||
|
///
|
||||||
class wxEventMonitorLogPanel : public wxEventMonitorLogPanelBase
|
class wxEventMonitorLogPanel : public wxEventMonitorLogPanelBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
///
|
||||||
|
/// Constructs EventMonitor log panel
|
||||||
|
///
|
||||||
|
/// \param[in] parent Parent window. Must not be \c NULL.
|
||||||
|
///
|
||||||
wxEventMonitorLogPanel(wxWindow* parent);
|
wxEventMonitorLogPanel(wxWindow* parent);
|
||||||
|
|
||||||
friend class wxPersistentEventMonitorLogPanel; // Allow saving/restoring window state.
|
friend class wxPersistentEventMonitorLogPanel; // Allow saving/restoring window state.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Supports saving/restoring `wxEventMonitorLogPanel` state
|
||||||
|
///
|
||||||
class wxPersistentEventMonitorLogPanel : public wxPersistentWindow<wxEventMonitorLogPanel>
|
class wxPersistentEventMonitorLogPanel : public wxPersistentWindow<wxEventMonitorLogPanel>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
///
|
||||||
|
/// Constructor for a persistent window object
|
||||||
|
///
|
||||||
|
/// \param[in] wnd Window this object will save/restore
|
||||||
|
///
|
||||||
wxPersistentEventMonitorLogPanel(wxEventMonitorLogPanel *wnd);
|
wxPersistentEventMonitorLogPanel(wxEventMonitorLogPanel *wnd);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns the string uniquely identifying the objects supported by this adapter.
|
||||||
|
///
|
||||||
|
/// \returns This implementation always returns `wxT(wxPERSIST_TLW_KIND)`
|
||||||
|
///
|
||||||
virtual wxString GetKind() const;
|
virtual wxString GetKind() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Saves the object properties
|
||||||
|
///
|
||||||
virtual void Save() const;
|
virtual void Save() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Restores the object properties
|
||||||
|
///
|
||||||
|
/// \returns
|
||||||
|
/// - \c true if the properties were successfully restored;
|
||||||
|
/// - \c false otherwise.
|
||||||
|
///
|
||||||
virtual bool Restore();
|
virtual bool Restore();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Creates persistent window object for `wxEventMonitorLogPanel` class window
|
||||||
|
///
|
||||||
inline wxPersistentObject *wxCreatePersistentObject(wxEventMonitorLogPanel *wnd)
|
inline wxPersistentObject *wxCreatePersistentObject(wxEventMonitorLogPanel *wnd)
|
||||||
{
|
{
|
||||||
return new wxPersistentEventMonitorLogPanel(wnd);
|
return new wxPersistentEventMonitorLogPanel(wnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
@ -39,6 +39,12 @@ namespace eap
|
|||||||
|
|
||||||
namespace eap
|
namespace eap
|
||||||
{
|
{
|
||||||
|
/// \addtogroup EAPBaseConfig
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
///
|
||||||
|
/// PAP configuration
|
||||||
|
///
|
||||||
class config_method_pap : public config_method_with_cred
|
class config_method_pap : public config_method_with_cred
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user