Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef mozilla_dom_GridTrack_h
8 : #define mozilla_dom_GridTrack_h
9 :
10 : #include "mozilla/dom/GridBinding.h"
11 : #include "nsWrapperCache.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : class GridTracks;
17 :
18 : class GridTrack : public nsISupports
19 : , public nsWrapperCache
20 : {
21 : public:
22 : explicit GridTrack(GridTracks *parent);
23 :
24 : protected:
25 : virtual ~GridTrack();
26 :
27 : public:
28 : NS_DECL_CYCLE_COLLECTING_ISUPPORTS
29 0 : NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GridTrack)
30 :
31 : virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
32 0 : GridTracks* GetParentObject()
33 : {
34 0 : return mParent;
35 : }
36 :
37 : double Start() const;
38 : double Breadth() const;
39 : GridDeclaration Type() const;
40 : GridTrackState State() const;
41 :
42 : void SetTrackValues(double aStart,
43 : double aBreadth,
44 : GridDeclaration aType,
45 : GridTrackState aState);
46 :
47 : protected:
48 : RefPtr<GridTracks> mParent;
49 : double mStart;
50 : double mBreadth;
51 : GridDeclaration mType;
52 : GridTrackState mState;
53 : };
54 :
55 : } // namespace dom
56 : } // namespace mozilla
57 :
58 : #endif /* mozilla_dom_GridTrack_h */
|