VisibleTemplateAttribute Class Reference

Provides a user editable template attribute. More...

#include <visiattr.h>

Inheritance diagram for VisibleTemplateAttribute:

VisibleUserAttribute VisibleAttribute UserInterface List of all members.

Public Member Functions

 VisibleTemplateAttribute (const WizOp &Handler, const StringBase &Question=NullString, const StringBase &Param=NullString)
 Debug function that provides descriptions for TemplateAttribute (WizOp) records.Constructor to ensure the data members are set up correctly.
virtual StringBaseGetText (StringBase &Description) const
 Gives the user something to chew on in the "Used Properties" list of the Wizard Properties dialog.
virtual BOOL Display (DialogOp &Dialog)
 Lets the user see the contents of this VisibleTemplateAttribute on the given dialog. Overrides the base class to provide a param hint.
virtual BOOL Interact (DialogOp &Dialog)
 This allows the user to change this VisibleTemplateAttribute.
virtual void Hide ()
 Hides this VisibleTemplateAttribute from the user. Overrides the base class to hide the param hint.
virtual NodeAttributeCreateNewAttribute ()
 Creates a new used property.

Protected Member Functions

const WizOpGetWizOp ()
VisibleLabelGetParamHint ()
void SetParamHint (const StringBase &HintToShow)

Private Attributes

const WizOpm_Handler
VisibleLabel m_ParamHint

Detailed Description

Provides a user editable template attribute.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/10/96

Definition at line 183 of file visiattr.h.


Constructor & Destructor Documentation

VisibleTemplateAttribute::VisibleTemplateAttribute const WizOp Handler,
const StringBase Question = NullString,
const StringBase Param = NullString
 

Debug function that provides descriptions for TemplateAttribute (WizOp) records.Constructor to ensure the data members are set up correctly.

Parameters:
Handler,: The WizOp that makes this VisibleTemplateAttribute changeable. [INPUTS] Question: The question to ask when changing the attribute Param: Any parameter the WizOp may have.

Definition at line 844 of file tmpltatr.cpp.

00846                                                                              :
00847     VisibleUserAttribute(NullString, NullString),
00848     m_Handler(Handler)
00849 {
00850     // do something here so it can create its text
00851 
00852     SetLongKey(Param);
00853     SetValue(Question);
00854 }


Member Function Documentation

NodeAttribute * VisibleTemplateAttribute::CreateNewAttribute  )  [virtual]
 

Creates a new used property.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
Returns:
A new AttrUser

Reimplemented from VisibleUserAttribute.

Definition at line 974 of file tmpltatr.cpp.

00975 {
00976     return new TemplateAttribute( m_Handler.GetInternalName(), GetValue(), GetLongKey() );
00977 }

BOOL VisibleTemplateAttribute::Display DialogOp Dialog  )  [virtual]
 

Lets the user see the contents of this VisibleTemplateAttribute on the given dialog. Overrides the base class to provide a param hint.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
See Also: VisibleUserAttribute::Display()

Reimplemented from VisibleUserAttribute.

Definition at line 892 of file tmpltatr.cpp.

00893 {
00894     SetParamHint( GetWizOp().GetParamHint() );
00895     // bodgy bit this...
00896     BOOL                fOk = GetParamHint().Display( Dialog );
00897 
00898     if( fOk )
00899     {
00900         fOk = VisibleUserAttribute::Display(Dialog);
00901     }
00902 
00903     return fOk;
00904 }

VisibleLabel & VisibleTemplateAttribute::GetParamHint  )  [protected]
 

Definition at line 993 of file tmpltatr.cpp.

00994 {
00995     return m_ParamHint;
00996 }

StringBase & VisibleTemplateAttribute::GetText StringBase Description  )  const [virtual]
 

Gives the user something to chew on in the "Used Properties" list of the Wizard Properties dialog.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
Returns:
A string

Reimplemented from VisibleUserAttribute.

Definition at line 870 of file tmpltatr.cpp.

00871 {
00872     Description = m_Handler.GetUserName();
00873     return Description; 
00874 }

const WizOp & VisibleTemplateAttribute::GetWizOp  )  [protected]
 

Definition at line 981 of file tmpltatr.cpp.

00982 {
00983     return m_Handler;
00984 }

void VisibleTemplateAttribute::Hide  )  [virtual]
 

Hides this VisibleTemplateAttribute from the user. Overrides the base class to hide the param hint.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
See Also: VisibleUserAttribute::Hide()

Reimplemented from VisibleUserAttribute.

Definition at line 954 of file tmpltatr.cpp.

00955 {
00956     GetParamHint().Hide();
00957 
00958     VisibleUserAttribute::Hide();
00959 }

BOOL VisibleTemplateAttribute::Interact DialogOp Dialog  )  [virtual]
 

This allows the user to change this VisibleTemplateAttribute.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97

Reimplemented from VisibleUserAttribute.

Definition at line 918 of file tmpltatr.cpp.

00919 {
00920     PORTNOTETRACE("other","TemplateAttribute::Interact - do nothing");
00921 #ifndef EXCLUDE_FROM_XARALX
00922     ERROR3IF(!((&Dialog)->IS_KIND_OF(TemplateDialog)), "Dialog isn't kind of TemplateDialog");
00923 
00924     TemplateDialog& BetterBeThisDialog = (TemplateDialog&)Dialog;
00925     
00926     // if there's a parameter hint, then let them edit the parameter
00927     // we'll blam 'em with an error message if they give us a duplicate
00928     if (IsNew() && !GetWizOp().GetParamHint().IsEmpty())
00929     {
00930         BetterBeThisDialog.GetParamHintControl().Enable();
00931         BetterBeThisDialog.GetKeyControl().Enable();
00932     }
00933 
00934     // always let them change the question
00935     BetterBeThisDialog.GetValueControl().Enable();
00936 #endif
00937     return TRUE;
00938 }

void VisibleTemplateAttribute::SetParamHint const StringBase HintToShow  )  [protected]
 

Definition at line 987 of file tmpltatr.cpp.

00988 {
00989     m_ParamHint = HintToShow;
00990 }


Member Data Documentation

const WizOp& VisibleTemplateAttribute::m_Handler [private]
 

Definition at line 205 of file visiattr.h.

VisibleLabel VisibleTemplateAttribute::m_ParamHint [private]
 

Definition at line 206 of file visiattr.h.


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