Base class for ADM dialogs. More...
#include <ADMBaseDialog.h>
Inherited by AboutDialog, ADMBaseWizPage, LicenseDialog, and RequestProgressDialog.

Classes | |
| struct | ADMBaseControlList |
| Helper class for control objects list; will delete them when closed. More... | |
Public Member Functions | |
| ADMBaseDialog (const char *pName, ASInt32 uID) | |
| Constructs a dialog object (but does not show it - for that call DoModal!). | |
| virtual | ~ADMBaseDialog () |
| Destructor. | |
| AVWindow | GetAVWindow () |
| Retrieve the Acrobat window reference for the dialog. | |
| ASInt32 | DoModal () |
| Displays the dialog and returns the dialog return value (usually, the button used to close it). | |
| virtual void | OnBtnClicked (ASInt32 nID) |
| Called by notification buttons. | |
| virtual bool | ConnectControl (ASInt32 nID, ADMBaseControl &control) |
| Helper function to connect a control object to an ADM control. | |
| virtual bool | ConnectControl (ASInt32 nID, ADMBaseControl &control, unsigned int uFlags) |
| Helper function to connect a control object to an ADM control with flags. | |
| virtual void | SetOKBtn (ASInt32 nID=IDOK, bool bSetDefault=true) |
| Sets the OK button. | |
| virtual void | SetCancelBtn (ASInt32 nID=IDCANCEL, bool bSetDefault=false) |
| Sets the cancel button. | |
| virtual void | AddNotifyBtn (ASInt32 nID, bool bSetDefault=false) |
| Sets a dialog control as a notification button. | |
| virtual void | AddClosingBtn (ASInt32 nID, bool bSetDefault=false, bool bNotify=true) |
| Sets a dialog control as a dialog-closing button. | |
| virtual void | AddNotifyRange (ASInt32 nID, int nCount) |
| Call to set click notification for a range of buttons. | |
| bool | SetControlText (ASInt32 nID, const char *pText) |
| Set control text. | |
| int | GetSelectedRadio (ASInt32 nIDFirst, int nCount) |
| Set a selected radio in a group. | |
| bool | ShowControl (ASInt32 nID, ASBoolean bShow=true) |
| Show or hide a control. | |
| bool | EnableControl (ASInt32 nID, ASBoolean bEnable) |
| Enable or disable a control. | |
| bool | IsChecked (ASInt32 nID) |
| Get checked status for a control (check box). | |
| bool | SetCheck (ASInt32 nID, ASBoolean bCheck=true) |
| Set the checked status of a control (check box). | |
| bool | SetPicture (ASInt32 nID, ASInt32 nPictureID, const char *pName) |
| Sets an image for a control (image controls). | |
| int | GetActiveEntry (ASInt32 nID) |
| Retrieve the current entry (combo, list and tree controls). | |
| std::string | GetActiveEntryText (ASInt32 nID) |
| Retrieve the current entry's text (combo, list and tree controls). | |
| int | GetEntryCount (ASInt32 nID) |
| Get the number of entries (combo, list and tree controls). | |
| void | SelectEntry (ASInt32 nID, ASInt32 nEntry, ASBoolean bSelect=true) |
| Select/deselect a specific entry by number (combo, list and tree controls). | |
| void | SelectEntry (ASInt32 nID, const std::string &sEntryText, ASBoolean bSelect=true) |
| Select/deselect a specific entry by text (combo, list and tree controls). | |
| void | Invalidate () |
| Invalidates the dialog (redrawing it). | |
| void | CreateADMTimer (ASUInt32 uDelay, ADMActionMask maskAbort=0) |
| Set a timer for the dialog. | |
| void | AbortADMTimer () |
| End the timer for the dialog. | |
| bool | EndModal (ASInt32 nID, bool bOK) |
| End the dialog. | |
Protected Member Functions | |
| bool | HasControl (ASInt32 id) |
| Check if there's a control with the specified ID. | |
| virtual ASErr | OnInitDialog () |
| Called when the dialog window is created; usually control object are connected to the controls here. | |
| virtual void | OnDestroyDialog () |
| Called when the dialog is destroyed. | |
| virtual void | OnDialogNotify (ADMNotifierRef inNotifier) |
| Called when a notification message is sent to the dialog (mouse click and such). | |
| virtual ASBoolean | OnDialogEvent (ADMTrackerRef inTracker) |
| Called when a tracking event is sent to the dialog (mouse move and such). | |
| virtual void | OnOK () |
| Called when the OK button is clicked. | |
| virtual ASBoolean | OnTimer (ADMTimerRef inTimerID) |
| Called when a timer event occurs (set by CreateADMTimer). | |
| virtual void | OnTimerAbort (ADMTimerRef inTimerID, ADMAction inAbortAction) |
| Called when a timer event is stopped. | |
Static Protected Member Functions | |
| static ASErr ASAPI | DialogInit (ADMDialogRef dialogRef) |
| Callback for dialog initialization; calls OnInitDialog(). | |
| static void ASAPI | DialogDestroy (ADMDialogRef dialogRef) |
| Callback for dialog destruction; calls OnDestoryDialog(). | |
| static void ASAPI | DialogNotify (ADMDialogRef dialogRef, ADMNotifierRef inNotifier) |
| Callback for dialog notification (clicks and such); calls OnDialogNotify(). | |
| static ASBoolean ASAPI | DialogEvent (ADMDialogRef inDialog, ADMTrackerRef inTracker) |
| Callback for dialog tracking events (mouse moves and such); calls OnDialogEvent(). | |
| static ASBoolean ASAPI | TimerProc (ADMDialogRef inDialog, ADMTimerRef inTimerID) |
| Callback for dialog timer events; calls OnTimer(). | |
| static void ASAPI | TimerAbortProc (ADMDialogRef inDialog, ADMTimerRef inTimerID, ADMAction inAbortAction) |
| Callback for dialog timer aborting event; calls OnTimerAbort(). | |
Protected Attributes | |
| ASInt32 | m_uID |
| ID of the dialog resource. | |
| std::string | m_sName |
| Unique name of the dialog. | |
| ADMDialogRef | m_refDialog |
| ADM dialog object reference. | |
| AVWindow | m_AVWindow |
| Acrobat window reference for the dialog window. | |
| ADMBaseControlList | m_controls |
| List of control objects. | |
| ASInt32 | m_nOKBtnID |
| ID of dialog's OK button (if any). | |
| ADMTimerRef | m_refTimer |
| Reference to the dialog's timer object (can be NULL). | |
Base class for ADM dialogs.
Definition at line 39 of file ADMBaseDialog.h.
| ADMBaseDialog::ADMBaseDialog | ( | const char * | pName, | |
| ASInt32 | uID | |||
| ) | [inline] |
Constructs a dialog object (but does not show it - for that call DoModal!).
| pName | Unique identifier for the dialog | |
| uID | Resource ID for the dialog |
Definition at line 48 of file ADMBaseDialog.h.
| void ADMBaseDialog::AddClosingBtn | ( | ASInt32 | nID, | |
| bool | bSetDefault = false, |
|||
| bool | bNotify = true | |||
| ) | [virtual] |
Sets a dialog control as a dialog-closing button.
| nID | ID of control to set as a dialog-closing button | |
| bSetDefault | true to set this button as the default button for the dialog, false not to | |
| bNotify | true to notify the dialog about the control prior to closing, false not to |
Definition at line 466 of file ADMBaseDialog.cpp.
References ADMBaseDialog::ADMBaseControlList::add(), ConnectControl(), m_controls, and m_refDialog.
| void ADMBaseDialog::AddNotifyBtn | ( | ASInt32 | nID, | |
| bool | bSetDefault = false | |||
| ) | [virtual] |
Sets a dialog control as a notification button.
| nID | ID of control to set as a notificaiton | |
| bSetDefault | true to set this button as the default button for the dialog, false not to |
Definition at line 446 of file ADMBaseDialog.cpp.
References ADMBaseDialog::ADMBaseControlList::add(), ConnectControl(), m_controls, and m_refDialog.
Referenced by AddNotifyRange(), RequestProgressDialog::OnInitDialog(), ADMBaseWizPage::OnInitDialog(), and FullLicenseDialog::OnInitDialog().
| virtual void ADMBaseDialog::AddNotifyRange | ( | ASInt32 | nID, | |
| int | nCount | |||
| ) | [inline, virtual] |
Call to set click notification for a range of buttons.
| nID | ID of first button in the range | |
| nCount | Number of buttons in the range |
Definition at line 133 of file ADMBaseDialog.h.
References AddNotifyBtn().
Referenced by ADMWizSamplePage::OnInitDialog(), ADMWizJurisdicationPage::OnInitDialog(), ADMWizModificationPage::OnInitDialog(), ADMWizUsagePage::OnInitDialog(), and ADMWizLicenseTypePage::OnInitDialog().
| bool ADMBaseDialog::ConnectControl | ( | ASInt32 | nID, | |
| ADMBaseControl & | control, | |||
| unsigned int | uFlags | |||
| ) | [virtual] |
Helper function to connect a control object to an ADM control with flags.
| nID | ID of control to connect | |
| control | Object to connect to the control | |
| uFlags | Additional creation controls |
Definition at line 59 of file ADMBaseDialog.cpp.
References ADMBaseControl::ConnectToControl(), and m_refDialog.
| bool ADMBaseDialog::ConnectControl | ( | ASInt32 | nID, | |
| ADMBaseControl & | control | |||
| ) | [virtual] |
Helper function to connect a control object to an ADM control.
| nID | ID of control to connect | |
| control | Object to connect to the control |
Definition at line 35 of file ADMBaseDialog.cpp.
References ADMBaseControl::ConnectToControl(), and m_refDialog.
Referenced by AddClosingBtn(), AddNotifyBtn(), RequestProgressDialog::OnInitDialog(), and LicenseDialog::OnInitDialog().
| void ADMBaseDialog::CreateADMTimer | ( | ASUInt32 | uDelay, | |
| ADMActionMask | maskAbort = 0 | |||
| ) |
Set a timer for the dialog.
| uDelay | Delay between timer calls, in Milliseconds | |
| maskAbort | Actions that will stop the timer |
Note that there can be only one timer per dialog for now!
Definition at line 191 of file ADMBaseDialog.cpp.
References m_refDialog, m_refTimer, TimerAbortProc(), and TimerProc().
Referenced by RequestProgressDialog::OnInitDialog().
| void ADMBaseDialog::DialogDestroy | ( | ADMDialogRef | dialogRef | ) | [static, protected] |
Callback for dialog destruction; calls OnDestoryDialog().
| dialogRef | Reference to the destroyed ADM dialog object |
Definition at line 151 of file ADMBaseDialog.cpp.
References OnDestroyDialog().
Referenced by DialogInit().
| ASBoolean ASAPI ADMBaseDialog::DialogEvent | ( | ADMDialogRef | dialogRef, | |
| ADMTrackerRef | inTracker | |||
| ) | [static, protected] |
Callback for dialog tracking events (mouse moves and such); calls OnDialogEvent().
| dialogRef | ADM dialog reference | |
| inTracker | ADM Tracker object |
Definition at line 275 of file ADMBaseDialog.cpp.
References m_refDialog, and OnDialogEvent().
Referenced by OnInitDialog().
| ASErr ASAPI ADMBaseDialog::DialogInit | ( | ADMDialogRef | dialogRef | ) | [static, protected] |
Callback for dialog initialization; calls OnInitDialog().
| dialogRef | Reference to the initialized ADM dialog object (called by Modal) |
Definition at line 137 of file ADMBaseDialog.cpp.
References DialogDestroy(), m_refDialog, and OnInitDialog().
Referenced by DoModal().
| void ASAPI ADMBaseDialog::DialogNotify | ( | ADMDialogRef | dialogRef, | |
| ADMNotifierRef | inNotifier | |||
| ) | [static, protected] |
Callback for dialog notification (clicks and such); calls OnDialogNotify().
| dialogRef | ADM dialog reference | |
| inNotifier | ADM Notification object |
Definition at line 244 of file ADMBaseDialog.cpp.
References m_refDialog, and OnDialogNotify().
Referenced by OnInitDialog().
| ASInt32 ADMBaseDialog::DoModal | ( | ) |
Displays the dialog and returns the dialog return value (usually, the button used to close it).
Definition at line 80 of file ADMBaseDialog.cpp.
References DialogInit(), ADMWrapper::InitADM(), m_sName, m_uID, and ADMWrapper::ReleaseADM().
Referenced by RequestProgressDialog::DoRequest(), CCInfoFullPlugin::ShowAbout(), and CCInfoFullPlugin::ShowLicense().
| bool ADMBaseDialog::EnableControl | ( | ASInt32 | nID, | |
| ASBoolean | bEnable | |||
| ) |
Enable or disable a control.
| nID | ID of control to enable or disable | |
| bEnable | true to enable the control, false to disable it |
Definition at line 349 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by RequestProgressDialog::OnBtnClicked(), FullLicenseDialog::OnInitDialog(), ADMBaseWizDialog::SetEnabledButtons(), and ADMWizJurisdicationPage::UpdateControls().
| bool ADMBaseDialog::EndModal | ( | ASInt32 | nID, | |
| bool | bOK | |||
| ) |
End the dialog.
| nID | ID to return from the modal function | |
| bOK | true to call OnOK(), false not to |
Definition at line 109 of file ADMBaseDialog.cpp.
References GetAVWindow(), m_refDialog, and OnOK().
Referenced by RequestProgressDialog::OnFinished().
| int ADMBaseDialog::GetActiveEntry | ( | ASInt32 | nID | ) |
Retrieve the current entry (combo, list and tree controls).
| nID | ID of list, combo or tree control to retrieve the selected entry number from |
Definition at line 613 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by ADMWizJurisdicationPage::UpdateControls().
| std::string ADMBaseDialog::GetActiveEntryText | ( | ASInt32 | nID | ) |
Retrieve the current entry's text (combo, list and tree controls).
| nID | ID of list, combo or tree control to retrieve entry text from |
Definition at line 575 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by ADMWizJurisdicationPage::OnKillActive().
| AVWindow ADMBaseDialog::GetAVWindow | ( | ) | [inline] |
Retrieve the Acrobat window reference for the dialog.
Definition at line 104 of file ADMBaseDialog.h.
References m_AVWindow.
Referenced by EndModal(), and ADMCloseDialogButton::OnNotify().
| int ADMBaseDialog::GetEntryCount | ( | ASInt32 | nID | ) |
Get the number of entries (combo, list and tree controls).
| nID | ID of list, combo or tree control to retrieve the number of entries of |
Definition at line 641 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by ADMWizJurisdicationPage::UpdateControls().
| int ADMBaseDialog::GetSelectedRadio | ( | ASInt32 | nIDFirst, | |
| int | nCount | |||
| ) |
Set a selected radio in a group.
| nIDFirst | ID of first radio control in the group | |
| nCount | Number of radio controls in the group |
Definition at line 541 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by ADMWizSamplePage::OnKillActive(), ADMWizJurisdicationPage::OnKillActive(), ADMWizModificationPage::OnKillActive(), ADMWizUsagePage::OnKillActive(), ADMWizLicenseTypePage::OnKillActive(), ADMWizSamplePage::UpdateControls(), ADMWizJurisdicationPage::UpdateControls(), ADMWizModificationPage::UpdateControls(), ADMWizUsagePage::UpdateControls(), and ADMWizLicenseTypePage::UpdateControls().
| bool ADMBaseDialog::HasControl | ( | ASInt32 | id | ) | [protected] |
Check if there's a control with the specified ID.
| id | ID of control to check |
Definition at line 235 of file ADMBaseDialog.cpp.
References m_refDialog.
| bool ADMBaseDialog::IsChecked | ( | ASInt32 | nID | ) |
Get checked status for a control (check box).
| nID | ID to test |
Definition at line 496 of file ADMBaseDialog.cpp.
References m_refDialog.
| void ADMBaseDialog::OnBtnClicked | ( | ASInt32 | nID | ) | [virtual] |
Called by notification buttons.
| nID | ID of button clicked |
Reimplemented in FullLicenseDialog, ADMWizLicenseTypePage, ADMWizUsagePage, ADMWizModificationPage, ADMWizJurisdicationPage, ADMWizSamplePage, ADMBaseWizPage, and RequestProgressDialog.
Definition at line 484 of file ADMBaseDialog.cpp.
References m_nOKBtnID, and OnOK().
Referenced by ADMCloseDialogButton::OnClick(), and ADMNotifyButton::OnClick().
| virtual ASBoolean ADMBaseDialog::OnDialogEvent | ( | ADMTrackerRef | inTracker | ) | [inline, protected, virtual] |
Called when a tracking event is sent to the dialog (mouse move and such).
| inTracker | Reference to the ADM tracking object |
Definition at line 193 of file ADMBaseDialog.h.
Referenced by DialogEvent().
| void ADMBaseDialog::OnDialogNotify | ( | ADMNotifierRef | inNotifier | ) | [protected, virtual] |
Called when a notification message is sent to the dialog (mouse click and such).
| inNotifier | ADM Notification object |
Reimplemented in ADMBaseWizPage.
Definition at line 264 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by DialogNotify().
| ASErr ADMBaseDialog::OnInitDialog | ( | ) | [protected, virtual] |
Called when the dialog window is created; usually control object are connected to the controls here.
Reimplemented in AboutDialog, FullLicenseDialog, ADMWizLicenseTypePage, ADMWizUsagePage, ADMWizModificationPage, ADMWizJurisdicationPage, ADMWizSummeryPage, ADMWizSamplePage, LicenseDialog, ADMBaseWizPage, and RequestProgressDialog.
Definition at line 209 of file ADMBaseDialog.cpp.
References DialogEvent(), DialogNotify(), AcrobatPluginInfo::GetPluginInfo(), m_AVWindow, m_refDialog, AcrobatPluginInfo::RegisterModalDialog(), and ADMModalWrapper::StartModal().
Referenced by DialogInit().
| virtual ASBoolean ADMBaseDialog::OnTimer | ( | ADMTimerRef | inTimerID | ) | [inline, protected, virtual] |
Called when a timer event occurs (set by CreateADMTimer).
| inTimerID | Reference to the ADM timer |
Reimplemented in RequestProgressDialog.
Definition at line 203 of file ADMBaseDialog.h.
References m_refTimer.
Referenced by TimerProc().
| virtual void ADMBaseDialog::OnTimerAbort | ( | ADMTimerRef | inTimerID, | |
| ADMAction | inAbortAction | |||
| ) | [inline, protected, virtual] |
Called when a timer event is stopped.
| inTimerID | Reference to the ADM timer | |
| inAbortAction | The action that caused the abort |
Definition at line 209 of file ADMBaseDialog.h.
References m_refTimer.
Referenced by TimerAbortProc().
| void ADMBaseDialog::SelectEntry | ( | ASInt32 | nID, | |
| const std::string & | sEntryText, | |||
| ASBoolean | bSelect = true | |||
| ) |
Select/deselect a specific entry by text (combo, list and tree controls).
| nID | ID of list, combo or tree control to selected/deselect an entry for | |
| sEntryText | Text of the entry to select or deselect | |
| bSelect | true to select the entry, false to deselect it |
Definition at line 696 of file ADMBaseDialog.cpp.
References m_refDialog.
| void ADMBaseDialog::SelectEntry | ( | ASInt32 | nID, | |
| ASInt32 | nEntry, | |||
| ASBoolean | bSelect = true | |||
| ) |
Select/deselect a specific entry by number (combo, list and tree controls).
| nID | ID of list, combo or tree control to selected/deselect an entry for | |
| nEntry | Index of entry to selected or deselect | |
| bSelect | true to select the entry, false to deselect it |
Definition at line 665 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by ADMWizJurisdicationPage::OnInitDialog(), and ADMWizJurisdicationPage::UpdateControls().
| void ADMBaseDialog::SetCancelBtn | ( | ASInt32 | nID = IDCANCEL, |
|
| bool | bSetDefault = false | |||
| ) | [virtual] |
Sets the cancel button.
| nID | ID of control to set as the dialog's Cancel button | |
| bSetDefault | true to set this button as the default button for the dialog, false not to |
Definition at line 418 of file ADMBaseDialog.cpp.
References ADMBaseDialog::ADMBaseControlList::add(), ADMBaseControl::ConnectToControl(), m_controls, and m_refDialog.
Referenced by ADMBaseWizPage::OnInitDialog().
| bool ADMBaseDialog::SetCheck | ( | ASInt32 | nID, | |
| ASBoolean | bCheck = true | |||
| ) |
Set the checked status of a control (check box).
| nID | ID of control to set the check status of | |
| bCheck | true to set, false to clear |
Definition at line 518 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by ADMWizSamplePage::OnInitDialog(), ADMWizJurisdicationPage::OnInitDialog(), ADMWizModificationPage::OnInitDialog(), ADMWizUsagePage::OnInitDialog(), and ADMWizLicenseTypePage::OnInitDialog().
| bool ADMBaseDialog::SetControlText | ( | ASInt32 | nID, | |
| const char * | pText | |||
| ) |
Set control text.
| nID | ID of control to set the text of | |
| pText | String to set to the control |
Definition at line 326 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by RequestProgressDialog::OnBtnClicked(), ADMWizSamplePage::OnInitDialog(), ADMWizSummeryPage::OnInitDialog(), ADMWizJurisdicationPage::OnInitDialog(), ADMWizModificationPage::OnInitDialog(), ADMWizUsagePage::OnInitDialog(), ADMBaseWizDialog::SetEnabledButtons(), ADMWizLicenseTypePage::UpdateControls(), and LicenseDialog::UpdateLicenseInfo().
| void ADMBaseDialog::SetOKBtn | ( | ASInt32 | nID = IDOK, |
|
| bool | bSetDefault = true | |||
| ) | [virtual] |
Sets the OK button.
| nID | ID of control to set as an OK button | |
| bSetDefault | true to set this button as the default button for the dialog, false not to |
Definition at line 296 of file ADMBaseDialog.cpp.
References ADMBaseDialog::ADMBaseControlList::add(), ADMBaseControl::ConnectToControl(), m_controls, m_nOKBtnID, and m_refDialog.
Referenced by AboutDialog::OnInitDialog(), and LicenseDialog::OnInitDialog().
| bool ADMBaseDialog::SetPicture | ( | ASInt32 | nID, | |
| ASInt32 | nPictureID, | |||
| const char * | pName | |||
| ) |
Sets an image for a control (image controls).
| nID | ID of control to set the image to | |
| nPictureID | ID of image | |
| pName | Unique name of image |
Definition at line 396 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by ADMWizSummeryPage::SetIconImage().
| bool ADMBaseDialog::ShowControl | ( | ASInt32 | nID, | |
| ASBoolean | bShow = true | |||
| ) |
Show or hide a control.
| nID | ID of control to show or hide | |
| bShow | true to show the control, false to hide it |
Definition at line 372 of file ADMBaseDialog.cpp.
References m_refDialog.
Referenced by ADMWizSummeryPage::SetIconImage().
| void ASAPI ADMBaseDialog::TimerAbortProc | ( | ADMDialogRef | dialogRef, | |
| ADMTimerRef | inTimerID, | |||
| ADMAction | inAbortAction | |||
| ) | [static, protected] |
Callback for dialog timer aborting event; calls OnTimerAbort().
| dialogRef | ADM dialog reference | |
| inTimerID | ADM timer reference | |
| inAbortAction | Action that caused the timer to abort |
Definition at line 749 of file ADMBaseDialog.cpp.
References m_refDialog, and OnTimerAbort().
Referenced by CreateADMTimer().
| ASBoolean ASAPI ADMBaseDialog::TimerProc | ( | ADMDialogRef | dialogRef, | |
| ADMTimerRef | inTimerID | |||
| ) | [static, protected] |
Callback for dialog timer events; calls OnTimer().
| dialogRef | ADM dialog reference | |
| inTimerID | ADM timer reference |
Definition at line 727 of file ADMBaseDialog.cpp.
References m_refDialog, and OnTimer().
Referenced by CreateADMTimer().
1.6.1