GlistEngine
Loading...
Searching...
No Matches
gGUITooltipText.h
Go to the documentation of this file.
1/*
2 * gGUITooltipText.h
3 *
4 * Created on: 03 Jan 2024
5 * Author : Furkan
6 */
7
8#ifndef SRC_GGUITOOLTIPTEXT_H_
9#define SRC_GGUITOOLTIPTEXT_H_
10
11#include "gGUISizer.h"
12#include "gGUIButton.h"
13#include "gFont.h"
14#include "gGUIControl.h"
15#include "gColor.h"
16
17
19public:
20
21 /*
22 * To activate these class needed 2 step as follows;
23 * First: void setTooltipText(tooltipText* tooltiptext);
24 * above method needed to be evoked by current frame object
25 * Second: void tooltipActivate(gGUISizer* sizer, int guiobject, int lineNo, int columnNo, std::string text);
26 * below method should be called with the necessary parameters
27 */
30
37
38 /*
39 * The set method works for setting the tooltip text which the user desires
40 * The get method works for getting the tooltip text which the user defined
41 * @param text, Text the user set it
42 */
43 void setText(std::string text);
44 std::string getText();
45
46 /*
47 * activate method works for the activation of the tooltip text massage by the parameters of user
48 * and assigning the coordinates to draw the massage
49 * This method evokes 2 other functions
50 * First it evokes setText method
51 * second it evokes setTitlePosition method
52 *
53 * @param sizer which is the guiobject included
54 * @param guiobject which is the type of the object such as Button, textbox or text
55 * @param lineNo which is the line number refers the desired guiobject
56 * @param lineNo which is the column number refers the desired guiobject
57 * @param text Text the user set it
58 */
59 void activate(gGUISizer* sizer, objects guiobject, int lineNo, int columnNo, std::string text);
60
61 /*
62 * setTitleLength method manage the length of the massage to draw
63 * @param text Text the user set it
64 */
65 void setTitleLength(std::string text);
66
67 void setMargin(int x, int y);
68
69 void update();
70 void draw();
71 void mouseMoved(int x, int y);
72
73private:
74 gColor color;
75 std::string text;
76 std::deque<std::string> textlist;
77 int sizerx, sizery, sizerw, sizerh;
78 int cursorx, cursory;
79 int objecth, marginx, marginy;
80 int marginentry = 0;
81 int buttonx, buttony;
82 float texth, textw, tx;
83};
84
85#endif /* SRC_GGUITOOLTIPTEXT_H_ */
Definition gColor.h:17
Definition gGUIControl.h:29
Definition gGUISizer.h:14
Definition gGUITooltipText.h:18
std::string getText()
objects
Definition gGUITooltipText.h:31
@ Panel
Definition gGUITooltipText.h:35
@ Numberbox
Definition gGUITooltipText.h:34
@ Button
Definition gGUITooltipText.h:32
@ Textbox
Definition gGUITooltipText.h:33
void setText(std::string text)
void setMargin(int x, int y)
void activate(gGUISizer *sizer, objects guiobject, int lineNo, int columnNo, std::string text)
void setTitleLength(std::string text)
void mouseMoved(int x, int y)
virtual ~gGUITooltipText()