#include <uielem.h>
Inheritance diagram for EditableText:
Public Member Functions | |
EditableText (const StringBase &TextString=NullString) | |
Provides the user with a string that they can edit and we can retrieve. | |
virtual | ~EditableText () |
Ensures the text in the control / gadget is empty. | |
EditableText (const EditableText &Other) | |
Warns that these members are unimplemented (destructor is though). | |
virtual const EditableText & | operator= (const EditableText &Other) |
virtual const EditableText & | operator= (const StringBase &NewText) |
Puts the given text into the UIElement. | |
operator const StringBase & () | |
Pretends this EditableText is a StringBase, so it can be assigned and stuff. | |
virtual BOOL | Display (DialogOp &Dialog) |
virtual BOOL | Interact (DialogOp &Dialog) |
virtual BOOL | Display (TextControl &Control) |
Displays this EditableText in the given TextControl. | |
virtual void | Hide () |
Ensures the Text in the control is the text inside this EditableText object. | |
Private Attributes | |
EditableText::Observer | m_Watcher |
TextControl * | m_pUIElement |
String_256 | m_String |
Friends | |
void | Observer::Notify (Notifier *const pSender) |
Classes | |
class | Observer |
Definition at line 263 of file uielem.h.
|
Provides the user with a string that they can edit and we can retrieve.
The following code kicks out: warning C4355: 'this' : used in base member initializer list. Normally, it would be dangerous for the contained-object constructor to access the container class because the contained objects are initialized before the container is initialized. We don't do that here, and it's convenient to pass a pointer to the container at construction time, so turn off the warning. Definition at line 874 of file uielem.cpp. 00874 : 00875 m_Watcher(this), 00876 m_pUIElement(NULL), 00877 m_String(TextString) 00878 { 00879 }
|
|
Ensures the text in the control / gadget is empty.
Definition at line 894 of file uielem.cpp. 00895 { 00896 if (m_pUIElement != NULL) 00897 { 00898 m_pUIElement->UpdateText(NullString); 00899 } 00900 }
|
|
Warns that these members are unimplemented (destructor is though).
Definition at line 916 of file uielem.cpp. 00916 : 00917 m_Watcher(this) 00918 { 00919 ERROR3("EditableText - copy constructor unimplemented\n"); 00920 }
|
|
Displays this EditableText in the given TextControl.
Definition at line 1034 of file uielem.cpp. 01035 { 01036 m_pUIElement = &Control; 01037 Control.UpdateText(m_String); 01038 01039 return TRUE; 01040 }
|
|
Implements UserInterface. Definition at line 276 of file uielem.h. 00276 { return TRUE; }
|
|
Ensures the Text in the control is the text inside this EditableText object.
Implements UserInterface. Definition at line 1057 of file uielem.cpp. 01058 { 01059 if (m_pUIElement != NULL) 01060 { 01061 m_pUIElement->RetrieveText(&m_String); 01062 m_pUIElement->UpdateText(NullString); 01063 m_pUIElement->Disable(); 01064 m_pUIElement = NULL; 01065 } 01066 }
|
|
Implements UserInterface. Definition at line 277 of file uielem.h. 00277 { return TRUE; }
|
|
Pretends this EditableText is a StringBase, so it can be assigned and stuff.
Definition at line 963 of file uielem.cpp. 00964 { 00965 if (m_pUIElement != NULL) 00966 { 00967 m_pUIElement->RetrieveText(&m_String); 00968 } 00969 00970 return m_String; 00971 }
|
|
Puts the given text into the UIElement.
Definition at line 943 of file uielem.cpp. 00944 { 00945 m_String = NewString; 00946 00947 Notify(&m_Watcher); 00948 00949 return *this; 00950 }
|
|
Definition at line 925 of file uielem.cpp. 00926 { 00927 ERROR3("EditableText - assignment operator not implemented\n"); 00928 00929 return *this; 00930 }
|
|
|
|
|
|
|
|
|