+ (MUIWindow *) window

Default constructor

- (BOOL) activate

Setting this to TRUE will activate the window. Setting this to FALSE has no effect. The attribute will change whenever the user activates/deactivates the window.

Specifying FALSE at object creation time will make the window open in an inactive state.

- (MUIArea *) activeObject

Set the active object in a window as if the user would have activated it with the tab key. The object has to be in the cycle chain for this command to work.

- (BOOL) addEventHandler:(struct MUI_EventHandlerNode *)ehnode

Event handlers introduced in muimaster.library V16 offer a new way for custom classes to receive user input. They work a little like the previously introduced input handlers (MUIM_Application_AddInputHandler). You fill out a struct MUI_EventHandlerNode (preferably located somewhere in the instance data of your custom class) with the type of events you wish to receive and then call MUIM_Window_AddEventHandler to add your node to a windows event handler queue.

Whenever an input event arrives, MUIs window class iterates through the list of event handlers. The class of the input event is matched against the event handlers class field and in case of a match, the method MUIM_HandleEvent is invoked on the specified object.

Each event handler may decide to "eat" the input event, this means window class will abort iterating the handler queue after calling this handler.

MUI follows certain priority rules when iterating through the handler queue of a window. If there are handler entries for the active object (MUIA_Window_ActiveObject) or for the default object (MUIA_Window_DefaultObject), their nodes are checked before all other nodes. Active objects are checked before default objects. If there was no active and no default object or if none of them ate the event, the rest of the handler queue is checked according to their ehn_Priority field.

A good place to add/remove event handlers is the MUIM_Setup/MUIM_Cleanup method pair of your custom class.

If you wish to change certain fields (e.g. ehn_Events) in an active handler (one that is currently added to a window), you must deactivate (remove) the handler, make your changes and then add it again. Do not change fields of an active handler without removing it first!

- (LONG) altHeight

Specify the alternate (zoomed) height of a window. If not present, the alternate height will be the minimum height.

- (LONG) altLeftEdge

Specify the alternate (zoomed) left position of a window. This defaults to the standard left position.

- (LONG) altTopEdge

Specify the alternate (zoomed) top position of a window. This defaults to the standard top position.

- (LONG) altWidth

Specify the alternate (zoomed) width of a window. If not present, the alternate width will be the minimum width.

- (void) cleanup
- (BOOL) closeRequest

When the user hits a windows close gadget, the window isn't closed immediately. Instead MUI only sets this attribute to TRUE to allow your application to react.

Usually, you will setup a notification that automatically closes the window when a close request appears, but you could e.g. pop up a confirmation requester or do some other things first.

- (MUIArea *) defaultObject

The default object in a window receives keyboard input as long as no other object is active. Good candidates for default objects are e.g. lonely listviews. Making such a listview the default object will allow the user to control it immediately without the need of several tab strokes for activation.

- (ULONG) disableKeys

Disable specific keyboard controls forthe related window Check the various MUIKEYF_#? defines for all the controls that might be specified. You might specify multiple keys by OR'ing the defines into a single mask

- (BOOL) fancyDrawing

OBSOLETE!

This attribute used to allow a more relaxed way of drawing for custom classes. This behaviour is discouraged, the attribute is obsolete. The only place where a class is allowed to draw something is the MUIM_Draw method. Setting a few flags and calling MUI_Redraw() on your object is no major performance loss.

OLD AND OBSOLETE DOCUMENTATION Usually, the only possible place to do some rendering is during a MUIM_Draw method. However, if you have a class that really requires very high graphical output speed (e.g. a module players scope or a game class), you can set MUIA_Window_FancyDrawing to TRUE.

This allows your class to render anywhere between MUIM_Show and MUIM_Hide, e.g. directly after an attribute change with OM_SET or from a seperate task.

Note that your rastport etc. is only valid between MUIM_Show and MUIM_Hide. Keep that in mind!

When drawing from a seperate task, you have to clone the RastPort and use the copy for your rendering!

Please use this attribute sparingly. It might prevent MUI from doing nice things with your window, e.g. building an automatic virtual group when the screen is too small.

MUIA_Window_FancyDrawing is really only necessary for very few types of applications. You should use the traditional way (MUIM_Draw and MUI_Redraw()) whenever and wherever possible!

- (ULONG) getMenuCheck:(ULONG)menuid

Ask whether a checkmark menu item has its checkmark set or cleared.

- (ULONG) getMenuState:(ULONG)menuid

Ask whether a menu item is enabled or disabled.

- (BOOL) hasAlpha

Enable/disable alpha transparency handling for the related window object. This adjusts both the internal MUI rendering and intuition's Window rendering and forwards the TRUE/FALSE state to intuition's window object as well via the WA_Alpha tag. It usually is already applied at object creation time but can also be modified later on. If enabled, it will use a per pixel opacity level based on the window's pixel buffer data instead of a global window opacity as specified by MUIA_Window_Opacity

