Removed Modify Dialog.

This commit is contained in:
leo 2012-02-19 23:39:50 +00:00
parent 3b83cd493e
commit 91208e9ce1
8 changed files with 1 additions and 647 deletions

View file

@ -318,7 +318,6 @@ BEGIN
MENUITEM "&Animation", ID_VIEW_ANIMATION_BAR
MENUITEM "&Pieces", ID_VIEW_PIECES_BAR
MENUITEM "P&roperties", ID_VIEW_PROPERTIES_BAR
MENUITEM "&Modify", ID_VIEW_MODIFY_BAR
MENUITEM "S&tatus Bar", ID_VIEW_STATUS_BAR
END
MENUITEM "&Full Screen\tCtrl+F", ID_VIEW_FULLSCREEN
@ -369,7 +368,6 @@ BEGIN
MENUITEM "Drawing", ID_VIEW_TOOLS_BAR
MENUITEM "Animation", ID_VIEW_ANIMATION_BAR
MENUITEM "Pieces", ID_VIEW_PIECES_BAR
MENUITEM "Modify", ID_VIEW_MODIFY_BAR
MENUITEM "Status Bar", ID_VIEW_STATUS_BAR
END
POPUP "1"
@ -435,15 +433,9 @@ BEGIN
MENUITEM "Drawing", ID_VIEW_TOOLS_BAR
MENUITEM "Animation", ID_VIEW_ANIMATION_BAR
MENUITEM "Pieces", ID_VIEW_PIECES_BAR
MENUITEM "Modify", ID_VIEW_MODIFY_BAR
MENUITEM "Status Bar", ID_VIEW_STATUS_BAR
END
POPUP "5"
BEGIN
MENUITEM "Pieces", ID_MODDLG_PIECES
MENUITEM "Cameras", ID_MODDLG_CAMERAS
MENUITEM "Lights", ID_MODDLG_LIGHTS
END
MENUITEM "5", 65535
POPUP "6"
BEGIN
MENUITEM "Add", ID_EDITOR_ADD
@ -960,37 +952,6 @@ BEGIN
CTEXT "Preview",IDC_OPENDLG_TEXT,2,20,60,8
END
IDD_MODIFY DIALOGEX 0, 0, 106, 92
STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
PUSHBUTTON "",IDC_MODDLG_PIECE,4,4,12,12,BS_BITMAP
COMBOBOX IDC_MODDLG_LIST,22,4,80,63,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Position",IDC_STATIC,4,21,24,8
EDITTEXT IDC_MODDLG_POSX,34,20,20,10,ES_AUTOHSCROLL
EDITTEXT IDC_MODDLG_POSY,58,20,20,10,ES_AUTOHSCROLL
EDITTEXT IDC_MODDLG_POSZ,82,20,20,10,ES_AUTOHSCROLL
LTEXT "Rotation",IDC_MODDLG_ROTATION,4,35,26,8
EDITTEXT IDC_MODDLG_ROTX,34,34,20,10,ES_AUTOHSCROLL
EDITTEXT IDC_MODDLG_ROTY,58,34,20,10,ES_AUTOHSCROLL
EDITTEXT IDC_MODDLG_ROTZ,82,34,20,10,ES_AUTOHSCROLL
LTEXT "Step",IDC_MODDLG_STEPFROM,4,49,26,8
EDITTEXT IDC_MODDLG_UPX,34,48,20,10,ES_AUTOHSCROLL
EDITTEXT IDC_MODDLG_UPY,58,48,20,10,ES_AUTOHSCROLL
EDITTEXT IDC_MODDLG_UPZ,82,48,20,10,ES_AUTOHSCROLL
EDITTEXT IDC_MODDLG_FROM,34,48,20,10,ES_AUTOHSCROLL
LTEXT "to",IDC_MODDLG_STEPTO,59,49,20,8
EDITTEXT IDC_MODDLG_TO,82,48,20,10,ES_AUTOHSCROLL
CONTROL "Hidden",IDC_MODDLG_HIDDEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,64,34,8
LTEXT "FOV",IDC_MODDLG_FOVSTATIC,59,63,20,8,NOT WS_VISIBLE
EDITTEXT IDC_MODDLG_FOV,82,62,20,10,ES_AUTOHSCROLL | NOT WS_VISIBLE
PUSHBUTTON "",IDC_MODDLG_COLOR,80,61,22,12
PUSHBUTTON "Apply",IDC_MODDLG_APPLY,4,76,30,12
EDITTEXT IDC_MODDLG_NEAR,58,76,20,10,ES_AUTOHSCROLL
EDITTEXT IDC_MODDLG_FAR,82,76,20,10,ES_AUTOHSCROLL
LTEXT "Clip",IDC_MODDLG_PLANESSTATIC,40,77,15,8
END
IDD_IMAGE DIALOG 0, 0, 212, 155
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Image Options"
@ -1388,14 +1349,6 @@ BEGIN
BOTTOMMARGIN, 106
END
IDD_MODIFY, DIALOG
BEGIN
LEFTMARGIN, 4
RIGHTMARGIN, 102
TOPMARGIN, 4
BOTTOMMARGIN, 88
END
IDD_IMAGE, DIALOG
BEGIN
LEFTMARGIN, 7
@ -1797,7 +1750,6 @@ BEGIN
ID_VIEW_TOOLS_BAR "Show or hide the drawing toolbar\nToggle DrawingBar"
ID_VIEW_ANIMATION_BAR "Show or hide the animation toolbar\nToggle AnimationBar"
ID_VIEW_PROPERTIES_BAR "Show or hide the properties toolbar\nToggle ToolBar"
ID_VIEW_MODIFY_BAR "Show or hide the modify dialog\nToggle Modify Dialog"
END
STRINGTABLE

