Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > af7a4b7f1ee5a4a084c41b9005da5527 > files > 1523

libfox1.1_46-devel-1.1.46-1mdk.i586.rpm

<html>
<head>
<link rel="stylesheet" href="page.css" type="text/css">
<title>fox-toolkit.org - Documentation</title>
</head>
<body bgcolor=#ffffff link=#990033 vlink=#990033 alink=#990033 text=#000000>
<font face='verdana,sans-serif' size=2 >

<!---- TOPIC TITLE WITH LOGO--->
<table border=0 cellpadding= cellspacing=2 width=100% ><tr><td><a href='http://www.fox-toolkit.org/doc.html'><img src='../art/foxlogo_small.jpg' border=0></a></td><td width=100% valign=bottom><font face='verdana,sans-serif' size=2 ><b>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a>
<br><img src='../art/line.gif' width=100% height=1></b></font></td></tr></table>
<p>
<!--- TOPIC TITLE WITH LOGO --->
<!-- Generated by Doxygen 1.3.3 -->
<h1>FXMessageBox.h</h1><div class="fragment"><pre>00001 <span class="comment">/********************************************************************************</span>
00002 <span class="comment">*                                                                               *</span>
00003 <span class="comment">*                         M e s s a g e   B o x e s                             *</span>
00004 <span class="comment">*                                                                               *</span>
00005 <span class="comment">*********************************************************************************</span>
00006 <span class="comment">* Copyright (C) 1997,2004 by Jeroen van der Zijp.   All Rights Reserved.        *</span>
00007 <span class="comment">*********************************************************************************</span>
00008 <span class="comment">* This library is free software; you can redistribute it and/or                 *</span>
00009 <span class="comment">* modify it under the terms of the GNU Lesser General Public                    *</span>
00010 <span class="comment">* License as published by the Free Software Foundation; either                  *</span>
00011 <span class="comment">* version 2.1 of the License, or (at your option) any later version.            *</span>
00012 <span class="comment">*                                                                               *</span>
00013 <span class="comment">* This library is distributed in the hope that it will be useful,               *</span>
00014 <span class="comment">* but WITHOUT ANY WARRANTY; without even the implied warranty of                *</span>
00015 <span class="comment">* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *</span>
00016 <span class="comment">* Lesser General Public License for more details.                               *</span>
00017 <span class="comment">*                                                                               *</span>
00018 <span class="comment">* You should have received a copy of the GNU Lesser General Public              *</span>
00019 <span class="comment">* License along with this library; if not, write to the Free Software           *</span>
00020 <span class="comment">* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *</span>
00021 <span class="comment">*********************************************************************************</span>
00022 <span class="comment">* $Id: FXMessageBox.h,v 1.23 2004/02/08 17:17:34 fox Exp $                      *</span>
00023 <span class="comment">********************************************************************************/</span>
00024 <span class="preprocessor">#ifndef FXMESSAGEBOX_H</span>
00025 <span class="preprocessor"></span><span class="preprocessor">#define FXMESSAGEBOX_H</span>
00026 <span class="preprocessor"></span>
00027 <span class="preprocessor">#ifndef FXDIALOGBOX_H</span>
00028 <span class="preprocessor"></span><span class="preprocessor">#include "FXDialogBox.h"</span>
00029 <span class="preprocessor">#endif</span>
00030 <span class="preprocessor"></span>
00031 <span class="keyword">namespace </span>FX {
00032 
00033 
00034 <span class="comment">// Message box buttons</span>
00035 <span class="keyword">enum</span> {
00036   <a class="code" href="group__FXMessageBox__0.html#a0a1895">MBOX_OK</a>                 = 0x10000000, <span class="comment">/// Message box has a only an OK button</span>
00037 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__0.html#a0a1896">MBOX_OK_CANCEL</a>          = 0x20000000, <span class="comment">/// Message box has OK and CANCEL buttons</span>
00038 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__0.html#a0a1897">MBOX_YES_NO</a>             = 0x30000000, <span class="comment">/// Message box has YES and NO buttons</span>
00039 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__0.html#a0a1898">MBOX_YES_NO_CANCEL</a>      = 0x40000000, <span class="comment">/// Message box has YES, NO, and CANCEL buttons</span>
00040 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__0.html#a0a1899">MBOX_QUIT_CANCEL</a>        = 0x50000000, <span class="comment">/// Message box has QUIT and CANCEL buttons</span>
00041 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__0.html#a0a1900">MBOX_QUIT_SAVE_CANCEL</a>   = 0x60000000, <span class="comment">/// Message box has QUIT, SAVE, and CANCEL buttons</span>
00042 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__0.html#a0a1901">MBOX_SKIP_SKIPALL_CANCEL</a> =0x70000000  <span class="comment">/// Message box has SKIP, SKIP ALL, and CANCEL buttons</span>
00043 <span class="comment"></span>  };
00044 
00045 
00046 <span class="comment">// Return values</span>
00047 <span class="keyword">enum</span> {
00048   <a class="code" href="group__FXMessageBox__1.html#a0a1902">MBOX_CLICKED_YES</a>      = 1,            <span class="comment">/// The YES button was clicked</span>
00049 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__1.html#a0a1903">MBOX_CLICKED_NO</a>       = 2,            <span class="comment">/// The NO button was clicked</span>
00050 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__1.html#a0a1904">MBOX_CLICKED_OK</a>       = 3,            <span class="comment">/// The OK button was clicked</span>
00051 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__1.html#a0a1905">MBOX_CLICKED_CANCEL</a>   = 4,            <span class="comment">/// The CANCEL button was clicked</span>
00052 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__1.html#a0a1906">MBOX_CLICKED_QUIT</a>     = 5,            <span class="comment">/// The QUIT button was clicked</span>
00053 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__1.html#a0a1907">MBOX_CLICKED_SAVE</a>     = 6,            <span class="comment">/// The SAVE button was clicked</span>
00054 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__1.html#a0a1908">MBOX_CLICKED_SKIP</a>     = 7,            <span class="comment">/// The SKIP button was clicked</span>
00055 <span class="comment"></span>  <a class="code" href="group__FXMessageBox__1.html#a0a1909">MBOX_CLICKED_SKIPALL</a>  = 8             <span class="comment">/// The SKIP ALL button was clicked</span>
00056 <span class="comment"></span>  };
00057 
00058 <span class="comment"></span>
00059 <span class="comment">/// Message box</span>
00060 <span class="comment"></span><span class="keyword">class </span>FXAPI FXMessageBox : <span class="keyword">public</span> FXDialogBox {
00061   FXDECLARE(FXMessageBox)
00062 <span class="keyword">protected</span>:
00063   FXMessageBox(){}
00064 <span class="keyword">private</span>:
00065   FXMessageBox(<span class="keyword">const</span> FXMessageBox&amp;);
00066   FXMessageBox &amp;operator=(<span class="keyword">const</span> FXMessageBox&amp;);
00067   <span class="keywordtype">void</span> initialize(<span class="keyword">const</span> FXString&amp; text,FXIcon* ic,FXuint whichbuttons);
00068 <span class="keyword">public</span>:
00069   <span class="keywordtype">long</span> onCmdClicked(FXObject*,FXSelector,<span class="keywordtype">void</span>*);
00070   <span class="keywordtype">long</span> onCmdCancel(FXObject*,FXSelector,<span class="keywordtype">void</span>*);
00071 <span class="keyword">public</span>:
00072   <span class="keyword">enum</span>{
<a name="l00073"></a><a class="code" href="classFX_1_1FXMessageBox.html">00073</a>     ID_CLICKED_YES=FXDialogBox::ID_LAST,
00074     ID_CLICKED_NO,
00075     ID_CLICKED_OK,
00076     ID_CLICKED_CANCEL,
00077     ID_CLICKED_QUIT,
00078     ID_CLICKED_SAVE,
00079     ID_CLICKED_SKIP,
00080     ID_CLICKED_SKIPALL,
00081     ID_LAST
00082     };
00083 <span class="keyword">public</span>:
00084 <span class="comment"></span>
00085 <span class="comment">  /// Construct message box with given caption, icon, and message text</span>
00086 <span class="comment"></span>  FXMessageBox(FXWindow* owner,<span class="keyword">const</span> FXString&amp; caption,<span class="keyword">const</span> FXString&amp; text,FXIcon* ic=NULL,FXuint opts=0,FXint x=0,FXint y=0);
00087 <span class="comment"></span>
00088 <span class="comment">  /// Construct free floating message box with given caption, icon, and message text</span>
00089 <span class="comment"></span>  FXMessageBox(FXApp* app,<span class="keyword">const</span> FXString&amp; caption,<span class="keyword">const</span> FXString&amp; text,FXIcon* ic=NULL,FXuint opts=0,FXint x=0,FXint y=0);
00090 <span class="comment"></span>
00091 <span class="comment">  /**</span>
00092 <span class="comment">  * Show a modal error message.</span>
00093 <span class="comment">  * The text message may contain printf-tyle formatting commands.</span>
00094 <span class="comment">  */</span>
00095   <span class="keyword">static</span> FXuint error(FXWindow* owner,FXuint opts,<span class="keyword">const</span> <span class="keywordtype">char</span>* caption,<span class="keyword">const</span> <span class="keywordtype">char</span>* message,...) FX_PRINTF(4,5) ;
00096 <span class="comment"></span>
00097 <span class="comment">  /**</span>
00098 <span class="comment">  * Show modal error message, in free floating window.</span>
00099 <span class="comment">  */</span>
00100   <span class="keyword">static</span> FXuint error(FXApp* app,FXuint opts,<span class="keyword">const</span> <span class="keywordtype">char</span>* caption,<span class="keyword">const</span> <span class="keywordtype">char</span>* message,...) FX_PRINTF(4,5) ;
00101 <span class="comment"></span>
00102 <span class="comment">  /**</span>
00103 <span class="comment">  * Show a modal warning message</span>
00104 <span class="comment">  * The text message may contain printf-tyle formatting commands.</span>
00105 <span class="comment">  */</span>
00106   <span class="keyword">static</span> FXuint warning(FXWindow* owner,FXuint opts,<span class="keyword">const</span> <span class="keywordtype">char</span>* caption,<span class="keyword">const</span> <span class="keywordtype">char</span>* message,...) FX_PRINTF(4,5) ;
00107 <span class="comment"></span>
00108 <span class="comment">  /**</span>
00109 <span class="comment">  * Show modal warning message, in free floating window.</span>
00110 <span class="comment">  */</span>
00111   <span class="keyword">static</span> FXuint warning(FXApp* app,FXuint opts,<span class="keyword">const</span> <span class="keywordtype">char</span>* caption,<span class="keyword">const</span> <span class="keywordtype">char</span>* message,...) FX_PRINTF(4,5) ;
00112 <span class="comment"></span>
00113 <span class="comment">  /**</span>
00114 <span class="comment">  * Show a modal question dialog</span>
00115 <span class="comment">  * The text message may contain printf-tyle formatting commands.</span>
00116 <span class="comment">  */</span>
00117   <span class="keyword">static</span> FXuint question(FXWindow* owner,FXuint opts,<span class="keyword">const</span> <span class="keywordtype">char</span>* caption,<span class="keyword">const</span> <span class="keywordtype">char</span>* message,...) FX_PRINTF(4,5) ;
00118 <span class="comment"></span>
00119 <span class="comment">  /**</span>
00120 <span class="comment">  * Show modal question message, in free floating window.</span>
00121 <span class="comment">  */</span>
00122   <span class="keyword">static</span> FXuint question(FXApp* app,FXuint opts,<span class="keyword">const</span> <span class="keywordtype">char</span>* caption,<span class="keyword">const</span> <span class="keywordtype">char</span>* message,...) FX_PRINTF(4,5) ;
00123 <span class="comment"></span>
00124 <span class="comment">  /**</span>
00125 <span class="comment">  * Show a modal information dialog</span>
00126 <span class="comment">  * The text message may contain printf-tyle formatting commands.</span>
00127 <span class="comment">  */</span>
00128   <span class="keyword">static</span> FXuint information(FXWindow* owner,FXuint opts,<span class="keyword">const</span> <span class="keywordtype">char</span>* caption,<span class="keyword">const</span> <span class="keywordtype">char</span>* message,...) FX_PRINTF(4,5) ;
00129 <span class="comment"></span>
00130 <span class="comment">  /**</span>
00131 <span class="comment">  * Show modal information message, in free floating window.</span>
00132 <span class="comment">  */</span>
00133   <span class="keyword">static</span> FXuint information(FXApp* app,FXuint opts,<span class="keyword">const</span> <span class="keywordtype">char</span>* caption,<span class="keyword">const</span> <span class="keywordtype">char</span>* message,...) FX_PRINTF(4,5) ;
00134 
00135   };
00136 
00137 }
00138 
00139 <span class="preprocessor">#endif</span>
</pre></div></font>

<!--- COPYRIGHT -->
<p>
<table width=100% cellpadding=0 cellspacing=0><tr><td width=100% valign=top id=HEADLINE align=right>
<img src='../art/line.gif' width=100% height=1><font size=-1>
Copyright &copy; 1997-2004 Jeroen van der Zijp</font>
</td></tr></table>
</p>
<!--- COPYRIGHT -->
</body>
</html>