[sldev] GUI class programming
Lawson English
lenglish5 at cox.net
Sat Sep 1 10:37:24 PDT 2007
Hi all, I'm trying to add a "simple" bit of functionality to the LSL
edit window. At least, on paper it is simple, but after spending several
days delving into the depths of the LL classes, I'm feeling less than
confidant that I can do this project nearly as fast as I expected (a
diagram of the function of my floater is found at the bottom of this
too-long article).
My plan: create a simple folder/outline hierarchy of categories of LSL
keywords using a nested-folder paradigm, but instead of displaying items
in the same list as the folders, use them as buttons to display
progressively more focused (and therefore smaller) lists.
The sub-categories and sub-sub-categories, etc., are based on the
categories used by the LSL wiki and the whole thing will be found in a
floater window that resizes itself from barely large enough to hold the
top three categories, to large enough to hold the expanded categories
and a scrolling list (and an optional prototype). It is meant as a
replacement for the drop-down combo box labeled "Insert..." found at the
bottom of each LS editor window, and (in the simplest form) will simply
paste either the keyword or the keyword + prototype into the current
selection of the LSL editor in the same manner the Insert... combo box does.
My plan was to use the existing classes that handle folders ala the
inventory and other hierarchical lists in the SL viewer, and override
the appropriate methods to display the list to the side rather than
underneath.
Then I discovered llInventoryPanel...
It feels like someone was feeling up to a challenge to merge at least
two levels of classes into one. In my mind there is at least one class
missing between LLPanel and LLInventoryPanel. Or, to put it differently,
the durned thing is so complicated that I think it will be easier to
fake a static hierarchical list using simple scrolling lists and icons
modified on the fly, then to use the LLInventoryPanel for something far
simpler than it was designed for. I'd rather not reinvent the wheel, but
given a choice between fitting a racing car wheel on a haywagon, or
building my own, I may have no choice. Has anyone used LLInventoryPanel
for providing a simple "outline view" in the client? Any pointers to
code or other suggestions? I've looked at all the classes that use it,
but they are so tied in with the LL data types that its hard to see how
to simplify things. Should I just fake my own using other classes given
that this is a static hierarchy or is there a simple example of how to
do what I want using the existing classes that I have missed, or is
there some "key" to understanding the class that will make it all fall
into place?
Thanks in advance,
Lawson English
[Floater Keywords]
>Functions No list
>Events
>Constants
\/Functions Huge list
>Sub_cat1
>Sub_cat2
>Sub_cat3
>Events
>Constants
\/Functions Smaller list
\/Sub_cat1
>Sub_Sub_cat1
>Sub_Sub_cat2
>Sub_Sub_cat3
>Sub_cat2
>Sub_cat3
>Events
>Constants
More information about the SLDev
mailing list