Wide Studio Object Reference

Wide Studio Home
Up to


Class Name

WSCbaseDialog

Specification of methods



onActivate method

Form
void onActivate()
Function
It executes this method when the button: [ok, no, cancel] of the dialog is pushed.
Description
Instead of the event procedure by the WSEV_ACTIVATE trigger, the WSEV_ACTIVATE event can be handled by overloading of this method.
Parameters
None.
Return value
None.
Notice
If needed, overload this method on the sub classes.
Samples
void new_class::onActivate(){
  //do something when the button is pressed.

  //call the method of the parent class.
  old_class::onActivate();
}



getStatus() method

Form
long getStatus()
Function
Returns the state at which button is pushed.
Description
Parameters
None.
Return value
Returns WS_DIALOG_OK if OK is pushed; returns WS_DIALOG_NO if it is NO; returns WS_DIALOG_CANCEL if it is CANCEL;
Notice
None.
Samples
void sample_proc(WSCbase* object){
  WSCbaseDialog* dialog = (WSCbaseDialog*)object->cast("WSCbaseDialog");
  if (dialog == NULL){
    return;
  }
  long status = dialog->getStatus();
  if (status == WS_DIALOG_OK){
    //OK button is pressed.
  }else
  if (status == WS_DIALOG_NO){
    //NO button is pressed.
  }else
  if (status == WS_DIALOG_CANCEL){
    //CANCEL button is pressed.
  }
}



popup() method

Form
long popup()
Function
Pops up the dialog and waits until the button is pushed. Then, it returns which button is pushed.
Description
Parameters
None.
Return value
Returns WS_DIALOG_OK if OK is pushed; returns WS_DIALOG_NO if it is NO; returns WS_DIALOG_CANCEL if it is CANCEL;
Notice
None.
Samples
extern WSCbaseDialog* newdial_000;
void sample_proc(WSCbase* object){
  //pop the dialog up.
  //wait until the dialog is done.
  long result = newdial_000->popup();

  if (result == WS_DIALOG_OK){
    //OK button is pressed.
  }else
  if (result == WS_DIALOG_NO){
    //NO button is pressed.
  }else
  if (result == WS_DIALOG_CANCEL){
    //CANCEL button is pressed.
  }
}


Document Release 3.20

For use with Wide Studio Release 3.20, Spring 2003


Wide Studio Home | Up to

Copyright(C) T. Hirabayashi, 1999-2003 Last modified: February 3, 2003