+ (MUINotify *) notify

Default constructor

- (struct AppMessage *) appMessage

When your window is an AppWindow, i.e. you have set the MUIA_Window_AppWindow attribute to TRUE, you will be able to get AppMessages by listening to MUIA_AppMessage. Whenever an AppMessage arrives, this attribute will be set to a pointer to that message.

MUIA_AppMessage is object specific. You can e.g. set up different notifications for different objects in your window, they will only get exectued when icons are dropped over the specific object.

If you wait on MUIA_AppMessage with a window object, your notify will always get executed when icons are dropped on the window.

Notes:

- You should use the MUIM_CallHook method to call a hook function when an AppMessage arrives (see below). The pointer to the AppMessage is valid only as long as the notification method is executed.

- AppWindows are only possible on the workench screen.

- (MUIApplication *) applicationObject

You can obtain a pointer to the application object that some gadget belongs to by using this attribute. Useful mainly within callback hooks if you do not want to deal with global variables.

If your object is not currently attached to an application, you will receive NULL.

- (OBString *) cSSFilePath
- (IPTR) export:(MUIDataspace *)dataspace

This method is called for each object in the application tree (including menus) during execution of MUIM_Application_Save. It's purpose is to export an objects "contents" to a dataspace object for later saving to an IFF file.

If you override this method to export your custom data, you are supposed to use your MUIA_ObjectID as ID for the dataspace entry. Don't export if your MUIA_ObjectID is 0.

RESULT Return 0 if you dont want your superclasses to be able to import/export any values themselves. Otherwise return(DoSuperMethodA(cl,obj,msg));

- (id) findUData:(ULONG)udata

This method tests if the MUIA_UserData of the object contains the given and returns the object pointer in this case.

Although this is not very useful for single objects, performing this method on objects that handle children can become very handy. In this case, all the children (any maybe their children) are tested against and the first matching object is returned.

This method is especially useful if you created your menu tree with a NewMenu structure and you want to find the object pointer for a single menu item.

- (LONG) helpLine

Define a line in a help file specified with MUIA_Application_HelpFile.

- (OBString *) helpNode

Define a node in a help file specified with MUIA_Application_HelpFile.

- (IPTR) import:(MUIDataspace *)dataspace

This method is called for each object in the application tree (including menus) during execution of MUIM_Application_Load. It's purpose is to import an objects "contents" from a dataspace object after loading from an IFF file.

If you override this method to import your custom data, you are supposed to use your MUIA_ObjectID as ID for the dataspace entry. Don't import if your MUIA_ObjectID is 0.

RESULT Return 0 if you dont want your superclasses to be able to import/export any values themselves. Otherwise return(DoSuperMethodA(cl,obj,msg));

- (void) killAllNotifies

Removes all notifications on a given attribute

- (void) killNotify:(SEL)attribute
- (ULONG) muiaFromSelector:(SEL)selector

Each settable attribute may trigger a MUI notification. In order to translate the objc selector into an attribute tag, each MUINotify subclass shall implement this method

- (void) noNotifySetAppMessage:(struct AppMessage *)appmessage
- (void) noNotifySetHelpLine:(LONG)helpline
- (void) noNotifySetHelpNode:(OBString *)helpnode
- (void) noNotifySetNoNotify:(BOOL)nonotify
- (void) noNotifySetNoNotifyMethod:(ULONG)nonotifymethod
- (void) noNotifySetObjectID:(ULONG)objectid
- (void) noNotifySetUserData:(ULONG)userdata
- (BOOL) notify:(SEL)attribute performSelector:(SEL)selector

Establishes a notification on the MUIA attribute related to selector 'attribute' - as in MUIAText's @selector(contents) would use MUIA_Text_Contents and calls the selector 'selector' when the notification occurs The notification is triggered every time the value is set Notifications are automatically removed when your object gets deinstantiated

