#include <bmpprefs.h>
Inheritance diagram for PhotoCDDlg:
Public Types | |
enum | { IDD = _R(IDD_PHOTOCDOPTS) } |
Public Member Functions | |
PhotoCDDlg () | |
PhotoCDDlg constructor. Creates a non-undoable operation. | |
void | DoWithParam (OpDescriptor *, OpParam *Param) |
Creates then opens the dialog in response to a request from the user and allows values to be passed in and returned to the caller via the PhotoCDDlgParam class. | |
void | Do (OpDescriptor *) |
Creates then opens the dialog in response to a request from the user. | |
BOOL | Create () |
PhotoCDDlg create method. | |
virtual MsgResult | Message (Msg *Message) |
Handles all the photocd import options dialog's messages. | |
Static Public Member Functions | |
static BOOL | Init () |
PhotoCDDlg Init method. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
PhotoCDDlg GetState method. | |
static BOOL | InvokeDialog (UINT32 *ImageNumber) |
Static Public Attributes | |
static const CDlgMode | Mode |
Protected Member Functions | |
BOOL | CommitDialogValues (PhotoCDDlg *pPhotoCD) |
Takes the values in the dialog box and sets the return values accordingly Called when ok is pressed on the dialog box. | |
Static Protected Attributes | |
static PhotoCDDlgParam * | pParams |
Private Member Functions | |
BOOL | InitDialog (PhotoCDDlg *pPhotoCD) |
Sets initial dialog values. |
Definition at line 765 of file bmpprefs.h.
|
Definition at line 784 of file bmpprefs.h.
|
|
PhotoCDDlg constructor. Creates a non-undoable operation.
Definition at line 4127 of file bmpprefs.cpp. 04127 : DialogOp(PhotoCDDlg::IDD, PhotoCDDlg::Mode) 04128 { 04129 // At present, do nothing. 04130 }
|
|
Takes the values in the dialog box and sets the return values accordingly Called when ok is pressed on the dialog box.
Definition at line 4148 of file bmpprefs.cpp. 04149 { 04150 ERROR3IF(pParams == NULL, "PhotoCDDlg::CommitDialogValues called after duff initialisation?!"); 04151 04152 // Ok has been pressed so take the values and set up the static values so that the 04153 // caller can access them 04154 04155 // Get the image that the user has chosen from the radio buttons 04156 BOOL Valid = 0; // Flag for validity of value 04157 BOOL State = 0; 04158 UINT32 Page = 0; 04159 State = GetLongGadgetValue(_R(IDC_PHOTOCD_BASE), 0, 1, 0, &Valid); 04160 if (State) 04161 Page = 0; 04162 State = GetLongGadgetValue(_R(IDC_PHOTOCD_BASEDIV4), 0, 1, 0, &Valid); 04163 if (State) 04164 Page = 1; 04165 State = GetLongGadgetValue(_R(IDC_PHOTOCD_BASEDIV16), 0, 1, 0, &Valid); 04166 if (State) 04167 Page = 2; 04168 State = GetLongGadgetValue(_R(IDC_PHOTOCD_BASE4), 0, 1, 0, &Valid); 04169 if (State) 04170 Page = 3; 04171 State = GetLongGadgetValue(_R(IDC_PHOTOCD_BASE16), 0, 1, 0, &Valid); 04172 if (State) 04173 Page = 4; 04174 pParams->ImageNumber = Page; 04175 04176 return TRUE; 04177 }
|
|
PhotoCDDlg create method.
Reimplemented from DialogOp. Definition at line 4330 of file bmpprefs.cpp. 04331 { 04332 if (DialogOp::Create()) 04333 { 04334 // Set the initial control values 04335 // Dialog now Modal so set up happens in the message handler 04336 //InitDialog(this); 04337 04338 return TRUE; 04339 } 04340 else 04341 { 04342 return FALSE; 04343 } 04344 }
|
|
Creates then opens the dialog in response to a request from the user.
Reimplemented from Operation. Definition at line 4361 of file bmpprefs.cpp. 04362 { 04363 ERROR3("PhotoCDDlg::Do called when should be using DoWithParam!"); 04364 End(); // End the operation 04365 }
|
|
Creates then opens the dialog in response to a request from the user and allows values to be passed in and returned to the caller via the PhotoCDDlgParam class.
Reimplemented from Operation. Definition at line 4384 of file bmpprefs.cpp. 04385 { 04386 ERROR3IF(Param == NULL, "PhotoCDDlg::DoWithParam - NULL Param passed in"); 04387 04388 // Use the OpParam that has been passed in to us 04389 PhotoCDDlgParam * BmpDlgParam = (PhotoCDDlgParam *) Param; 04390 04391 BOOL ok; 04392 04393 // Force the dialog box to be created, as it is modal it will be opened via a message 04394 ok = Create(); 04395 04396 if ( !ok ) 04397 { 04398 // Could not create the dialog box so call inform error 04399 InformError(); 04400 End(); // End the operation 04401 } 04402 }
|
|
PhotoCDDlg GetState method.
Definition at line 4273 of file bmpprefs.cpp. 04274 { 04275 OpState OpSt; 04276 return(OpSt); 04277 }
|
|
PhotoCDDlg Init method.
Reimplemented from SimpleCCObject. Definition at line 4295 of file bmpprefs.cpp. 04296 { 04297 BOOL InitOK; 04298 04299 InitOK = RegisterOpDescriptor( 04300 0, /* Tool ID */ 04301 _R(IDS_PHOTOCDDLG), 04302 CC_RUNTIME_CLASS(PhotoCDDlg), 04303 OPTOKEN_PHOTOCDDLG, 04304 GetState, 04305 0, /* help ID */ 04306 0, /* bubble help */ 04307 0, /* resource ID */ 04308 0 /* control ID */ 04309 ); 04310 04311 return (InitOK); 04312 }
|
|
Sets initial dialog values.
Definition at line 4420 of file bmpprefs.cpp. 04421 { 04422 ERROR3IF(pParams == NULL, "PhotoCDDlg::InitDialog called after duff initialisation?!"); 04423 04424 // Check how many pages were found and if necessary whether to grey some of the 04425 // buttons 04426 // Bodge the Base16 so that ungreys using same condition as the Base4 as once again 04427 // Accusoft are lying and tell us 4 images instead of 5. 04428 EnableGadget(_R(IDC_PHOTOCD_BASE16), (pParams->NumberOfPages > 3)); //4)); 04429 EnableGadget(_R(IDC_PHOTOCD_BASE4), (pParams->NumberOfPages > 3)); 04430 EnableGadget(_R(IDC_PHOTOCD_BASEDIV16), (pParams->NumberOfPages > 2)); 04431 EnableGadget(_R(IDC_PHOTOCD_BASEDIV4), (pParams->NumberOfPages > 1)); 04432 EnableGadget(_R(IDC_PHOTOCD_BASE), (pParams->NumberOfPages > 0)); 04433 04434 switch (pParams->ImageNumber) 04435 { 04436 case 4: 04437 SetLongGadgetValue(_R(IDC_PHOTOCD_BASE16), TRUE); 04438 break; 04439 case 3: 04440 SetLongGadgetValue(_R(IDC_PHOTOCD_BASE4), TRUE); 04441 break; 04442 case 2: 04443 SetLongGadgetValue(_R(IDC_PHOTOCD_BASEDIV16), TRUE); 04444 break; 04445 case 1: 04446 SetLongGadgetValue(_R(IDC_PHOTOCD_BASEDIV4), TRUE); 04447 break; 04448 case 0: 04449 default: 04450 SetLongGadgetValue(_R(IDC_PHOTOCD_BASE), TRUE); 04451 break; 04452 } 04453 04454 return TRUE; 04455 }
|
|
Definition at line 4088 of file bmpprefs.cpp. 04089 { 04090 // Params is defined to be the PhotoCDDlgParams class to nicely encapsulate 04091 // all the parameters that we need to pass back and forth. 04092 PhotoCDDlgParam Params(*Page); 04093 pParams = &Params; // Save a reference to the params for use in the dialog code 04094 04095 Params.ImageNumber = 0; // Set default page to be zero 04096 Params.PhotoCDOk = FALSE; // Ensure ok is False by default 04097 04098 OpDescriptor *OpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(PhotoCDDlg)); 04099 04100 ERROR3IF(OpDesc == NULL,"PhotoCDDlg::InvokeDialog is unable to find the PhotoCDDlg OpDescriptor"); 04101 04102 if (OpDesc != NULL) 04103 OpDesc->Invoke((OpParam *)&Params); 04104 04105 // If ok used then alter the page to the one that the user has chosen 04106 if (Params.PhotoCDOk) 04107 *Page = Params.ImageNumber; 04108 04109 return Params.PhotoCDOk; 04110 }
|
|
Handles all the photocd import options dialog's messages.
Reimplemented from DialogOp. Definition at line 4196 of file bmpprefs.cpp. 04197 { 04198 ERROR3IF(pParams == NULL, "PhotoCDDlg::Message - Parameters not been set up"); 04199 04200 if (IS_OUR_DIALOG_MSG(Message)) 04201 { 04202 DialogMsg* Msg = (DialogMsg*)Message; 04203 04204 MsgResult Result; 04205 04206 // Main handler for dialog type messages 04207 BOOL EndDialog = FALSE; // TRUE if we should quit the dialog 04208 04209 // Should now handle the required messages that we respond to 04210 switch (Msg->DlgMsg) 04211 { 04212 case DIM_CREATE: 04213 // As it is a modal dialog box we are sent a message to say the dialog box 04214 // is being created, so we have a chance to set the initial control values. 04215 InitDialog(this); 04216 break; 04217 04218 case DIM_COMMIT: 04219 // (ok) accept all changes that the user has made to the settings 04220 // brackets make the ok local to this case 04221 { 04222 BOOL ok; 04223 ok = CommitDialogValues(this); 04224 if (ok) 04225 { 04226 // Values found ok so quit dialogue then go ahead and export 04227 pParams->PhotoCDOk = TRUE; // Flag ok used 04228 EndDialog = TRUE; 04229 } 04230 } 04231 break; 04232 04233 case DIM_CANCEL: 04234 // Cancel all changes that the user has made to the settings 04235 pParams->PhotoCDOk = FALSE; // Flag cancel used 04236 EndDialog = TRUE; 04237 break; 04238 } 04239 04240 // Allow the base class access to the message, it will do the 04241 // DLG_EAT_IF_HUNGRY(Msg) for us 04242 // Must do this before the Close and End 04243 Result = DialogOp::Message(Message); 04244 04245 // End dialog here 04246 if (EndDialog) 04247 { 04248 Close(); // Hide the dialog box 04249 End(); // Finish the operation 04250 } 04251 04252 // The message was for our dialog box so return that we have handled it, if necessary 04253 return Result; 04254 } 04255 return DialogOp::Message(Message); 04256 }
|
|
Definition at line 786 of file bmpprefs.h. |
|
Definition at line 799 of file bmpprefs.h. |