aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/include/IGUIStaticText.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/include/IGUIStaticText.h')
-rw-r--r--src/others/irrlicht-1.8.1/include/IGUIStaticText.h135
1 files changed, 135 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/include/IGUIStaticText.h b/src/others/irrlicht-1.8.1/include/IGUIStaticText.h
new file mode 100644
index 0000000..30325bc
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/include/IGUIStaticText.h
@@ -0,0 +1,135 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_GUI_STATIC_TEXT_H_INCLUDED__
6#define __I_GUI_STATIC_TEXT_H_INCLUDED__
7
8#include "IGUIElement.h"
9#include "SColor.h"
10
11namespace irr
12{
13namespace gui
14{
15 class IGUIFont;
16
17 //! Multi or single line text label.
18 class IGUIStaticText : public IGUIElement
19 {
20 public:
21
22 //! constructor
23 IGUIStaticText(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
24 : IGUIElement(EGUIET_STATIC_TEXT, environment, parent, id, rectangle) {}
25
26 //! Sets another skin independent font.
27 /** If this is set to zero, the button uses the font of the skin.
28 \param font: New font to set. */
29 virtual void setOverrideFont(IGUIFont* font=0) = 0;
30
31 //! Gets the override font (if any)
32 /** \return The override font (may be 0) */
33 virtual IGUIFont* getOverrideFont(void) const = 0;
34
35 //! Get the font which is used right now for drawing
36 /** Currently this is the override font when one is set and the
37 font of the active skin otherwise */
38 virtual IGUIFont* getActiveFont() const = 0;
39
40 //! Sets another color for the text.
41 /** If set, the static text does not use the EGDC_BUTTON_TEXT color defined
42 in the skin, but the set color instead. You don't need to call
43 IGUIStaticText::enableOverrrideColor(true) after this, this is done
44 by this function.
45 If you set a color, and you want the text displayed with the color
46 of the skin again, call IGUIStaticText::enableOverrideColor(false);
47 \param color: New color of the text. */
48 virtual void setOverrideColor(video::SColor color) = 0;
49
50 //! Gets the override color
51 /** \return: The override color */
52 virtual video::SColor getOverrideColor(void) const = 0;
53
54 //! Sets if the static text should use the overide color or the color in the gui skin.
55 /** \param enable: If set to true, the override color, which can be set
56 with IGUIStaticText::setOverrideColor is used, otherwise the
57 EGDC_BUTTON_TEXT color of the skin. */
58 virtual void enableOverrideColor(bool enable) = 0;
59
60 //! Checks if an override color is enabled
61 /** \return true if the override color is enabled, false otherwise */
62 virtual bool isOverrideColorEnabled(void) const = 0;
63
64 //! Sets another color for the background.
65 virtual void setBackgroundColor(video::SColor color) = 0;
66
67 //! Sets whether to draw the background
68 virtual void setDrawBackground(bool draw) = 0;
69
70 //! Gets the background color
71 /** \return: The background color */
72 virtual video::SColor getBackgroundColor() const = 0;
73
74 //! Checks if background drawing is enabled
75 /** \return true if background drawing is enabled, false otherwise */
76 virtual bool isDrawBackgroundEnabled() const = 0;
77
78 //! Sets whether to draw the border
79 virtual void setDrawBorder(bool draw) = 0;
80
81 //! Checks if border drawing is enabled
82 /** \return true if border drawing is enabled, false otherwise */
83 virtual bool isDrawBorderEnabled() const = 0;
84
85 //! Sets text justification mode
86 /** \param horizontal: EGUIA_UPPERLEFT for left justified (default),
87 EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
88 \param vertical: EGUIA_UPPERLEFT to align with top edge,
89 EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */
90 virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
91
92 //! Enables or disables word wrap for using the static text as multiline text control.
93 /** \param enable: If set to true, words going over one line are
94 broken on to the next line. */
95 virtual void setWordWrap(bool enable) = 0;
96
97 //! Checks if word wrap is enabled
98 /** \return true if word wrap is enabled, false otherwise */
99 virtual bool isWordWrapEnabled(void) const = 0;
100
101 //! Returns the height of the text in pixels when it is drawn.
102 /** This is useful for adjusting the layout of gui elements based on the height
103 of the multiline text in this element.
104 \return Height of text in pixels. */
105 virtual s32 getTextHeight() const = 0;
106
107 //! Returns the width of the current text, in the current font
108 /** If the text is broken, this returns the width of the widest line
109 \return The width of the text, or the widest broken line. */
110 virtual s32 getTextWidth(void) const = 0;
111
112 //! Set whether the text in this label should be clipped if it goes outside bounds
113 virtual void setTextRestrainedInside(bool restrainedInside) = 0;
114
115 //! Checks if the text in this label should be clipped if it goes outside bounds
116 virtual bool isTextRestrainedInside() const = 0;
117
118 //! Set whether the string should be interpreted as right-to-left (RTL) text
119 /** \note This component does not implement the Unicode bidi standard, the
120 text of the component should be already RTL if you call this. The
121 main difference when RTL is enabled is that the linebreaks for multiline
122 elements are performed starting from the end.
123 */
124 virtual void setRightToLeft(bool rtl) = 0;
125
126 //! Checks whether the text in this element should be interpreted as right-to-left
127 virtual bool isRightToLeft() const = 0;
128 };
129
130
131} // end namespace gui
132} // end namespace irr
133
134#endif
135