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
11
13{
14public:
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
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
43protected:
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
58
60 video::SColor m_bg_color;
61
63};
64
65
66#endif // GUIEDITBOXWITHSCROLLBAR_HEADER
67
Definition guiEditBoxWithScrollbar.h:13
virtual void updateAbsolutePosition()
Updates the absolute position, splits text if required.
Definition guiEditBoxWithScrollbar.cpp:68
bool m_background
Definition guiEditBoxWithScrollbar.h:57
virtual irr::u32 getCursorBlinkTime() const
Definition guiEditBoxWithScrollbar.cpp:660
void calculateScrollPos()
calculates the current scroll position
Definition guiEditBoxWithScrollbar.cpp:485
virtual void setBackgroundColor(const video::SColor &bg_color)
Change the background color.
Definition guiEditBoxWithScrollbar.cpp:649
virtual bool isDrawBorderEnabled() const
Definition guiEditBoxWithScrollbar.cpp:656
void createVScrollBar()
create a Vertical ScrollBar
Definition guiEditBoxWithScrollbar.cpp:617
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
bool m_bg_color_used
Definition guiEditBoxWithScrollbar.h:59
virtual bool isDrawBackgroundEnabled() const
Definition guiEditBoxWithScrollbar.cpp:655
virtual void breakText()
Breaks the single text line.
Definition guiEditBoxWithScrollbar.cpp:311
virtual void draw()
draws the element and its children
Definition guiEditBoxWithScrollbar.cpp:81
virtual wchar_t getCursorChar() const
Definition guiEditBoxWithScrollbar.cpp:658
video::SColor m_bg_color
Definition guiEditBoxWithScrollbar.h:60
void calculateFrameRect()
calculated the FrameRect
Definition guiEditBoxWithScrollbar.cpp:598
virtual void setCursorBlinkTime(irr::u32 timeMs)
Definition guiEditBoxWithScrollbar.cpp:659
ISimpleTextureSource * m_tsrc
Definition guiEditBoxWithScrollbar.h:62
virtual void setCursorChar(const wchar_t cursorChar)
Definition guiEditBoxWithScrollbar.cpp:657
s32 getCursorPos(s32 x, s32 y)
Definition guiEditBoxWithScrollbar.cpp:267
virtual ~GUIEditBoxWithScrollBar()
destructor
Definition guiEditBoxWithScrollbar.h:22
virtual void setDrawBackground(bool draw)
Sets whether to draw the background.
Definition guiEditBoxWithScrollbar.cpp:62
virtual void setTextRect(s32 line)
sets the area of the given line
Definition guiEditBoxWithScrollbar.cpp:419
Definition guiEditBox.h:17
Definition texturesource.h:25