#include <ngprop.h>
Inheritance diagram for SGNameProp:
Public Types | |
enum | { nPropertyCount = 3 } |
Public Member Functions | |
SGNameProp (const StringBase &strName, INT32 nIndex) | |
Constructs an SGNameProp object. | |
SGNameProp (const SGNameProp &other) | |
Copy constructor. | |
virtual | ~SGNameProp () |
Destroys an SGNameProp object. | |
const StringBase & | GetName () const |
INT32 | GetIndex () const |
BOOL | IsVirgin () const |
void | SetDirty () |
virtual BOOL | HandleMouse (SGNameItem *, SGMouseInfo *, SGMiscInfo *)=0 |
virtual void | CalcUiBounds (SGNameItem *, SGFormatInfo *, SGMiscInfo *, DocRect *)=0 |
virtual BOOL | HandleRedraw (SGNameItem *, SGRedrawInfo *, SGMiscInfo *, const DocRect &)=0 |
virtual BOOL | Write (CXaraFileRecord *pRec) |
Writes out an SGNameProp record. Derived classes should call this before writing their specific data. | |
virtual BOOL | Read (CXaraFileRecord *pRec) |
Reads in an SGNameProp record. Derived classes should call this before reading their specific data. | |
virtual SGNameProp * | Clone ()=0 |
Static Public Member Functions | |
static SGNameProp * | CreateDefault (const StringBase &strName, INT32 nIndex) |
Protected Member Functions | |
virtual BOOL | Change (SGNameItem *pItem, SGNameProp *pNewProp, StringBase *pstrNewName=0) |
Private Member Functions | |
CC_DECLARE_MEMDUMP (SGNameProp) | |
Private Attributes | |
StringBase | m_strName |
INT32 | m_nIndex |
BOOL | m_fIsVirgin |
Definition at line 126 of file ngprop.h.
|
Definition at line 131 of file ngprop.h. 00131 { nPropertyCount = 3 };
|
|
Constructs an SGNameProp object.
Definition at line 179 of file ngprop.cpp. 00180 : m_nIndex(nIndex), 00181 m_fIsVirgin(TRUE) 00182 { 00183 ERROR3IF(nIndex < 0 || nIndex >= nPropertyCount, 00184 "SGNameProp::SGNameProp: index out of range"); 00185 m_strName.Alloc(strName.Length() + 1); 00186 m_strName = strName; 00187 }
|
|
Copy constructor.
Definition at line 214 of file ngprop.cpp. 00215 : m_nIndex(other.m_nIndex), 00216 m_fIsVirgin(other.m_fIsVirgin) 00217 { 00218 m_strName.Alloc(other.m_strName.Length() + 1); 00219 m_strName = other.m_strName; 00220 }
|
|
Destroys an SGNameProp object.
Definition at line 199 of file ngprop.cpp.
|
|
Implemented in NamedTickboxProp, NamedExportProp, and NamedStretchProp. |
|
|
|
Definition at line 277 of file ngprop.cpp. 00278 { 00279 String_256 strName; 00280 pItem->GetNameText(&strName); 00281 00282 StringBase* apstr[2]; 00283 apstr[0] = &strName; 00284 apstr[1] = pstrNewName; 00285 00286 OpDescriptor* pDesc = OpDescriptor::FindOpDescriptor( OPTOKEN_CHANGE_SET_PROPERTY ); 00287 ERROR3IF(pDesc == 0, "SGNameProp::Change: can't find OpDescriptor"); 00288 OpParam param( apstr, pNewProp ); 00289 pDesc->Invoke( ¶m ); 00290 return TRUE; 00291 }
|
|
Implemented in NamedExportProp, NamedSliceProp, and NamedStretchProp. |
|
Definition at line 234 of file ngprop.cpp. 00235 { 00236 SGNameProp* pProp; 00237 switch (nIndex) 00238 { 00239 case NamedExportProp::nIndex: 00240 pProp = new NamedExportProp(strName); 00241 break; 00242 00243 case NamedSliceProp::nIndex: 00244 pProp = new NamedSliceProp(strName, TRUE); // by default is a slice 00245 break; 00246 00247 case NamedStretchProp::nIndex: 00248 pProp = new NamedStretchProp(strName); 00249 break; 00250 00251 default: 00252 ERROR3("SGNameProp::CreateDefault: index out of range"); 00253 pProp = 0; 00254 break; 00255 } 00256 00257 ERRORIF(pProp == 0, _R(IDE_NOMORE_MEMORY), 0); 00258 return pProp; 00259 }
|
|
Definition at line 143 of file ngprop.h. 00143 { return m_nIndex; }
|
|
Definition at line 142 of file ngprop.h. 00142 { return m_strName; }
|
|
Implemented in NamedTickboxProp, NamedExportProp, and NamedStretchProp. |
|
Implemented in NamedTickboxProp, NamedExportProp, and NamedStretchProp. |
|
Definition at line 147 of file ngprop.h. 00147 { return m_fIsVirgin; }
|
|
Reads in an SGNameProp record. Derived classes should call this before reading their specific data.
Reimplemented in NamedTickboxProp, NamedExportProp, NamedSliceProp, and NamedStretchProp. Definition at line 325 of file ngprop.cpp. 00326 { 00327 // Read in the virgin state. 00328 BYTE n; 00329 if (!pRec->ReadBYTE(&n)) return FALSE; 00330 m_fIsVirgin = (BOOL) n; 00331 return TRUE; 00332 }
|
|
Definition at line 148 of file ngprop.h. 00148 { m_fIsVirgin = FALSE; }
|
|
Writes out an SGNameProp record. Derived classes should call this before writing their specific data.
Reimplemented in NamedTickboxProp, NamedExportProp, NamedSliceProp, and NamedStretchProp. Definition at line 306 of file ngprop.cpp. 00307 { 00308 // Write out the virgin state. 00309 return pRec->WriteBYTE((BYTE) m_fIsVirgin); 00310 }
|
|
|
|
|
|
|