improve doxygen documentation of PMsgBox.*

This commit is contained in:
2025-11-14 07:57:06 +01:00
parent 40a797c0da
commit a40c431396
2 changed files with 123 additions and 4 deletions

View File

@@ -38,14 +38,67 @@
#include <TGListBox.h>
#include <TList.h>
//--------------------------------------------------------------------------
/**
* \brief GUI message box for displaying error messages and warnings.
*
* PMsgBox is a ROOT-based GUI window that displays multi-line error messages
* in a scrollable list box. It provides a simple, modal-like interface for
* showing diagnostic information to the user.
*
* The message box:
* - Parses multi-line error messages (separated by newline characters)
* - Displays each line in a scrollable list box
* - Provides an Exit button that terminates the application
* - Uses ROOT's TGMainFrame for window management
*
* Typical use case:
* \code
* std::string errorMsg = "Error parsing file:\nLine 42: Invalid syntax\nAborting...";
* PMsgBox msgBox(errorMsg, gClient->GetRoot(), 640, 240);
* \endcode
*
* \see TGMainFrame for the base class
*/
class PMsgBox : public TGMainFrame {
private:
TGListBox *fListBox;
TGListBox *fListBox; ///< List box widget displaying error message lines
public:
//-----------------------------------------------------------------------
/**
* \brief Constructor that creates and displays the message box window.
*
* Creates a GUI window containing:
* - A scrollable list box with the parsed error message
* - An Exit button that terminates the application
*
* The error message is split at newline characters, and each line is
* displayed as a separate entry in the list box.
*
* \param errMsg Multi-line error message string (lines separated by '\n')
* \param p Parent window (typically gClient->GetRoot())
* \param w Window width in pixels
* \param h Window height in pixels
*/
PMsgBox(const std::string errMsg, const TGWindow *p, UInt_t w, UInt_t h);
//-----------------------------------------------------------------------
/**
* \brief Destructor that cleans up the message box resources.
*/
~PMsgBox() override;
//-----------------------------------------------------------------------
/**
* \brief Exit button callback that terminates the application.
*
* This method is called when the user clicks the Exit button.
* It terminates the entire application with exit code 0.
*
* \note This will exit the entire application, not just close the window
*/
void DoExit();
ClassDefOverride(PMsgBox, 0)