Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef nsTreeSelection_h__ |
michael@0 | 8 | #define nsTreeSelection_h__ |
michael@0 | 9 | |
michael@0 | 10 | #include "nsITreeSelection.h" |
michael@0 | 11 | #include "nsITreeColumns.h" |
michael@0 | 12 | #include "nsITimer.h" |
michael@0 | 13 | #include "nsCycleCollectionParticipant.h" |
michael@0 | 14 | #include "mozilla/Attributes.h" |
michael@0 | 15 | |
michael@0 | 16 | class nsITreeBoxObject; |
michael@0 | 17 | struct nsTreeRange; |
michael@0 | 18 | |
michael@0 | 19 | class nsTreeSelection MOZ_FINAL : public nsINativeTreeSelection |
michael@0 | 20 | { |
michael@0 | 21 | public: |
michael@0 | 22 | nsTreeSelection(nsITreeBoxObject* aTree); |
michael@0 | 23 | ~nsTreeSelection(); |
michael@0 | 24 | |
michael@0 | 25 | NS_DECL_CYCLE_COLLECTING_ISUPPORTS |
michael@0 | 26 | NS_DECL_CYCLE_COLLECTION_CLASS(nsTreeSelection) |
michael@0 | 27 | NS_DECL_NSITREESELECTION |
michael@0 | 28 | |
michael@0 | 29 | // nsINativeTreeSelection: Untrusted code can use us |
michael@0 | 30 | NS_IMETHOD EnsureNative() MOZ_OVERRIDE { return NS_OK; } |
michael@0 | 31 | |
michael@0 | 32 | friend struct nsTreeRange; |
michael@0 | 33 | |
michael@0 | 34 | protected: |
michael@0 | 35 | nsresult FireOnSelectHandler(); |
michael@0 | 36 | static void SelectCallback(nsITimer *aTimer, void *aClosure); |
michael@0 | 37 | |
michael@0 | 38 | protected: |
michael@0 | 39 | // Members |
michael@0 | 40 | nsCOMPtr<nsITreeBoxObject> mTree; // The tree will hold on to us through the view and let go when it dies. |
michael@0 | 41 | |
michael@0 | 42 | bool mSuppressed; // Whether or not we should be firing onselect events. |
michael@0 | 43 | int32_t mCurrentIndex; // The item to draw the rect around. The last one clicked, etc. |
michael@0 | 44 | nsCOMPtr<nsITreeColumn> mCurrentColumn; |
michael@0 | 45 | int32_t mShiftSelectPivot; // Used when multiple SHIFT+selects are performed to pivot on. |
michael@0 | 46 | |
michael@0 | 47 | nsTreeRange* mFirstRange; // Our list of ranges. |
michael@0 | 48 | |
michael@0 | 49 | nsCOMPtr<nsITimer> mSelectTimer; |
michael@0 | 50 | }; |
michael@0 | 51 | |
michael@0 | 52 | nsresult |
michael@0 | 53 | NS_NewTreeSelection(nsITreeBoxObject* aTree, nsITreeSelection** aResult); |
michael@0 | 54 | |
michael@0 | 55 | #endif |