Repository navigation
Expand file tree
/
Copy pathTextLabel.h
More file actions
69 lines (61 loc) · 1.57 KB
/
Copy pathTextLabel.h
File metadata and controls
69 lines (61 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/// \file
/// \author Matthew Allen
/// \brief A text label
#ifndef _GTEXT_LABEL_H_
#define _GTEXT_LABEL_H_
/// A static text label widget
class LgiClass LTextLabel :
public LView,
public ResObject,
public LDom
{
class LTextPrivate *d;
public:
/// Constructor
LTextLabel
(
/// The control's ID
int id,
/// Left edge position
int x,
/// Top edge position
int y,
/// The width
int cx,
/// The height
int cy,
/// Utf-8 text for the label
const char *name
);
~LTextLabel();
const char *GetClass() override { return "LTextLabel"; }
/// Set the text
bool Name(const char *n) override;
/// Set the text with a wide string
bool NameW(const char16 *n) override;
/// Sets the font used to render the text
void SetFont(LFont *Fnt, bool OwnIt = false) override;
/// Returns the numeric value of the text (atoi)
int64 Value() override;
/// Sets the text to a number
void Value(int64 i) override;
/// Gets the text
const char *Name() override { return LView::Name(); }
/// Gets the text as a wide string
const char16 *NameW() override { return LView::NameW(); }
/// Word wrap
bool GetWrap();
/// Sets the use of word wrap
void SetWrap(bool b);
// Events
LMessage::Result OnEvent(LMessage *Msg) override;
int OnNotify(LViewI *Ctrl, const LNotification &n) override;
void OnPaint(LSurface *pDC) override;
void OnPosChange() override;
void OnAttach() override;
bool OnLayout(LViewLayoutInfo &Inf) override;
void OnStyleChange();
bool SetVariant(const char *Name, LVariant &Value, const char *Array = NULL) override;
void OnCreate() override;
};
#endif