Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IGUIStaticText.hpp
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 jimcpp/jimcpp.hpp
4
5#ifndef JPP_I_GUI_STATIC_TEXT_HPP_INCLUDED
6#define JPP_I_GUI_STATIC_TEXT_HPP_INCLUDED
7
8#include <jimcpp/core/engine/IGUIElement.hpp>
9#include <jimcpp/core/engine/SColor.hpp>
10
11namespace jpp
12{
13namespace gui
14{
15 class IGUIFont;
16
19 {
20 public:
21
23 IGUIStaticText(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
24 : IGUIElement(EGUIET_STATIC_TEXT, environment, parent, id, rectangle) {}
25
27
29 virtual void setOverrideFont(IGUIFont* font=0) = 0;
30
32
33 virtual IGUIFont* getOverrideFont(void) const = 0;
34
36
38 virtual IGUIFont* getActiveFont() const = 0;
39
41
48 virtual void setOverrideColor(video::SColor color) = 0;
49
51
52 virtual video::SColor getOverrideColor(void) const = 0;
53
55
56 virtual video::SColor getActiveColor() const = 0;
57
59
62 virtual void enableOverrideColor(bool enable) = 0;
63
65
66 virtual bool isOverrideColorEnabled(void) const = 0;
67
69 virtual void setBackgroundColor(video::SColor color) = 0;
70
72 virtual void setDrawBackground(bool draw) = 0;
73
75
76 virtual bool isDrawBackgroundEnabled() const = 0;
77
79
80 virtual video::SColor getBackgroundColor() const = 0;
81
83 virtual void setDrawBorder(bool draw) = 0;
84
86
87 virtual bool isDrawBorderEnabled() const = 0;
88
90
94 virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
95
97
99 virtual void setWordWrap(bool enable) = 0;
100
102
103 virtual bool isWordWrapEnabled(void) const = 0;
104
106
109 virtual s32 getTextHeight() const = 0;
110
112
114 virtual s32 getTextWidth(void) const = 0;
115
117 virtual void setTextRestrainedInside(bool restrainedInside) = 0;
118
120 virtual bool isTextRestrainedInside() const = 0;
121
123
128 virtual void setRightToLeft(bool rtl) = 0;
129
131 virtual bool isRightToLeft() const = 0;
132 };
133
134
135} // end namespace gui
136} // end namespace jpp
137
138#endif
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Base class of all GUI elements.
Definition IGUIElement.hpp:24
virtual void draw()
Draws the element and its children.
Definition IGUIElement.hpp:331
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.hpp:73
Font interface.
Definition IGUIFont.hpp:40
Multi or single line text label.
Definition IGUIStaticText.hpp:19
virtual IGUIFont * getActiveFont() const =0
Get the font which is used right now for drawing.
virtual video::SColor getOverrideColor(void) const =0
Gets the override color.
virtual void setOverrideColor(video::SColor color)=0
Sets another color for the text.
virtual bool isDrawBorderEnabled() const =0
Checks if border drawing is enabled.
virtual bool isRightToLeft() const =0
Checks whether the text in this element should be interpreted as right-to-left.
virtual void setWordWrap(bool enable)=0
Enables or disables word wrap for using the static text as multiline text control.
virtual void setTextRestrainedInside(bool restrainedInside)=0
Set whether the text in this label should be clipped if it goes outside bounds.
virtual void enableOverrideColor(bool enable)=0
Sets if the static text should use the override color or the color in the gui skin.
virtual video::SColor getBackgroundColor() const =0
Gets the background color.
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)=0
Sets text justification mode.
virtual video::SColor getActiveColor() const =0
Gets the currently used text color.
virtual bool isTextRestrainedInside() const =0
Checks if the text in this label should be clipped if it goes outside bounds.
virtual void setDrawBackground(bool draw)=0
Sets whether to draw the background.
virtual void setOverrideFont(IGUIFont *font=0)=0
Sets another skin independent font.
virtual void setDrawBorder(bool draw)=0
Sets whether to draw the border.
IGUIStaticText(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
Definition IGUIStaticText.hpp:23
virtual void setRightToLeft(bool rtl)=0
Set whether the string should be interpreted as right-to-left (RTL) text.
virtual s32 getTextWidth(void) const =0
Returns the width of the current text, in the current font.
virtual bool isDrawBackgroundEnabled() const =0
Checks if background drawing is enabled.
virtual void setBackgroundColor(video::SColor color)=0
Sets another color for the background.
virtual s32 getTextHeight() const =0
Returns the height of the text in pixels when it is drawn.
virtual IGUIFont * getOverrideFont(void) const =0
Gets the override font (if any)
virtual bool isOverrideColorEnabled(void) const =0
Checks if an override color is enabled.
virtual bool isWordWrapEnabled(void) const =0
Checks if word wrap is enabled.
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
@ EGUIET_STATIC_TEXT
A static text (IGUIStaticText)
Definition EGUIElementTypes.hpp:68
EGUI_ALIGNMENT
Definition EGUIAlignment.hpp:15
As of Jimcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72

Jimcpp    @cppfx.xyz

K