PlainBaseDialog is the base class of all dialog classes in the ooDialog framework. It implements methods that are common to every dialog. PlainBaseDialog should be considered an abstract class. Although, a programmer could instantiate a new PlainBaseDialog object, the class does not implement all the methods that are needed to execute a dialog. Therefore, not much can be done with a simple PlainBaseDialog object. The ooDialog programmer uses subclasses of PlainBaseDialog to actually create and execute a real dialog.
The PlainBaseDialog inherits from the WindowBase mixin class. The WindowBase mixin class implements methods that are common to all windows. Since both dialogs and dialog controls are windows, the DialogControl class also inherits from WindowBase.
The PlainUserDialog class subclasses from PlainBaseDialog class and provides all the methods that normally are required to execute a dialog that is either created dynamically or loaded from a resource script (.RC). Its purpose is to provide a simpler class that can be used for ordinary user interfaces, like the standard dialogs. The ooDialog programmer can subclass from the PlainUserDialog to produce straighforward, uncomplicated user interfaces.
The more advanced dialog classes, ResDialog, RcDialog, UserDialog, subclass the BaseDialog class. The BaseDialog class subclasses PlainBaseDialog, and like PlainBaseDialog should be considered an abstract class. BaseDialog inherits from the WindowExtensions and DialogExtensions mixin classes. These classes implement methods that cover asynchronous dialog execution, scroll bar support, resizing and repositioning, bitmaps, graphics (device context related methods), scrolling text, and menus (action bars). The ResDialog, RcDialog, UserDialog classes, and their subclasses, allow the programmer to produce very sophisticated graphical user interfaces.
Historically, the reason for providing the simpler PlainUserDialog class was to have a smaller package that required less system resources for ordinary user interfaces like the standard dialogs. That reason is probably not as valid in modern times as it was when ooDialog was being developed to run on Windows 3.1.
PlainUserDialog is a limited version of the UserDialog class. Use ::requires "OODPLAIN.CLS" in your script to get access to the PlainUserDialog class.
Note: If you use ::requires "OODWIN32.CLS" you do not need to specify the ::requires "OODIALOG.CLS" directive because OODIALOG.CLS is included from OODWIN32.CLS.
Note: If you use ::requires "OODIALOG.CLS" you do not need to specify the ::requires "OODPLAIN.CLS" directive because OODPLAIN.CLS is included from OODIALOG.CLS.
The following list briefly describes the attributes of the PlainUserDialog.
Instances of the PlainUserDialog class have the following attributes:
Automatic data field detection on (=1, default) or off (=0). For the UserDialog subclass the default is off and Connect... methods or a resource script are usually used.
A queue containing the methods that are started concurrently before the execution of the dialog
A directory string storing the numerical values assigned to symbolic IDs (#define-statements in the resource script)
Protected attribute to store connections between dialog items and the attributes of the dialog instance
A handle to the dialog
0 if dialog is executing, 1 if terminated with OK, and 2 if canceled
After the Init method has finished executing the value of the attribtute is 0 if no errors were detected during initialization, otherwise its value is non-zero. After instantiating a new dialog object, the InitCode attribute should be checked. If its value is not 0 then there was some problem initializing the object. The programmer should treat this as an error condition and not expect that the underlying Windows dialog can be created successfully.
After the dialog is finished, the attribute will be 1 if the user terminated the dialog with the Ok button. Its value will be 2 if the user canceled the dialog.
Protected attribute that is true (=1) if a stem variable was passed to init
The following table lists all the class methods, attributes, and instance methods of the PlainUserDialog class with links to the full documentation. The individual methods are documented in BaseDialog Class or UserDialog Class.
Table 3-1. PlainUserDialog Class Methods
| Item... | ...description |
|---|---|
| Class Method | Link |
| getFontName (Class method) | getFontName |
| getFontSize (Class method) | getFontSize |
| setDefaultFont (Class method) | setDefaultFont |
| Attributes | Link |
| fontName (Attribute) | fontName |
| fontSize (Attribute) | fontSize |
| Instance Methods | Link |
| AddAttribute | AddAttribute |
| addBitmapButton | addBitmapButton |
| addBlackFrame | addBlackFrame |
| addBlackRect | addBlackRect |
| addButton | addButton |
| addButtonGroup | addButtonGroup |
| addCheckBox | addCheckBox |
| addCheckBoxStem | addCheckBoxStem |
| addCheckGroup | addCheckGroup |
| addComboBox | addComboBox |
| AddComboEntry | AddComboEntry |
| addComboInput | addComboInput |
| addEntryLine | addEntryLine |
| addEtchedFrame | addEtchedFrame |
| addGrayFrame | addGreyFrame |
| addGrayRect | addGrayRect |
| addGroupBox | addGroupBox |
| addEtchedHorizontal | addEtchedHorizontal |
| addIcon | addIcon |
| addInput | addInput |
| addInputGroup | addInputGroup |
| addInputStem | addInputStem |
| addListBox | addListBox |
| AddListEntry | AddListEntry |
| AddMenuItem | AddMenuItem |
| AddMenuSeparator | AddMenuSeparator |
| addOkCancelLeftBottom | addOkCancelLeftBottom |
| addOkCancelLeftTop | addOkCancelLeftTop |
| addOkCancelRightBottom | addOkCancelRightBottom |
| addOkCancelRightTop | addOkCancelRightTop |
| addPasswordLine | addPasswordLine |
| AddPopupMenu | AddPopupMenu |
| addRadioButton | addRadioButton |
| addRadioGroup | addRadioGroup |
| addRadioStem | addRadioStem |
| addScrollBar | addScrollBar |
| addText | addText |
| addUserMsg | addUserMsg |
| addEtchedVertical | addEtchedVertical |
| addWhiteFrame | addWhiteFrame |
| addWhiteRect | addWhiteRect |
| AutoDetection | AutoDetection |
| Cancel | Cancel |
| Center | Center |
| ChangeComboEntry | ChangeComboEntry |
| ChangeListEntry | ChangeListEntry |
| ClearMessages | ClearMessages |
| ComboAddDirectory | ComboAddDirectory |
| ComboDrop | ComboDrop |
| ConnectButton | ConnectButton |
| ConnectCheckBox | ConnectCheckBox |
| connectComboBox | connectComboBox |
| ConnectControl | ConnectControl |
| ConnectEntryLine | ConnectEntryLine |
| ConnectList | ConnectList |
| ConnectListBox | ConnectListBox |
| ConnectListLeftDoubleClick | ConnectListLeftDoubleClick |
| ConnectMultiListBox | ConnectMultiListBox |
| ConnectRadioButton | ConnectRadioButton |
| Create | Create |
| CreateCenter | CreateCenter |
| CreateMenu | CreateMenu |
| DefineDialog | DefineDialog |
| DeInstall | DeInstall |
| DeleteComboEntry | DeleteComboEntry |
| DeleteListEntry | DeleteListEntry |
| Disable | Disable |
| DisableItem | DisableItem |
| Enable | Enable |
| EnableItem | EnableItem |
| Execute | Execute |
| FindComboEntry | FindComboEntry |
| FindListEntry | FindListEntry |
| FocusItem | FocusItem |
| Get | Get |
| GetAttrib | GetAttrib |
| GetButtonRect | GetButtonRect |
| GetCheckBox | GetCheckBox |
| GetComboEntry | GetComboEntry |
| GetComboItems | GetComboItems |
| GetComboLine | GetComboLine |
| GetCurrentComboIndex | GetCurrentComboIndex |
| GetCurrentListIndex | GetCurrentListIndex |
| GetData | GetData |
| GetDataStem | GetDataStem |
| GetEntryLine | GetEntryLine |
| getExStyleRaw | getExStyleRaw |
| GetID | GetID |
| GetItem | GetItem |
| GetListEntry | GetListEntry |
| GetListItems | GetListItems |
| GetListLine | GetListLine |
| GetMultiList | GetMultiList |
| GetPos | GetPos |
| GetRadioButton | GetRadioButton |
| GetSize | GetSize |
| getStyleRaw | getStyleRaw |
| getTextSize (deprecated) | getTextSize |
| getTextSizeDlg | getTextSizeDlg |
| GetValue | GetValue |
| HandleMessages | HandleMessages |
| Help | Help |
| Hide | Hide |
| HideItem | HideItem |
| HideWindow | HideWindow |
| Init | Init |
| InitAutoDetection | InitAutoDetection |
| InitDialog | InitDialog |
| InsertComboEntry | InsertComboEntry |
| InsertListEntry | InsertListEntry |
| IsDialogActive | IsDialogActive |
| ItemTitle | ItemTitle |
| Leaving | Leaving |
| ListAddDirectory | ListAddDirectory |
| ListDrop | ListDrop |
| Load | Load |
| LoadFrame | LoadFrame |
| LoadItems | LoadItems |
| LoadMenu | LoadMenu |
| Move | Move |
| NoAutoDetection | NoAutoDetection |
| OK | OK |
| Resize | Resize |
| Run | Run |
| SetAttrib | SetAttrib |
| SetCheckBox | SetCheckBox |
| SetComboLine | SetComboLine |
| SetCurrentComboIndex | SetCurrentComboIndex |
| SetCurrentListIndex | SetCurrentListIndex |
| SetData | SetData |
| SetDataStem | SetDataStem |
| SetEntryLine | SetEntryLine |
| SetListLine | SetListLine |
| SetListTabulators | SetListTabulators |
| SetMenu | SetMenu |
| SetMultiList | SetMultiList |
| SetRadioButton | SetRadioButton |
| SetStaticText | SetStaticText |
| SetTitle | SetTitle |
| SetValue | SetValue |
| SetWindowTitle | SetWindowTitle |
| Show | Show |
| ShowItem | ShowItem |
| ShowWindow | ShowWindow |
| StartIt | StartIt |
| StopIt | StopIt |
| Title | Title |
| Title= | Title= |
| Update | Update |
| Validate | Validate |