Popasl.mui Class Reference

BOOPSI custom class Popasl.mui (MUI 3.8 dev). Each ### sub-section below documents one of the class's attributes or methods. Sub-classes of Popasl.mui are listed at the end under Sub-classes; the class hierarchy itself is documented in the MUI classes index.

Function index

Class definition

Attributes


Popasl.mui


MUIA_Popasl_Active

MUIA_Popasl_Active -- (V7 ) [..G], BOOL

Function

Popasl creates asynchronous popups. Requesters are opened in a seperately spawned task and don't disturb the rest of the application. You can ask for the state of a requester by querying the MUIA_Popasl_Active attribute. It will return TRUE when the requester is currently open, FALSE otherwise. Common use for this attribute is to prevent an application from being terminated while a requester is open. If you try to dispose the popasl object with a currently open requester, MUI will freeze your task as long as the requester stays there.

Example

case MUIV_Application_ReturnID_Quit:
{
LONG active;
get(pop1,MUIA_Popasl_Active,&active);
if (!active) get(pop2,MUIA_Popasl_Active,&active);
if (!active) get(pop3,MUIA_Popasl_Active,&active);
if (!active) get(pop4,MUIA_Popasl_Active,&active);
if (active)
MUI_Request(app,window,0,NULL,"OK",
"Cannot quit now, still some asl popups opened.");
else
running = FALSE;
}
break;

See also

MUIA_Popasl_StartHook, MUIA_Popasl_StopHook, MUIA_Popasl_Type


MUIA_Popasl_StartHook

**MUIA_Popasl_StartHook -- (V7 ) [ISG], struct Hook ***

Function

Before popasl class opens the asl requester, it has to get some kind of parameters describing its initial contents. A file popup would e.g. need to split the string gadgets contents into path and file name part and pass these as ASLFR_InititalFile and ASLFR_InitialDrawer to the requester. The MUIA_Popasl_StartHook tag describes a hook function that will be called immediately before the requester is opened. It will receive a pointer to itself in A0, a pointer to the popasl object in A2 and a pointer to a taglist in A1. This taglist already contains some tags: ASLFR/FO/..._Screen : parent screen ASLFR/FO/..._PrivateIDCMP : TRUE ASLFR/FO/..._InititalLeftEdge: left edge of popasl object ASLFR/FO/..._InititalTopEdge : bottom edge of popasl object ASLFR/FO/..._InititalWidth : width of popasl object, only present when the popup is called for the first time. You may add other tags to the list, but beware that the maximum allowed number of tags is 15. If you need more, use the TAG_MORE tag. Since the asl requester will run in a seperate task, you should not change the state of the ASLFR_PrivateIDCMP tag! If your hook returns TRUE, popasl class opens the requester with the given taglist. A return value of FALSE should be used when something went wrong, no requester will be opened in this case. For file and font requester, popasl class will fall back to a default tag handling when no start hook is specified. A file name is automatically split into path and file part and passed to the requester a ASLFR_InitialFile and ASLFR_InitialDrawer. A font requester splits a string like "topaz/8" into font name and size for ASLFO_InitialName and ASLFO_InitialSize.

See also

MUIA_Popasl_StopHook, MUIA_Popasl_Type


MUIA_Popasl_StopHook

**MUIA_Popasl_StopHook -- (V7 ) [ISG], struct Hook ***

Function

When the requester terminates, MUIA_Popasl_StopHook will be called with a pointer to itself in A0, a pointer to the popasl object in A2 and a pointer to the asl requester structure in A1. The hook can then parse the requester structure and set the string gadgets contents respectively. For file and font requesters, a default handling is provided.

See also

MUIA_Popasl_StartHook, MUIA_Popasl_Type


MUIA_Popasl_Type

MUIA_Popasl_Type -- (V7 ) [I.G], ULONG

Function

This tag allows to set the type of asl requester. Pass the same value you would use for AllocAslRequest(), e.g. ASL_FileRequest, ASL_FontRequest or ASL_ScreenModeRequest. For ASL_FileRequest and ASL_FontRequest, popasl class offers a a standard start/stop handling. When a file requester is opened, MUI splits the string gadgets contents into a path and a file name and uses these as initial paremeters for the requester. Font popups translate a font into a name/size pair, e.g. "topaz/8". You can override these translations by specifying a MUIA_Popasl_StartHook and a MUIA_Popasl_StopHook. For ASL_ScreenModeRequest, no standard handling is available. Using such a popup without Start and Stop hooks won't make much sense.

See also

MUIA_Popasl_StartHook, MUIA_Popasl_StopHook