#include <namedlg.h>
Inheritance diagram for NameDialog:
Public Member Functions | |
NameDialog () | |
NameDialog constructor. Creates a non-undoable operation. | |
virtual void | DoWithParam (OpDescriptor *, OpParam *) |
Opens a dialog with the name given in pOpParam. | |
virtual MsgResult | Message (Msg *Message) |
See DialogOp. | |
void | ShowLayerDetails () |
void | CommitDialogValues () |
Static Public Member Functions | |
static BOOL | Init () |
Declares a NameDialog. | |
static BOOL | Invoke (NameDialogParam &NameParam) |
Pops up a name dialog without you having to type in all that OpDescriptor hoo haa. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
See DialogOp. | |
Static Public Attributes | |
static const INT32 | IDD = _R(IDD_NAME) |
static const CDlgMode | Mode = MODAL |
Protected Member Functions | |
virtual void | OnCreate () |
Responds to a DIM_CREATE message by initializing the dialog control. It sets the name control with the string passed in the NameDialogParam via the DoWithParam() member. | |
virtual void | OnCommit () |
Takes the string from the dialog and puts it in the NameDialogParam given in DoWithParam(). | |
virtual void | OnCancel () |
Responds to a DIM_CANCEL message, by setting ??????????????????? in the NameDialogParam. | |
const StringBase & | GetName () const |
BOOL | SetName (const StringBase &StringEntered) |
BOOL | SetCancelled () |
void | SetNameParam (NameDialogParam &NameParam) |
Data access. | |
Private Attributes | |
NameDialogParam * | m_pNameParam |
Definition at line 151 of file namedlg.h.
|
NameDialog constructor. Creates a non-undoable operation.
Definition at line 271 of file namedlg.cpp. 00271 : DialogOp(NameDialog::IDD, NameDialog::Mode) 00272 { 00273 m_pNameParam = NULL; 00274 }
|
|
|
|
Opens a dialog with the name given in pOpParam.
Reimplemented from Operation. Definition at line 290 of file namedlg.cpp. 00291 { 00292 VOID_ENSURE_NOT_NULL(pOpParam); 00293 ENSURE_KIND(pOpParam, NameDialogParam); 00294 00295 SetNameParam(*(NameDialogParam*)pOpParam); 00296 00297 BOOL ok = Create(); 00298 00299 if (!ok) // Could not create 00300 { 00301 End(); // End the operation 00302 } 00303 }
|
|
Definition at line 450 of file namedlg.cpp. 00451 { 00452 ERROR2IF(m_pNameParam == NULL, NullString, "NULL Member"); 00453 00454 return m_pNameParam->GetNameEntered(); 00455 }
|
|
See DialogOp.
Definition at line 252 of file namedlg.cpp. 00253 { 00254 OpState OpSt; 00255 00256 return(OpSt); 00257 }
|
|
Declares a NameDialog.
Reimplemented from SimpleCCObject. Definition at line 194 of file namedlg.cpp. 00195 { 00196 return (RegisterOpDescriptor( 00197 0, 00198 _R(IDS_STYLENAMEDLG), 00199 CC_RUNTIME_CLASS(NameDialog), 00200 OPTOKEN_NAMEDLG, 00201 NameDialog::GetState, 00202 0, //_R(IDH_Command_Wizard_Properties), // help ID 00203 0 // bubble ID 00204 ) 00205 ); 00206 }
|
|
Pops up a name dialog without you having to type in all that OpDescriptor hoo haa.
Definition at line 226 of file namedlg.cpp. 00227 { 00228 OpDescriptor* const pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_NAMEDLG); 00229 if (pOpDesc != NULL) 00230 { 00231 pOpDesc->Invoke(&NameParam); 00232 } 00233 else 00234 { 00235 ERROR3("Couldn't find OPTOKEN_NAMEDLG op descriptor"); 00236 } 00237 00238 return !NameParam.DialogCancelled(); 00239 }
|
|
See DialogOp.
Reimplemented from DialogOp. Definition at line 316 of file namedlg.cpp. 00317 { 00318 if (IS_OUR_DIALOG_MSG(Message)) 00319 { 00320 DialogMsg* pMsg = (DialogMsg*)Message; 00321 BOOL EndDialog = FALSE; 00322 switch (pMsg->DlgMsg) 00323 { 00324 case DIM_CREATE: 00325 OnCreate(); 00326 break; 00327 00328 case DIM_COMMIT: 00329 OnCommit(); 00330 EndDialog = TRUE; 00331 break; 00332 00333 case DIM_CANCEL: 00334 OnCancel(); 00335 EndDialog = TRUE; 00336 break; 00337 } 00338 00339 if (EndDialog) 00340 { 00341 Close(); // Close the dialog 00342 End(); // Destroy dialog - BEWARE! delete's this 00343 } 00344 00345 } 00346 00347 // Pass everything on to the base class . . . 00348 return DialogOp::Message(Message); 00349 }
|
|
Responds to a DIM_CANCEL message, by setting ??????????????????? in the NameDialogParam.
Definition at line 420 of file namedlg.cpp. 00421 { 00422 SetCancelled(); 00423 }
|
|
Takes the string from the dialog and puts it in the NameDialogParam given in DoWithParam().
Definition at line 392 of file namedlg.cpp. 00393 { 00394 BOOL Valid = TRUE; 00395 00396 String_256 NewName; 00397 00398 // Get the string from the layer name dialog 00399 NewName = GetStringGadgetValue(_R(IDC_NAME_NAME), &Valid); 00400 00401 if (Valid) 00402 { 00403 Valid = SetName(NewName); 00404 } 00405 }
|
|
Responds to a DIM_CREATE message by initializing the dialog control. It sets the name control with the string passed in the NameDialogParam via the DoWithParam() member.
Definition at line 367 of file namedlg.cpp. 00368 { 00369 String_256 Name = GetName(); 00370 00371 BOOL Ok = SetStringGadgetValue(_R(IDC_NAME_NAME),&Name); 00372 00373 if (Ok) 00374 { 00375 SetKeyboardFocus(_R(IDC_NAME_NAME)); 00376 HighlightText(_R(IDC_NAME_NAME)); 00377 } 00378 }
|
|
Definition at line 458 of file namedlg.cpp. 00459 { 00460 ENSURE_NOT_NULL(m_pNameParam); 00461 00462 m_pNameParam->SetDialogCancelled(); 00463 00464 return TRUE; 00465 }
|
|
Definition at line 442 of file namedlg.cpp. 00443 { 00444 ENSURE_NOT_NULL(m_pNameParam); 00445 00446 return m_pNameParam->SetNameGiven(StringEntered); 00447 }
|
|
Data access.
Definition at line 436 of file namedlg.cpp. 00437 { 00438 m_pNameParam = &NameParam; 00439 }
|
|
|
|
|
|
|
|
|