Chapter 7. PlainUserDialog Class and PlainBaseDialog Class

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). In other words it is a limited version of 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.

UserDialog includes all the methods PlainUserDialog does plus all the methods defined in the DialogExtensions class. These are more specific 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 reason for splitting the functionality into two classes is to provide a smaller package which requires less system resources for ordinary user interfaces like the standard dialogs.

The following table lists all the methods that are provided by the PlainUserDialog class. The individual methods are documented in BaseDialog Class or UserDialog Class.

Attributes:

Instances of the PlainUserDialog class have the following attributes:

AutoDetect

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.

AutomaticMethods

A queue containing the methods that are started concurrently before the execution of the dialog

ConstDir

A directory string storing the numerical values assigned to symbolic IDs (#define-statements in the resource script)

DataConnection

Protected attribute to store connections between dialog items and the attributes of the dialog instance

DlgHandle

A handle to the dialog

Finished

0 if dialog is executing, 1 if terminated with OK, and 2 if canceled

InitCode

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.

UseStem

Protected attribute that is true (=1) if a stem variable was passed to init

Methods:

Instances of the PlainUserDialog class implement the methods listed in PlainUserDialog and PlainBaseDialog Class Methods table.

Table 7-1. PlainUserDialog and PlainBaseDialog Class Methods

Method......on page
AddAttributeAddAttribute
AddBitmapButtonAddBitmapButton
AddBlackFrameAddBlackFrame
AddBlackRectAddBlackRect
AddButtonAddButton
AddButtonGroupAddButtonGroup
AddCheckBoxAddCheckBox
AddCheckBoxStemAddCheckBoxStem
AddCheckGroupAddCheckGroup
AddComboBoxAddComboBox
AddComboEntryAddComboEntry
AddComboInputAddComboInput
AddEntryLineAddEntryLine
AddGrayFrameAddGreyFrame
AddGrayRectAddGrayRect
AddGroupBoxAddGroupBox
AddIconAddIcon
AddInputAddInput
AddInputGroupAddInputGroup
AddInputStemAddInputStem
AddListBoxAddListBox
AddListEntryAddListEntry
AddMenuItemAddMenuItem
AddMenuSeparatorAddMenuSeparator
AddOkCancelLeftBottomAddOkCancelLeftBottom
AddOkCancelLeftTopAddOkCancelLeftTop
AddOkCancelRightBottomAddOkCancelRightBottom
AddOkCancelRightTopAddOkCancelRightTop
AddPasswordLineAddPasswordLine
AddPopupMenuAddPopupMenu
AddRadioButtonAddRadioButton
AddRadioGroupAddRadioGroup
AddRadioStemAddRadioStem
AddScrollBarAddScrollBar
AddTextAddText
AddUserMsgAddUserMsg
AddWhiteFrameAddWhiteFrame
AddWhiteRectAddWhiteRect
AssignWindowAssignWindow
AutoDetectionAutoDetection
CancelCancel
CenterCenter
ChangeComboEntryChangeComboEntry
ChangeListEntryChangeListEntry
ClearMessagesClearMessages
ComboAddDirectoryComboAddDirectory
ComboDropComboDrop
ConnectButtonConnectButton
ConnectCheckBoxConnectCheckBox
ConnectComboBoxConnectComboBox
ConnectControlConnectControl
ConnectEntryLineConnectEntryLine
ConnectListConnectList
ConnectListBoxConnectListBox
ConnectListLeftDoubleClickConnectListLeftDoubleClick
ConnectMultiListBoxConnectMultiListBox
ConnectRadioButtonConnectRadioButton
CreateCreate
CreateCenterCreateCenter
CreateMenuCreateMenu
DefineDialogDefineDialog
DeInstallDeInstall
DeleteComboEntryDeleteComboEntry
DeleteListEntryDeleteListEntry
DisableDisable
DisableItemDisableItem
EnableEnable
EnableItemEnableItem
ExecuteExecute
FindComboEntryFindComboEntry
FindListEntryFindListEntry
FocusItemFocusItem
GetGet
GetAttribGetAttrib
GetButtonRectGetButtonRect
GetCheckBoxGetCheckBox
GetComboEntryGetComboEntry
GetComboItemsGetComboItems
GetComboLineGetComboLine
GetCurrentComboIndexGetCurrentComboIndex
GetCurrentListIndexGetCurrentListIndex
GetDataGetData
GetDataStemGetDataStem
GetEntryLineGetEntryLine
GetIDGetID
GetItemGetItem
GetListEntryGetListEntry
GetListItemsGetListItems
GetListLineGetListLine
GetMultiListGetMultiList
GetPosGetPos
GetRadioButtonGetRadioButton
GetSizeGetSize
GetTextSizeGetTextSize
GetValueGetValue
HandleMessagesHandleMessages
HelpHelp
HideHide
HideItemHideItem
HideWindowHideWindow
InitInit
InitAutoDetectionInitAutoDetection
InitDialogInitDialog
InsertComboEntryInsertComboEntry
InsertListEntryInsertListEntry
IsDialogActiveIsDialogActive
ItemTitleItemTitle
LeavingLeaving
ListAddDirectoryListAddDirectory
ListDropListDrop
LoadLoad
LoadFrameLoadFrame
LoadItemsLoadItems
LoadMenuLoadMenu
MoveMove
NoAutoDetectionNoAutoDetection
OKOK
ResizeResize
RunRun
SetAttribSetAttrib
SetCheckBoxSetCheckBox
SetComboLineSetComboLine
SetCurrentComboIndexSetCurrentComboIndex
SetCurrentListIndexSetCurrentListIndex
SetDataSetData
SetDataStemSetDataStem
SetEntryLineSetEntryLine
SetListLineSetListLine
SetListTabulatorsSetListTabulators
SetMenuSetMenu
SetMultiListSetMultiList
SetRadioButtonSetRadioButton
SetStaticTextSetStaticText
SetTitleSetTitle
SetValueSetValue
SetWindowTitleSetWindowTitle
ShowShow
ShowItemShowItem
ShowWindowShowWindow
StartItStartIt
StopItStopIt
TitleTitle
Title=Title=
UpdateUpdate
ValidateValidate