root/trunk/FormatSettingsPage.cpp

Revision 5, 2.8 kB (checked in by qbert, 6 years ago)

Initial ( and last :( ) commit

Line 
1 // FormatSettingsPage.cpp : implementation file
2 //
3
4 #include "stdafx.h"
5 #include "Elephant.h"
6 #include "FormatSettingsPage.h"
7
8 #ifdef _DEBUG
9 #define new DEBUG_NEW
10 #undef THIS_FILE
11 static char THIS_FILE[] = __FILE__;
12 #endif
13
14 /////////////////////////////////////////////////////////////////////////////
15 // CFormatSettingsPage dialog
16
17
18 CFormatSettingsPage::CFormatSettingsPage(CWnd* pParent /*=NULL*/)
19    
20 {
21     //{{AFX_DATA_INIT(CFormatSettingsPage)
22     m_c11 = Globals::settings->astyleSettings->GetCache("fillEmptyLines") == "1";
23     m_c12 = Globals::settings->astyleSettings->GetCache("keepOneLineStatements") == "1";
24     m_c13 = Globals::settings->astyleSettings->GetCache("keepOneLineBlocks") == "1";
25     m_c14 = Globals::settings->astyleSettings->GetCache("breakAllBlocks") == "1";
26     m_c15 = Globals::settings->astyleSettings->GetCache("padParens") == "1";
27     m_c16 = Globals::settings->astyleSettings->GetCache("convertTabs") == "1";
28     m_c17 = Globals::settings->astyleSettings->GetCache("breakElseIfs") == "1";
29     m_c2 = Globals::settings->astyleSettings->GetCache("attachBrackets") == "1";
30     m_c6 = Globals::settings->astyleSettings->GetCache("breakBrackets") == "1";
31     m_c7 = Globals::settings->astyleSettings->GetCache("indentBlocks") == "1";
32     m_c8 = Globals::settings->astyleSettings->GetCache("indentBrackets") == "1";
33     m_c9 = Globals::settings->astyleSettings->GetCache("indentLabels") == "1";
34     m_style = atoi(Globals::settings->astyleSettings->GetCache("style").c_str());
35     m_indent = atoi(Globals::settings->astyleSettings->GetCache("indent") .c_str());
36     m_c10 = Globals::settings->astyleSettings->GetCache("indentCases") == "1";
37     m_c1 = Globals::settings->astyleSettings->GetCache("indentClasses") == "1";
38     //}}AFX_DATA_INIT
39 }
40
41
42 void CFormatSettingsPage::DoDataExchange(CDataExchange* pDX)
43 {
44     CDialog::DoDataExchange(pDX);
45     //{{AFX_DATA_MAP(CFormatSettingsPage)
46     DDX_Check(pDX, IDC_CHECK11, m_c11);
47     DDX_Check(pDX, IDC_CHECK12, m_c12);
48     DDX_Check(pDX, IDC_CHECK13, m_c13);
49     DDX_Check(pDX, IDC_CHECK14, m_c14);
50     DDX_Check(pDX, IDC_CHECK15, m_c15);
51     DDX_Check(pDX, IDC_CHECK16, m_c16);
52     DDX_Check(pDX, IDC_CHECK17, m_c17);
53     DDX_Check(pDX, IDC_CHECK2, m_c2);
54     DDX_Check(pDX, IDC_CHECK6, m_c6);
55     DDX_Check(pDX, IDC_CHECK7, m_c7);
56     DDX_Check(pDX, IDC_CHECK8, m_c8);
57     DDX_Check(pDX, IDC_CHECK9, m_c9);
58     DDX_Radio(pDX, IDC_RADIO1, m_style);
59     DDX_Radio(pDX, IDC_RADIO6, m_indent);
60     DDX_Check(pDX, IDC_CHECK10, m_c10);
61     DDX_Check(pDX, IDC_CHECK1, m_c1);
62     //}}AFX_DATA_MAP
63 }
64
65
66 BEGIN_MESSAGE_MAP(CFormatSettingsPage, CDialog)
67     //{{AFX_MSG_MAP(CFormatSettingsPage)
68         // NOTE: the ClassWizard will add message map macros here
69     //}}AFX_MSG_MAP
70 END_MESSAGE_MAP()
71
72 /////////////////////////////////////////////////////////////////////////////
73 // CFormatSettingsPage message handlers
Note: See TracBrowser for help on using the browser.