VisibleStyleReference Class Reference

Provides a user editable style reference. More...

#include <visiattr.h>

Inheritance diagram for VisibleStyleReference:

VisibleAttribute UserInterface List of all members.

Public Member Functions

 VisibleStyleReference (const WizOpStyle &Style)
 Debug function that provides descriptions for TemplateAttribute (WizOp) records.Sets up a VisibleStyleReference so it actually references a style and so we can play with it.
virtual BOOL Display (DialogOp &Dialog)
 This displays the StyleReference to the user.
virtual BOOL Interact (DialogOp &Dialog)
 This allows the user to change this VisibleStyleReference. Except it does nothing.
virtual void Hide ()
 Hides any interaction with the user.
virtual StringBaseGetText (StringBase &Description) const
 Gives the VisibleListItem its text to display.
virtual NodeAttributeCreateNewAttribute ()
 Creates a new StyleReferenceAttribute that this VisibleStyleReference represents to put in the tree.
VisibleLabelGetParamHintLabel ()
void SetParamHintString (const StringBase &HintToShow)
EditableTextGetParamText ()
void SetParamText (const StringBase &ParamToShow)
const WizOpStyleGetStyle ()

Private Attributes

const WizOpStylem_Style
EditableText m_Question
VisibleLabel m_ParamHintLabel
EditableText m_Param

Detailed Description

Provides a user editable style reference.

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

Definition at line 220 of file visiattr.h.


Constructor & Destructor Documentation

VisibleStyleReference::VisibleStyleReference const WizOpStyle Style  ) 
 

Debug function that provides descriptions for TemplateAttribute (WizOp) records.Sets up a VisibleStyleReference so it actually references a style and so we can play with it.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/06/97
Parameters:
Style,: The style that you want to show the user. [INPUTS]

Definition at line 1555 of file tmpltatr.cpp.

01555                                                                     :
01556     m_Style(Style)
01557 {
01558     m_Question = m_Style.GetQuestion();
01559 }


Member Function Documentation

NodeAttribute * VisibleStyleReference::CreateNewAttribute  )  [virtual]
 

Creates a new StyleReferenceAttribute that this VisibleStyleReference represents to put in the tree.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/06/97
Returns:
A pointer to the new StyleReferenceAttribute (or NULL)

Implements VisibleAttribute.

Definition at line 1676 of file tmpltatr.cpp.

01677 {
01678     return new StyleReferenceAttribute(m_Style);
01679 }

BOOL VisibleStyleReference::Display DialogOp Dialog  )  [virtual]
 

This displays the StyleReference to the user.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
Notes: This function takes a DialopOp as its argument to determine where to put this object. Since this requires an internal knowledge of the DialogOp at the moment it is cast to a TemplateDialog which has the fields all ready. This is likely to change in the future.

Implements UserInterface.

Definition at line 1597 of file tmpltatr.cpp.

01598 {
01599     BOOL                Ok = TRUE;
01600 
01601     PORTNOTETRACE("other","TemplateAttribute::Display - do nothing");
01602 #ifndef EXCLUDE_FROM_XARALX
01603     ERROR3IF(!((&Dialog)->IS_KIND_OF(TemplateDialog)), "Dialog isn't kind of TemplateDialog");
01604 
01605     TemplateDialog& BetterBeThisDialog = (TemplateDialog&)Dialog;
01606 
01607     Ok = m_Question.Display(BetterBeThisDialog.GetValueControl());
01608 
01609     if (Ok)
01610     {
01611         SetParamHintString(GetStyle().GetWizOp().GetParamHint());
01612         // bodgy bit this...
01613         Ok = GetParamHintLabel().Display(Dialog);
01614     }
01615 
01616     if (Ok)
01617     {
01618         SetParamText(GetStyle().GetParam());
01619         // bodgy bit this...
01620         Ok = GetParamText().Display(BetterBeThisDialog.GetKeyControl());
01621     }
01622 #endif
01623     return Ok;
01624 }

VisibleLabel & VisibleStyleReference::GetParamHintLabel  ) 
 

Definition at line 1697 of file tmpltatr.cpp.

01698 {
01699     return m_ParamHintLabel;
01700 }

EditableText & VisibleStyleReference::GetParamText  ) 
 

Definition at line 1704 of file tmpltatr.cpp.

01705 {
01706     return m_Param;
01707 }

const WizOpStyle & VisibleStyleReference::GetStyle  ) 
 

Definition at line 1690 of file tmpltatr.cpp.

01691 {
01692     return m_Style;
01693 }

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

Gives the VisibleListItem its text to display.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/06/97
Parameters:
Description Where the text should go [OUTPUTS]
Returns:
A reference to the given StringBase

Implements VisibleAttribute.

Definition at line 1575 of file tmpltatr.cpp.

01576 {
01577     return (Description = m_Style.GetName());
01578 }

void VisibleStyleReference::Hide  )  [virtual]
 

Hides any interaction with the user.

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

Implements UserInterface.

Definition at line 1655 of file tmpltatr.cpp.

01656 {
01657     m_Question.Hide();
01658     GetParamHintLabel().Hide();
01659     GetParamText().Hide();
01660 }

BOOL VisibleStyleReference::Interact DialogOp Dialog  )  [virtual]
 

This allows the user to change this VisibleStyleReference. Except it does nothing.

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

Reimplemented from VisibleAttribute.

Definition at line 1639 of file tmpltatr.cpp.

01640 {
01641     return TRUE;
01642 }

void VisibleStyleReference::SetParamHintString const StringBase HintToShow  ) 
 

Definition at line 1684 of file tmpltatr.cpp.

01685 {
01686     m_ParamHintLabel = HintToShow;
01687 }

void VisibleStyleReference::SetParamText const StringBase ParamToShow  ) 
 

Definition at line 1711 of file tmpltatr.cpp.

01712 {
01713     m_Param = ParamToShow;
01714 }


Member Data Documentation

EditableText VisibleStyleReference::m_Param [private]
 

Definition at line 247 of file visiattr.h.

VisibleLabel VisibleStyleReference::m_ParamHintLabel [private]
 

Definition at line 246 of file visiattr.h.

EditableText VisibleStyleReference::m_Question [private]
 

Definition at line 245 of file visiattr.h.

const WizOpStyle& VisibleStyleReference::m_Style [private]
 

Definition at line 244 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