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