CFORMDLG Class Reference

#include <mi32/cformdlg.h>

List of all members.

Public Member Functions

 CFORMDLG ()
int Create (Widget parent, char *title, char *help, BUTTONITEM *buttons=NULL, UINT32 flags=0)
int Create (Widget parent, const char *title, const char *help, BUTTONITEM *buttons=NULL, UINT32 flags=0)
virtual int DoModal ()
void EndDialog (int result=0)
Widget GetCancelButton () const
Widget GetMainForm () const
Widget GetOKButton () const
virtual bool IsModal () const
void OKButtonDisable () const
void OKButtonEnable (bool enable=true) const
virtual void OnCancel ()
virtual void OnClose ()
virtual int OnInitDialog (Widget form)=0
virtual void OnOK ()
virtual ~CFORMDLG ()


Detailed Description

Deprecated:
Use MGUI::DLGBASE instead

Definition at line 43 of file cformdlg.h.


Constructor & Destructor Documentation

CFORMDLG::CFORMDLG  ) 
 

CONSTRUCTOR.

virtual CFORMDLG::~CFORMDLG  )  [virtual]
 

DESTRUCTOR.


Member Function Documentation

int CFORMDLG::Create Widget  parent,
char *  title,
char *  help,
BUTTONITEM buttons = NULL,
UINT32  flags = 0
 

For backwards comapt. Should go away...

Parameters:
parent  Parent widget for dialog
title  title string (localized via tntxres.txt)
help  help tag
buttons  Buttons for bottom of window. NULL to use default ok/cancel/help

int CFORMDLG::Create Widget  parent,
const char *  title,
const char *  help,
BUTTONITEM buttons = NULL,
UINT32  flags = 0
 

Create the dialog.

Returns 0 or an error code. If you don't want a button row at the bottom, pass in a BUTTONITEM array in which the first item has a NULL label.

Parameters:
parent  Parent widget for dialog
title  title string (localized via tntxres.txt)
help  help tag
buttons  Buttons for bottom of window. NULL to use default ok/cancel/help

virtual int CFORMDLG::DoModal  )  [virtual]
 

Manage dialog and wait for it to close.

Returns 0 or EUserCancel I made this virtual because the MFC one is. I'm not sure why you'd want to override it, but you can.

void CFORMDLG::EndDialog int  result = 0  ) 
 

Closes the dialog.

Parameters:
result  value to return to the caller of DoModal()

Widget CFORMDLG::GetCancelButton  )  const [inline]
 

Return the Cancel button's widget.

Definition at line 99 of file cformdlg.h.

Widget CFORMDLG::GetMainForm  )  const [inline]
 

Return the main form.

Definition at line 87 of file cformdlg.h.

Widget CFORMDLG::GetOKButton  )  const [inline]
 

Return the OK button's widget.

Definition at line 93 of file cformdlg.h.

virtual bool CFORMDLG::IsModal  )  const [inline, virtual]
 

Function to determine if the dialog is modal or not.

Default is modal. If you want your derived class to be a non-modal dialog, override this function and have it return false.

Definition at line 109 of file cformdlg.h.

void CFORMDLG::OKButtonDisable  )  const [inline]
 

Disable OK button.

Definition at line 115 of file cformdlg.h.

void CFORMDLG::OKButtonEnable bool  enable = true  )  const
 

Enable (or disable) the OK button, if any.

Default is to enable, but takes an optional parameter which could be the result of an expression. true enables, false disables. Doesn't actually modify the class, just a Widget it holds.

virtual void CFORMDLG::OnCancel  )  [virtual]
 

Called when user hits Cancel (if you used default buttons) or the "X" on title bar.

Default calls EndDialog(EUserCancel). If you override it, your version should call DFORMDLG::OnCancel().

virtual void CFORMDLG::OnClose  )  [virtual]
 

Called when dialog pops down.

Default does nothing.

virtual int CFORMDLG::OnInitDialog Widget  form  )  [pure virtual]
 

Function called by Create to create the contents.

Derived class MUST implement this. Function should return 0 or an error code. If returns < 0, create will return the error value too. The form passed in is already attached to the dialog on top, left and right, and to a separator above the button row on bottom

Parameters:
form  For to create contents in

virtual void CFORMDLG::OnOK  )  [virtual]
 

Called when user hits OK (if you used default buttons).

Default calls EndDialog(0). If you override it, your version should call DFORMDLG::OnOK().


The documentation for this class was generated from the following file:
Generated on Wed May 31 15:28:19 2006 for TNTsdk by  doxygen 1.3.8-20040913