зеркало из https://github.com/mozilla/pjs.git
Not part of build.
This commit is contained in:
Родитель
959336880a
Коммит
bcacff7234
|
@ -40,6 +40,9 @@ interface nsIOutlinerBoxObject : nsISupports
|
|||
// Gets the number of possible visible rows.
|
||||
long getPageCount();
|
||||
|
||||
// Ensures that a row at a given index is visible.
|
||||
void scrollToRow(in long index);
|
||||
|
||||
// Invalidation methods for fine-grained painting control.
|
||||
void invalidate();
|
||||
void invalidateRow(in long index);
|
||||
|
|
|
@ -63,9 +63,6 @@ interface nsIOutlinerView : nsISupports
|
|||
// :moz-outliner-indentation pseudoclass to compute the exact indendation.
|
||||
wstring getCellText(in long row, in wstring colID, out long level);
|
||||
|
||||
// Ensures that a row at a given index is visible.
|
||||
void scrollToRow(in long index);
|
||||
|
||||
// Called during initialization to link the view to the front end box object.
|
||||
void setOutliner(in nsIOutlinerBoxObject outliner);
|
||||
|
||||
|
|
|
@ -182,6 +182,11 @@ NS_IMETHODIMP nsOutlinerBodyFrame::GetPageCount(PRInt32 *_retval)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsOutlinerBodyFrame::ScrollToRow(PRInt32 aRow)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsOutlinerBodyFrame::Invalidate()
|
||||
{
|
||||
return NS_OK;
|
||||
|
|
|
@ -144,6 +144,15 @@ NS_IMETHODIMP nsOutlinerBoxObject::GetPageCount(PRInt32 *_retval)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsOutlinerBoxObject::ScrollToRow(PRInt32 aRow)
|
||||
{
|
||||
nsIOutlinerBoxObject* body = GetOutlinerBody();
|
||||
if (body)
|
||||
return body->ScrollToRow(aRow);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsOutlinerBoxObject::Invalidate()
|
||||
{
|
||||
nsIOutlinerBoxObject* body = GetOutlinerBody();
|
||||
|
|
|
@ -40,6 +40,9 @@ interface nsIOutlinerBoxObject : nsISupports
|
|||
// Gets the number of possible visible rows.
|
||||
long getPageCount();
|
||||
|
||||
// Ensures that a row at a given index is visible.
|
||||
void scrollToRow(in long index);
|
||||
|
||||
// Invalidation methods for fine-grained painting control.
|
||||
void invalidate();
|
||||
void invalidateRow(in long index);
|
||||
|
|
|
@ -63,9 +63,6 @@ interface nsIOutlinerView : nsISupports
|
|||
// :moz-outliner-indentation pseudoclass to compute the exact indendation.
|
||||
wstring getCellText(in long row, in wstring colID, out long level);
|
||||
|
||||
// Ensures that a row at a given index is visible.
|
||||
void scrollToRow(in long index);
|
||||
|
||||
// Called during initialization to link the view to the front end box object.
|
||||
void setOutliner(in nsIOutlinerBoxObject outliner);
|
||||
|
||||
|
|
|
@ -182,6 +182,11 @@ NS_IMETHODIMP nsOutlinerBodyFrame::GetPageCount(PRInt32 *_retval)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsOutlinerBodyFrame::ScrollToRow(PRInt32 aRow)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsOutlinerBodyFrame::Invalidate()
|
||||
{
|
||||
return NS_OK;
|
||||
|
|
|
@ -144,6 +144,15 @@ NS_IMETHODIMP nsOutlinerBoxObject::GetPageCount(PRInt32 *_retval)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsOutlinerBoxObject::ScrollToRow(PRInt32 aRow)
|
||||
{
|
||||
nsIOutlinerBoxObject* body = GetOutlinerBody();
|
||||
if (body)
|
||||
return body->ScrollToRow(aRow);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsOutlinerBoxObject::Invalidate()
|
||||
{
|
||||
nsIOutlinerBoxObject* body = GetOutlinerBody();
|
||||
|
|
|
@ -29,6 +29,7 @@ radioBindings.xml
|
|||
scrollbarBindings.xml
|
||||
tabBindings.xml
|
||||
treeBindings.xml
|
||||
outlinerBindings.xml
|
||||
xulBindings.xml
|
||||
xul.css
|
||||
nsClipboard.js
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
<xul:image class="menu-dropmarker"/>
|
||||
</content>
|
||||
<handlers>
|
||||
<handler event="command" phase="capturing" action="if (event.target.localName == 'menuitem') this.selectedItem = event.target;"/>
|
||||
<handler event="command" phase="capturing" action="dump('menulist command\n'); if (event.target.localName == 'menuitem') this.selectedItem = event.target;"/>
|
||||
<handler event="create">
|
||||
<![CDATA[
|
||||
dump('menulist create\n');
|
||||
if (event.target.parentNode == this && this.selectedItem) {
|
||||
// Not ready for auto-setting the active child in hierarchies yet.
|
||||
// For now, only do this when the outermost menupopup opens.
|
||||
|
@ -51,6 +52,7 @@
|
|||
<property name="data" onget="return this.getAttribute('data');">
|
||||
<setter>
|
||||
<![CDATA[
|
||||
dump('setting data.\n');
|
||||
var arr;
|
||||
|
||||
if (this.childNodes.length)
|
||||
|
@ -114,17 +116,21 @@
|
|||
<property name="selectedItem">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
dump('getting selected item.\n');
|
||||
return this.selectedInternal;
|
||||
]]>
|
||||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
dump('setting selected item.\n');
|
||||
if (this.selectedInternal == val)
|
||||
return val;
|
||||
|
||||
if (this.selectedInternal)
|
||||
this.selectedInternal.removeAttribute('selected');
|
||||
|
||||
dump('updating selected item.\n');
|
||||
|
||||
this.selectedInternal = val;
|
||||
if (!this.selectedInternal) {
|
||||
this.removeAttribute('data');
|
||||
|
@ -133,6 +139,8 @@
|
|||
return val;
|
||||
}
|
||||
|
||||
dump('got here with selected item.\n');
|
||||
|
||||
val.setAttribute('selected', 'true');
|
||||
|
||||
this.setAttribute('data', val.getAttribute('data'));
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<bindings id="outlinerBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<binding id="outliner">
|
||||
<content orient="vertical">
|
||||
<xul:box class="outliner-columns">
|
||||
<children includes="outlinercol|splitter"/>
|
||||
</xul:box>
|
||||
<xul:outlinerrows class="outliner-rows" flex="1">
|
||||
<children/>
|
||||
</xul:outlinerrows>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="outlinerrows" extends="xul:box">
|
||||
<content>
|
||||
<children/>
|
||||
<xul:scrollbar align="vertical" class="outliner-scrollbar"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="outlinerbody"/>
|
||||
|
||||
<binding id="outlinercol">
|
||||
<content autostretch="never">
|
||||
<xul:image class="outlinercol-image" inherits="src"/>
|
||||
<xul:text class="outlinercol-text" inherits="crop,value" flex="1" crop="right"/>
|
||||
<xul:image class="outlinercol-sortdirection"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
checkbox,radio,tree,menulist {
|
||||
checkbox,radio,tree,outliner,menulist {
|
||||
-moz-user-focus: normal;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ menupopup, popup, splitter {
|
|||
-moz-user-focus: ignore;
|
||||
}
|
||||
|
||||
treechildren, treehead, treerows {
|
||||
treechildren, treehead, treerows, outlinercol, outlinerrows, outlinerbody {
|
||||
-moz-user-focus: none;
|
||||
}
|
||||
|
||||
|
@ -262,6 +262,30 @@ menupopup, popup {
|
|||
|
||||
/******** Titled buttons **********/
|
||||
|
||||
/******** Outliner widget ******/
|
||||
|
||||
outliner {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
min-width: 0px;
|
||||
min-height: 0px;
|
||||
-moz-binding: url("chrome://global/content/outlinerBindings.xml#outliner");
|
||||
}
|
||||
|
||||
outlinercol {
|
||||
width: 16px;
|
||||
min-width: 16px;
|
||||
-moz-binding: url("chrome://global/content/outlinerBindings.xml#outlinercol");
|
||||
}
|
||||
|
||||
outlinerbody {
|
||||
-moz-binding: url("chrome://global/content/outlinerBindings.xml#outlinerbody");
|
||||
}
|
||||
|
||||
outlinerrows {
|
||||
-moz-binding: url("chrome://global/content/outlinerBindings.xml#outlinerrows");
|
||||
}
|
||||
|
||||
/******** Tree widget **********/
|
||||
|
||||
tree {
|
||||
|
|
Загрузка…
Ссылка в новой задаче