#include <attraggl.h>
Inheritance diagram for SingletonAppliedAttribute:
Public Member Functions | |
SingletonAppliedAttribute (NodeAttribute &TheAttribute) | |
This constructor tries to create a UserInterface in the form of a VisibleUserAttribute so the user can alter the attributes' contents. | |
SingletonAppliedAttribute (VisibleAttribute &TheVisibleAttribute) | |
This constructor is used for new VisibleAttributes (i.e., ones that haven't yet been applied). | |
SingletonAppliedAttribute (const SingletonAppliedAttribute &Other) | |
virtual | ~SingletonAppliedAttribute () |
Destructor removes any internal heap muck. | |
virtual BOOL | Display (DialogOp &Dialog) |
This SingletonAppliedAttribute appears in the Wizard Properties dialog as a "Used Property". When selected it displays its innards. | |
virtual void | Hide () |
This SingletonAppliedAttribute appears in the Wizard Properties dialog as a "Used Property". When de-selected it hides what it was displaying and makes any updates to the actual VisibleAttribute. | |
virtual StringBase & | GetText (StringBase &Description) const |
Provides the text that goes in any UI. | |
virtual AttributeIdentifier | GetAttrID () const |
virtual BOOL | ApplyAttribute (Operation &OpToApplyWith) |
This is called when the AppliedAttribute should apply itself to the selection. | |
virtual VisibleAttribute * | GetVisibleAttribute () |
Private Member Functions | |
CC_DECLARE_MEMDUMP (SingletonAppliedAttribute) | |
Private Attributes | |
VisibleAttribute * | m_pVisibleAttribute |
String_128 | m_AttrID |
DialogOp * | m_pDialog |
Definition at line 339 of file attraggl.h.
|
This constructor tries to create a UserInterface in the form of a VisibleUserAttribute so the user can alter the attributes' contents.
Definition at line 836 of file attraggl.cpp. 00836 : 00837 m_AttrID(TheAttribute.GetAttributeClassID()) 00838 { 00839 00840 m_pVisibleAttribute = TheAttribute.CreateVisibleAttribute(); 00841 if (m_pVisibleAttribute != NULL) 00842 { 00843 m_pVisibleAttribute->MarkAsUsed(); 00844 } 00845 m_pDialog = NULL; 00846 }
|
|
This constructor is used for new VisibleAttributes (i.e., ones that haven't yet been applied).
Definition at line 867 of file attraggl.cpp. 00867 : 00868 m_AttrID(NullString) 00869 { 00870 m_pVisibleAttribute = &TheVisibleAttribute; 00871 00872 // Create us a quick NodeAttribute so we can get the ClassID thing 00873 NodeAttribute* pAttrib = m_pVisibleAttribute->CreateNewAttribute(); 00874 00875 if (pAttrib != NULL) 00876 { 00877 m_AttrID = pAttrib->GetAttributeClassID(); 00878 delete pAttrib; 00879 } 00880 m_pDialog = NULL; 00881 }
|
|
Definition at line 347 of file attraggl.h. 00347 : m_AttrID(NonConstNullString) 00348 { TRACE( wxT("SingletonAppliedAttribute copy constructor not implemented\n") ); }
|
|
Destructor removes any internal heap muck.
Definition at line 894 of file attraggl.cpp. 00895 { 00896 delete m_pVisibleAttribute; 00897 m_pVisibleAttribute = NULL; 00898 }
|
|
This is called when the AppliedAttribute should apply itself to the selection.
Implements AppliedAttribute. Definition at line 1038 of file attraggl.cpp. 01039 { 01040 BOOL Ok = TRUE; 01041 01042 if (GetVisibleAttribute() != NULL) 01043 { 01044 NodeAttribute* pAttrib = GetVisibleAttribute()->CreateNewAttribute(); 01045 Ok = (pAttrib != NULL); 01046 01047 if (Ok) 01048 { 01049 // Obtain a pointer to the op descriptor for the attribute operation 01050 OpDescriptor* const pOpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(OpApplyAttribToSelected)); 01051 ENSURE_NOT_NULL(pOpDesc); 01052 01053 // Invoke the operation, passing Attrib as a parameter 01054 OpParam Param( pAttrib, TRUE ); 01055 pOpDesc->Invoke( &Param ); // TRUE for undo 01056 } 01057 01058 delete pAttrib; 01059 pAttrib = NULL; 01060 } 01061 else 01062 { 01063 TRACE( _T("SingletonAppliedAttribute::ApplyAttribute() : NULL Members") ); 01064 } 01065 01066 return Ok; 01067 }
|
|
|
|
This SingletonAppliedAttribute appears in the Wizard Properties dialog as a "Used Property". When selected it displays its innards.
Reimplemented from VisibleListItem. Definition at line 918 of file attraggl.cpp. 00919 { 00920 PORTNOTETRACE("dialog","SingletonAppliedAttribute::Display - do nothing"); 00921 #ifndef EXCLUDE_FROM_XARALX 00922 BOOL Ok = TRUE; 00923 00924 if (m_pVisibleAttribute != NULL) 00925 { 00926 m_pVisibleAttribute->Display(Dialog); 00927 00928 // god, it's another bodge...it will get sorted, honest! 00929 // if the user changes the text then we'll enable the apply button 00930 // but we need to make sure we don't interpret our own internal changes 00931 // We disable the message processing (in TemplateDialog) in Hide() 00932 m_pDialog = &Dialog; 00933 00934 ENSURE_KIND((&Dialog), TemplateDialog); 00935 00936 TemplateDialog& BetterBeThisDialog = (TemplateDialog&)Dialog; 00937 BetterBeThisDialog.SetUserCanModifyQuestion(TRUE); 00938 00939 Ok = m_pVisibleAttribute->Interact(Dialog); 00940 } 00941 else 00942 { 00943 TRACE(_T("SingletonAppliedAttribute::Display() : NULL Members")); 00944 Ok = FALSE; 00945 } 00946 00947 return Ok; 00948 #endif 00949 return FALSE; 00950 }
|
|
Implements AppliedAttribute. Definition at line 362 of file attraggl.h. 00362 { return m_AttrID; }
|
|
Provides the text that goes in any UI.
Implements VisibleListItem. Definition at line 1008 of file attraggl.cpp. 01009 { 01010 if (m_pVisibleAttribute != NULL) 01011 { 01012 return m_pVisibleAttribute->GetText(Description); 01013 } 01014 else 01015 { 01016 return Description = String_256(_R(IDS_ERRORS_UNKNOWN)); 01017 } 01018 }
|
|
Implements AppliedAttribute. Definition at line 364 of file attraggl.h. 00364 { return m_pVisibleAttribute; }
|
|
This SingletonAppliedAttribute appears in the Wizard Properties dialog as a "Used Property". When de-selected it hides what it was displaying and makes any updates to the actual VisibleAttribute.
Reimplemented from VisibleListItem. Definition at line 968 of file attraggl.cpp. 00969 { 00970 PORTNOTETRACE("dialog","SingletonAppliedAttribute::Hide - do nothing"); 00971 #ifndef EXCLUDE_FROM_XARALX 00972 if (m_pDialog != NULL && m_pVisibleAttribute != NULL) 00973 { 00974 ENSURE_KIND(m_pDialog, TemplateDialog); 00975 00976 // Disable the processing of TEXT_CHANGED message (in TemplateDialog) 00977 // otherwise we end up processing our own changes 00978 TemplateDialog* pBetterBeThisDialog = (TemplateDialog*)m_pDialog; 00979 pBetterBeThisDialog->SetUserCanModifyQuestion(FALSE); 00980 00981 m_pVisibleAttribute->Hide(); 00982 00983 // we'll say we're not on a dialog any more so we can ignore further requests 00984 m_pDialog = NULL; 00985 } 00986 else 00987 { 00988 TRACE(_T("SingletonAppliedAttribute::Hide() : NULL Members")); 00989 } 00990 #endif 00991 }
|
|
Definition at line 369 of file attraggl.h. |
|
Definition at line 370 of file attraggl.h. |
|
Definition at line 368 of file attraggl.h. |