Popobject.mui Class Reference¶
BOOPSI custom class Popobject.mui (MUI 3.8 dev). Each ### sub-section below documents one of the class's attributes or methods. Sub-classes of Popobject.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
MUIA_Popobject_FollowMUIA_Popobject_LightMUIA_Popobject_ObjectMUIA_Popobject_ObjStrHookMUIA_Popobject_StrObjHookMUIA_Popobject_VolatileMUIA_Popobject_WindowHook
Popobject.mui¶
MUIA_Popobject_Follow¶
MUIA_Popobject_Follow -- (V7 ) [ISG], BOOL
Function
Setting this attribute causes the popup window to follow its parent window when its moved. Defaults to TRUE.
See also
MUIA_Popobject_Light, MUIA_Popobject_Volatile.
MUIA_Popobject_Light¶
MUIA_Popobject_Light -- (V7 ) [ISG], BOOL
Function
This attribute causes the popup window to be border and titleless. Defaults to TRUE
See also
MUIA_Popobject_Follow, MUIA_Popobject_Volatile
MUIA_Popobject_Object¶
**MUIA_Popobject_Object -- (V7 ) [I.G], Object ***
Function
Specify the object to pop up. Usually this is a relatively simple thing like a single listview, but you can of course use group class here and make rather complex popups. As with all other MUI classes, the object here gets disposed when the popobject is disposed.
Example
pop = PopobjectObject,
MUIA_Popstring_String, KeyString(0,60,'n'),
MUIA_Popstring_Button, PopButton(MUII_PopUp),
MUIA_Popobject_StrObjHook, &StrObjHook,
MUIA_Popobject_ObjStrHook, &ObjStrHook,
MUIA_Popobject_Object, ListviewObject,
MUIA_Listview_List, ListObject,
InputListFrame,
MUIA_List_SourceArray, PopNames,
End,
End,
End;
See also
MUIA_Popobject_StrObjHook, MUIA_Popobject_ObjStrHook, MUIA_Popobject_Light
MUIA_Popobject_ObjStrHook¶
**MUIA_Popobject_ObjStrHook -- (V7 ) [ISG], struct Hook ***
Function
When a popup is closed, this hook is called. You can examine the state of your MUIA_Popobject_Object and set the contents of the string gadget respectively. The hook receives a pointer to itself in A0, a pointer to your MUIA_Popobject_Object in A2 and a pointer to the embedded string object in A1. The hook will only be called when your popup is closed with a success value of TRUE. Otherwise, MUI closes the popup without taking further actions, just as if had never opened. Since MUI doesn't know anything about your MUIA_Popobject_Object, it's your task to tell when your popup is finished. You can terminate popups at anytime by sending a MUIM_Popstring_Close method: / A double click terminates the popping list with a successful return value. / DoMethod(plist,MUIM_Notify,MUIA_Listview_DoubleClick,TRUE, pop,2,MUIM_Popstring_Close,TRUE);
Example
SAVEDS ASM VOID ObjStrFunc(REG(a2) Object *list,REG(a1) Object *str)
{
char *x;
DoMethod(list,MUIM_List_GetEntry,MUIV_List_GetEntry_Active,&x);
set(str,MUIA_String_Contents,x);
}
MUIA_Popobject_StrObjHook¶
**MUIA_Popobject_StrObjHook -- (V7 ) [ISG], struct Hook ***
Function
Before the popup opens, this hook is called. You can use it to prepare your MUIA_Popobject_Object according to the contents of the string gadget. The hook receives a pointer to itself in A0, a pointer to your MUIA_Popobject_Object in A2 and a pointer to the embedded string object in A1. Return TRUE if you want the popup to appear, FALSE otherwise.
Example
SAVEDS ASM LONG StrObjFunc(REG(a2) Object *list,REG(a1) Object *str)
{
char *x,*s;
int i;
get(str,MUIA_String_Contents,&s);
for (i=0;;i++)
{
DoMethod(list,MUIM_List_GetEntry,i,&x);
if (!x)
{
set(list,MUIA_List_Active,MUIV_List_Active_Off);
break;
}
else if (!stricmp(x,s))
{
set(list,MUIA_List_Active,i);
break;
}
}
return(TRUE);
}
See also
MUIA_Popobject_ObjStrHook, MUIA_Popobject_Object, MUIA_Popobject_WindowHook
MUIA_Popobject_Volatile¶
MUIA_Popobject_Volatile -- (V7 ) [ISG], BOOL
Function
Setting this attribute causes the popup window to disappear when the corresponding popobject disappears, e.g. because its in a page group and the user toggled the page. When the popobject appears again, the popup window appears also. Defaults to TRUE.
See also
MUIA_Popobject_Light, MUIA_Popobject_Follow
MUIA_Popobject_WindowHook¶
**MUIA_Popobject_WindowHook -- (V9 ) [ISG], struct Hook ***
Function
If specified, this hook is called immediately after the popups window objects has been created but before this window is opened. You might e.g. want to add a cycle chain for the popup window here. The hook is called with a pointer to the pop object (MUIA_Popobject_Object) in A2 and with a pointer to the window object that MUI generated to handle the popup in A1.
Example
/* pop is a simple listview, just set the windows
** default object to this to enable keyboard control */
SAVEDS ASM VOID WindowFunc(REG(a2) Object *pop,REG(a1) Object *win)
{
set(win,MUIA_Window_DefaultObject,pop);
}
See also
MUIA_Popobject_ObjStrHook, MUIA_Popobject_Object