Ember
Loading...
Searching...
No Matches
Ember::Monitor::ConnectionPanel Class Reference

UI panel for managing TCP server connection, showing server/client status, port input, start/stop/disconnect buttons. More...

#include <ConnectionPanel.h>

Inheritance diagram for Ember::Monitor::ConnectionPanel:
EmberUI::Panel IPanel

Public Member Functions

 ConnectionPanel (wxWindow *parent, TCPServer *server)
 ~ConnectionPanel () override=default
void UpdateStatus ()
 Refreshes server and client status display.
void SetTreeStatus (const wxString &status)
 Sets the tree status text shown in the panel.
void SetTreeId (const wxString &treeId)
 Sets the tree ID text shown in the panel.
Public Member Functions inherited from EmberUI::Panel
 Panel (wxWindow *parent, const wxString &name="Panel", long style=wxTAB_TRAVERSAL)
 Constructs the panel with optional name and style.
virtual ~Panel ()
wxPanel * GetPanel () override
 Returns this panel as wxPanel pointer.
wxString GetTitle () const override
 Returns the panel title.
wxString GetPanelType () const override
 Returns the panel type identifier.
void Initialize () override
 Initializes the panel layout and appearance.
void Refresh () override
 Refreshes panel content.
void OnActivated () override
 Called when the panel is activated.
void OnDeactivated () override
 Called when the panel is deactivated.
void Cleanup () override
 Cleans up panel resources.
bool IsValid () const override
 Returns true if the panel has been initialized.
wxString SerializeState () const override
 Serializes panel state to a string.
void DeserializeState (const wxString &state) override
 Restores panel state from a serialized string.
bool HasUnsavedChanges () const override
 Returns true if there are unsaved changes.
bool Save () override
 Saves panel state; returns true on success.
bool SupportsOperation (const wxString &operation) const override
 Returns true if the panel supports the given operation.
bool ExecuteOperation (const wxString &operation, const wxString &parameter="") override
 Executes a named operation with optional parameter.
wxString GetName () const override
 Returns the panel name.
void SetName (const wxString &name) override
 Sets the panel name.
void SetTitle (const wxString &title)
 Sets the panel title.
void SetPanelType (const wxString &type)
 Sets the panel type identifier.
Public Member Functions inherited from IPanel
virtual ~IPanel ()=default

Private Member Functions

void CreateUI ()
void OnStartStop (wxCommandEvent &event)
void OnDisconnect (wxCommandEvent &event)
 wxDECLARE_EVENT_TABLE ()

Private Attributes

TCPServerm_server
wxStaticText * m_serverStatusLabel
wxTextCtrl * m_portInput
wxButton * m_startStopButton
wxStaticText * m_clientStatusLabel
wxStaticText * m_clientAddressLabel
wxStaticText * m_clientNameLabel
wxStaticText * m_treeIdLabel
wxButton * m_disconnectButton

Additional Inherited Members

Protected Member Functions inherited from EmberUI::Panel
virtual void CreateLayout ()
 Hook: creates the panel layout. Override to customize.
virtual void ApplyTheme ()
 Hook: applies theme colors and fonts. Override to customize.
virtual void UpdateContent ()
 Hook: updates displayed content. Override to refresh data.
virtual void HandleActivation ()
 Hook: handles panel activation. Override to customize.
virtual void HandleDeactivation ()
 Hook: handles panel deactivation. Override to customize.
virtual bool ValidateState () const
 Hook: validates panel state; returns true if valid.
void MarkChanged ()
 Marks the panel as having unsaved changes.
void MarkSaved ()
 Clears the unsaved-changes flag.
wxSizer * GetMainSizer () const
 Returns the main sizer for layout.
void SetMainSizer (wxSizer *sizer)
 Sets the main sizer.
virtual void OnPanelSize (wxSizeEvent &event)
 Hook: handles panel resize events.
virtual void OnPanelPaint (wxPaintEvent &event)
 Hook: handles panel paint events.

Detailed Description

UI panel for managing TCP server connection, showing server/client status, port input, start/stop/disconnect buttons.

Definition at line 13 of file ConnectionPanel.h.

Constructor & Destructor Documentation

◆ ConnectionPanel()

Ember::Monitor::ConnectionPanel::ConnectionPanel ( wxWindow * parent,
TCPServer * server )

◆ ~ConnectionPanel()

Ember::Monitor::ConnectionPanel::~ConnectionPanel ( )
overridedefault

Member Function Documentation

◆ CreateUI()

void Ember::Monitor::ConnectionPanel::CreateUI ( )
private

Definition at line 18 of file ConnectionPanel.cpp.

◆ OnDisconnect()

void Ember::Monitor::ConnectionPanel::OnDisconnect ( wxCommandEvent & event)
private

Definition at line 133 of file ConnectionPanel.cpp.

◆ OnStartStop()

void Ember::Monitor::ConnectionPanel::OnStartStop ( wxCommandEvent & event)
private

Definition at line 114 of file ConnectionPanel.cpp.

◆ SetTreeId()

void Ember::Monitor::ConnectionPanel::SetTreeId ( const wxString & treeId)

Sets the tree ID text shown in the panel.

Definition at line 144 of file ConnectionPanel.cpp.

◆ SetTreeStatus()

void Ember::Monitor::ConnectionPanel::SetTreeStatus ( const wxString & status)

Sets the tree status text shown in the panel.

Definition at line 138 of file ConnectionPanel.cpp.

◆ UpdateStatus()

void Ember::Monitor::ConnectionPanel::UpdateStatus ( )

Refreshes server and client status display.

Definition at line 80 of file ConnectionPanel.cpp.

◆ wxDECLARE_EVENT_TABLE()

Ember::Monitor::ConnectionPanel::wxDECLARE_EVENT_TABLE ( )
private

Member Data Documentation

◆ m_clientAddressLabel

wxStaticText* Ember::Monitor::ConnectionPanel::m_clientAddressLabel
private

Definition at line 38 of file ConnectionPanel.h.

◆ m_clientNameLabel

wxStaticText* Ember::Monitor::ConnectionPanel::m_clientNameLabel
private

Definition at line 39 of file ConnectionPanel.h.

◆ m_clientStatusLabel

wxStaticText* Ember::Monitor::ConnectionPanel::m_clientStatusLabel
private

Definition at line 37 of file ConnectionPanel.h.

◆ m_disconnectButton

wxButton* Ember::Monitor::ConnectionPanel::m_disconnectButton
private

Definition at line 41 of file ConnectionPanel.h.

◆ m_portInput

wxTextCtrl* Ember::Monitor::ConnectionPanel::m_portInput
private

Definition at line 34 of file ConnectionPanel.h.

◆ m_server

TCPServer* Ember::Monitor::ConnectionPanel::m_server
private

Definition at line 31 of file ConnectionPanel.h.

◆ m_serverStatusLabel

wxStaticText* Ember::Monitor::ConnectionPanel::m_serverStatusLabel
private

Definition at line 33 of file ConnectionPanel.h.

◆ m_startStopButton

wxButton* Ember::Monitor::ConnectionPanel::m_startStopButton
private

Definition at line 35 of file ConnectionPanel.h.

◆ m_treeIdLabel

wxStaticText* Ember::Monitor::ConnectionPanel::m_treeIdLabel
private

Definition at line 40 of file ConnectionPanel.h.


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