| 1 |
#if !defined(AFX_FORMATSETTINGSPAGE_H__A50EA1A3_F3E2_4A7A_B946_84D4F106DF0A__INCLUDED_) |
|---|
| 2 |
#define AFX_FORMATSETTINGSPAGE_H__A50EA1A3_F3E2_4A7A_B946_84D4F106DF0A__INCLUDED_ |
|---|
| 3 |
|
|---|
| 4 |
#if _MSC_VER > 1000 |
|---|
| 5 |
#pragma once |
|---|
| 6 |
#endif // _MSC_VER > 1000 |
|---|
| 7 |
// FormatSettingsPage.h : header file |
|---|
| 8 |
// |
|---|
| 9 |
#include "GUIComponents/GenericChildDialog.h" |
|---|
| 10 |
///////////////////////////////////////////////////////////////////////////// |
|---|
| 11 |
// CFormatSettingsPage dialog |
|---|
| 12 |
|
|---|
| 13 |
class CFormatSettingsPage : public CRHGenericChildDialog |
|---|
| 14 |
{ |
|---|
| 15 |
// Construction |
|---|
| 16 |
public: |
|---|
| 17 |
CFormatSettingsPage(CWnd* pParent = NULL); // standard constructor |
|---|
| 18 |
virtual int CRHGetDialogID() { return IDD; |
|---|
| 19 |
} |
|---|
| 20 |
// Dialog Data |
|---|
| 21 |
//{{AFX_DATA(CFormatSettingsPage) |
|---|
| 22 |
enum { IDD = IDD_FORMATSETTINGS_PAGE }; |
|---|
| 23 |
BOOL m_c11; |
|---|
| 24 |
BOOL m_c12; |
|---|
| 25 |
BOOL m_c13; |
|---|
| 26 |
BOOL m_c14; |
|---|
| 27 |
BOOL m_c15; |
|---|
| 28 |
BOOL m_c16; |
|---|
| 29 |
BOOL m_c17; |
|---|
| 30 |
BOOL m_c2; |
|---|
| 31 |
BOOL m_c6; |
|---|
| 32 |
BOOL m_c7; |
|---|
| 33 |
BOOL m_c8; |
|---|
| 34 |
BOOL m_c9; |
|---|
| 35 |
int m_style; |
|---|
| 36 |
int m_indent; |
|---|
| 37 |
BOOL m_c10; |
|---|
| 38 |
BOOL m_c1; |
|---|
| 39 |
//}}AFX_DATA |
|---|
| 40 |
|
|---|
| 41 |
void Save() { |
|---|
| 42 |
|
|---|
| 43 |
UpdateData(); |
|---|
| 44 |
|
|---|
| 45 |
// AfxMessageBox(Globals::settings->astyleSettings->GetCache("fillEmptyLines").c_str() ); |
|---|
| 46 |
|
|---|
| 47 |
Globals::settings->astyleSettings->SetCache("fillEmptyLines",m_c11 ? "1":"0"); |
|---|
| 48 |
Globals::settings->astyleSettings->SetCache("keepOneLineStatements",m_c12 ? "1":"0"); |
|---|
| 49 |
Globals::settings->astyleSettings->SetCache("keepOneLineBlocks",m_c13 ? "1":"0"); |
|---|
| 50 |
Globals::settings->astyleSettings->SetCache("breakAllBlocks",m_c14 ? "1":"0"); |
|---|
| 51 |
Globals::settings->astyleSettings->SetCache("padParens",m_c15 ? "1":"0"); |
|---|
| 52 |
Globals::settings->astyleSettings->SetCache("convertTabs",m_c16 ? "1":"0"); |
|---|
| 53 |
Globals::settings->astyleSettings->SetCache("breakElseIfs",m_c17 ? "1":"0"); |
|---|
| 54 |
Globals::settings->astyleSettings->SetCache("attachBrackets",m_c2 ? "1":"0"); |
|---|
| 55 |
Globals::settings->astyleSettings->SetCache("breakBrackets",m_c6 ? "1":"0"); |
|---|
| 56 |
Globals::settings->astyleSettings->SetCache("indentBlocks",m_c7 ? "1":"0"); |
|---|
| 57 |
Globals::settings->astyleSettings->SetCache("indentBrackets",m_c8 ? "1":"0"); |
|---|
| 58 |
Globals::settings->astyleSettings->SetCache("indentLabels",m_c9 ? "1":"0"); |
|---|
| 59 |
Globals::settings->astyleSettings->SetCache("style",ITOA(m_style) ); |
|---|
| 60 |
Globals::settings->astyleSettings->SetCache("indent",ITOA(m_indent) ); |
|---|
| 61 |
Globals::settings->astyleSettings->SetCache("indentCases",m_c10 ? "1":"0"); |
|---|
| 62 |
Globals::settings->astyleSettings->SetCache("indentClasses",m_c1 ? "1":"0"); |
|---|
| 63 |
// AfxMessageBox(Globals::settings->astyleSettings->GetCache("fillEmptyLines").c_str() ); |
|---|
| 64 |
|
|---|
| 65 |
} |
|---|
| 66 |
// Overrides |
|---|
| 67 |
// ClassWizard generated virtual function overrides |
|---|
| 68 |
//{{AFX_VIRTUAL(CFormatSettingsPage) |
|---|
| 69 |
protected: |
|---|
| 70 |
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
|---|
| 71 |
//}}AFX_VIRTUAL |
|---|
| 72 |
|
|---|
| 73 |
// Implementation |
|---|
| 74 |
protected: |
|---|
| 75 |
|
|---|
| 76 |
// Generated message map functions |
|---|
| 77 |
//{{AFX_MSG(CFormatSettingsPage) |
|---|
| 78 |
// NOTE: the ClassWizard will add member functions here |
|---|
| 79 |
//}}AFX_MSG |
|---|
| 80 |
DECLARE_MESSAGE_MAP() |
|---|
| 81 |
}; |
|---|
| 82 |
|
|---|
| 83 |
//{{AFX_INSERT_LOCATION}} |
|---|
| 84 |
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|---|
| 85 |
|
|---|
| 86 |
#endif // !defined(AFX_FORMATSETTINGSPAGE_H__A50EA1A3_F3E2_4A7A_B946_84D4F106DF0A__INCLUDED_) |
|---|