IGUIProfiler.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // This file is part of the "Irrlicht Engine".
  2. // For conditions of distribution and use, see copyright notice in irrlicht.h
  3. // Written by Michael Zeilfelder
  4. #ifndef IRR_I_GUI_PROFILER_H_INCLUDED
  5. #define IRR_I_GUI_PROFILER_H_INCLUDED
  6. #include "IGUIElement.h"
  7. namespace irr
  8. {
  9. class IProfiler;
  10. namespace gui
  11. {
  12. class IGUIFont;
  13. //! Element to display profiler information
  14. class IGUIProfiler : public IGUIElement
  15. {
  16. public:
  17. //! constructor
  18. /** \param profiler You can pass a custom profiler, but typically you can pass 0 in which cases it takes the global profiler from Irrlicht */
  19. IGUIProfiler(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle, IProfiler* profiler = NULL)
  20. : IGUIElement(EGUIET_PROFILER, environment, parent, id, rectangle)
  21. {}
  22. //! Show first page of profile data
  23. /** \param includeOverview When true show the group-overview page, when false show the profile data of the first group */
  24. virtual void firstPage(bool includeOverview=true) = 0;
  25. //! Show next page of profile data
  26. /** \param includeOverview Include the group-overview page */
  27. virtual void nextPage(bool includeOverview=true) = 0;
  28. //! Show previous page of profile data
  29. /** \param includeOverview Include the group-overview page */
  30. virtual void previousPage(bool includeOverview=true) = 0;
  31. //! Try to show as many group-pages together as possible instead of showing at most one group per page.
  32. /** \param groupsTogether When true show several groups on one page, when false show max. one group per page. Default is false. */
  33. virtual void setShowGroupsTogether(bool groupsTogether) = 0;
  34. //! Can several groups be displayed per page?
  35. virtual bool getShowGroupsTogether() const = 0;
  36. //! Sets another skin independent font.
  37. /** If this is set to zero, the button uses the font of the skin.
  38. \param font: New font to set. */
  39. virtual void setOverrideFont(IGUIFont* font=0) = 0;
  40. //! Gets the override font (if any)
  41. /** \return The override font (may be 0) */
  42. virtual IGUIFont* getOverrideFont(void) const = 0;
  43. //! Get the font which is used right now for drawing
  44. /** Currently this is the override font when one is set and the
  45. font of the active skin otherwise */
  46. virtual IGUIFont* getActiveFont() const = 0;
  47. //! Sets whether to draw the background. By default disabled,
  48. virtual void setDrawBackground(bool draw) = 0;
  49. //! Checks if background drawing is enabled
  50. /** \return true if background drawing is enabled, false otherwise */
  51. virtual bool isDrawBackgroundEnabled() const = 0;
  52. //! Allows to freeze updates which makes it easier to read the numbers
  53. /** Numbers are updated once when you switch pages. */
  54. virtual void setFrozen(bool freeze) = 0;
  55. //! Are updates currently frozen
  56. virtual bool getFrozen() const = 0;
  57. //! Filters prevents data that doesn't achieve the conditions from being displayed
  58. virtual void setFilters(irr::u32 minCalls = 0, irr::u32 minTimeSum = 0, irr::f32 minTimeAverage = 0.f, irr::u32 minTimeMax = 0) = 0;
  59. };
  60. } // end namespace gui
  61. } // end namespace irr
  62. #endif