#ifndef __BeamExPages_h__
#define __BeamExPages_h__
#include <CeDialog.h>
#include <CeTab.h>
#include <CeString.h>
#include "resource.h"
#include <CeMgr.h>
#include <CeGroup.h>
//#include "CeStatic.h"
enum ECrossSection
{
BSC_Rod = 0,
BCS_Beam = 1,
BSC_Triangle = 2,
BCS_IBeam = 3,
BSC_LBeam = 4,
BSC_User = 5,
};
enum EScenario
{
BST_CantileveredPointLoad = 0,
BST_CantileveredUniformLoad = 1,
BST_CantileveredMoment = 2,
BST_SupportedPointLoad = 3,
BST_SupportedUniform = 4,
};
class CeLayoutPage: public CeTabPage
{
// Construction
public:
CeLayoutPage(): CeTabPage(IDD_LAYOUT_PAGE, _T("Cross Section"))
{
m_nSection = (short) BCS_Beam;
}
// Attributes
short m_nSection;
CeString m_strParm_1;
CeString m_strParm_2;
CeString m_strParm_3;
CeString m_strParm_4;
CeChildMgr m_mgr;
void SetCrossSection(int nSection);
virtual void Sync(bool bSave);
double CalcI();
public:
// Implementation
void OnSection();
virtual BOOL OnSetActive();
virtual BOOL OnCommand( WPARAM wParam, LPARAM lParam, bool& bHandled );
virtual BOOL OnInitDialog();
virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
};
class CeActualsPage: public CeTabPage
{
public:
// data members
CeChildMgr m_mgr;
short m_nScenario;
CeString m_strParm_1;
CeString m_strParm_2;
CeString m_strParm_3;
virtual void Sync(bool bSave);
bool CalcY(double dblI, double dblE, double& dblY, double& dblYmax);
// construction
CeActualsPage();
// window messages
virtual BOOL OnInitDialog();
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
// implementation
void OnScenario();
void SetScenario(int nScenario);
};
class CeMaterialsPage: public CeTabPage
{
public:
// data members
CeChildMgr m_mgr;
double m_dblModulus;
int m_nMaterial;
CeString m_strMaterial;
CeString m_strModulus;
virtual void Sync(bool bSave);
// construction
CeMaterialsPage(): CeTabPage(IDD_MATERIALS_PAGE, _T("Material"))
{
m_dblModulus = 0;
m_nMaterial = 0;
}
// window messages
virtual BOOL OnInitDialog();
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
// Implementation
public:
double CalcE();
void OnMaterial();
};
// _T("Deflection Results")
class CeResultsPanel: public CeDialog
{
private:
public:
double m_dblMax;
double m_dblY;
CeChildMgr m_mgr;
CeStaticGroup m_static;
CeResultsPanel()
{
m_dblMax = 0;
m_dblY = 0;
}
virtual BOOL OnInitDialog();
virtual void OnSize(UINT nType, int cx, int cy, bool& bHandled);
};
class CeScenarioDlg: public CeDialog
{
private:
public:
short m_nScenario;
CeScenarioDlg() { m_nScenario = 2; }
virtual ~CeScenarioDlg() {}
virtual void OnOK();
virtual BOOL OnInitDialog();
};
class CeScenario2Dlg: public CeDialog
{
private:
HIMAGELIST m_hImageList;
public:
int m_nScenario;
CeScenario2Dlg() { m_hImageList = NULL; m_nScenario = 2; }
virtual ~CeScenario2Dlg() {}
virtual void OnOK();
virtual BOOL OnInitDialog();
};
class CeMaterialDlg: public CeDialog
{
private:
void SetEditValues(int nItem);
void OnMaterialValues();
public:
CeMaterialDlg() { m_dblModulus = 0; m_nSelected = 0; }
virtual ~CeMaterialDlg() {}
virtual BOOL OnInitDialog();
virtual LRESULT OnNotify(int nCtrlId, LPNMHDR pNMH, bool& bHandled);
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
// virtual BOOL
virtual void OnOK();
virtual void OnCancel();
CeString m_strMaterial;
double m_dblModulus;
int m_nSelected;
};
class CeSectionDlg: public CeDialog
{
private:
public:
short m_nSection;
CeSectionDlg() { m_nSection = 1; }
virtual ~CeSectionDlg() {}
virtual void OnOK();
virtual BOOL OnInitDialog();
};
#endif //__BeamExPages_h__