2006-02-10 22:01:20 +00:00
|
|
|
/*
|
2012-03-17 20:01:54 +00:00
|
|
|
BobToolz plugin for GtkRadiant
|
|
|
|
Copyright (C) 2001 Gordon Biggans
|
2006-02-10 22:01:20 +00:00
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
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.
|
2006-02-10 22:01:20 +00:00
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
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.
|
2006-02-10 22:01:20 +00:00
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
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
|
|
|
|
*/
|
2006-02-10 22:01:20 +00:00
|
|
|
|
|
|
|
// StairDialog.cpp : implementation file
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "../StdAfx.h"
|
|
|
|
#include "StairDialog.h"
|
|
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
#define new DEBUG_NEW
|
|
|
|
#undef THIS_FILE
|
|
|
|
static char THIS_FILE[] = __FILE__;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// CStairDialog dialog
|
|
|
|
|
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
CStairDialog::CStairDialog( CWnd* pParent /*=NULL*/ )
|
|
|
|
: CDialog( CStairDialog::IDD, pParent ){
|
2006-02-10 22:01:20 +00:00
|
|
|
//{{AFX_DATA_INIT(CStairDialog)
|
|
|
|
m_nStairHeight = 8;
|
|
|
|
m_StairDir = 0;
|
|
|
|
m_StairStyle = 0;
|
2012-03-17 20:01:54 +00:00
|
|
|
m_riserTexture = _T( "" );
|
2006-02-10 22:01:20 +00:00
|
|
|
m_bDetail = TRUE;
|
|
|
|
//}}AFX_DATA_INIT
|
|
|
|
}
|
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
void CStairDialog::DoDataExchange( CDataExchange* pDX ){
|
|
|
|
CDialog::DoDataExchange( pDX );
|
2006-02-10 22:01:20 +00:00
|
|
|
//{{AFX_DATA_MAP(CStairDialog)
|
2012-03-17 20:01:54 +00:00
|
|
|
DDX_Text( pDX, IDC_EDIT1, m_nStairHeight );
|
|
|
|
DDV_MinMaxUInt( pDX, m_nStairHeight, 1, 256 );
|
|
|
|
DDX_Radio( pDX, IDC_DIR_N_RADIO, m_StairDir );
|
|
|
|
DDX_Radio( pDX, IDC_STYLE_ORIG_RADIO, m_StairStyle );
|
|
|
|
DDX_Text( pDX, IDC_RISER_EDIT, m_riserTexture );
|
|
|
|
DDV_MaxChars( pDX, m_riserTexture, 256 );
|
|
|
|
DDX_Check( pDX, IDC_DETAIL_CHK, m_bDetail );
|
2006-02-10 22:01:20 +00:00
|
|
|
//}}AFX_DATA_MAP
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
BEGIN_MESSAGE_MAP( CStairDialog, CDialog )
|
|
|
|
//{{AFX_MSG_MAP(CStairDialog)
|
|
|
|
ON_BN_CLICKED( IDC_STYLE_BOB_RADIO, OnStyleBobClicked )
|
|
|
|
ON_BN_CLICKED( IDC_STYLE_ORIG_RADIO, OnStyleOrigClicked )
|
|
|
|
ON_BN_CLICKED( IDC_STYLE_CORNER_RADIO, OnStyleCornerClicked )
|
|
|
|
//}}AFX_MSG_MAP
|
2006-02-10 22:01:20 +00:00
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// CStairDialog message handlers
|
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
void CStairDialog::OnStyleBobClicked(){
|
|
|
|
EnableDetail( TRUE );
|
2006-02-10 22:01:20 +00:00
|
|
|
}
|
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
void CStairDialog::OnStyleOrigClicked(){
|
|
|
|
EnableDetail( FALSE );
|
2006-02-10 22:01:20 +00:00
|
|
|
}
|
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
void CStairDialog::EnableDetail( BOOL bEnable ){
|
|
|
|
CWnd* dtlChk = GetDlgItem( IDC_DETAIL_CHK );
|
|
|
|
if ( dtlChk ) {
|
|
|
|
dtlChk->EnableWindow( bEnable );
|
|
|
|
}
|
2006-02-10 22:01:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
BOOL CStairDialog::OnInitDialog(){
|
2006-02-10 22:01:20 +00:00
|
|
|
CDialog::OnInitDialog();
|
2012-03-17 20:01:54 +00:00
|
|
|
|
|
|
|
EnableDetail( m_StairStyle == 1 );
|
|
|
|
|
2006-02-10 22:01:20 +00:00
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
|
|
}
|
|
|
|
|
2012-03-17 20:01:54 +00:00
|
|
|
void CStairDialog::OnStyleCornerClicked(){
|
|
|
|
EnableDetail( FALSE );
|
2006-02-10 22:01:20 +00:00
|
|
|
}
|