SavvyUI C++ UI Library
Loading...
Searching...
No Matches
Frame.h
Go to the documentation of this file.
1#pragma once
2
3#include "Component.h"
4#include "GridPanel.h"
5#include "Button.h"
6#include "Label.h"
7
8class StatusBar : public GridPanel, public ActionListener
9{
10 Label _textLabel;
11 Button _licenseBtn;
12 Button _themeBtn;
13
14 BOOL _showThemeToggler;
15
16 wstring _licenseMessage;
17
18public:
19
21 virtual ~StatusBar();
22
23 void setText(const wstring& text);
24 void setLicenseMessage(const wstring& message);
25
26 void setShowThemeToggler(BOOL bShow = TRUE);
27
28 void onAction(const ActionEvent& ev);
29};
30
38class Frame: public Component
39{
40 GridPanel _contentPane;
41 StatusBar _statusBar;
42
43 wstring _wndClassName;
44 wstring _title;
45 wstring _ltoken;
46 BOOL _lValid;
47 wstring _lTo;
48 wstring _lDate;
49 wstring _lApplication;
50 BOOL _isCentered;
51
52 BOOL _showThemeToggler;
53
58 void _clt(const wstring& t);
59
60protected:
61
70 BOOL getCreateWindowOptions(wstring& title, UINT& widownStyles, wstring& wndClassName, BOOL& isCustomWndProc);
71
76
77protected:
78
84
86
87 void setShowThemeToggler(BOOL bShow = TRUE);
88
89public:
90
96 Frame(const wstring& wndClassName, const wstring& title);
97
101 virtual ~Frame();
102
103 void setTitle(const wstring& title);
104
109 void setLicense(const wstring& licenseToken);
110
116 virtual void onConstructWindow() = 0;
117
122 void onTimer(unsigned int timerId);
123
128
133};
Definition EventListeners.h:38
Definition EventListeners.h:46
A clickable UI component representing a button with customizable text and type.
Definition Button.h:13
Component()
Constructs a new Component instance.
void onWindowResized()
Handles window resize events.
GridPanel * getContentPane()
Returns a pointer to the frame's content pane (GridPanel).
void onTimer(unsigned int timerId)
Handles timer events.
void windowCreated()
Called after the native window has been created.
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Retrieves window creation options such as title, styles, and class name.
Frame(const wstring &wndClassName, const wstring &title)
Constructs a Frame with specified window class name and title.
void setTitle(const wstring &title)
void onWindowMoved()
Handles window move events.
void setWindowCentered()
virtual ~Frame()
Destructor.
virtual void onConstructWindow()=0
Abstract method called to perform window construction tasks.
void setShowThemeToggler(BOOL bShow=TRUE)
void setLicense(const wstring &licenseToken)
Sets the license token and updates licensing status.
A panel that arranges child components in a grid layout.
Definition GridPanel.h:39
A UI component for displaying text with customizable alignment.
Definition Label.h:13
Definition Frame.h:9
void setLicenseMessage(const wstring &message)
void setText(const wstring &text)
void setShowThemeToggler(BOOL bShow=TRUE)
void onAction(const ActionEvent &ev)
virtual ~StatusBar()