2 BobToolz plugin for GtkRadiant
3 Copyright (C) 2001 Gordon Biggans
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // StairDialog.cpp : implementation file
23 #include "../StdAfx.h"
24 #include "StairDialog.h"
29 static char THIS_FILE[] = __FILE__;
32 /////////////////////////////////////////////////////////////////////////////
33 // CStairDialog dialog
36 CStairDialog::CStairDialog( CWnd* pParent /*=NULL*/ )
37 : CDialog( CStairDialog::IDD, pParent ){
38 //{{AFX_DATA_INIT(CStairDialog)
42 m_riserTexture = _T( "" );
47 void CStairDialog::DoDataExchange( CDataExchange* pDX ){
48 CDialog::DoDataExchange( pDX );
49 //{{AFX_DATA_MAP(CStairDialog)
50 DDX_Text( pDX, IDC_EDIT1, m_nStairHeight );
51 DDV_MinMaxUInt( pDX, m_nStairHeight, 1, 256 );
52 DDX_Radio( pDX, IDC_DIR_N_RADIO, m_StairDir );
53 DDX_Radio( pDX, IDC_STYLE_ORIG_RADIO, m_StairStyle );
54 DDX_Text( pDX, IDC_RISER_EDIT, m_riserTexture );
55 DDV_MaxChars( pDX, m_riserTexture, 256 );
56 DDX_Check( pDX, IDC_DETAIL_CHK, m_bDetail );
61 BEGIN_MESSAGE_MAP( CStairDialog, CDialog )
62 //{{AFX_MSG_MAP(CStairDialog)
63 ON_BN_CLICKED( IDC_STYLE_BOB_RADIO, OnStyleBobClicked )
64 ON_BN_CLICKED( IDC_STYLE_ORIG_RADIO, OnStyleOrigClicked )
65 ON_BN_CLICKED( IDC_STYLE_CORNER_RADIO, OnStyleCornerClicked )
69 /////////////////////////////////////////////////////////////////////////////
70 // CStairDialog message handlers
72 void CStairDialog::OnStyleBobClicked(){
76 void CStairDialog::OnStyleOrigClicked(){
77 EnableDetail( FALSE );
80 void CStairDialog::EnableDetail( BOOL bEnable ){
81 CWnd* dtlChk = GetDlgItem( IDC_DETAIL_CHK );
83 dtlChk->EnableWindow( bEnable );
88 BOOL CStairDialog::OnInitDialog(){
89 CDialog::OnInitDialog();
91 EnableDetail( m_StairStyle == 1 );
93 return TRUE; // return TRUE unless you set the focus to a control
94 // EXCEPTION: OCX Property Pages should return FALSE
97 void CStairDialog::OnStyleCornerClicked(){
98 EnableDetail( FALSE );