- (LONG) height

Specify the height of a window. Usually, you won't give a pixel value here but instead use one of the following magic macros:

MUIV_Window_Height_Default: calculated from objects default sizes.

MUIV_Window_Height_MinMax(0..100): somewhere between the minimum height (0) and the maximum height (100) of your window.

MUIV_Window_Height_Visible(1..100): percentage of the screens visible height.

MUIV_Window_Height_Screen(1..100): percentage of the screens total height.

MUIV_Window_Height_Scaled: height will be adjusted so that width : height == minimum width : minimum height. Note that a windows width and height may not both be scaled.

Default for this tag is MUIV_Window_Height_Default.

As long as your window has a window id (MUIA_Window_ID), choosing a size is not that important. MUI will always remember a windows last position and size and these values will simply override your settings. Positioning and sizing should be completely under user control, a programmer doesn't need to worry about it.

- (ULONG) iD
- (struct InputEvent *) inputEvent

This attribute gets set whenever your window receives an input event. You can react on this by creating a notification event containing a standard commodities.library input description string.

Due to performance reasons, only IDCMP_RAWKEY, IDCMP_DISKINSERTED and IDCMP_DISKREMOVED events are translated to a MUIA_Window_InputEvent notification.

Prior to MUI 3.0, the input description string needed to remain valid as long as the notification lasts. MUI 3.0 converts the string to a struct IX immediately, speeding up the comparision and eliminating the need to keep the description strings allocated.

- (BOOL) isSubWindow

Windows with this flag set to TRUE dont get disposed when the application object is disposed. You should set this if your window belongs to an object placed in another window (e.g. popup windows) and you want to dispose the window object yourself during the OM_DISPOSE method of the parent object.

- (LONG) leftEdge

Specify the left edge of a window. Usually, you shouldn't define a pixel value here but instead use one of the following macros:

MUIV_Window_LeftEdge_Centered: window appears centered on the visible area of screen.

MUIV_Window_LeftEdge_Moused window appears centered under the mouse pointer.

Default for this tag is MUIV_Window_LeftEdge_Centered.

As long as your window has a window id (MUIA_Window_ID), choosing a position is not that important. MUI will always remember a windows last position and size and these values will simply override your settings. Positioning and sizing should be completely under user control, a programmer doesn't need to worry about it.

- (ULONG) menuAction

Whenever a menu item is selected, this attribute will be set to the corresponding UserData field of the gadtools NewMenu structure. This allows reacting on menu items via broadcasting.

- (MUIMenustrip *) menustrip

Specify a menu strip object for this window. The object is treated as a child of the window and will be disposed when the window is disposed.

Menustrip objects defined for a window will override an applications Menustrip object.

MUIA_Window_Menustrip replaces the old and obsolete MUIA_Window_Menu tag.

Usually, you will create the menu object with MUI's builtin object library from a gadtools NewMenu structure, but its also OK to define the menu tree "by hand" using the Family class.

If you have a global menu for all your applications windows but you want some windows to have no menu, use the MUIA_Window_NoMenus tag.

The attribute is ISG since muimaster.library 20.6902, IG with earlier versions.

- (MUIArea *) mouseObject

Find out which object is currently below the mouse pointer. You can set up notifications to react on changes or you can use IDCMP_MOUSEOBJECT in your event handler and query the attribute in your event scheduler.

Always returns the deepest nested object.

OLD AND OBSOLETE DOCUMENTATION When MUIA_Window_NeedsMouseObject is enabled for this window, you can setup notificationns on MUIA_Window_MouseObject to find out on which object the mouse pointer is located.

- (BOOL) noMenus

Temporarily disable the menu strip of a window.

- (void) noNotifySetActivate:(BOOL)activate
- (void) noNotifySetActiveObject:(MUIArea *)activeobject
- (void) noNotifySetActiveObjectSpecial:(ULONG)muivActiveObject
- (void) noNotifySetCloseRequest:(BOOL)closerequest
- (void) noNotifySetDefaultObject:(MUIArea *)defaultobject
- (void) noNotifySetDisableKeys:(ULONG)disablekeys
- (void) noNotifySetFancyDrawing:(BOOL)fancydrawing
- (void) noNotifySetHasAlpha:(BOOL)hasalpha
- (void) noNotifySetID:(ULONG)id
- (void) noNotifySetIsSubWindow:(BOOL)issubwindow
- (void) noNotifySetMenuAction:(ULONG)menuaction
- (void) noNotifySetMenustrip:(MUIMenustrip *)menustrip
- (void) noNotifySetNoMenus:(BOOL)nomenus
- (void) noNotifySetOpacity:(LONG)opacity
- (void) noNotifySetOpen:(BOOL)open
- (void) noNotifySetPublicScreen:(OBString *)publicscreen
- (void) noNotifySetRefWindow:(MUIWindow *)refwindow
- (void) noNotifySetRootObject:(id)rootobject
- (void) noNotifySetScreen:(struct Screen *)screen
- (void) noNotifySetScreenTitle:(OBString *)screentitle
- (void) noNotifySetSleep:(BOOL)sleep
- (void) noNotifySetTitle:(OBString *)title
- (void) noNotifySetUseBottomBorderScroller:(BOOL)usebottomborderscroller
- (void) noNotifySetUseLeftBorderScroller:(BOOL)useleftborderscroller
- (void) noNotifySetUseRightBorderScroller:(BOOL)userightborderscroller
- (void) noNotifySetVisibleOnMaximize:(BOOL)visibleonmaximize
- (LONG) opacity

