Luanti
5.10.0-dev
Loading...
Searching...
No Matches
guiEditBoxWithScrollbar.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2012 Nikolaus Gebhardt, Modified by Mustapha Tachouct
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 GUIEDITBOXWITHSCROLLBAR_HEADER
6
#define GUIEDITBOXWITHSCROLLBAR_HEADER
7
8
#include "
guiEditBox.h
"
9
10
class
ISimpleTextureSource
;
11
12
class
GUIEditBoxWithScrollBar
:
public
GUIEditBox
13
{
14
public
:
15
17
GUIEditBoxWithScrollBar
(
const
wchar_t
* text,
bool
border, IGUIEnvironment* environment,
18
IGUIElement* parent, s32
id
,
const
core::rect<s32>& rectangle,
19
ISimpleTextureSource
*tsrc,
bool
writable =
true
,
bool
has_vscrollbar =
true
);
20
22
virtual
~GUIEditBoxWithScrollBar
() {}
23
25
virtual
void
setDrawBackground
(
bool
draw
);
26
28
virtual
void
draw
();
29
31
virtual
void
updateAbsolutePosition
();
32
34
virtual
void
setBackgroundColor
(
const
video::SColor &bg_color);
35
36
virtual
bool
isDrawBackgroundEnabled
()
const
;
37
virtual
bool
isDrawBorderEnabled
()
const
;
38
virtual
void
setCursorChar
(
const
wchar_t
cursorChar);
39
virtual
wchar_t
getCursorChar
()
const
;
40
virtual
void
setCursorBlinkTime
(irr::u32 timeMs);
41
virtual
irr::u32
getCursorBlinkTime
()
const
;
42
43
protected
:
45
virtual
void
breakText
();
47
virtual
void
setTextRect
(s32 line);
49
void
calculateScrollPos
();
51
void
calculateFrameRect
();
53
void
createVScrollBar
();
54
55
s32
getCursorPos
(s32 x, s32 y);
56
57
bool
m_background
;
58
59
bool
m_bg_color_used
;
60
video::SColor
m_bg_color
;
61
62
ISimpleTextureSource
*
m_tsrc
;
63
};
64
65
66
#endif
// GUIEDITBOXWITHSCROLLBAR_HEADER
67
GUIEditBoxWithScrollBar
Definition
guiEditBoxWithScrollbar.h:13
GUIEditBoxWithScrollBar::updateAbsolutePosition
virtual void updateAbsolutePosition()
Updates the absolute position, splits text if required.
Definition
guiEditBoxWithScrollbar.cpp:68
GUIEditBoxWithScrollBar::m_background
bool m_background
Definition
guiEditBoxWithScrollbar.h:57
GUIEditBoxWithScrollBar::getCursorBlinkTime
virtual irr::u32 getCursorBlinkTime() const
Definition
guiEditBoxWithScrollbar.cpp:660
GUIEditBoxWithScrollBar::calculateScrollPos
void calculateScrollPos()
calculates the current scroll position
Definition
guiEditBoxWithScrollbar.cpp:485
GUIEditBoxWithScrollBar::setBackgroundColor
virtual void setBackgroundColor(const video::SColor &bg_color)
Change the background color.
Definition
guiEditBoxWithScrollbar.cpp:649
GUIEditBoxWithScrollBar::isDrawBorderEnabled
virtual bool isDrawBorderEnabled() const
Definition
guiEditBoxWithScrollbar.cpp:656
GUIEditBoxWithScrollBar::createVScrollBar
void createVScrollBar()
create a Vertical ScrollBar
Definition
guiEditBoxWithScrollbar.cpp:617
GUIEditBoxWithScrollBar::GUIEditBoxWithScrollBar
GUIEditBoxWithScrollBar(const wchar_t *text, bool border, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle, ISimpleTextureSource *tsrc, bool writable=true, bool has_vscrollbar=true)
constructor
Definition
guiEditBoxWithScrollbar.cpp:26
GUIEditBoxWithScrollBar::m_bg_color_used
bool m_bg_color_used
Definition
guiEditBoxWithScrollbar.h:59
GUIEditBoxWithScrollBar::isDrawBackgroundEnabled
virtual bool isDrawBackgroundEnabled() const
Definition
guiEditBoxWithScrollbar.cpp:655
GUIEditBoxWithScrollBar::breakText
virtual void breakText()
Breaks the single text line.
Definition
guiEditBoxWithScrollbar.cpp:311
GUIEditBoxWithScrollBar::draw
virtual void draw()
draws the element and its children
Definition
guiEditBoxWithScrollbar.cpp:81
GUIEditBoxWithScrollBar::getCursorChar
virtual wchar_t getCursorChar() const
Definition
guiEditBoxWithScrollbar.cpp:658
GUIEditBoxWithScrollBar::m_bg_color
video::SColor m_bg_color
Definition
guiEditBoxWithScrollbar.h:60
GUIEditBoxWithScrollBar::calculateFrameRect
void calculateFrameRect()
calculated the FrameRect
Definition
guiEditBoxWithScrollbar.cpp:598
GUIEditBoxWithScrollBar::setCursorBlinkTime
virtual void setCursorBlinkTime(irr::u32 timeMs)
Definition
guiEditBoxWithScrollbar.cpp:659
GUIEditBoxWithScrollBar::m_tsrc
ISimpleTextureSource * m_tsrc
Definition
guiEditBoxWithScrollbar.h:62
GUIEditBoxWithScrollBar::setCursorChar
virtual void setCursorChar(const wchar_t cursorChar)
Definition
guiEditBoxWithScrollbar.cpp:657
GUIEditBoxWithScrollBar::getCursorPos
s32 getCursorPos(s32 x, s32 y)
Definition
guiEditBoxWithScrollbar.cpp:267
GUIEditBoxWithScrollBar::~GUIEditBoxWithScrollBar
virtual ~GUIEditBoxWithScrollBar()
destructor
Definition
guiEditBoxWithScrollbar.h:22
GUIEditBoxWithScrollBar::setDrawBackground
virtual void setDrawBackground(bool draw)
Sets whether to draw the background.
Definition
guiEditBoxWithScrollbar.cpp:62
GUIEditBoxWithScrollBar::setTextRect
virtual void setTextRect(s32 line)
sets the area of the given line
Definition
guiEditBoxWithScrollbar.cpp:419
GUIEditBox
Definition
guiEditBox.h:17
ISimpleTextureSource
Definition
texturesource.h:25
guiEditBox.h
gui
guiEditBoxWithScrollbar.h
Generated on Fri Nov 1 2024 10:48:59 for Luanti by
1.11.0