Docs » Autodocs » layout.gadget » RethinkLayout
RethinkLayout -- Relayout and render the layout. (V39)
RethinkLayout( layout, window, requester, refresh );
a0 a1 a2
void RethinkLayout( struct Gadget *, struct Window *,
struct Requester *, BOOL )
Relayout and refresh the layout page. Call this function after
a call SetGadgetAttrs() returns 1 to display the changes in the
layout. According to BOOPSI rules, a gadget will return a value
of 1 from OM_SET to tell the application to refresh. This is what
this function is for. Basically, it will call the GM_LAYOUT and
GM_RENDER methods of the layout.
layout = the layout to refresh. Doesn't have to be the topmost
object in the hierarchy, if the changes do not affect
window = the window to which the layout (or its parent) is
requester = the window's requester, or NULL.
refresh = whether layout.gadget should also refresh the display.
This function emulates a DoGadgetMethod() on V37 and V38 systems.intuition.library/RefreshGList(), intuition.library/SetGadgetAttrsA(), intuition.library/DoGadgetMethod
The refresh flag is provided for several reasons. First, when using
LAYOUT_DeferLayout, you should not refresh upon receiving a
LAYOUT_RequestLayout notification. Second, datatypes have an
asynchronous layout, and should not be attempted to refresh before
that is finished. Wait for DTA_Sync, and then RefreshGList( layout,
window, requester, 1 ).