- (BOOL) notify:(SEL)attribute performSelector:(SEL)selector withNegatedRawTriggerValueTarget:(id)weak
- (BOOL) notify:(SEL)attribute performSelector:(SEL)selector withObject:(id)strong

Passes the object 'strong' as a parameter to the selector, 'strong' implies forcing a strong relationship to the object

- (BOOL) notify:(SEL)attribute performSelector:(SEL)selector withRawTriggerValueTarget:(id)weak
- (BOOL) notify:(SEL)attribute performSelector:(SEL)selector withTarget:(id)weak

The selector shall be called on the target object rather than self, the target is a weak reference and you MUST ensure it's valid while the notification is in place

- (BOOL) notify:(SEL)attribute performSelector:(SEL)selector withTarget:(id)weak withObject:(id)strong
- (BOOL) notify:(SEL)attribute performSelector:(SEL)selector withTriggerValueTarget:(id)weak
- (BOOL) notify:(SEL)attribute performSelectorWithNegatedRawTriggerValue:(SEL)selector
- (BOOL) notify:(SEL)attribute performSelectorWithRawTriggerValue:(SEL)selector

Trigger value is passed as a raw IPTR

- (BOOL) notify:(SEL)attribute performSelectorWithTriggerValue:(SEL)selector

Passes the trigger value as a parameter to the selector

- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelector:(SEL)selector
- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelector:(SEL)selector withNegatedRawTriggerValueTarget:(id)weak
- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelector:(SEL)selector withObject:(id)strong
- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelector:(SEL)selector withRawTriggerValueTarget:(id)weak
- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelector:(SEL)selector withTarget:(id)weak
- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelector:(SEL)selector withTarget:(id)weak withObject:(id)strong
- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelector:(SEL)selector withTriggerValueTarget:(id)weak
- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelectorWithNegatedRawTriggerValue:(SEL)selector
- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelectorWithRawTriggerValue:(SEL)selector
- (BOOL) notify:(SEL)attribute trigger:(ULONG)value performSelectorWithTriggerValue:(SEL)selector
- (id) objectForMUIAAttribute:(ULONG)attribute value:(IPTR)value
- (id) objectForSelector:(SEL)selector value:(IPTR)value

Converts the value to a native objc type, using the class returned by typeFromSelector

- (ULONG) objectID

Objects with a non NULL MUIA_ObjectID export their contents during MUIM_Application_Save and import them during MUIM_Application_Load.

You have to use different ObjectIDs for your objects!

- (id) parent

Get a pointer to the parent object of the current object. The parent object is always the group/family object which contains the current object. If an object has no parent group, this attribute will be NULL.

- (LONG) revision

Get the revision number of an objects class. Although MUIA_Revision is documented at notify class, you will of course receive the revision number of the objects true class.

- (void) setAppMessage:(struct AppMessage *)appmessage
- (void) setHelpLine:(LONG)helpline
- (void) setHelpNode:(OBString *)helpnode
- (void) setNoNotify:(BOOL)nonotify

If you set up a notify on an attibute to react on user input, you will also recognize events when you change this attribute under program control with SetAttrs(). Setting MUIA_NoNotify together with your attribute will prevent this notification from being triggered.

- (void) setNoNotifyMethod:(ULONG)nonotifymethod
- (void) setObjectID:(ULONG)objectid
- (void) setUserData:(ULONG)userdata
- (Class) typeFromMUIAAttribute:(ULONG)attribute
- (Class) typeFromSelector:(SEL)selector

Returns the ObjC class that represents the type related to the given attribute For MUIA_Text_Contents the selector would be @selector(contents) and returned class equal to [OBString class] For attributes of which the return type is unknown, etc, this will return NULL For the moment, the only supported classes are OBString, OBNumber and MUIObject

- (ULONG) userData

A general purpose value to fill in any kind of information.

- (LONG) version

Get the version number of an objects class. Although MUIA_Version is documented at notify class, you will of course receive the version number of the objects true class.