diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-05 16:58:42 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-05 16:58:42 +0400 |
commit | f6883a2c09507d0acb9ccbf0156e5948211dc480 (patch) | |
tree | 7789b4fecd6b2e846f070e2e0bdb1e16ea7555e9 /src/apps/mplayerc/ShaderCombineDlg.cpp | |
parent | e9b446380bc3bc122e3e3a1d0622163a5f1920a3 (diff) |
astyle formatting
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2103 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/ShaderCombineDlg.cpp')
-rw-r--r-- | src/apps/mplayerc/ShaderCombineDlg.cpp | 168 |
1 files changed, 84 insertions, 84 deletions
diff --git a/src/apps/mplayerc/ShaderCombineDlg.cpp b/src/apps/mplayerc/ShaderCombineDlg.cpp index 2dc85c1e5..9c938b39c 100644 --- a/src/apps/mplayerc/ShaderCombineDlg.cpp +++ b/src/apps/mplayerc/ShaderCombineDlg.cpp @@ -28,9 +28,9 @@ // CShaderCombineDlg dialog
CShaderCombineDlg::CShaderCombineDlg(CAtlList<CString>& labels, CWnd* pParent , bool bScreenSpace)
- : CResizableDialog(CShaderCombineDlg::IDD, pParent)
- , m_labels(labels)
- , m_bScreenSpace(bScreenSpace)
+ : CResizableDialog(CShaderCombineDlg::IDD, pParent)
+ , m_labels(labels)
+ , m_bScreenSpace(bScreenSpace)
{
}
@@ -40,120 +40,120 @@ CShaderCombineDlg::~CShaderCombineDlg() void CShaderCombineDlg::DoDataExchange(CDataExchange* pDX)
{
- __super::DoDataExchange(pDX);
- DDX_Control(pDX, IDC_LIST1, m_list);
- DDX_Control(pDX, IDC_COMBO1, m_combo);
+ __super::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_LIST1, m_list);
+ DDX_Control(pDX, IDC_COMBO1, m_combo);
}
BEGIN_MESSAGE_MAP(CShaderCombineDlg, CResizableDialog)
- ON_BN_CLICKED(IDC_BUTTON2, &CShaderCombineDlg::OnBnClickedButton12)
- ON_BN_CLICKED(IDC_BUTTON3, &CShaderCombineDlg::OnBnClickedButton13)
- ON_BN_CLICKED(IDC_BUTTON1, &CShaderCombineDlg::OnBnClickedButton1)
- ON_BN_CLICKED(IDC_BUTTON4, &CShaderCombineDlg::OnBnClickedButton11)
+ ON_BN_CLICKED(IDC_BUTTON2, &CShaderCombineDlg::OnBnClickedButton12)
+ ON_BN_CLICKED(IDC_BUTTON3, &CShaderCombineDlg::OnBnClickedButton13)
+ ON_BN_CLICKED(IDC_BUTTON1, &CShaderCombineDlg::OnBnClickedButton1)
+ ON_BN_CLICKED(IDC_BUTTON4, &CShaderCombineDlg::OnBnClickedButton11)
END_MESSAGE_MAP()
// CShaderCombineDlg message handlers
BOOL CShaderCombineDlg::OnInitDialog()
{
- __super::OnInitDialog();
-
- AddAnchor(IDC_LIST1, TOP_LEFT, BOTTOM_RIGHT);
- AddAnchor(IDC_COMBO1, BOTTOM_LEFT, BOTTOM_RIGHT);
- AddAnchor(IDC_STATIC1, BOTTOM_LEFT, BOTTOM_RIGHT);
- AddAnchor(IDC_BUTTON2, BOTTOM_RIGHT);
- AddAnchor(IDC_BUTTON3, BOTTOM_RIGHT);
- AddAnchor(IDC_BUTTON1, TOP_RIGHT);
- AddAnchor(IDC_BUTTON4, TOP_RIGHT);
- AddAnchor(IDOK, TOP_RIGHT);
- AddAnchor(IDCANCEL, TOP_RIGHT);
-
- AppSettings& s = AfxGetAppSettings();
-
- CString str;
- if (m_bScreenSpace)
- str = s.m_shadercombineScreenSpace.Trim();
- else
- str = s.m_shadercombine.Trim();
-
- CAtlList<CString> sl;
- if(!str.IsEmpty()) Explode(str, sl, '|');
-
- POSITION pos = sl.GetHeadPosition();
- while(pos) m_list.AddString(sl.GetNext(pos));
-
- pos = s.m_shaders.GetHeadPosition();
- while(pos) m_combo.AddString(s.m_shaders.GetNext(pos).label);
- if(m_combo.GetCount()) m_combo.SetCurSel(0);
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
+ __super::OnInitDialog();
+
+ AddAnchor(IDC_LIST1, TOP_LEFT, BOTTOM_RIGHT);
+ AddAnchor(IDC_COMBO1, BOTTOM_LEFT, BOTTOM_RIGHT);
+ AddAnchor(IDC_STATIC1, BOTTOM_LEFT, BOTTOM_RIGHT);
+ AddAnchor(IDC_BUTTON2, BOTTOM_RIGHT);
+ AddAnchor(IDC_BUTTON3, BOTTOM_RIGHT);
+ AddAnchor(IDC_BUTTON1, TOP_RIGHT);
+ AddAnchor(IDC_BUTTON4, TOP_RIGHT);
+ AddAnchor(IDOK, TOP_RIGHT);
+ AddAnchor(IDCANCEL, TOP_RIGHT);
+
+ AppSettings& s = AfxGetAppSettings();
+
+ CString str;
+ if (m_bScreenSpace)
+ str = s.m_shadercombineScreenSpace.Trim();
+ else
+ str = s.m_shadercombine.Trim();
+
+ CAtlList<CString> sl;
+ if(!str.IsEmpty()) Explode(str, sl, '|');
+
+ POSITION pos = sl.GetHeadPosition();
+ while(pos) m_list.AddString(sl.GetNext(pos));
+
+ pos = s.m_shaders.GetHeadPosition();
+ while(pos) m_combo.AddString(s.m_shaders.GetNext(pos).label);
+ if(m_combo.GetCount()) m_combo.SetCurSel(0);
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
}
void CShaderCombineDlg::OnOK()
{
- m_labels.RemoveAll();
+ m_labels.RemoveAll();
- CAtlList<CString> sl;
+ CAtlList<CString> sl;
- for(int i = 0, j = m_list.GetCount(); i < j; i++)
- {
- CString label;
- m_list.GetText(i, label);
- sl.AddTail(label);
- m_labels.AddTail(label);
- }
+ for(int i = 0, j = m_list.GetCount(); i < j; i++)
+ {
+ CString label;
+ m_list.GetText(i, label);
+ sl.AddTail(label);
+ m_labels.AddTail(label);
+ }
- if (m_bScreenSpace)
- AfxGetAppSettings().m_shadercombineScreenSpace = Implode(sl, '|');
- else
- AfxGetAppSettings().m_shadercombine = Implode(sl, '|');
+ if (m_bScreenSpace)
+ AfxGetAppSettings().m_shadercombineScreenSpace = Implode(sl, '|');
+ else
+ AfxGetAppSettings().m_shadercombine = Implode(sl, '|');
- __super::OnOK();
+ __super::OnOK();
}
void CShaderCombineDlg::OnBnClickedButton12()
{
- int i = m_combo.GetCurSel();
- if(i < 0) return;
+ int i = m_combo.GetCurSel();
+ if(i < 0) return;
- CString label;
- m_combo.GetLBText(i, label);
- m_list.SetCurSel(m_list.AddString(label));
+ CString label;
+ m_combo.GetLBText(i, label);
+ m_list.SetCurSel(m_list.AddString(label));
}
void CShaderCombineDlg::OnBnClickedButton13()
{
- int i = m_list.GetCurSel();
- if(i < 0) return;
+ int i = m_list.GetCurSel();
+ if(i < 0) return;
- m_list.DeleteString(i);
- if(i == m_list.GetCount()) i--;
- if(i >= 0) m_list.SetCurSel(i);
+ m_list.DeleteString(i);
+ if(i == m_list.GetCount()) i--;
+ if(i >= 0) m_list.SetCurSel(i);
}
void CShaderCombineDlg::OnBnClickedButton1()
{
- int i = m_list.GetCurSel();
- if(i < 1) return;
-
- CString label;
- m_list.GetText(i, label);
- m_list.DeleteString(i);
- i--;
- m_list.InsertString(i, label);
- m_list.SetCurSel(i);
+ int i = m_list.GetCurSel();
+ if(i < 1) return;
+
+ CString label;
+ m_list.GetText(i, label);
+ m_list.DeleteString(i);
+ i--;
+ m_list.InsertString(i, label);
+ m_list.SetCurSel(i);
}
void CShaderCombineDlg::OnBnClickedButton11()
{
- int i = m_list.GetCurSel();
- if(i < 0 || i >= m_list.GetCount()-1) return;
-
- CString label;
- m_list.GetText(i, label);
- m_list.DeleteString(i);
- if(++i == m_list.GetCount()) m_list.AddString(label);
- else m_list.InsertString(i, label);
- m_list.SetCurSel(i);
+ int i = m_list.GetCurSel();
+ if(i < 0 || i >= m_list.GetCount()-1) return;
+
+ CString label;
+ m_list.GetText(i, label);
+ m_list.DeleteString(i);
+ if(++i == m_list.GetCount()) m_list.AddString(label);
+ else m_list.InsertString(i, label);
+ m_list.SetCurSel(i);
}
|