StaticTextControl Class Reference

Represents a Static Text Control (Label) in a DialogOp. More...

#include <gadget.h>

Inheritance diagram for StaticTextControl:

DialogMgrGadget NotifyingGadget Gadget CCCoreUI List of all members.

Public Member Functions

 StaticTextControl (DialogOp *const pDialog, CGadgetID ControlID, const StringBase &InitialText=NullString, Notifiable *const pTell=&Nobody)
 Default constructor for a TextControl.
virtual ~StaticTextControl ()
void UpdateText (const StringBase &NewString)
 Sets the text in this control.
void RetrieveText (StringBase *const pExistingString) const
 Gets the text currently displayed in this StaticTextControl.
virtual void OnChange ()
 Don't use this (yet!).

Protected Member Functions

const StaticTextControloperator= (const StaticTextControl &OtherControl)
 StaticTextControl (const StaticTextControl &OtherControl)

Private Member Functions

 CC_DECLARE_MEMDUMP (StaticTextControl)

Private Attributes

Notifiablem_pObserver

Detailed Description

Represents a Static Text Control (Label) in a DialogOp.

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

Definition at line 527 of file gadget.h.


Constructor & Destructor Documentation

StaticTextControl::StaticTextControl DialogOp *const   pDialog,
CGadgetID  ControlID,
const StringBase InitialText = NullString,
Notifiable *const   pTell = &Nobody
 

Default constructor for a TextControl.

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

Definition at line 316 of file gadget.cpp.

00318                                                                   :
00319     DialogMgrGadget(pDialog, ControlID),
00320     m_pObserver(pTell)
00321 {
00322     if (!InitialText.IsEmpty())
00323     {
00324         pDialog->SetStringGadgetValue(m_ControlID, InitialText);
00325     }
00326 }

virtual StaticTextControl::~StaticTextControl  )  [inline, virtual]
 

Definition at line 537 of file gadget.h.

00537 {};

StaticTextControl::StaticTextControl const StaticTextControl OtherControl  )  [protected]
 

Definition at line 396 of file gadget.cpp.

00396                                                                           :
00397     DialogMgrGadget(NULL, 0)
00398 {
00399     ERROR3("StaticTextControl copy constructor not implemented\n");
00400 }


Member Function Documentation

StaticTextControl::CC_DECLARE_MEMDUMP StaticTextControl   )  [private]
 

void StaticTextControl::OnChange  )  [inline, virtual]
 

Don't use this (yet!).

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

Definition at line 383 of file gadget.cpp.

00384 {
00385     Notify(m_pObserver);
00386 }

const StaticTextControl & StaticTextControl::operator= const StaticTextControl OtherControl  )  [protected]
 

Definition at line 389 of file gadget.cpp.

00390 {
00391     ERROR3("StaticTextControl assignment not implemented\n");
00392 
00393     return *this;
00394 }

void StaticTextControl::RetrieveText StringBase *const   pDisplayedString  )  const
 

Gets the text currently displayed in this StaticTextControl.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
Parameters:
pDisplayedString : the string to set in the text control [OUTPUTS]

Definition at line 362 of file gadget.cpp.

00363 {
00364     ASSERT(m_ControlID != 0 && m_pDialog != NULL);
00365 
00366     if (pDisplayedString != NULL)
00367     {
00368         *pDisplayedString = m_pDialog->GetStringGadgetValue(m_ControlID);
00369     }
00370 }

void StaticTextControl::UpdateText const StringBase NewString  ) 
 

Sets the text in this control.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
Input: NewString : the string to set in the static control (label)

Definition at line 341 of file gadget.cpp.

00342 {
00343     ASSERT(m_ControlID != 0 && m_pDialog != NULL);
00344 
00345     m_pDialog->SetStringGadgetValue(m_ControlID, NewString);
00346     Notify(m_pObserver);
00347 }


Member Data Documentation

Notifiable* StaticTextControl::m_pObserver [private]
 

Definition at line 549 of file gadget.h.


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