CInitBrushNameDlg Class Reference

#include <brshname.h>

Inheritance diagram for CInitBrushNameDlg:

CNameBrushDlg CBaseBrushNameDlg DialogOp Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Static Public Member Functions

static BOOL Init ()
 Register operation.
static OpState GetState (String_256 *, OpDescriptor *)
 The usual default GetState function for the CNameBrushDlg dialog operation.

Protected Member Functions

 CInitBrushNameDlg ()
 Constructs a CNameBrushDlg object, a modeless version of the base class dialog, which gets a name for a newly created brush.
virtual BOOL DoCommit (const StringBase &strName)
 simply retrieves the brush definition and changes the name, this means that it will not be undoable
virtual void HandleCancel ()
 simply retrieves the brush definition and changes the name, this means that it will not be undoable
virtual void InitGadgetText (String_32 *pString=NULL, BOOL resizeDialog=TRUE)
 Initialises the text of the gadgets in the dialog.

Detailed Description

Definition at line 200 of file brshname.h.


Constructor & Destructor Documentation

CInitBrushNameDlg::CInitBrushNameDlg  )  [protected]
 

Constructs a CNameBrushDlg object, a modeless version of the base class dialog, which gets a name for a newly created brush.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/2000
See also:
CBaseNameBrushDlg

Definition at line 673 of file brshname.cpp.

00674   : CNameBrushDlg()
00675 {
00676     // Empty.
00677 }


Member Function Documentation

BOOL CInitBrushNameDlg::DoCommit const StringBase strName  )  [protected, virtual]
 

simply retrieves the brush definition and changes the name, this means that it will not be undoable

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/2000
Parameters:
strName --- the name to apply [INPUTS]
Returns:
TRUE / FALSE --- don't / do close the dialog on returning.
See also:
BaseCNameBrushDlg::Message; OpApplyNames

Reimplemented from CNameBrushDlg.

Definition at line 637 of file brshname.cpp.

00638 {
00639     String_32 Name(strName);
00640     BrushComponent::SetNewName(strName);
00641     return m_bModeless;
00642 }

OpState CInitBrushNameDlg::GetState String_256 ,
OpDescriptor
[static]
 

The usual default GetState function for the CNameBrushDlg dialog operation.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/2000

Reimplemented from CNameBrushDlg.

Definition at line 580 of file brshname.cpp.

00581 {    
00582     OpState OpSt;
00583     return OpSt;
00584 }

void CInitBrushNameDlg::HandleCancel  )  [protected, virtual]
 

simply retrieves the brush definition and changes the name, this means that it will not be undoable

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/2000
Parameters:
strName --- the name to apply [INPUTS]
Returns:
TRUE / FALSE --- don't / do close the dialog on returning.
See also:
BaseCNameBrushDlg::Message; OpApplyNames

Reimplemented from CBaseBrushNameDlg.

Definition at line 658 of file brshname.cpp.

00659 {
00660     BrushComponent::CancelNewBrush();
00661 }

BOOL CInitBrushNameDlg::Init void   )  [static]
 

Register operation.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/2000
See also:

Reimplemented from CNameBrushDlg.

Definition at line 559 of file brshname.cpp.

00560 {  
00561     return RegisterOpDescriptor(0,
00562                                 _R(IDS_OK),
00563                                 CC_RUNTIME_CLASS(CInitBrushNameDlg),
00564                                 OPTOKEN_INITNAME_BRUSH_DLG,
00565                                 CInitBrushNameDlg::GetState,
00566                                 0,                              // help ID
00567                                 0);                             // bubble ID
00568 }   

void CInitBrushNameDlg::InitGadgetText String_32 pString = NULL,
BOOL  resizeDialog = TRUE
[protected, virtual]
 

Initialises the text of the gadgets in the dialog.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/2000
Parameters:
pString - if you want to suggest a name based on a particular string [INPUTS] then pass a string, defaults to FALSE though so you don't have to
See also:
CBaseBrushNameDlg::Message

Reimplemented from CNameBrushDlg.

Definition at line 599 of file brshname.cpp.

00600 {
00601     if (pString != NULL)
00602         m_strSuggest = *pString;
00603     SetStringGadgetValue(_R(IDC_EDITBRUSHNAME), *GetSuggestion(&m_strSuggest));
00604 
00605     // change the dialog title to "Enter brush name:"
00606     // Errr, NO!  This is very bad for translation!
00607 //  String_256 Name = TEXT("Create new brush:");
00608 //  SetTitlebarName(&Name);
00609 
00610     // Show the help button
00611     HideGadget(_R(ID_CC_HELP_BUTTON), FALSE);
00612 
00613     // show the group info text
00614     SetStringGadgetValue(_R(IDC_STATICBRUSHGROUP), _R(IDS_BRUSHGROUP));
00615     HideGadget(_R(IDC_STATICBRUSHGROUP), FALSE);
00616 
00617     
00618     
00619     HighlightText(_R(IDC_EDITBRUSHNAME));
00620     SetKeyboardFocus(_R(IDC_EDITBRUSHNAME));
00621 
00622 
00623 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:52:33 2007 for Camelot by  doxygen 1.4.4