326 lines
18 KiB
HTML
326 lines
18 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.13.2"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>musrfit: PMsgBox Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">musrfit<span id="projectnumber"> 1.9.9</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.13.2 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(0); });
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',false,false,'search.php','Search',true);
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function(){initNavTree('classPMsgBox.html',''); initResizable(true); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pri-attribs">Private Attributes</a> |
|
|
<a href="classPMsgBox-members.html">List of all members</a> </div>
|
|
<div class="headertitle"><div class="title">PMsgBox Class Reference</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>GUI message box for displaying error messages and warnings.
|
|
<a href="#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="PMsgBox_8h_source.html">PMsgBox.h</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for PMsgBox:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="classPMsgBox__inherit__graph.png" border="0" usemap="#aPMsgBox_inherit__map" alt="Inheritance graph"/></div>
|
|
<map name="aPMsgBox_inherit__map" id="aPMsgBox_inherit__map">
|
|
<area shape="rect" title="GUI message box for displaying error messages and warnings." alt="" coords="21,81,97,109"/>
|
|
<area shape="rect" title=" " alt="" coords="5,5,113,33"/>
|
|
<area shape="poly" title=" " alt="" coords="62,49,62,81,56,81,56,49"/>
|
|
</map>
|
|
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
|
|
<div class="dynheader">
|
|
Collaboration diagram for PMsgBox:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="classPMsgBox__coll__graph.png" border="0" usemap="#aPMsgBox_coll__map" alt="Collaboration graph"/></div>
|
|
<map name="aPMsgBox_coll__map" id="aPMsgBox_coll__map">
|
|
<area shape="rect" title="GUI message box for displaying error messages and warnings." alt="" coords="21,81,97,109"/>
|
|
<area shape="rect" title=" " alt="" coords="5,5,113,33"/>
|
|
<area shape="poly" title=" " alt="" coords="62,49,62,81,56,81,56,49"/>
|
|
</map>
|
|
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:aa8cc81377c6f811de7bbceafe31719db" id="r_aa8cc81377c6f811de7bbceafe31719db"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa8cc81377c6f811de7bbceafe31719db">PMsgBox</a> (const std::string errMsg, const TGWindow *p, UInt_t w, UInt_t h)</td></tr>
|
|
<tr class="memdesc:aa8cc81377c6f811de7bbceafe31719db"><td class="mdescLeft"> </td><td class="mdescRight">Constructor that creates and displays the message box window. <br /></td></tr>
|
|
<tr class="separator:aa8cc81377c6f811de7bbceafe31719db"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4ed9b368764130dd43921f350b8b32a8" id="r_a4ed9b368764130dd43921f350b8b32a8"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a4ed9b368764130dd43921f350b8b32a8">~PMsgBox</a> () override</td></tr>
|
|
<tr class="memdesc:a4ed9b368764130dd43921f350b8b32a8"><td class="mdescLeft"> </td><td class="mdescRight">Destructor that cleans up the message box resources. <br /></td></tr>
|
|
<tr class="separator:a4ed9b368764130dd43921f350b8b32a8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a673872db3a414ed1a99c8ab1bda3ccf8" id="r_a673872db3a414ed1a99c8ab1bda3ccf8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a673872db3a414ed1a99c8ab1bda3ccf8">DoExit</a> ()</td></tr>
|
|
<tr class="memdesc:a673872db3a414ed1a99c8ab1bda3ccf8"><td class="mdescLeft"> </td><td class="mdescRight">Exit button callback that terminates the application. <br /></td></tr>
|
|
<tr class="separator:a673872db3a414ed1a99c8ab1bda3ccf8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
|
|
Private Attributes</h2></td></tr>
|
|
<tr class="memitem:a0e97fd5689bbcdcd86afaa702fa8577e" id="r_a0e97fd5689bbcdcd86afaa702fa8577e"><td class="memItemLeft" align="right" valign="top">TGListBox * </td><td class="memItemRight" valign="bottom"><a class="el" href="#a0e97fd5689bbcdcd86afaa702fa8577e">fListBox</a></td></tr>
|
|
<tr class="memdesc:a0e97fd5689bbcdcd86afaa702fa8577e"><td class="mdescLeft"> </td><td class="mdescRight">List box widget displaying error message lines. <br /></td></tr>
|
|
<tr class="separator:a0e97fd5689bbcdcd86afaa702fa8577e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>GUI message box for displaying error messages and warnings. </p>
|
|
<p><a class="el" href="classPMsgBox.html" title="GUI message box for displaying error messages and warnings.">PMsgBox</a> 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.</p>
|
|
<p>The message box:</p><ul>
|
|
<li>Parses multi-line error messages (separated by newline characters)</li>
|
|
<li>Displays each line in a scrollable list box</li>
|
|
<li>Provides an Exit button that terminates the application</li>
|
|
<li>Uses ROOT's TGMainFrame for window management</li>
|
|
</ul>
|
|
<p>Typical use case: </p><div class="fragment"><div class="line">std::string errorMsg = <span class="stringliteral">"Error parsing file:\nLine 42: Invalid syntax\nAborting..."</span>;</div>
|
|
<div class="line"><a class="code hl_function" href="#aa8cc81377c6f811de7bbceafe31719db">PMsgBox</a> msgBox(errorMsg, gClient->GetRoot(), 640, 240);</div>
|
|
<div class="ttc" id="aclassPMsgBox_html_aa8cc81377c6f811de7bbceafe31719db"><div class="ttname"><a href="#aa8cc81377c6f811de7bbceafe31719db">PMsgBox::PMsgBox</a></div><div class="ttdeci">PMsgBox(const std::string errMsg, const TGWindow *p, UInt_t w, UInt_t h)</div><div class="ttdoc">Constructor that creates and displays the message box window.</div><div class="ttdef"><b>Definition</b> <a href="PMsgBox_8cpp_source.html#l00064">PMsgBox.cpp:64</a></div></div>
|
|
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd>TGMainFrame for the base class </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PMsgBox_8h_source.html#l00063">63</a> of file <a class="el" href="PMsgBox_8h_source.html">PMsgBox.h</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="aa8cc81377c6f811de7bbceafe31719db" name="aa8cc81377c6f811de7bbceafe31719db"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa8cc81377c6f811de7bbceafe31719db">◆ </a></span>PMsgBox()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">PMsgBox::PMsgBox </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::string</td> <td class="paramname"><span class="paramname"><em>errMsg</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const TGWindow *</td> <td class="paramname"><span class="paramname"><em>p</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">UInt_t</td> <td class="paramname"><span class="paramname"><em>w</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">UInt_t</td> <td class="paramname"><span class="paramname"><em>h</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Constructor that creates and displays the message box window. </p>
|
|
<p>Constructor that creates and displays the message box GUI.</p>
|
|
<p>Creates a GUI window containing:</p><ul>
|
|
<li>A scrollable list box with the parsed error message</li>
|
|
<li>An Exit button that terminates the application</li>
|
|
</ul>
|
|
<p>The error message is split at newline characters, and each line is displayed as a separate entry in the list box.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">errMsg</td><td>Multi-line error message string (lines separated by '<br />
|
|
') </td></tr>
|
|
<tr><td class="paramname">p</td><td>Parent window (typically gClient->GetRoot()) </td></tr>
|
|
<tr><td class="paramname">w</td><td>Window width in pixels </td></tr>
|
|
<tr><td class="paramname">h</td><td>Window height in pixels</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>This constructor performs the following steps:</p><ol type="1">
|
|
<li>Creates a scrollable list box widget</li>
|
|
<li>Parses the error message string by splitting at newline characters</li>
|
|
<li>Populates the list box with individual message lines</li>
|
|
<li>Creates an Exit button with callback to <a class="el" href="#a673872db3a414ed1a99c8ab1bda3ccf8" title="Exit button callback that terminates the application.">DoExit()</a></li>
|
|
<li>Configures layout and displays the window</li>
|
|
</ol>
|
|
<p>The message parsing algorithm:</p><ul>
|
|
<li>Adds an initial empty line</li>
|
|
<li>Splits the input string at each '<br />
|
|
' character</li>
|
|
<li>Each substring becomes a separate list box entry</li>
|
|
<li>Handles multi-line messages gracefully</li>
|
|
</ul>
|
|
<p>GUI Layout:</p><ul>
|
|
<li>List box: 600x200 pixels, expandable, with 5-pixel margins</li>
|
|
<li>Button frame: Fixed width (150px), contains Exit button</li>
|
|
<li>Window title: "Error Message"</li>
|
|
</ul>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">errMsg</td><td>Multi-line error message string with '<br />
|
|
' separators </td></tr>
|
|
<tr><td class="paramname">p</td><td>Parent window pointer (typically gClient->GetRoot()) </td></tr>
|
|
<tr><td class="paramname">w</td><td>Initial window width in pixels </td></tr>
|
|
<tr><td class="paramname">h</td><td>Initial window height in pixels</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section note"><dt>Note</dt><dd>The window is automatically mapped (displayed) after construction </dd>
|
|
<dd>
|
|
The list box ID is set to 89 (ROOT widget identifier) </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PMsgBox_8cpp_source.html#l00064">64</a> of file <a class="el" href="PMsgBox_8cpp_source.html">PMsgBox.cpp</a>.</p>
|
|
|
|
<p class="reference">References <a class="el" href="PMsgBox_8h_source.html#l00066">fListBox</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4ed9b368764130dd43921f350b8b32a8" name="a4ed9b368764130dd43921f350b8b32a8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4ed9b368764130dd43921f350b8b32a8">◆ </a></span>~PMsgBox()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">PMsgBox::~PMsgBox </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel override">override</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Destructor that cleans up the message box resources. </p>
|
|
<p>The ROOT framework automatically handles cleanup of GUI components (list box, buttons, frames) through the TGMainFrame destructor chain, so no explicit cleanup is required here.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>GUI widgets are managed by ROOT and are automatically deleted when the main frame is destroyed </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PMsgBox_8cpp_source.html#l00115">115</a> of file <a class="el" href="PMsgBox_8cpp_source.html">PMsgBox.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a673872db3a414ed1a99c8ab1bda3ccf8" name="a673872db3a414ed1a99c8ab1bda3ccf8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a673872db3a414ed1a99c8ab1bda3ccf8">◆ </a></span>DoExit()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void PMsgBox::DoExit </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Exit button callback that terminates the application. </p>
|
|
<p>This method is called when the user clicks the Exit button. It terminates the entire application with exit code 0.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>This will exit the entire application, not just close the window</dd></dl>
|
|
<p>This method is invoked when the user clicks the Exit button. It terminates the entire ROOT application with exit code 0, which causes a clean shutdown of the program.</p>
|
|
<p>The method is connected to the Exit button's "Pressed()" signal in the constructor via ROOT's signal/slot mechanism: </p><div class="fragment"><div class="line">exit->Connect(<span class="stringliteral">"Pressed()"</span>, <span class="stringliteral">"PMsgBox"</span>, <span class="keyword">this</span>, <span class="stringliteral">"DoExit()"</span>);</div>
|
|
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>This terminates the entire application, not just the message box window </dd>
|
|
<dd>
|
|
Exit code 0 indicates successful termination</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd>gApplication for ROOT's global application object </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PMsgBox_8cpp_source.html#l00141">141</a> of file <a class="el" href="PMsgBox_8cpp_source.html">PMsgBox.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a id="a0e97fd5689bbcdcd86afaa702fa8577e" name="a0e97fd5689bbcdcd86afaa702fa8577e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0e97fd5689bbcdcd86afaa702fa8577e">◆ </a></span>fListBox</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">TGListBox* PMsgBox::fListBox</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>List box widget displaying error message lines. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PMsgBox_8h_source.html#l00066">66</a> of file <a class="el" href="PMsgBox_8h_source.html">PMsgBox.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="PMsgBox_8cpp_source.html#l00064">PMsgBox()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li>/workspace/LMU/musrfit/src/include/<a class="el" href="PMsgBox_8h_source.html">PMsgBox.h</a></li>
|
|
<li>/workspace/LMU/musrfit/src/classes/<a class="el" href="PMsgBox_8cpp_source.html">PMsgBox.cpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="classPMsgBox.html">PMsgBox</a></li>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|