View file

@ -121,12 +121,10 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
ON_COMMAND_EX(ID_VIEW_TOOLS_BAR, &CFrameWndEx::OnPaneCheck)
ON_COMMAND_EX(ID_VIEW_PIECES_BAR, &CFrameWndEx::OnPaneCheck)
ON_COMMAND_EX(ID_VIEW_PROPERTIES_BAR, &CFrameWndEx::OnPaneCheck)
ON_COMMAND_EX(ID_VIEW_MODIFY_BAR, &CFrameWndEx::OnPaneCheck)
ON_UPDATE_COMMAND_UI(ID_VIEW_ANIMATION_BAR, &CFrameWndEx::OnUpdatePaneMenu)
ON_UPDATE_COMMAND_UI(ID_VIEW_TOOLS_BAR, &CFrameWndEx::OnUpdatePaneMenu)
ON_UPDATE_COMMAND_UI(ID_VIEW_PIECES_BAR, &CFrameWndEx::OnUpdatePaneMenu)
ON_UPDATE_COMMAND_UI(ID_VIEW_PROPERTIES_BAR, &CFrameWndEx::OnUpdatePaneMenu)
ON_UPDATE_COMMAND_UI(ID_VIEW_MODIFY_BAR, &CFrameWndEx::OnUpdatePaneMenu)
ON_UPDATE_COMMAND_UI_RANGE(ID_ACTION_SELECT, ID_ACTION_ROLL, OnUpdateAction)
ON_UPDATE_COMMAND_UI_RANGE(ID_SNAP_SNAPX, ID_SNAP_SNAPNONE, OnUpdateSnap)
ON_UPDATE_COMMAND_UI_RANGE(ID_LOCK_LOCKX, ID_LOCK_UNLOCKALL, OnUpdateLock)
@ -232,15 +230,7 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
m_wndPiecesBar.EnableDocking(CBRS_ALIGN_ANY);
if (!m_wndModifyDlg.Create(_T("Modify"), this, TRUE, MAKEINTRESOURCE(IDD_MODIFY), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI, ID_VIEW_MODIFY_BAR))
{
TRACE0("Failed to create Dialog Bar\n");
return -1; // failed to create
}
m_wndModifyDlg.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
// ShowPane(&m_wndModifyDlg, FALSE, FALSE, FALSE);
// UpdateMenuAccelerators();
@ -462,7 +452,6 @@ LONG CMainFrame::OnUpdateInfo(UINT lParam, LONG wParam)
{
Object* Focus = lcGetActiveProject()->GetFocusObject();
m_wndModifyDlg.UpdateInfo((Object*)lParam);
m_wndProperties.Update(Focus);
char str[128];

View file

@ -3,7 +3,6 @@
#include "PieceBar.h"
#include "CADBar.h"
#include "ModDlg.h"
#include "propertiespane.h"
class MainWnd;
@ -67,7 +66,6 @@ public:
{ m_strStatusBar = Message; }
protected:
CModifyDialog m_wndModifyDlg;
CPropertiesPane m_wndProperties;
WINDOWPLACEMENT m_wpPrev;

View file

@ -1,450 +0,0 @@
// ModDlg.cpp: implementation of the CModifyDialog class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "leocad.h"
#include "ModDlg.h"
#include "project.h"
#include "globals.h"
#include "defines.h"
#include "piece.h"
#include "camera.h"
#include "light.h"
#include "matrix.h"
#include "lc_application.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_DYNAMIC(CModifyDialog, CPaneDialog)
BEGIN_MESSAGE_MAP(CModifyDialog, CPaneDialog)
//{{AFX_MSG_MAP(CModifyDialog)
ON_BN_CLICKED(IDC_MODDLG_PIECE, OnModdlgPiece)
ON_CBN_SELENDOK(IDC_MODDLG_LIST, OnSelendokModdlgList)
ON_BN_CLICKED(IDC_MODDLG_APPLY, OnModdlgApply)
ON_CBN_DROPDOWN(IDC_MODDLG_LIST, OnDropdownModdlgList)
//}}AFX_MSG_MAP
ON_COMMAND_RANGE(ID_MODDLG_PIECES, ID_MODDLG_LIGHTS, OnMenuClick)
END_MESSAGE_MAP()
CModifyDialog::CModifyDialog()
{
m_pObject = NULL;
m_nType = 255;
//{{AFX_DATA_INIT(CModifyDialog)
m_fRotX = 0.0f;
m_fRotY = 0.0f;
m_fRotZ = 0.0f;
m_fPosX = 0.0f;
m_fPosY = 0.0f;
m_fPosZ = 0.0f;
m_bHidden = FALSE;
m_fFOV = 0.0f;
m_nFrom = 0;
m_nTo = 0;
m_strName = _T("");
m_fUpX = 0.0f;
m_fUpY = 0.0f;
m_fUpZ = 0.0f;
m_fFar = 0.0f;
m_fNear = 0.0f;
//}}AFX_DATA_INIT
}
CModifyDialog::~CModifyDialog()
{
}
/*
BOOL CModifyDialog::Create(CWnd * pParentWnd, LPCTSTR lpszTemplateName, UINT nStyle, UINT nID)
{
// Let MFC Create the control
if(!CPaneDialog::Create(pParentWnd, lpszTemplateName, nStyle, nID))
return FALSE;
// Since there is no WM_INITDIALOG message we have to call
// our own InitDialog function ourselves after m_hWnd is valid
if(!OnInitDialogBar())
return FALSE;
return TRUE;
}
BOOL CModifyDialog::Create(CWnd * pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID)
{
//Let MFC Create the control
if(!CPaneDialog::Create(pParentWnd, nIDTemplate, nStyle, nID))
return FALSE;
// Since there is no WM_INITDIALOG message we have to call
// our own InitDialog function ourselves after m_hWnd is valid
if(!OnInitDialogBar())
return FALSE;
return TRUE;
}
*/
BOOL CModifyDialog::OnInitDialogBar()
{
// Support for the MFC DDX model
UpdateData(FALSE);
m_ctlCombo.LimitText(80);
m_ctlColor.SetColorIndex(0);
UpdateControls(LC_OBJECT_PIECE);
return TRUE;
}
void CModifyDialog::DoDataExchange(CDataExchange* pDX)
{
//Derived Classes Overide this function
ASSERT(pDX);
CPaneDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CModifyDialog)
DDX_Control(pDX, IDC_MODDLG_LIST, m_ctlCombo);
DDX_Control(pDX, IDC_MODDLG_COLOR, m_ctlColor);
DDX_Text(pDX, IDC_MODDLG_ROTX, m_fRotX);
DDX_Text(pDX, IDC_MODDLG_ROTY, m_fRotY);
DDX_Text(pDX, IDC_MODDLG_ROTZ, m_fRotZ);
DDX_Text(pDX, IDC_MODDLG_POSX, m_fPosX);
DDX_Text(pDX, IDC_MODDLG_POSY, m_fPosY);
DDX_Text(pDX, IDC_MODDLG_POSZ, m_fPosZ);
DDX_Check(pDX, IDC_MODDLG_HIDDEN, m_bHidden);
DDX_Text(pDX, IDC_MODDLG_FOV, m_fFOV);
DDX_Text(pDX, IDC_MODDLG_FROM, m_nFrom);
DDX_Text(pDX, IDC_MODDLG_TO, m_nTo);
DDX_CBString(pDX, IDC_MODDLG_LIST, m_strName);
DDV_MaxChars(pDX, m_strName, 80);
DDX_Text(pDX, IDC_MODDLG_UPX, m_fUpX);
DDX_Text(pDX, IDC_MODDLG_UPY, m_fUpY);
DDX_Text(pDX, IDC_MODDLG_UPZ, m_fUpZ);
DDX_Text(pDX, IDC_MODDLG_FAR, m_fFar);
// DDV_MinMaxFloat(pDX, m_fFar, 5.f, 10000.f);
DDX_Text(pDX, IDC_MODDLG_NEAR, m_fNear);
// DDV_MinMaxFloat(pDX, m_fNear, 1.e-002f, 100.f);
//}}AFX_DATA_MAP
}
void CModifyDialog::OnUpdateCmdUI(CFrameWnd * pTarget, BOOL /*bDisableIfNoHndler*/)
{
UpdateDialogControls(pTarget, FALSE);
}
void CModifyDialog::UpdateInfo(Object* pObject)
{
if (!IsVisible())
return;
if (pObject == NULL)
pObject = lcGetActiveProject()->GetFocusObject();
m_pObject = pObject;
if (m_pObject == NULL)
{
m_fPosX = m_fPosY = m_fPosZ = 0.0f;
m_fRotX = m_fRotY = m_fRotZ = 0.0f;
m_fUpX = m_fUpY = m_fUpZ = 0.0f;
UpdateData(FALSE);
return;
}
else
{
UpdateControls(m_pObject->GetType());
}
switch (m_nType)
{
case LC_OBJECT_PIECE:
{
float rot[4];
Piece* pPiece = (Piece*)m_pObject;
Vector3 Pos = pPiece->GetPosition();
pPiece->GetRotation(rot);
Matrix mat(rot, Pos);
mat.ToEulerAngles(rot);
lcGetActiveProject()->ConvertToUserUnits(Pos);
m_fPosX = Pos[0];
m_fPosY = Pos[1];
m_fPosZ = Pos[2];
m_fRotX = rot[0];
m_fRotY = rot[1];
m_fRotZ = rot[2];
if (lcGetActiveProject()->IsAnimation())
{
m_nFrom = pPiece->GetFrameShow();
m_nTo = pPiece->GetFrameHide();
}
else
{
m_nFrom = pPiece->GetStepShow();
m_nTo = pPiece->GetStepHide();
}
m_bHidden = pPiece->IsHidden();
m_ctlColor.SetColorIndex(pPiece->GetColor());
UpdateData(FALSE);
m_ctlCombo.SetWindowText(pPiece->GetName());
} break;
case LC_OBJECT_CAMERA:
case LC_OBJECT_CAMERA_TARGET:
{
Vector3 tmp;
Camera* pCamera;
if (m_nType == LC_OBJECT_CAMERA)
pCamera = (Camera*)m_pObject;
else
pCamera = ((CameraTarget*)m_pObject)->GetParent();
tmp = pCamera->GetEyePosition();
lcGetActiveProject()->ConvertToUserUnits(tmp);
m_fPosX = tmp[0];
m_fPosY = tmp[1];
m_fPosZ = tmp[2];
tmp = pCamera->GetTargetPosition();
lcGetActiveProject()->ConvertToUserUnits(tmp);
m_fRotX = tmp[0];
m_fRotY = tmp[1];
m_fRotZ = tmp[2];
tmp = pCamera->GetUpVector();
lcGetActiveProject()->ConvertToUserUnits(tmp);
m_fUpX = tmp[0];
m_fUpY = tmp[1];
m_fUpZ = tmp[2];
m_fFOV = pCamera->m_fovy;
m_fNear = pCamera->m_zNear;
m_fFar = pCamera->m_zFar;
m_bHidden = !pCamera->IsVisible();
UpdateData(FALSE);
m_ctlCombo.SetWindowText(pCamera->GetName());
} break;
case LC_OBJECT_LIGHT:
case LC_OBJECT_LIGHT_TARGET:
{
// TODO: Lights.
} break;
}
}
void CModifyDialog::OnModdlgPiece()
{
CMenu menu;
CMenu* pPopup;
RECT rc;
::GetWindowRect(::GetDlgItem(m_hWnd, IDC_MODDLG_PIECE), &rc);
menu.LoadMenu(IDR_POPUPS);
pPopup = menu.GetSubMenu(5);
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, rc.right, rc.top, this);
}
void CModifyDialog::UpdateControls(BYTE nType)
{
if (m_nType == nType)
return;
DeleteObject((HBITMAP)SendDlgItemMessage(IDC_MODDLG_PIECE, BM_GETIMAGE, IMAGE_BITMAP, 0));
UINT id = IDB_PIECE;
if (nType == LC_OBJECT_CAMERA || nType == LC_OBJECT_CAMERA_TARGET)
id = IDB_CAMERA;
if (nType == LC_OBJECT_LIGHT || nType == LC_OBJECT_LIGHT_TARGET)
id = IDB_LIGHT;
SendDlgItemMessage(IDC_MODDLG_PIECE, BM_SETIMAGE, IMAGE_BITMAP,
(LPARAM)LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(id)));
m_ctlCombo.SetWindowText("");
switch (nType)
{
case LC_OBJECT_PIECE:
{
GetDlgItem(IDC_MODDLG_ROTATION)->SetWindowText(_T("Rotation"));
GetDlgItem(IDC_MODDLG_STEPFROM)->SetWindowText(_T("Step"));
GetDlgItem(IDC_MODDLG_STEPTO)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_FROM)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_TO)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_COLOR)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_FOV)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_FOVSTATIC)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_UPX)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_UPY)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_UPZ)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_PLANESSTATIC)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_NEAR)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_FAR)->ShowWindow(SW_HIDE);
} break;
case LC_OBJECT_CAMERA:
case LC_OBJECT_CAMERA_TARGET:
{
GetDlgItem(IDC_MODDLG_ROTATION)->SetWindowText(_T("Target"));
GetDlgItem(IDC_MODDLG_STEPFROM)->SetWindowText(_T("Up"));
GetDlgItem(IDC_MODDLG_STEPTO)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_FROM)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_TO)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_COLOR)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MODDLG_FOV)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_FOVSTATIC)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_UPX)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_UPY)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_UPZ)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_PLANESSTATIC)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_NEAR)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MODDLG_FAR)->ShowWindow(SW_SHOW);
} break;
case LC_OBJECT_LIGHT: case LC_OBJECT_LIGHT_TARGET:
{
// TODO: Lights.
} break;
}
m_nType = nType;
}
void CModifyDialog::OnMenuClick(UINT nID)
{
m_pObject = NULL;
switch (nID - ID_MODDLG_PIECES)
{
case 0: UpdateControls(LC_OBJECT_PIECE); break;
case 1: UpdateControls(LC_OBJECT_CAMERA); break;
case 2: UpdateControls(LC_OBJECT_LIGHT); break;
}
}
void CModifyDialog::OnSelendokModdlgList()
{
void* pNew = m_ctlCombo.GetItemDataPtr(m_ctlCombo.GetCurSel());
if ((pNew != m_pObject) && (pNew != (void*)-1))
UpdateInfo((Object*)pNew);
}
void CModifyDialog::OnModdlgApply()
{
if (m_pObject == NULL)
return;
UpdateData(TRUE);
switch (m_nType)
{
case LC_OBJECT_PIECE:
{
LC_PIECE_MODIFY mod;
mod.piece = (Piece*)m_pObject;
mod.Position = Vector3(m_fPosX, m_fPosY, m_fPosZ);
lcGetActiveProject()->ConvertFromUserUnits(mod.Position);
mod.Rotation = Vector3(m_fRotX, m_fRotY, m_fRotZ);
mod.from = m_nFrom;
mod.to = m_nTo;
mod.hidden = (m_bHidden != FALSE);
mod.color = m_ctlColor.GetColorIndex();
strcpy(mod.name, m_strName);
lcGetActiveProject()->HandleNotify(LC_PIECE_MODIFIED, (unsigned long)&mod);
} break;
case LC_OBJECT_CAMERA: case LC_OBJECT_CAMERA_TARGET:
{
LC_CAMERA_MODIFY mod;
mod.camera = (Camera*)m_pObject;
mod.hidden = (m_bHidden != FALSE);
mod.Eye = Vector3(m_fPosX, m_fPosY, m_fPosZ);
mod.Target = Vector3(m_fRotX, m_fRotY, m_fRotZ);
mod.Up = Vector3(m_fUpX, m_fUpY, m_fUpZ);
lcGetActiveProject()->ConvertFromUserUnits(mod.Eye);
lcGetActiveProject()->ConvertFromUserUnits(mod.Target);
lcGetActiveProject()->ConvertFromUserUnits(mod.Up);
mod.fovy = m_fFOV;
mod.znear = m_fNear;
mod.zfar = m_fFar;
lcGetActiveProject()->HandleNotify(LC_CAMERA_MODIFIED, (unsigned long)&mod);
} break;
case LC_OBJECT_LIGHT: case LC_OBJECT_LIGHT_TARGET:
{
// TODO: Lights.
} break;
}
// pDoc->UpdateAllViews(NULL);
}
/*
void CModifyDialog::OnModdlgClose()
{
AfxGetMainWnd()->PostMessage(WM_COMMAND, ID_VIEW_MODIFY_BAR);
}
*/
void CModifyDialog::OnDropdownModdlgList()
{
Piece* pPiece;
Camera* pCamera;
Light* pLight;
int i;
lcGetActiveProject()->GetArrays(&pPiece, &pCamera, &pLight);
m_ctlCombo.ResetContent();
switch (m_nType)
{
case LC_OBJECT_PIECE:
{
for (; pPiece; pPiece = pPiece->m_pNext)
{
i = m_ctlCombo.AddString(pPiece->GetName());
m_ctlCombo.SetItemDataPtr(i, pPiece);
}
if (m_pObject)
m_ctlCombo.SelectString(-1, ((Piece*)m_pObject)->GetName());
} break;
case LC_OBJECT_CAMERA:
case LC_OBJECT_CAMERA_TARGET:
{
for (; pCamera; pCamera = pCamera->m_pNext)
{
i = m_ctlCombo.AddString(pCamera->GetName());
m_ctlCombo.SetItemDataPtr(i, pCamera);
}
if (m_pObject)
m_ctlCombo.SelectString(-1, ((Camera*)m_pObject)->GetName());
} break;
case LC_OBJECT_LIGHT:
case LC_OBJECT_LIGHT_TARGET:
{
for (; pLight; pLight = pLight->m_pNext)
{
i = m_ctlCombo.AddString(pLight->GetName());
m_ctlCombo.SetItemDataPtr(i, pLight);
}
if (m_pObject)
m_ctlCombo.SelectString(-1, ((Light*)m_pObject)->GetName());
} break;
}
}

