SavvyUI C++ UI Library
Loading...
Searching...
No Matches
Label.h
Go to the documentation of this file.
1#pragma once
2
3#include "Component.h"
4
12class Label : public Component
13{
14 wstring _text;
15 long _alignment;
16
17protected:
18
28 BOOL getCreateWindowOptions(wstring& title, UINT& widownStyles, wstring& wndClassName, BOOL& isCustomWndProc);
29
34
35public:
36
41
45 virtual ~Label();
46
52 void setText(const wstring& text);
53
59 void setAlignment(long alignment);
60
61public: // Overridables
62
63 void onPaint(Graphics* g) override;
64 void onWindowResized() override;
65};
Component()
Constructs a new Component instance.
Definition Graphics.h:161
void onWindowResized() override
Called when the component's window is resized.
void onPaint(Graphics *g) override
Called to paint the component's client area.
void setText(const wstring &text)
Sets the text content of the label.
void setAlignment(long alignment)
Sets the text alignment within the label.
void windowCreated()
Called after the native window has been created to perform initialization.
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Provides options needed to create the native window for the label.
virtual ~Label()
Destructor for Label component.
Label()
Constructs an empty Label component.