#include <ngitem.h>
Inheritance diagram for SGUsedBitmaps:
Public Member Functions | |
SGUsedBitmaps () | |
virtual BOOL | IsMember (Node *, const StringBase &) const |
virtual BOOL | CreateItems (Node *) |
Create 'Used Bitmaps' set items for the node, as appropriate. |
Definition at line 314 of file ngitem.h.
|
Definition at line 317 of file ngitem.h. 00318 : SGNameGroup(_R(IDS_NAMEGAL_BITMAPS_TYPE), _R(IDS_NAMEGAL_BITMAPS_TITLE)) 00319 { /* empty */ }
|
|
Create 'Used Bitmaps' set items for the node, as appropriate.
Implements SGNameGroup. Definition at line 1232 of file ngitem.cpp. 01233 { 01234 // Is the object itself a kind of bitmap? 01235 KernelBitmap* pBmp; 01236 if (pNode->IsABitmap()) 01237 { 01238 pBmp = ((NodeBitmap*) pNode)->BitmapRef.GetBitmap(); 01239 if (pBmp != 0 && RegisterMember(pNode, pBmp->GetName()) == 0) 01240 return FALSE; 01241 else if (pBmp != 0) 01242 return (TRUE); 01243 } 01244 01245 // Does it have a bitmap transparency fill attribute? 01246 NodeAttribute* pAttr = pNode->FindFirstAttr( &Node::IsABitmapTranspFill ); 01247 if (pAttr != 0) 01248 { 01249 pBmp = ((BitmapTranspFillAttribute*) pAttr->GetAttributeValue()) 01250 ->BitmapRef.GetBitmap(); 01251 01252 if (pBmp != 0 && RegisterMember(pNode, pBmp->GetName()) == 0) 01253 return FALSE; 01254 else if (pBmp != 0) 01255 return (TRUE); 01256 } 01257 01258 // Does a bitmap colour or transparency fill attribute apply to it? 01259 pAttr = pNode->FindFirstAttr( &Node::IsABitmapFill ); 01260 if (pAttr != 0 && !pAttr->IsAFractalFill()) // fractals and plasmas don't have a bitmap!!! sjk 01261 { 01262 pBmp = ((BitmapFillAttribute*) pAttr->GetAttributeValue()) 01263 ->BitmapRef.GetBitmap(); 01264 if (pBmp != 0 && RegisterMember(pNode, pBmp->GetName()) == 0) 01265 return FALSE; 01266 else if (pBmp != 0) 01267 return (TRUE); 01268 } 01269 01270 return TRUE; 01271 }
|
|
Implements SGNameGroup. Definition at line 1186 of file ngitem.cpp. 01187 { 01188 // Is it a bitmap with that value? 01189 KernelBitmap* pBmp; 01190 String_256 str; 01191 if (pNode->IsABitmap()) 01192 { 01193 pBmp = ((NodeBitmap*) pNode)->BitmapRef.GetBitmap(); 01194 if (pBmp != 0 && pBmp != (class KernelBitmap *)1 && pBmp->GetName() == strName) return TRUE; 01195 } 01196 01197 // Test against bitmap transparency fills. 01198 NodeAttribute* pAttr = pNode->FindFirstAttr( &Node::IsABitmapTranspFill ); 01199 if (pAttr != 0) 01200 { 01201 pBmp = ((BitmapTranspFillAttribute*) pAttr->GetAttributeValue()) 01202 ->BitmapRef.GetBitmap(); 01203 if (pBmp != 0 && pBmp != (class KernelBitmap *)1 && pBmp->GetName() == strName) return TRUE; 01204 } 01205 01206 // Test against bitmap colour fills. 01207 pAttr = pNode->FindFirstAttr( &Node::IsABitmapColourFill ); 01208 if (pAttr != 0) 01209 { 01210 pBmp = ((BitmapFillAttribute*) pAttr->GetAttributeValue()) 01211 ->BitmapRef.GetBitmap(); 01212 if (pBmp != 0 && pBmp != (class KernelBitmap *)1 && pBmp->GetName() == strName) return TRUE; 01213 } 01214 01215 return FALSE; 01216 }
|