Object Styles

Workplace Shell objects have styles that define their behavior. The object class style is defined by wpQueryStyle. When an object is created, the object's style is initially inherited from the class. The wpQueryStyle method can modify the style flags to tailor the object. Also, wpModifyStyle can be used to set or reset individual style flags for the object. The following table lists the object style flags:

┌──────────────────────────────┬──────────────────────────────┐
│Style Name                    │Description                   │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NOCOPY               │The object cannot be copied.  │
│                              │The Copy option is not valid  │
│                              │for a direct manipulation     │
│                              │operation (Pickup and Drop)   │
│                              │and there is no Copy option in│
│                              │the object's context menu.    │
│                              │This option is inherited from │
│                              │the class' CLSSTYLE_NEVERCOPY │
│                              │style.                        │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NODELETE             │The object cannot be deleted. │
│                              │The object cannot be dragged  │
│                              │to the shredder and there is  │
│                              │no Delete option in the       │
│                              │object's context menu. This   │
│                              │option is inherited from the  │
│                              │class' CLSSTYLE_NEVERDELETE   │
│                              │style.                        │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NODRAG               │The object cannot be copied or│
│                              │moved. Direct manipulation    │
│                              │operations (Pickup and Drop)  │
│                              │are not valid for this object │
│                              │and there are no Copy, Move,  │
│                              │or Pickup options in the      │
│                              │object's context menu. This   │
│                              │option is inherited from the  │
│                              │class' CLSSTYLE_NEVERDRAG     │
│                              │style.                        │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NODROPON             │No other object can be dropped│
│                              │on this object using a direct │
│                              │manipulation operation (Pickup│
│                              │and Drop).                    │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NOLINK               │The object cannot have        │
│                              │shadows. The Link option is   │
│                              │not valid for a direct        │
│                              │manipulation operation (Pickup│
│                              │and Drop) and there is no     │
│                              │Create shadow option in the   │
│                              │object's context menu. This   │
│                              │option is inherited from the  │
│                              │class' CLSSTYLE_NEVERLINK     │
│                              │style.                        │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NOMOVE               │The object cannot be moved.   │
│                              │The Move option is not valid  │
│                              │for a direct manipulation     │
│                              │operation (Pickup and Drop)   │
│                              │and there is no Move option in│
│                              │the object's context menu.    │
│                              │This option is inherited from │
│                              │the class' CLSSTYLE_NEVERMOVE │
│                              │style.                        │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NOPRINT              │The object cannot be printed. │
│                              │The object cannot be dragged  │
│                              │to a Printer object and there │
│                              │is no Print option in the     │
│                              │object's context menu. This   │
│                              │option is inherited from the  │
│                              │class' CLSSTYLE_NEVERPRINT    │
│                              │style.                        │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NORENAME             │This object cannot be renamed.│
│                              │Its title cannot be changed   │
│                              │either by directly editing the│
│                              │title under the icon or by    │
│                              │changing the title on the     │
│                              │General page of the Settings  │
│                              │notebook.                     │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NOSETTINGS           │This object cannot be opened  │
│                              │in Settings view. There is no │
│                              │Settings option in the        │
│                              │object's context menu. This   │
│                              │option is inherited from the  │
│                              │class' CLSSTYLE_NEVERSETTINGS │
│                              │style.                        │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_NOTDEFAULTICON       │The icon associated with this │
│                              │object is not the class       │
│                              │default icon.                 │
│                              │                              │
│                              │Note:                         │
│                              │You should never modify this  │
│                              │style option because the      │
│                              │Workplace Shell uses it for   │
│                              │the following reasons:        │
│                              │                              │
│                              │o When you copy an object,    │
│                              │  the Workplace Shell         │
│                              │  determines when to create   │
│                              │  a copy of the object's      │
│                              │  icon.                       │
│                              │o When the Workplace Shell    │
│                              │  frees an icon.              │
│                              │                              │
│                              │If this style flag is set     │
│                              │incorrectly, the object's     │
│                              │icon could disappear or       │
│                              │could not be freed when       │
│                              │necessary, thereby wasting    │
│                              │system memory.                │
├──────────────────────────────┼──────────────────────────────┤
│OBJSTYLE_TEMPLATE             │This object is a template.    │
└──────────────────────────────┴──────────────────────────────┘


[Back: Class Styles]
[Next: Data File Related Methods]