-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcleanSearch_Events.cpp
150 lines (150 loc) · 3.3 KB
/
cleanSearch_Events.cpp
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#include "G.h"
void G::dump_BOnClick( wxCommandEvent& event )
{
findUse_D->SetSelection( 0 );
Search( 0, 0 );
}
void G::find_BOnClick( wxCommandEvent& event )
{
s16 no = findUse_D->GetSelection();
if ( no < 255 )
{
Search( no, findType_D->GetSelection() );
}
}
void G::findEqual_BOnClick( wxCommandEvent& event )
{
findType_D->SetSelection( QD_EQUAL );
s16 no = findUse_D->GetSelection();
if ( no < 255 )
{
Search( no, QD_EQUAL );
}
}
void G::findNOTE_BOnClick( wxCommandEvent& event )
{
findType_D->SetSelection( QD_NOT );
s16 no = findUse_D->GetSelection();
if ( no < 255 )
{
Search( no, QD_NOT );
}
}
void G::findGT_BOnClick( wxCommandEvent& event )
{
findType_D->SetSelection( QD_MT );
s16 no = findUse_D->GetSelection();
if ( no < 255 )
{
Search( no, QD_MT );
}
}
void G::findGTE_BOnClick( wxCommandEvent& event )
{
findType_D->SetSelection( QD_MTE );
s16 no = findUse_D->GetSelection();
if ( no < 255 )
{
Search( no, QD_MTE );
}
}
void G::findLT_BOnClick( wxCommandEvent& event )
{
findType_D->SetSelection( QD_LT );
s16 no = findUse_D->GetSelection();
if ( no < 255 )
{
Search( no, QD_LT );
}
}
void G::findLTE_BOnClick( wxCommandEvent& event )
{
findType_D->SetSelection( QD_LTE );
s16 no = findUse_D->GetSelection();
if ( no < 255 )
{
Search( no, QD_LTE );
}
}
void G::findUndo_BOnClick( wxCommandEvent& event )
{
s16 no = findUse_D->GetCount() - 2;
SetSearch( no );
}
s8 prevMode = 0;
void G::findMode_DOnChoice( wxCommandEvent& event )
{
s8 mode = findMode_D->GetSelection();
u8 size = gGetUSize( findSize_D->GetSelection() );
u64 valG, valB;
xStr txtG, txtB, text;
for ( s8 i = 0; i < QV_COUNT; ++i )
{
txtG = mQVG_TXT[ i ]->GetValue();
txtB = mQVB_TXT[ i ]->GetValue();
switch ( prevMode )
{
case VAL_HEX:
valG = GetHex( txtG, size );
valB = GetHex( txtB, size );
break;
case VAL_UINT:
valG = GetHexFromU64( txtG, size );
valB = GetHexFromU64( txtB, size );
break;
case VAL_SINT:
valG = GetHexFromS64( txtG, size );
valB = GetHexFromS64( txtB, size );
break;
case VAL_SFLT:
valG = GetHexFromF64( txtG, size );
valB = GetHexFromF64( txtB, size );
break;
default:
valG = 0u;
valB = 0u;
}
switch ( mode )
{
case VAL_HEX:
text = hexVLL;
txtG.Printf( text, valG );
txtB.Printf( text, valB );
break;
case VAL_UINT:
text = wxT( "%llu" );
txtG.Printf( text, valG );
txtB.Printf( text, valB );
break;
case VAL_SINT:
text = wxT( "%lli" );
txtG.Printf( text, valG );
txtB.Printf( text, valB );
break;
case VAL_SFLT:
switch ( size )
{
case 1u: case 2u: case 4u:
text = wxT( "%llf" ); break;
default: text = wxT( "%lg" );
}
txtG.Printf( text, valG );
txtB.Printf( text, valB );
break;
default:
txtG = wxT( '0' );
txtB = wxT( '0' );
break;
}
mQVG_TXT[ i ]->ChangeValue( txtG );
mQVB_TXT[ i ]->ChangeValue( txtB );
}
prevMode = mode;
}
void G::find_TXTOnChange( wxCommandEvent& event )
{
s32 mode = findMode_D->GetSelection();
s32 size = findSize_D->GetSelection();
doChange( event, mode, size );
}
void G::compare_DOnChoice( wxCommandEvent& event ) {}