]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/bobtoolz/dialogs/PolygonDialog.cpp
my own uncrustify run
[xonotic/netradiant.git] / contrib / bobtoolz / dialogs / PolygonDialog.cpp
index f0a38d6e9b7463ad704c0a88ba1cb6d665eedfca..652d9cb07875e3c865148dec6a868d7a2f60c528 100644 (file)
@@ -1,21 +1,21 @@
 /*
-BobToolz plugin for GtkRadiant
-Copyright (C) 2001 Gordon Biggans
+   BobToolz plugin for GtkRadiant
+   Copyright (C) 2001 Gordon Biggans
 
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Lesser General Public License for more details.
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
 
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 // PolygonDialog.cpp : implementation file
 //
@@ -34,9 +34,8 @@ static char THIS_FILE[] = __FILE__;
 // CPolygonDialog dialog
 
 
-CPolygonDialog::CPolygonDialog(CWnd* pParent /*=NULL*/)
-       : CDialog(CPolygonDialog::IDD, pParent)
-{
+CPolygonDialog::CPolygonDialog( CWnd* pParent /*=NULL*/ )
+       : CDialog( CPolygonDialog::IDD, pParent ){
        //{{AFX_DATA_INIT(CPolygonDialog)
        m_nSideCount = 3;
        m_bInverse = FALSE;
@@ -46,71 +45,67 @@ CPolygonDialog::CPolygonDialog(CWnd* pParent /*=NULL*/)
        //}}AFX_DATA_INIT
 }
 
-void CPolygonDialog::DoDataExchange(CDataExchange* pDX)
-{
-       CDialog::DoDataExchange(pDX);
+void CPolygonDialog::DoDataExchange( CDataExchange* pDX ){
+       CDialog::DoDataExchange( pDX );
        //{{AFX_DATA_MAP(CPolygonDialog)
-       DDX_Text(pDX, IDC_EDIT1, m_nSideCount);
-       DDV_MinMaxUInt(pDX, m_nSideCount, 3, MAX_POLYGON_FACES);
-       DDX_Check(pDX, IDC_INVERSE_CHK, m_bInverse);
-       DDX_Check(pDX, IDC_BORDER_CHK, m_bBorder);
-       DDX_Text(pDX, IDC_BORDER_EDIT, m_nBorderSize);
-       DDV_MinMaxUInt(pDX, m_nBorderSize, 1, 1024);
-       DDX_Check(pDX, IDC_ALIGN_CHK, m_bAlignTop);
+       DDX_Text( pDX, IDC_EDIT1, m_nSideCount );
+       DDV_MinMaxUInt( pDX, m_nSideCount, 3, MAX_POLYGON_FACES );
+       DDX_Check( pDX, IDC_INVERSE_CHK, m_bInverse );
+       DDX_Check( pDX, IDC_BORDER_CHK, m_bBorder );
+       DDX_Text( pDX, IDC_BORDER_EDIT, m_nBorderSize );
+       DDV_MinMaxUInt( pDX, m_nBorderSize, 1, 1024 );
+       DDX_Check( pDX, IDC_ALIGN_CHK, m_bAlignTop );
        //}}AFX_DATA_MAP
 }
 
 
-BEGIN_MESSAGE_MAP(CPolygonDialog, CDialog)
-       //{{AFX_MSG_MAP(CPolygonDialog)
-       ON_BN_CLICKED(IDC_BORDER_CHK, OnBorderChkClicked)
-       ON_BN_CLICKED(IDC_INVERSE_CHK, OnInverseChkClickrd)
-       //}}AFX_MSG_MAP
+BEGIN_MESSAGE_MAP( CPolygonDialog, CDialog )
+//{{AFX_MSG_MAP(CPolygonDialog)
+ON_BN_CLICKED( IDC_BORDER_CHK, OnBorderChkClicked )
+ON_BN_CLICKED( IDC_INVERSE_CHK, OnInverseChkClickrd )
+//}}AFX_MSG_MAP
 END_MESSAGE_MAP()
 
 /////////////////////////////////////////////////////////////////////////////
 // CPolygonDialog message handlers
 
-BOOL CPolygonDialog::OnInitDialog() 
-{
+BOOL CPolygonDialog::OnInitDialog(){
        CDialog::OnInitDialog();
-       
-       EnableBordered(!GetChkBool(IDC_INVERSE_CHK));
-       EnableBorderEdit(!GetChkBool(IDC_INVERSE_CHK) && GetChkBool(IDC_BORDER_CHK));
-               
+
+       EnableBordered( !GetChkBool( IDC_INVERSE_CHK ) );
+       EnableBorderEdit( !GetChkBool( IDC_INVERSE_CHK ) && GetChkBool( IDC_BORDER_CHK ) );
+
        return TRUE;  // return TRUE unless you set the focus to a control
                      // EXCEPTION: OCX Property Pages should return FALSE
 }
 
-void CPolygonDialog::EnableBordered(BOOL bEnable)
-{
-       CWnd* dtlChk = GetDlgItem(IDC_BORDER_CHK);
-       if(dtlChk)
-               dtlChk->EnableWindow(bEnable);
+void CPolygonDialog::EnableBordered( BOOL bEnable ){
+       CWnd* dtlChk = GetDlgItem( IDC_BORDER_CHK );
+       if ( dtlChk ) {
+               dtlChk->EnableWindow( bEnable );
+       }
 }
 
-void CPolygonDialog::EnableBorderEdit(BOOL bEnable)
-{
-       CWnd* dtlChk = GetDlgItem(IDC_BORDER_EDIT);
-       if(dtlChk)
-               dtlChk->EnableWindow(bEnable);
+void CPolygonDialog::EnableBorderEdit( BOOL bEnable ){
+       CWnd* dtlChk = GetDlgItem( IDC_BORDER_EDIT );
+       if ( dtlChk ) {
+               dtlChk->EnableWindow( bEnable );
+       }
 }
 
-void CPolygonDialog::OnBorderChkClicked() 
-{
-       EnableBorderEdit(!GetChkBool(IDC_INVERSE_CHK) && GetChkBool(IDC_BORDER_CHK));
+void CPolygonDialog::OnBorderChkClicked(){
+       EnableBorderEdit( !GetChkBool( IDC_INVERSE_CHK ) && GetChkBool( IDC_BORDER_CHK ) );
 }
 
-void CPolygonDialog::OnInverseChkClickrd() 
-{
-       EnableBordered(!GetChkBool(IDC_INVERSE_CHK));
-       EnableBorderEdit(!GetChkBool(IDC_INVERSE_CHK) && GetChkBool(IDC_BORDER_CHK));
+void CPolygonDialog::OnInverseChkClickrd(){
+       EnableBordered( !GetChkBool( IDC_INVERSE_CHK ) );
+       EnableBorderEdit( !GetChkBool( IDC_INVERSE_CHK ) && GetChkBool( IDC_BORDER_CHK ) );
 }
 
-BOOL CPolygonDialog::GetChkBool(int nID)
-{
-       CButton* btn = (CButton*)GetDlgItem(nID);
-       if(btn)
+BOOL CPolygonDialog::GetChkBool( int nID ){
+       CButton* btn = (CButton*)GetDlgItem( nID );
+       if ( btn ) {
                return btn->GetCheck();
+       }
        return FALSE;
 }