-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTabPageTerminalSimulator.cpp
More file actions
82 lines (62 loc) · 1.98 KB
/
Copy pathTabPageTerminalSimulator.cpp
File metadata and controls
82 lines (62 loc) · 1.98 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
70
71
72
73
74
75
76
77
78
79
80
81
82
#include "TabPageTerminalSimulator.h"
TabPageTerminalSimulator::TabPageTerminalSimulator( window wd,MainFormBase* parentForm )
:
TabPageBase( wd,parentForm )
{
MainSetup( "vertical < weight = 19% placeEmpty_00>"
" < weight = 10% placeLabelHead margin = [0%,5%,0%,5%]>"
" < weight = 20% placeLabel margin = [0%,5%,0%,5%]>"
" < weight = 2% placeEmpty_01>"
" < weight = 20% placeButton>"
" < weight = 19% placeEmpty_02>" );
}
TabPageTerminalSimulator::~TabPageTerminalSimulator()
{
}
void TabPageTerminalSimulator::InitTabPage()
{
for( int i = 0; i < 1; ++i )
{
auto p = std::make_shared<button>( *this );
m_vButtons.push_back( p );
}
auto pCurBtn = m_vButtons[ 0 ];
m_place.field( "placeButton" ) << *pCurBtn;
pCurBtn->events().click( [ this ]{
NoTabBarFormLogin fm( *dynamic_cast<MainForm*>( m_parent ),true );
} );
for( int i = 0; i < 2; ++i )
{
auto p = std::make_shared<label>( *this );
m_vLabels.push_back( p );
}
auto pCurLbl = m_vLabels[ 0 ];
m_place.field( "placeLabelHead" ) << *pCurLbl;
pCurLbl = m_vLabels[ 1 ];
m_place.field( "placeLabel" ) << *pCurLbl;
}
void TabPageTerminalSimulator::UpdateStringsWidgets()
{
std::string basePath = TABPAGE_TERMINALSIMULATOR_FILEPATH_BASE + GET_CURLANGUAGE_STR + "/";
//---------//
// BUTTONS //
//---------//
std::vector<std::string> buttonStrings = FIO_ReadFromFileToVector( basePath + FILE_BUTTONS );
auto pCurBtn = m_vButtons[ 0 ];
auto pCurBtnText = buttonStrings[ 0 ];
pCurBtn->caption( ( pCurBtnText ) );
//--------//
// LABELS //
//--------//
std::vector<std::string> labelStrings = FIO_ReadFromFileToVector( basePath + FILE_LABELS );
auto pCurLbl = m_vLabels[ 0 ];
auto pCurLblText = labelStrings[ 0 ];
pCurLbl->format( true );
pCurLbl->caption( ( "<bold,size=12>" + pCurLblText + "</>" ) );
pCurLbl = m_vLabels[ 1 ];
pCurLblText = labelStrings[ 1 ];
pCurLbl->caption( ( pCurLblText ) );
}
void TabPageTerminalSimulator::UpdateStringsModalForms()
{
}