Set the global opacity level of the related window object, range is 0-255. This affects intuition's Window rendering and it forwards the left aligned, shifted value to intuition's window object which is used as a 32bit opacity value then with 0xFFFFFFFF being the value for full visibility. It usually is already applied at object creation time but can also be modified later on.

- (BOOL) open

This little attribute can be used to open and close a window. When opening a window, MUI does lots of stuff to calculate sizes and positions of all gadgets. Minimum and maximum window sizes will be adjusted automatically.

When the minimum size of a window is too big to fit on the screen, MUI tries to reduce font sizes and does a new calculation. You should always design your windows to fit on a 640*200 screen with all fonts set to topaz/8.

When a window is closed (and you specified a MUIA_Window_ID), MUI remembers its position and size and uses these values during the next opening.

After setting MUIA_Window_Open to TRUE, you should test if MUI was able to open the window by getting the attribute again. If you don't and if this was the only window of your application, the user won't be able to do any input and your application will seem to hang.

- (OBString *) publicScreen

Force the window to appear on the public screen who's name is specified by this attribute. This tag overrides the user preferences setting and is overridden by MUIA_Window_Screen.

Please use this tag sparely, overriding user prefs is not a good idea!

- (BOOL) remEventHandler:(struct MUI_EventHandlerNode *)ehnode

Remove an event handler.

RESULT MUIM_Window_RemEventHandler cannot fail, the result value of the method is currently undefined.

- (id) rootObject

This is a pointer to a MUI object and defines the contents of your window. Usually, this root object will be of class MUIC_Group since you surely want to have more than one gadget.

The root object is treated as child of a window and will be disposed when the window is disposed. Note that windows can only have one child.

- (struct Screen *) screen

You can get a pointer to the parent screen of a window by getting this attribute. The result will be NULL when the window is currently closed.

Specifying MUIA_Window_Screen at object creation time or with a SetAttrs() call allows you to explicitly tell MUI on which screen the window should be opened. You normally won't need this feature and leave the decision about screens to the users preferences setting.

- (OBString *) screenTitle

This text will appear in the screens title bar when the window is active.

- (void) screenToBack

Put the window's screen to back. This command is only valid when the window is opened.

- (void) screenToFront

Put the window's screen to font. This command is only valid when the window is opened.

- (void) setActivate:(BOOL)activate
- (void) setActiveObject:(MUIArea *)activeobject
- (void) setActiveObjectSpecial:(ULONG)muivActiveObject

Allows modifying the active object via MUIV_Window_ActiveObject defines

- (void) setAltHeight:(LONG)altheight

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setAltLeftEdge:(LONG)altleftedge

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setAltTopEdge:(LONG)alttopedge

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setAltWidth:(LONG)altwidth

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setAppWindow:(BOOL)appwindow

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setBackdrop:(BOOL)backdrop

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setBorderless:(BOOL)borderless

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setCloseGadget:(BOOL)closegadget

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setCloseRequest:(BOOL)closerequest
- (void) setCycleChain:(Boopsiobject **)obj

Set the cycle chain for a window. To make MUI's keyboard control work, you need to setup a chain of objects that should be activatable with the tab key. This can be any objects you wish, MUI supports complete keyboard handling even for sliders or listviews.

If you forget to set a cycle chain because you are a mouse-man, you certainly will annoy some users of your application!

- (void) setDefaultObject:(MUIArea *)defaultobject
- (void) setDepthGadget:(BOOL)depthgadget

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setDisableKeys:(ULONG)disablekeys
- (void) setDragBar:(BOOL)dragbar

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setFancyDrawing:(BOOL)fancydrawing
- (void) setHasAlpha:(BOOL)hasalpha
- (void) setHeight:(LONG)height

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setID:(ULONG)id
- (void) setIsSubWindow:(BOOL)issubwindow
- (void) setLeftEdge:(LONG)leftedge

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setMenuAction:(ULONG)menuaction
- (ULONG) setMenuCheck:(ULONG)menuid stat:(LONG)stat

