зеркало из https://github.com/mozilla/pjs.git
Adding support for tree columns.
This commit is contained in:
Родитель
5c46e7c87c
Коммит
e0431b6eaf
|
@ -59,6 +59,8 @@ public:
|
|||
static nsIAtom* treechildren; // The children of an item in the tree viw
|
||||
static nsIAtom* treeindentation; // Specifies that the indentation for the level should occur here.
|
||||
static nsIAtom* treeallowevents; // Lets events be handled on the cell contents.
|
||||
static nsIAtom* treecol; // A column in the tree view
|
||||
static nsIAtom* treecolgroup; // A column group in the tree view
|
||||
|
||||
static nsIAtom* progressmeter;
|
||||
static nsIAtom* mode;
|
||||
|
|
|
@ -41,6 +41,8 @@ nsIAtom* nsXULAtoms::treecell;
|
|||
nsIAtom* nsXULAtoms::treechildren;
|
||||
nsIAtom* nsXULAtoms::treeindentation;
|
||||
nsIAtom* nsXULAtoms::treeallowevents;
|
||||
nsIAtom* nsXULAtoms::treecol;
|
||||
nsIAtom* nsXULAtoms::treecolgroup;
|
||||
|
||||
nsIAtom* nsXULAtoms::progressmeter;
|
||||
nsIAtom* nsXULAtoms::mode;
|
||||
|
@ -81,6 +83,8 @@ void nsXULAtoms::AddrefAtoms() {
|
|||
treechildren = NS_NewAtom("treechildren");
|
||||
treeindentation = NS_NewAtom("treeindentation");
|
||||
treeallowevents = NS_NewAtom("treeallowevents");
|
||||
treecol = NS_NewAtom("treecol");
|
||||
treecolgroup = NS_NewAtom("treecolgroup");
|
||||
|
||||
progressmeter = NS_NewAtom("progressmeter");
|
||||
mode = NS_NewAtom("mode");
|
||||
|
@ -111,6 +115,8 @@ void nsXULAtoms::ReleaseAtoms() {
|
|||
NS_RELEASE(treechildren);
|
||||
NS_RELEASE(treeindentation);
|
||||
NS_RELEASE(treeallowevents);
|
||||
NS_RELEASE(treecol);
|
||||
NS_RELEASE(treecolgroup);
|
||||
|
||||
NS_RELEASE(progressmeter);
|
||||
NS_RELEASE(mode);
|
||||
|
|
|
@ -59,9 +59,9 @@ static void ForceDrawFrame(nsIFrame * aFrame)
|
|||
// Creates a new tree cell frame
|
||||
//
|
||||
nsresult
|
||||
NS_NewTreeCellFrame (nsIFrame*& aNewFrame, PRBool allowEvents)
|
||||
NS_NewTreeCellFrame (nsIFrame*& aNewFrame)
|
||||
{
|
||||
nsTreeCellFrame* theFrame = new nsTreeCellFrame(allowEvents);
|
||||
nsTreeCellFrame* theFrame = new nsTreeCellFrame();
|
||||
if (theFrame == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
|
@ -72,8 +72,8 @@ NS_NewTreeCellFrame (nsIFrame*& aNewFrame, PRBool allowEvents)
|
|||
|
||||
|
||||
// Constructor
|
||||
nsTreeCellFrame::nsTreeCellFrame(PRBool allowEvents)
|
||||
:nsTableCellFrame() { mAllowEvents = allowEvents; mIsHeader = PR_FALSE; }
|
||||
nsTreeCellFrame::nsTreeCellFrame()
|
||||
:nsTableCellFrame() { mAllowEvents = PR_FALSE; mIsHeader = PR_FALSE; }
|
||||
|
||||
// Destructor
|
||||
nsTreeCellFrame::~nsTreeCellFrame()
|
||||
|
|
|
@ -24,7 +24,7 @@ class nsTreeFrame;
|
|||
class nsTreeCellFrame : public nsTableCellFrame
|
||||
{
|
||||
public:
|
||||
friend nsresult NS_NewTreeCellFrame(nsIFrame*& aNewFrame, PRBool allowEvents);
|
||||
friend nsresult NS_NewTreeCellFrame(nsIFrame*& aNewFrame);
|
||||
|
||||
NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint, // Overridden to capture events
|
||||
nsIFrame** aFrame);
|
||||
|
@ -46,8 +46,10 @@ public:
|
|||
void Select(nsIPresContext& presContext, PRBool isSelected, PRBool notifyForReflow = PR_TRUE);
|
||||
nsTableFrame* GetTreeFrame();
|
||||
|
||||
void SetAllowEvents(PRBool allowEvents) { mAllowEvents = allowEvents; };
|
||||
|
||||
protected:
|
||||
nsTreeCellFrame(PRBool allowEvents);
|
||||
nsTreeCellFrame();
|
||||
virtual ~nsTreeCellFrame();
|
||||
|
||||
nsresult HandleMouseDownEvent(nsIPresContext& aPresContext,
|
||||
|
|
|
@ -41,6 +41,8 @@ nsIAtom* nsXULAtoms::treecell;
|
|||
nsIAtom* nsXULAtoms::treechildren;
|
||||
nsIAtom* nsXULAtoms::treeindentation;
|
||||
nsIAtom* nsXULAtoms::treeallowevents;
|
||||
nsIAtom* nsXULAtoms::treecol;
|
||||
nsIAtom* nsXULAtoms::treecolgroup;
|
||||
|
||||
nsIAtom* nsXULAtoms::progressmeter;
|
||||
nsIAtom* nsXULAtoms::mode;
|
||||
|
@ -81,6 +83,8 @@ void nsXULAtoms::AddrefAtoms() {
|
|||
treechildren = NS_NewAtom("treechildren");
|
||||
treeindentation = NS_NewAtom("treeindentation");
|
||||
treeallowevents = NS_NewAtom("treeallowevents");
|
||||
treecol = NS_NewAtom("treecol");
|
||||
treecolgroup = NS_NewAtom("treecolgroup");
|
||||
|
||||
progressmeter = NS_NewAtom("progressmeter");
|
||||
mode = NS_NewAtom("mode");
|
||||
|
@ -111,6 +115,8 @@ void nsXULAtoms::ReleaseAtoms() {
|
|||
NS_RELEASE(treechildren);
|
||||
NS_RELEASE(treeindentation);
|
||||
NS_RELEASE(treeallowevents);
|
||||
NS_RELEASE(treecol);
|
||||
NS_RELEASE(treecolgroup);
|
||||
|
||||
NS_RELEASE(progressmeter);
|
||||
NS_RELEASE(mode);
|
||||
|
|
|
@ -59,6 +59,8 @@ public:
|
|||
static nsIAtom* treechildren; // The children of an item in the tree viw
|
||||
static nsIAtom* treeindentation; // Specifies that the indentation for the level should occur here.
|
||||
static nsIAtom* treeallowevents; // Lets events be handled on the cell contents.
|
||||
static nsIAtom* treecol; // A column in the tree view
|
||||
static nsIAtom* treecolgroup; // A column group in the tree view
|
||||
|
||||
static nsIAtom* progressmeter;
|
||||
static nsIAtom* mode;
|
||||
|
|
Загрузка…
Ссылка в новой задаче