[sldev] Approach to accessing floaters from inside plugins

John Hurliman jhurliman at wsu.edu
Thu Mar 8 09:34:17 PST 2007


Soft Noel wrote:
> I'm working to simplify the Floater interface for the C plugin interface,
> proceeding along these lines. Input on the approach would be appreciated
> before I start widening the interface with more events and accessors. The
> explanation will be in three parts. The first is what a plugin author
> would see/use. Here's enough interface to create something like the sample
> "Hippo" floater from the wiki:
>
> /*
> Functions used:
>
> U32 FloaterOpen( const char *name, const char *filepath );
> Open a floater XML description named name located at $pluginpath/filepath,
> return handle or 0
>
> void FloaterClose( U32 handle );
> Close a floater from the handle returned above, hiding it and revoking any
> handlers
>
> BOOL FloaterClickHandlerAdd( U32 floaterhandle, const char *buttonname,
> void (ClickFunc*)(U32 floaterhandle, void *userdata) );
> Register a callback for button clicks. Callback is:
> void Foo( U32 floaterhandle, void *userdata );
>
> BOOL FloaterCommitHandlerAdd( U32 floaterhandle, const char *fieldname,
> void (CommitFunc*)(U32 floaterhandle, void *userdata, const char
> *fieldtext) );
> Register a callback for field commits. Callback is:
> void Foo( U32 floaterhandle, void *userdata, const char *fieldtext );
> fieldtext is only valid for the duration of the callback.
>
> void FloaterShow( U32 handle );
> Show an open floater
> */
>
>   

How do you get the value of a slider or checkboxes? Is it possible to 
trigger events based on non-button UI widgets, or just get their values?

John Hurliman



More information about the SLDev mailing list