Set or clear the checkmark of a menu item.

- (ULONG) setMenuState:(ULONG)menuid stat:(LONG)stat

Enable or disable a menu item.

- (void) setMenustrip:(MUIMenustrip *)menustrip
- (void) setNeedsMouseObject:(BOOL)needsmouseobject

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setNoMenus:(BOOL)nomenus
- (void) setOpacity:(LONG)opacity
- (void) setOpen:(BOOL)open
- (void) setPanelWindow:(BOOL)panelwindow

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setPublicScreen:(OBString *)publicscreen
- (void) setRefWindow:(MUIWindow *)refwindow

Setting MUIA_Window_RefWindow to another MUI window object will make the left and top position relative to this reference window. Using MUIA_Window_LeftEdge, MUIV_Window_LeftEdge_Centered or MUIA_Window_TopEdge, MUIV_Window_TopEdge_Centered tag, you can easily open one window within another.

Note that if your window has an id, the window will remember its last position and reopen there. Thus, this tag is only useful if you omit MUIA_Window_ID, maybe for some small requester windows.

- (void) setRootObject:(id)rootobject
- (void) setScreen:(struct Screen *)screen
- (void) setScreenTitle:(OBString *)screentitle
- (void) setSizeGadget:(BOOL)sizegadget

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setSizeRight:(BOOL)sizeright

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setSleep:(BOOL)sleep
- (void) setTabletMessages:(BOOL)tabletmessages

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setTitle:(OBString *)title
- (void) setTopEdge:(LONG)topedge

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (void) setUseBottomBorderScroller:(BOOL)usebottomborderscroller
- (void) setUseLeftBorderScroller:(BOOL)useleftborderscroller
- (void) setUseRightBorderScroller:(BOOL)userightborderscroller
- (void) setVisibleOnMaximize:(BOOL)visibleonmaximize
- (void) setWidth:(LONG)width

CAUTION: this is an initializer attribute, meaning it cannot be changed after the underlying MUI object is instantiated

- (BOOL) setup
- (BOOL) sleep

This attribute can be used to put a window to sleep. The window gets disabled and a busy pointer appears.

The attribute contains a nesting count, if you tell your window to sleep twice, you will have to tell it to wake up twice too.

A sleeping window cannot be resized.

- (void) snapshot:(LONG)flags

MUIM_Window_Snapshot is the programmer's interface to MUI's window position remembering facility.

- (BOOL) tabletMessages

Enable/disable extended Tablet IntuiMessages supported in MorphOS. This directly forwards the true/false state to WA_TabletMessages if the actual Window is opened via Intuition and enables additional information if a supported tablet is connected and the boolean value is set to TRUE.

- (OBString *) title

Specify the title of a window.

- (void) toBack

Put the window to back. When the window is not currently open, this command does simply nothing.

- (void) toFront

Put the window to front. When the window is not currently open, this command does simply nothing.

- (LONG) topEdge

Specify the top edge of a window. Usually, you shouldn't define a pixel value here but instead use one of the following macros:

MUIV_Window_TopEdge_Centered: window appears centered on the visible area of screen.

MUIV_Window_TopEdge_Moused window appears centered under the mouse pointer.

MUIV_Window_TopEdge_Delta(p) window appears p pixels below the screens title bar.

Default for this tag is MUIV_Window_TopEdge_Centered.

As long as your window has a window id (MUIA_Window_ID), choosing a position is not that important. MUI will always remember a windows last position and size and these values will simply override your settings. Positioning and sizing should be completely under user control, a programmer doesn't need to worry about it.

- (BOOL) useBottomBorderScroller
- (BOOL) useLeftBorderScroller
- (BOOL) useRightBorderScroller
- (BOOL) visibleOnMaximize
- (LONG) width

Specify the width of a window. Usually, you won't give a pixel value here but instead use one of the following magic macros:

MUIV_Window_Width_Default: calculated from objects default sizes.

MUIV_Window_Width_MinMax(0..100): somewhere between the minimum width (0) and the maximum width (100) of your window.

MUIV_Window_Width_Visible(1..100): percentage of the screens visible width.

MUIV_Window_Width_Screen(1..100): percentage of the screens total width.

MUIV_Window_Width_Scaled: width will be adjusted so that width : height == minimum width : minimum height. Note that a windows width and height may not both be scaled.

Default for this tag is MUIV_Window_Width_Default.

As long as your window has a window id (MUIA_Window_ID), choosing a size is not that important. MUI will always remember a windows last position and size and these values will simply override your settings. Positioning and sizing should be completely under user control, a programmer doesn't need to worry about it.

- (struct Window *) window

When your window is open, you can obtain a pointer to the intuition Window structure with this tag and use it e.g. in an asl.library requester call.

Since the user can close your window any time (e.g. iconification), you must be prepared to receive a NULL pointer as result.