View file

@ -1,94 +0,0 @@
// ModDlg.h: interface for the CModifyDialog class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_INITDIALOGBAR_H__46B4D2B3_C982_11D1_8902_0060979C2EFD__INCLUDED_)
#define AFX_INITDIALOGBAR_H__46B4D2B3_C982_11D1_8902_0060979C2EFD__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "ClrPick.h"
class Object;
/////////////////////////////////////////////////////////////////////////////
// CModifyDialog window
class CModifyDialog : public CPaneDialog
{
DECLARE_DYNAMIC(CModifyDialog)
// Construction / Destruction
public:
CModifyDialog();
virtual ~CModifyDialog();
//{{AFX_DATA(CModifyDialog)
enum { IDD = IDD_MODIFY };
CComboBox m_ctlCombo;
CColorPicker m_ctlColor;
float m_fRotX;
float m_fRotY;
float m_fRotZ;
float m_fPosX;
float m_fPosY;
float m_fPosZ;
BOOL m_bHidden;
float m_fFOV;
int m_nFrom;
int m_nTo;
CString m_strName;
float m_fUpX;
float m_fUpY;
float m_fUpZ;
float m_fFar;
float m_fNear;
//}}AFX_DATA
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CModifyDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX);
//}}AFX_VIRTUAL
// Implementation
public:
void UpdateInfo(Object* pObject);
void OnUpdateCmdUI(CFrameWnd * pTarget, BOOL bDisableIfNoHndler);
// BOOL Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID);
//BOOL Create(CWnd* pParentWnd, LPCTSTR lpszTemplateName, UINT nStyle, UINT nID);
protected:
virtual BOOL OnInitDialogBar();
Object* m_pObject;
BYTE m_nType;
protected:
void UpdateControls(BYTE nType);
void OnMenuClick(UINT nID);
// Generated message map functions
//{{AFX_MSG(CModifyDialog)
afx_msg void OnModdlgPiece();
afx_msg void OnSelendokModdlgList();
afx_msg void OnModdlgApply();
afx_msg void OnDropdownModdlgList();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
#endif //!defined(AFX_INITDIALOGBAR_H__46B4D2B3_C982_11D1_8902_0060979C2EFD__INCLUDED_)
/////////////////////////////////////////////////////////////////////////////

