tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

GridArea.h (1558B)


      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_GridArea_h
      8 #define mozilla_dom_GridArea_h
      9 
     10 #include "mozilla/dom/GridBinding.h"
     11 #include "nsWrapperCache.h"
     12 
     13 class nsAtom;
     14 
     15 namespace mozilla::dom {
     16 
     17 class Grid;
     18 
     19 class GridArea : public nsISupports, public nsWrapperCache {
     20 public:
     21  explicit GridArea(Grid* aParent, nsAtom* aName, GridDeclaration aType,
     22                    uint32_t aRowStart, uint32_t aRowEnd, uint32_t aColumnStart,
     23                    uint32_t aColumnEnd);
     24 
     25 protected:
     26  virtual ~GridArea();
     27 
     28 public:
     29  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     30  NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(GridArea)
     31 
     32  virtual JSObject* WrapObject(JSContext* aCx,
     33                               JS::Handle<JSObject*> aGivenProto) override;
     34  Grid* GetParentObject() { return mParent; }
     35 
     36  void GetName(nsString& aName) const;
     37  GridDeclaration Type() const;
     38  uint32_t RowStart() const;
     39  uint32_t RowEnd() const;
     40  uint32_t ColumnStart() const;
     41  uint32_t ColumnEnd() const;
     42 
     43 protected:
     44  RefPtr<Grid> mParent;
     45  const RefPtr<nsAtom> mName;
     46  const GridDeclaration mType;
     47  const uint32_t mRowStart;
     48  const uint32_t mRowEnd;
     49  const uint32_t mColumnStart;
     50  const uint32_t mColumnEnd;
     51 };
     52 
     53 }  // namespace mozilla::dom
     54 
     55 #endif /* mozilla_dom_GridTrack_h */