nsProgressMeterFrame.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /**
  6. David Hyatt & Eric D Vaughan.
  7. An XBL-based progress meter.
  8. Attributes:
  9. value: A number between 0% and 100%
  10. align: horizontal or vertical
  11. mode: determined, undetermined (one shows progress other shows animated candy cane)
  12. **/
  13. #include "mozilla/Attributes.h"
  14. #include "nsBoxFrame.h"
  15. class nsProgressMeterFrame : public nsBoxFrame
  16. {
  17. public:
  18. NS_DECL_FRAMEARENA_HELPERS
  19. friend nsIFrame* NS_NewProgressMeterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
  20. NS_IMETHOD DoXULLayout(nsBoxLayoutState& aBoxLayoutState) override;
  21. virtual nsresult AttributeChanged(int32_t aNameSpaceID,
  22. nsIAtom* aAttribute,
  23. int32_t aModType) override;
  24. #ifdef DEBUG_FRAME_DUMP
  25. virtual nsresult GetFrameName(nsAString& aResult) const override;
  26. #endif
  27. protected:
  28. explicit nsProgressMeterFrame(nsStyleContext* aContext) :
  29. nsBoxFrame(aContext), mNeedsReflowCallback(true) {}
  30. virtual ~nsProgressMeterFrame();
  31. bool mNeedsReflowCallback;
  32. }; // class nsProgressMeterFrame