View file

@ -127,7 +127,6 @@
<ClCompile Include="Leocad.cpp" />
<ClCompile Include="Libdlg.cpp" />
<ClCompile Include="Mainfrm.cpp" />
<ClCompile Include="Moddlg.cpp" />
<ClCompile Include="Piecebar.cpp" />
<ClCompile Include="Piececmb.cpp" />
<ClCompile Include="Pieceprv.cpp" />
@ -440,7 +439,6 @@
<ClInclude Include="LeoCAD.h" />
<ClInclude Include="LibDlg.h" />
<ClInclude Include="MainFrm.h" />
<ClInclude Include="ModDlg.h" />
<ClInclude Include="Piecebar.h" />
<ClInclude Include="PieceCmb.h" />
<ClInclude Include="PiecePrv.h" />

View file

@ -101,9 +101,6 @@
<ClCompile Include="Mainfrm.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Moddlg.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Piecebar.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@ -649,9 +646,6 @@
<ClInclude Include="MainFrm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ModDlg.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Piecebar.h">
<Filter>Header Files</Filter>
</ClInclude>

View file

@ -68,7 +68,6 @@
#define IDB_PARTICONS 177
#define IDD_OPENDLG_TEMPLATE 177
#define IDS_COLOR03 178
#define IDD_MODIFY 178
#define IDS_COLOR04 179
#define IDS_COLOR05 180
#define IDS_COLOR06 181
@ -185,7 +184,6 @@
#define IDC_PROP_PIECES_LIST 1072
#define IDC_ABTDLG_INFO 1073
#define IDC_GENDLG_NUMBERS 1074
#define IDC_MODDLG_HIDDEN 1074
#define IDC_SAVEDLG_PREVIEW 1074
#define IDC_GENDLG_PREVIEW 1075
#define IDC_AIDDLG_SNAPX 1076
@ -233,20 +231,14 @@
#define IDC_DETDLG_ANTIALIAS 1094
#define IDC_AIDDLG_ANGLE 1095
#define IDC_GENDLG_SAVETIME 1095
#define IDC_MODDLG_ROTX 1095
#define IDC_EDTDLG_CONNECTION 1095
#define IDC_DETDLG_LINE 1096
#define IDC_PRNDLG_MARGIN_TOP 1096
#define IDC_AIDDLG_GRIDSIZE 1096
#define IDC_MODDLG_ROTY 1096
#define IDC_DETDLG_HIDDEN 1097
#define IDC_PRNDLG_MARGIN_BOTTOM 1097
#define IDC_MODDLG_ROTZ 1097
#define IDC_DETDLG_BACKGROUND 1098
#define IDC_PRNDLG_MARGIN_RIGHT 1098
#define IDC_MODDLG_POSX 1098
#define IDC_MODDLG_POSY 1099
#define IDC_MODDLG_POSZ 1100
#define IDC_OPENDLG_PREVIEW 1102
#define IDC_OPENDLG_TEXT 1103
#define IDC_SCNDLG_BGIMAGE_BROWSE 1104
@ -279,35 +271,18 @@
#define IDC_GENDLG_MOUSE 1132
#define IDC_GENDLG_GAMMA 1133
#define IDC_GENDLG_USER 1133
#define IDC_MODDLG_LIST 1136
#define IDC_MODDLG_COLOR 1137
#define IDC_MODDLG_PIECE 1142
#define IDC_MODDLG_ROTATION 1145
#define IDC_MODDLG_FROM 1146
#define IDC_EDTDLG_DESCRIPTION 1146
#define IDC_MODDLG_TO 1147
#define IDC_EDTDLG_NAME 1147
#define IDC_MODDLG_ROTATION2 1148
#define IDC_IMGDLG_PAUSE 1148
#define IDC_MODDLG_STEPFROM 1148
#define IDC_POVDLG_LGEO 1148
#define IDC_POVDLG_POVRAY 1149
#define IDC_MODDLG_FOV 1149
#define IDC_MODDLG_OK 1150
#define IDC_POVDLG_RENDER 1150
#define IDC_MODDLG_UPY 1150
#define IDC_MODDLG_CLOSE 1151
#define IDC_POVDLG_LGEOBROWSE 1151
#define IDC_MODDLG_UPX 1151
#define IDC_MODDLG_APPLY 1152
#define IDC_POVDLG_POVBROWSE 1152
#define IDC_POVDLG_OUTPOV 1153
#define IDC_MODDLG_UPZ 1153
#define IDC_IMGDLG_SINGLE 1154
#define IDC_POVDLG_POVOUTBROWSE 1154
#define IDC_MODDLG_NEAR 1154
#define IDC_IMGDLG_MULTIPLE 1155
#define IDC_MODDLG_FAR 1155
#define IDC_IMGDLG_BMP 1158
#define IDC_IMGDLG_JPG 1160
#define IDC_IMGDLG_AVI 1161
@ -315,8 +290,6 @@
#define IDC_IMGDLG_TO 1163
#define IDC_SAVEPICTURE_OPTIONS 1164
#define IDC_IMGDLG_PNG 1164
#define IDC_MODDLG_STEPTO 1165
#define IDC_MODDLG_FOVSTATIC 1166
#define IDC_EDITORSTATIC 1167
#define IDC_EDTDLG_LIST 1168
#define IDC_BUTTON2 1170
@ -379,7 +352,6 @@
#define IDC_TREE 1214
#define IDC_TRANSDLG_OZ 1214
#define IDC_MF_LEGL 1215
#define IDC_MODDLG_PLANESSTATIC 1215
#define IDC_MF_LEGR 1216
#define IDC_MF_SHOEL 1217
#define IDC_MF_SHOER 1218
@ -462,7 +434,6 @@
#define ID_RENDER_BOX 32821
#define ID_PIECE_INSERT 32822
#define ID_PIECE_DELETE 32823
#define ID_PIECE_MODIFY 32824
#define ID_VIEW_STEP_FIRST 32825
#define ID_VIEW_STEP_LAST 32826
#define ID_PIECE_HIDESELECTED 32827
@ -503,9 +474,6 @@
#define ID_PRINT_RIGHTALIGN 32882
#define ID_SNAP_ON 32883
#define ID_SNAP_ANGLE 32884
#define ID_MODDLG_PIECES 32884
#define ID_MODDLG_CAMERAS 32885
#define ID_MODDLG_LIGHTS 32886
#define ID_FILE_PRINTCATALOG 32887
#define ID_LIBDLG_FILE_PRINTCATALOG 32887
#define ID_FILE_MERGEUPDATE 32888
@ -677,7 +645,6 @@
#define ID_VIEW_ANIMATION_BAR 59427
#define ID_VIEW_PROPERTIES_BAR 59428
#define ID_VIEW_INVISIBLE_BAR 59429
#define ID_VIEW_MODIFY_BAR 59430
// Next default values for new objects
//