Search completed in 1.64 seconds.
ensureIndexIsVisible - Archive of obsolete content
« xul reference home ensureindex
isvisible( index ) return type: no return value if the item at the specified index is not currently visible to the user the displayed items are scrolled so that it is.
listbox - Archive of obsolete content
attributes disabled, disablekeynavigation, preference, rows, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, listboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelement
isvisible, ensureindex
isvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <listbox id="thelist"> <listitem label="ruby"/> <listitem label="emerald"...
... ensureelement
isvisible( element ) return type: no return value if the specified element is not currently visible to the user, the displayed items are scrolled so that it is.
... ensureindex
isvisible( index ) return type: no return value if the item at the specified index is not currently visible to the user the displayed items are scrolled so that it is.
...this is different than ensureindex
isvisible because the view is always scrolled.
richlistbox - Archive of obsolete content
attributes disabled, disablekeynavigation, preference, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, scrollboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelement
isvisible, ensureindex
isvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <description>a xul description!</description...
... ensureelement
isvisible( element ) return type: no return value if the specified element is not currently visible to the user, the displayed items are scrolled so that it is.
... ensureindex
isvisible( index ) return type: no return value if the item at the specified index is not currently visible to the user the displayed items are scrolled so that it is.
...this is different than ensureindex
isvisible because the view is always scrolled.
nsITreeBoxObject
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports to get the treeboxobject for a tree: let boxobject = tree.boxobject; boxobject.queryinterface("components.interfaces.nsitreeboxobject"); or simply: let boxobject = tree.treeboxobject; method overview long getfirstvisiblerow(); long getlastvisiblerow(); long getpagelength(); void ensurerow
isvisible(in long index); void ensurecell
isvisible(in long row, in nsitreecolumn col); void scrolltorow(in long index); void scrollbylines(in long numlines); void scrollbypages(in long numpages); void scrolltocell(in long row, in nsitreecolumn col); void scrolltocolumn(in nsitreecolumn col); void scrolltohorizontalposition(in long horizontalpos...
... long getpagelength(); ensurerow
isvisible() ensures that a row at a given index is visible.
... void ensurerow
isvisible(in long index); parameters index the index of the row ensurecell
isvisible() ensures that a given cell in the tree is visible.
... void ensurecell
isvisible(in long row, in nsitreecolumn col); parameters index the index of the row to check col the nsitreecolumn to check scrolltorow() scrolls such that the row at index is at the top of the visible view.
Index - Archive of obsolete content
1200 ensureelement
isvisible xul methods, xul reference no summary!
... 1201 ensureindex
isvisible xul methods, xul reference no summary!
... 1202 ensureselectedelement
isvisible xul methods, xul reference no summary!
Index - Archive of obsolete content
469 ensureelement
isvisible xul methods, xul reference no summary!
... 470 ensureindex
isvisible xul methods, xul reference no summary!
... 471 ensureselectedelement
isvisible xul methods, xul reference no summary!
Manipulating Lists - Archive of obsolete content
the ensureindex
isvisible() method is similar in that it also scrolls to show a row, but this method does not scroll if the item is already visible.
...there is also an ensureindex
isvisible() that takes an item as an argument instead of an index.
... compare the effect of both functions at different scroll positions in this example: example 5 : source view <button label="scrolltoindex" oncommand="document.getelementbyid('thelist').scrolltoindex(4);"/> <button label="ensureindex
isvisible" oncommand="document.getelementbyid('thelist').ensureindex
isvisible(4);"/> <listbox id="thelist" rows="5"> <listitem label="1"/> <listitem label="2"/> <listitem label="3"/> <listitem label="4"/> <listitem label="5"/> <listitem label="6"/> <listitem label="7"/> <listitem label="8"/> <listitem label="9"/> <listitem label="10"/> <listitem label="11"/> <listitem label="12"/> </listbox> next, we'll look at xul box objects.
XPCOM array guide
void processvisibleitems() { // temporary stack-based nscomarray nscomarray<nsifoo> fooitems; getcompletelist(fooitems); // now filter out non visible objects // doing this backwards pruint32 i = fooitems.count(); while (i > 0) { --i; prbool
isvisible; fooitems[i]->get
isvisible(&
isvisible); if (!
isvisible) { fooitems.removeobjectat(i); } } // now deal with the processed list processlist(fooitems); // fooitems will release all its members // when it goes out of scope } access to elements nscomarray<t> is a concrete c++ class, and so the [] operator is used to access its members.
...for instance: pr_callback prbool getfirstvisible(nsielement* element, void* closure) { prbool
isvisible; element->
isvisible(&
isvisible); // stop at first object if (
isvisible) { ns_static_cast(closureobject*,closure)->element = element; return pr_false; } return pr_true; } ...
... void processvisibleitems() { // temporary stack-based nstarray nstarray<foostruct> fooitems; getcompletelist(fooitems); // now filter out non visible objects // doing this backwards pruint32 i = fooitems.length(); while (i > 0) { --i; prbool
isvisible; fooitems[i]->get
isvisible(&
isvisible); if (!
isvisible) { fooitems.removeelementat(i); } } // now deal with the processed list processlist(fooitems); // fooitems will call the destructors of all the foostruct objects // when it goes out of scope } access to elements nstarray<t> is a concrete c++ class, and so the [] operator is used to access its members.
nsIHTMLEditor
inherits from: nsisupports last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) method overview void adddefaultproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void addinsertionlistener(in nsicontentfilter infilter); void align(in astring aalign); boolean break
isvisible(in nsidomnode anode); boolean candrag(in nsidomevent aevent); void checkselectionstateforanonymousbuttons(in nsiselection aselection); nsidomelement createanonymouselement(in astring atag, in nsidomnode aparentnode, in astring aanonclass, in boolean aiscreatedhidden); nsidomelement createelementwithdefaults(in astring atagname); void decreasefontsize(...
... void align( in astring aalign ); parameters aalign break
isvisible() checks whether a br node is visible to the user.
... boolean break
isvisible( in nsidomnode anode ); parameters anode return value candrag() decides if a drag should be started (for example, based on the current selection and mousepoint).
Tree Box Objects - Archive of obsolete content
additional scroll methods include the scrollbylines(), scrollbypages() and ensurerow
isvisible() functions.
... the ensurerow
isvisible() function will scroll to a row just as scrolltorow() does, but does not scroll if the row is already visible.
arrowscrollbox - Archive of obsolete content
attributes clicktoscroll, disabled, smoothscroll, tabindex properties disabled, scrollboxobject, scrollincrement, smoothscroll, tabindex methods ensureelement
isvisible, scrollbyindex, scrollbypixels examples <arrowscrollbox orient="vertical" flex="1"> <button label="red"/> <button label="blue"/> <button label="green"/> <button label="yellow"/> <button label="orange"/> <button label="silver"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="...
... methods ensureelement
isvisible( element ) return type: no return value if the specified element is not currently visible to the user, the displayed items are scrolled so that it is.
CustomizableUI.jsm
(awidgetid); void addpanelcloselisteners(apanel); void removepanelcloselisteners(apanel); void onwidgetdrag(awidgetid, aarea); void notifystartcustomizing(awindow); void notifyendcustomizing(awindow); void dispatchtoolboxevent(aevent, adetails, awindow); bool isareaoverflowable(aareaid); void settoolbarvisibility(atoolbarid, a
isvisible); string getplaceforitem(aelement); bool isbuiltintoolbar(atoolbarid); methods addlistener() add a listener object that will get fired for various events regarding customization.
... parameters atoolbarid the id of the toolbar whose visibility should be adjusted a
isvisible whether the toolbar should be visible getplaceforitem() obtain a string indicating the place of an element.
Methods - Archive of obsolete content
toselection addpane addprogresslistener addsession addtab addtabsprogresslistener advance advanceselectedtab appendcustomtoolbar appendgroup appenditem appendnotification blur cancel canceldialog centerwindowonscreen checkadjacentelement clearresults clearselection click close collapsetoolbar contains decrease decreasepage docommand ensureelement
isvisible ensureindex
isvisible ensureselectedelement
isvisible expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor getelementsbyattribute getelementsbyattributens getformattedstring gethtmleditor getindexoffirstvisiblerow getindexofitem getitematindex getnextitem ...
scrollbox - Archive of obsolete content
do this instead: var xpcominterface =scrollbox_element.boxobject.queryinterface( components.interfaces.nsiscrollboxobject); xpcominterface.ensureelement
isvisible(child_element_to_make_visible); see the nsiscrollboxobject api for other scroll-related methods.
nsICookieService
nsiuri afirsturi, in nsichannel achannel); void setcookiestring(in nsiuri auri, in nsiprompt aprompt, in string acookie, in nsichannel achannel); void setcookiestringfromhttp(in nsiuri auri, in nsiuri afirsturi, in nsiprompt aprompt, in string acookie, in string aservertime, in nsichannel achannel); attributes attribute type description cookieicon
isvisible boolean this attribute really doesn't belong on this interface.