Commit 804f745b authored by Russ Fish's avatar Russ Fish

Missed some HyperViewer source files at first checkin.

parent 04cd2b84
TARGETS = gluttest
LIBRARY = hypviewer
FILES = main
INCDIRS = -I../../include
all: $(TARGETS)
include ../../Makefile.main
$(TARGETS): $(OBJS)
$(CC) -o $(ARCH)/$(TARGETS) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
clean: _clean
This diff is collapsed.
// H3View.cpp : implementation of the CH3View class
//
#include "stdafx.h"
#include "h3.h"
#include "h3Doc.h"
#include "H3View.h"
#include "main.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CH3View
IMPLEMENT_DYNCREATE(CH3View, CView)
BEGIN_MESSAGE_MAP(CH3View, CView)
//{{AFX_MSG_MAP(CH3View)
ON_WM_CREATE()
ON_WM_CHAR()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_WM_MOUSEMOVE()
ON_WM_RBUTTONDOWN()
ON_WM_RBUTTONUP()
ON_WM_SIZE()
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CH3View construction/destruction
CH3View::CH3View()
{
// TODO: add construction code here
}
CH3View::~CH3View()
{
}
BOOL CH3View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CH3View drawing
void CH3View::OnDraw(CDC* pDC)
{
CH3Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
draw();
}
/////////////////////////////////////////////////////////////////////////////
// CH3View printing
BOOL CH3View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CH3View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CH3View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CH3View diagnostics
#ifdef _DEBUG
void CH3View::AssertValid() const
{
CView::AssertValid();
}
void CH3View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CH3Doc* CH3View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CH3Doc)));
return (CH3Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CH3View message handlers
int drag = 0;
int CH3View::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
RECT lpr;
GetClientRect(&lpr);
create(m_hWnd, lpr.right, lpr.bottom);
return 0;
}
void CH3View::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
keyboard(nChar);
CView::OnChar(nChar, nRepCnt, nFlags);
}
void CH3View::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CView::OnLButtonDown(nFlags, point);
mouse(0, 0, point.x, point.y, nFlags & MK_SHIFT, nFlags & MK_CONTROL);
drag = 1;
}
void CH3View::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CView::OnLButtonUp(nFlags, point);
mouse(0, 1, point.x, point.y, nFlags & MK_SHIFT, nFlags & MK_CONTROL);
drag = 0;
}
void CH3View::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CView::OnMouseMove(nFlags, point);
if (drag)
motion(point.x, point.y, nFlags & MK_SHIFT, nFlags & MK_CONTROL);
else
passive(point.x, point.y, nFlags & MK_SHIFT, nFlags & MK_CONTROL);
}
void CH3View::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CView::OnRButtonDown(nFlags, point);
mouse(2, 0, point.x, point.y, nFlags & MK_SHIFT, nFlags & MK_CONTROL);
drag = 1;
}
void CH3View::OnRButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CView::OnRButtonUp(nFlags, point);
mouse(2, 1, point.x, point.y, nFlags & MK_SHIFT, nFlags & MK_CONTROL);
drag = 0;
}
void CH3View::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
resize(cx, cy);
}
// H3View.h : interface of the CH3View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_H3VIEW_H__24E58501_0D87_11D3_90C4_00A0C996066F__INCLUDED_)
#define AFX_H3VIEW_H__24E58501_0D87_11D3_90C4_00A0C996066F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CH3View : public CView
{
protected: // create from serialization only
CH3View();
DECLARE_DYNCREATE(CH3View)
// Attributes
public:
CH3Doc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CH3View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CH3View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CH3View)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in H3View.cpp
inline CH3Doc* CH3View::GetDocument()
{ return (CH3Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_H3VIEW_H__24E58501_0D87_11D3_90C4_00A0C996066F__INCLUDED_)
// MainFrm.cpp : implementation of the CMainFrame class
//
#include "stdafx.h"
#include "h3.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMainFrame
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code !
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static UINT indicators[] =
{
ID_SEPARATOR, // status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
};
/////////////////////////////////////////////////////////////////////////////
// CMainFrame construction/destruction
CMainFrame::CMainFrame()
{
// TODO: add member initialization code here
}
CMainFrame::~CMainFrame()
{
}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}
// TODO: Delete these three lines if you don't want the toolbar to
// be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return 0;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CMainFrame diagnostics
#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
CFrameWnd::AssertValid();
}
void CMainFrame::Dump(CDumpContext& dc) const
{
CFrameWnd::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__24E584FD_0D87_11D3_90C4_00A0C996066F__INCLUDED_)
#define AFX_MAINFRM_H__24E584FD_0D87_11D3_90C4_00A0C996066F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMainFrame : public CFrameWnd
{
protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // control bar embedded members
CStatusBar m_wndStatusBar;
CToolBar m_wndToolBar;
// Generated message map functions
protected:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINFRM_H__24E584FD_0D87_11D3_90C4_00A0C996066F__INCLUDED_)
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by h3.rc
//
#define IDD_ABOUTBOX 100
#define IDR_MAINFRAME 128
#define IDR_H3TYPE 129
#define IDC_COPYRIGHT 1000
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 130
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
// stdafx.cpp : source file that includes just the standard includes
// h3.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__24E584FB_0D87_11D3_90C4_00A0C996066F__INCLUDED_)
#define AFX_STDAFX_H__24E584FB_0D87_11D3_90C4_00A0C996066F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__24E584FB_0D87_11D3_90C4_00A0C996066F__INCLUDED_)
TARGETS = vksimple
LIBRARY = hypviewer
FILES = main
INCDIRS = -I../../include
all: $(TARGETS)
include ../../Makefile.main
LDLIBS = -L../../src/$(ARCH) -l$(LIBRARY)$(ARCH) \
-lvk -lGLw -lGL -lGLU -lXm -lXt -lX11
$(TARGETS): $(OBJS)
$(CC) -o $(ARCH)/$(TARGETS) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
clean: _clean
\ No newline at end of file
TARGETS = vktest
LIBRARY = hypviewer
FILES = main
INCDIRS = -I../../include
all: $(TARGETS)
include ../../Makefile.main
$(TARGETS): $(OBJS)
$(CC) -o $(ARCH)/$(TARGETS) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
clean: _clean
TARGETS = xtnofile
LIBRARY = hypviewer
FILES = main
INCDIRS = -I../../include
all: $(TARGETS)
include ../../Makefile.main
$(TARGETS): $(OBJS)
$(CC) -o $(ARCH)/$(TARGETS) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
clean: _clean
TARGETS = xtsimple
LIBRARY = hypviewer
FILES = main
INCDIRS = -I../../include
all: $(TARGETS)
include ../../Makefile.main
$(TARGETS): $(OBJS)
$(CC) -o $(ARCH)/$(TARGETS) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
clean: _clean
# Makefile for hypviewer library
LIBRARY = hypviewer
FILES = HypGraph HypGroupArray HypLink HypNode HypNodeArray HypPoint \
HypQuat HypTransform HypView HypViewer \
VkHypViewer
INCDIRS = -I../include
LDLIBS = -lm
all: $(LIBRARY)
include ../Makefile.main
$(LIBRARY) : $(OBJS) _library
install:: $(LIBRARY) _install
clean:: _clean
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment