Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

NDK_XX::NDKMessageBox Class Reference

#include <ndk++.h>

Inheritance diagram for NDK_XX::NDKMessageBox:

NDK_XX::NDKDialogBox NDK_XX::NDKDlgControl NDK_XX::NDKOkCancelBox NDK_XX::NDKYesNoBox NDK_XX::NDKYesNoCancelBox List of all members.

Public Methods

 NDKMessageBox (const string &title, const string &message, int style=info)

Protected Methods

void on_dlg_init ()
 We redefine here so we get called on construction.

void show_message ()

Protected Attributes

string msg
 Prompt the user.


Constructor & Destructor Documentation

NDK_XX::NDKMessageBox::NDKMessageBox const string &    title,
const string &    message,
int    style = info
 

Definition at line 1763 of file ndk++.cc.

01764     : NDKDialogBox(10000,title,LINES-15,COLS-30,7,15,style),msg(message)
01765 {
01766 }


Member Function Documentation

void NDK_XX::NDKMessageBox::on_dlg_init   [protected, virtual]
 

We redefine here so we get called on construction.

Reimplemented from NDK_XX::NDKDialogBox.

Definition at line 1770 of file ndk++.cc.

References NDK_XX::NDKDialogBox::create_buttons(), NDK_XX::NDKDialogBox::pBtnCancel, NDK_XX::NDKDialogBox::set_focus_to(), and show_message().

01771 {   
01772     show_message();
01773     create_buttons(); 
01774     set_focus_to(pBtnCancel);
01775 }

void NDK_XX::NDKMessageBox::show_message   [protected]
 

Definition at line 1779 of file ndk++.cc.

References msg.

Referenced by on_dlg_init().

01780 {
01781     int max_row_size = width()-4;
01782     int rows = msg.size()/max_row_size;
01783     if(msg.size()%max_row_size)
01784         rows++;
01785     
01786     for(int i=0;i<rows && i< maxy()-3;i++){
01787         string what(msg.substr(max_row_size*i,max_row_size));
01788         centertext(i+2,what.c_str());
01789     }
01790 }


Member Data Documentation

string NDK_XX::NDKMessageBox::msg [protected]
 

Prompt the user.

Definition at line 1242 of file ndk++.h.

Referenced by show_message().


The documentation for this class was generated from the following files:
Generated on Tue Aug 27 10:49:47 2002 by doxygen1.2.17