Alphabetical Class Index   File Members   Compound Members   File List  

CHoopsFrm.h

00001 //
00002 // Copyright (c) 2000 by Tech Soft 3D, LLC.
00003 // The information contained herein is confidential and proprietary to
00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under
00005 // civil and criminal statutes.  Tech Soft 3D shall pursue its civil
00006 // and criminal remedies in the event of unauthorized use or misappropriation
00007 // of its trade secrets.  Use of this information by anyone other than
00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a
00009 // written non-disclosure agreement, expressly prescribing the scope and
00010 // manner of such use.
00011 //
00012 // $Id: 880314ef449a13c9b702d1975cfb9aca50750ab9 $
00013 //
00014 
00015 // CHoopsFrm.h : interface of the CHoopsFrame class, derived from CMDIFrameWnd(MDI)/CFrameWnd(SDI)
00016 // Manages palette creation and sharing per HOOPS MDI requirements
00017 
00018 #include "HMFCGlobals.h"
00019 
00020 #ifndef hoops_frame
00021 #define hoops_frame
00022 
00023 #ifdef HOOPS_MFC_SDI
00024 #define CBaseHoopsFrameWnd CFrameWnd
00025 #else
00026 #define CBaseHoopsFrameWnd CMDIFrameWnd
00027 #endif
00028 
00029 class CFullScreenHandler {
00030 public:
00031     CFullScreenHandler();
00032     ~CFullScreenHandler();
00033 
00034     void Maximize(CFrameWnd* pFrame, CWnd* pView);
00035     void Restore(CFrameWnd* pFrame);
00036     BOOL InFullScreenMode() { return !m_rcRestore.IsRectEmpty(); }
00037     CSize GetMaxSize(CWnd* pView);
00038 
00039 protected:
00040     CRect m_rcRestore;
00041     CRect m_MaxSize;
00042     DWORD m_styleRestore;
00043     bool m_maximized;
00044 };
00045 
00047 
00052 class HMFC_API CHoopsFrame : public CBaseHoopsFrameWnd
00053 {
00054 // Attributes
00055 
00056 protected:
00057 
00058     CPalette    *m_pPalette; 
00060     BOOL        m_bSharePalette;  
00067     void DockControlBarLeftOf(CToolBar* Bar,CToolBar* LeftOf);
00068 
00069 public:
00070     CHoopsFrame();
00071 
00072 #ifdef HOOPS_MFC_SDI
00073     DECLARE_DYNCREATE(CHoopsFrame)  
00074 #else
00075     DECLARE_DYNAMIC(CHoopsFrame);   
00076 #endif
00077 
00078 
00083     CHoopsFrame(BOOL share); 
00084 
00085 
00086 // Operations
00087 public:
00089     CPalette    *GetSharedPalette() {return m_pPalette;};
00090 
00092     BOOL        IsPaletteShared() {return m_bSharePalette;};
00093 
00095     void        SetPaletteShared(BOOL share);
00096 
00097 
00098  
00099 // Overrides
00100     // ClassWizard generated virtual function overrides
00101     //{{AFX_VIRTUAL(CHoopsFrame)
00102     public:
00103     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);  
00104     //}}AFX_VIRTUAL
00105 
00106 // Implementation
00107 public:
00108     virtual ~CHoopsFrame();
00109 #ifdef _DEBUG
00110     virtual void AssertValid() const;
00111     virtual void Dump(CDumpContext& dc) const;
00112 #endif
00113     void OnViewFullScreen();
00114 
00115 protected:  // control bar embedded members
00116     CStatusBar  m_wndStatusBar;  
00117     CToolBar    m_wndToolBar;    
00118 
00119 // Generated message map functions
00120 protected:
00121     //{{AFX_MSG(CHoopsFrame)
00122     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);  
00123     afx_msg BOOL OnQueryNewPalette();                   
00124     afx_msg void OnPaletteChanged(CWnd* pFocusWnd);     
00125     afx_msg void OnMove(int x, int y);          
00126     afx_msg virtual BOOL OnWndMsg( UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pResult);   
00127     afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpmmi);
00128     //}}AFX_MSG
00129     DECLARE_MESSAGE_MAP()
00130 };
00131 
00132 #endif