factored out a GetScrolableView method, implemented extended selection for drag select and shift->up/down keys

added page up and down support, but it isn't supported by nsScrollFrame (works for Gfx)
should be generating the coorect DOM selection events now
r=dcone, b=14771, 30463


git-svn-id: svn://10.0.0.236/trunk@63054 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com
2000-03-15 15:55:30 +00:00
parent 3747feefc2
commit 1b47027ebe
4 changed files with 338 additions and 132 deletions

View File

@@ -50,6 +50,7 @@ class nsIComboboxControlFrame;
class nsIViewManager;
class nsIPresContext;
class nsVoidArray;
class nsIScrollableView;
/**
* Frame-based listbox.
@@ -165,7 +166,7 @@ public:
//nsIDOMEventMotionListener
virtual nsresult MouseMove(nsIDOMEvent* aMouseEvent);
virtual nsresult DragMove(nsIDOMEvent* aMouseEvent) { return NS_OK; }
virtual nsresult DragMove(nsIDOMEvent* aMouseEvent);
//nsIDOMKeyListener
virtual nsresult KeyDown(nsIDOMEvent* aKeyEvent);
@@ -235,6 +236,8 @@ protected:
PRInt32 GetSelectedIndexFromFrame(nsIFrame *aHitFrame);
PRBool IsLeftButton(nsIDOMEvent* aMouseEvent);
void GetScrollableView(nsIScrollableView*& aScrollableView);
// onChange detection
nsresult SelectionChanged(nsIContent* aContent);