forked from n00b87/RCBasic-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrcbasic_edit_preference_dialog.cpp
executable file
·78 lines (63 loc) · 2.24 KB
/
rcbasic_edit_preference_dialog.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
#include "rcbasic_edit_preference_dialog.h"
#include "rcbasic_edit_frame.h"
rcbasic_edit_preference_dialog::rcbasic_edit_preference_dialog( wxWindow* parent )
:
rc_preference_dialog( parent )
{
parent_frame = parent;
rcbasic_edit_frame* pframe = (rcbasic_edit_frame*) parent_frame;
m_pref_rcPath_dirPicker->SetPath(pframe->getRCBasicBasePath());
m_pref_compilerPath_filePicker->SetFileName(wxFileName(pframe->getRCBasicBuildPath()));
m_pref_runtimePath_filePicker->SetFileName(wxFileName(pframe->getRCBasicRunPath()));
m_rcbasicManual_textCtrl->SetValue(pframe->getRCBasicDocLink());
m_editorManual_textCtrl->SetValue(pframe->getStudioDocLink());
m_enableParser_checkBox->SetValue(pframe->getParserFlag());
m_enableCodeCompletion_checkBox->SetValue(pframe->getAutoCompleteFlag());
m_enablePresets_checkBox->SetValue(pframe->getPresetFlag());
}
int rcbasic_edit_preference_dialog::getPreferenceDialogValue()
{
return preference_dialog_value;
}
void rcbasic_edit_preference_dialog::onCancelButtonClick( wxCommandEvent& event )
{
preference_dialog_value = preference_value_CANCEL;
Close();
}
void rcbasic_edit_preference_dialog::onOKButtonClick( wxCommandEvent& event )
{
preference_dialog_value = preference_value_OK;
Close();
}
wxString rcbasic_edit_preference_dialog::getRCBasicBasePath()
{
return m_pref_rcPath_dirPicker->GetPath();
}
wxFileName rcbasic_edit_preference_dialog::getRCBasicBuildPath()
{
return m_pref_compilerPath_filePicker->GetFileName();
}
wxFileName rcbasic_edit_preference_dialog::getRCBasicRunPath()
{
return m_pref_runtimePath_filePicker->GetFileName();
}
bool rcbasic_edit_preference_dialog::getParserFlag()
{
return m_enableParser_checkBox->GetValue();
}
bool rcbasic_edit_preference_dialog::getAutoCompleteFlag()
{
return m_enableCodeCompletion_checkBox->GetValue();
}
bool rcbasic_edit_preference_dialog::getPresetFlag()
{
return m_enablePresets_checkBox->GetValue();
}
wxString rcbasic_edit_preference_dialog::getRCBasicDocLink()
{
return m_rcbasicManual_textCtrl->GetValue();
}
wxString rcbasic_edit_preference_dialog::getStudioDocLink()
{
return m_editorManual_textCtrl->GetValue();
}