ToolnameDlg Class Reference

#include <tooldlg.h>

Inheritance diagram for ToolnameDlg:

DialogOp Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ToolnameDlg ()
 ToolnameDlg constructor. Creates a non-undoable operation.
void Do (OpDescriptor *)
 Creates then opens the dialog in response to a request from the user.
BOOL Create ()
 ToolnameDlg create method.
virtual MsgResult Message (Msg *Message)
 Handles all the Toolbar dialog's messages.

Static Public Member Functions

static BOOL Init ()
 ToolnameDlg Init method.
static OpState GetState (String_256 *, OpDescriptor *)
 ToolnameDlg GetState method.

Static Public Attributes

static const INT32 IDD = _R(IDD_NEWTOOLBAR)
static const CDlgMode Mode = MODAL

Private Member Functions

BOOL InitDialog ()
 Sets initial dialog values.

Detailed Description

Definition at line 185 of file tooldlg.h.


Constructor & Destructor Documentation

ToolnameDlg::ToolnameDlg  ) 
 

ToolnameDlg constructor. Creates a non-undoable operation.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/04/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 1021 of file tooldlg.cpp.

01022   : DialogOp(ToolnameDlg::IDD, ToolnameDlg::Mode) 
01023 {
01024 //  pToolbarDlg = NULL;
01025 }


Member Function Documentation

BOOL ToolnameDlg::Create void   )  [virtual]
 

ToolnameDlg create method.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/04/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if successful, else FALSE

Errors: -

See also:
-

Reimplemented from DialogOp.

Definition at line 1194 of file tooldlg.cpp.

01195 {                            
01196     if (DialogOp::Create())
01197     { 
01198         // Set the initial control values 
01199         InitDialog();
01200 
01201         return TRUE; 
01202     }
01203     else
01204     {
01205         return FALSE; 
01206     }
01207 }

void ToolnameDlg::Do OpDescriptor pOpDesc  )  [virtual]
 

Creates then opens the dialog in response to a request from the user.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/04/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 1227 of file tooldlg.cpp.

01228 {
01229     if (Create())   
01230     {
01231 //      pToolbarDlg = pDlg;
01232     //  Open();
01233     }
01234     else              // Could not create 
01235     {
01236         InformError();
01237         End();         // End the operation 
01238     }
01239 }

OpState ToolnameDlg::GetState String_256 ,
OpDescriptor
[static]
 

ToolnameDlg GetState method.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/04/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 1138 of file tooldlg.cpp.

01139 {    
01140     OpState OpSt;
01141     return(OpSt);
01142 }

BOOL ToolnameDlg::Init void   )  [static]
 

ToolnameDlg Init method.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/04/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from SimpleCCObject.

Definition at line 1162 of file tooldlg.cpp.

01163 {  
01164     return (RegisterOpDescriptor(
01165                                 0,
01166                                 _R(IDS_TOOLBARNAME_DLG),
01167                                 CC_RUNTIME_CLASS(ToolnameDlg),
01168                                 OPTOKEN_TOOLBARNAMEDLG,
01169                                 ToolnameDlg::GetState,
01170                                 0,  /* help ID */
01171                                 0,  /* bubble help ID _R(IDBBL_LAYERDLG), */
01172                                 0   /* bitmap ID */));
01173 }

BOOL ToolnameDlg::InitDialog  )  [private]
 

Sets initial dialog values.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/04/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 1259 of file tooldlg.cpp.

01260 {
01261     return TRUE;
01262 }

MsgResult ToolnameDlg::Message Msg Message  )  [virtual]
 

Handles all the Toolbar dialog's messages.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/04/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from DialogOp.

Definition at line 1045 of file tooldlg.cpp.

01046 {
01047     if (IS_OUR_DIALOG_MSG(Message))
01048     {
01049 
01050         DialogMsg* Msg = (DialogMsg*)Message; 
01051         BOOL EndDialog = FALSE; 
01052         switch (Msg->DlgMsg)
01053         {
01054             case DIM_CREATE:
01055                 SetKeyboardFocus (_R(IDC_EDITNEWBARNAME)) ;
01056                 HighlightText    (_R(IDC_EDITNEWBARNAME)) ;
01057                 break ;
01058 
01059             case DIM_COMMIT:
01060             {
01061                 // Accept all changes that the user wants to make to toolbars...
01062                 BOOL VV;
01063                 String_32 NewBarName = GetStringGadgetValue(_R(IDC_EDITNEWBARNAME),&VV);
01064                 if(NewBarName.Length()==0)
01065                 {
01066                     UINT32 Number = DialogBarOp::FindUniqueBarNumber(); 
01067                     NewBarName._MakeMsg(TEXT("Bar #1%ld"),Number); 
01068                 }
01069                 DialogBarOp* pNewBar = new DialogBarOp(NewBarName);
01070                 if (pNewBar)
01071                 {
01072                     pNewBar->SetDockBarType(DOCKBAR_FLOAT);
01073                     pNewBar->Create();
01074                     // The Create function sends a message which we intercept to update
01075                     // the list of bars in the Toolbars... dialog.
01076                     // this is very dangerous in fact it blows up..
01077                     // so I have removed it .. chris.
01078                     /*  if (pNewBar)
01079                     {
01080                         // Find toolbar dialog and close it...
01081                         ToolbarDlg* pToolbarDlg = ToolbarDlg::GetToolbarDlg();
01082                         if (pToolbarDlg)
01083                         {
01084                             pToolbarDlg->Close();
01085                             pToolbarDlg->End();
01086                         }
01087                     }
01088                     */
01089                     ToolbarDlg* pToolbarDlg = ToolbarDlg::GetToolbarDlg();
01090                     pToolbarDlg->ShowToolbarList();
01091                 }
01092                 EndDialog = TRUE;
01093             
01094             }
01095             break;
01096 
01097             case DIM_CANCEL:
01098                 // Cancel all changes the user wants to make to toolbars...
01099                 EndDialog = TRUE;
01100                 break;
01101 
01102 //          default:
01103         }
01104 
01105         if (EndDialog)  // Dialog communication over 
01106         {
01107             Close();    // Close the dialog 
01108             End();      // Destroy dialog 
01109         }
01110 
01111 //      return (DLG_EAT_IF_HUNGRY(Msg)); 
01112     }
01113 
01114 //  return OK; 
01115 
01116     // Pass everything on to the base-class . . .
01117     return DialogOp::Message(Message);
01118 }


Member Data Documentation

const INT32 ToolnameDlg::IDD = _R(IDD_NEWTOOLBAR) [static]
 

Definition at line 201 of file tooldlg.h.

const CDlgMode ToolnameDlg::Mode = MODAL [static]
 

Definition at line 202 of file tooldlg.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:02:00 2007 for Camelot by  doxygen 1.4.4