#ifndef __FRMBSMN_HPP__ #define __FRMBSMN_HPP__ /****************************************/ #ifndef CPA_EXPORT #if defined(CPA_WANTS_IMPORT) #define CPA_EXPORT __declspec(dllimport) #elif defined(CPA_WANTS_EXPORT) #define CPA_EXPORT __declspec(dllexport) #else #define CPA_EXPORT #endif #endif /****************************************/ #ifdef ACTIVE_EDITOR class EDT_SubMenu; class CPA_DLLBase; class CPA_EditorBase; class CPA_KeyActionConfiguration; #include "FRMBase.hpp" #include "Lst.hpp" #include "CPADgBar.hpp" class DEV_MultiDevice; class CPA_Interface; /**/ /* Constants for status bar.*/ /**/ #define C_STATUS_WARNING 1 /* blue background*/ #define C_STATUS_ERROR 2 /* red background*/ #define C_STATUS_NORMAL 3 /* normal background*/ #define C_STATUSPANE_EDITOR 0 #define C_STATUSPANE_INFOS 1 class FRMbaseMenu; /**/ /* Splitter.*/ /**/ class FRMSplitter : public CSplitterWnd { public: DECLARE_DYNCREATE(FRMSplitter) public: virtual BOOL CreateView(int, int, CRuntimeClass *, SIZE, CCreateContext *); virtual void DeleteView(int, int); virtual void DeleteRow(int); virtual void DeleteColumn(int); virtual void SetActivePane(int, int, CWnd *pWnd = NULL); virtual void RecalcLayout(void); virtual int HitTest(CPoint pt) const; void DrawObject(CWnd *); BOOL CreateScrollBarCtrl(DWORD, UINT); void MakeSplit(int); FRMBaseMenu * GetParentFrame() { return (FRMBaseMenu *) GetParent(); } protected: afx_msg void OnLButtonDown(UINT, CPoint); afx_msg void OnPaint(); afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); DECLARE_MESSAGE_MAP() }; /**/ /* Frame.*/ /**/ class CPA_EXPORT FRMBaseMenu : public FRMBase { protected: public: BOOL mbWantSplit; BOOL mbWantNew; BOOL mbWantTile; BOOL mbWantClose; FRMSplitter m_oSplitter; CMenu m_oGeneralMenu; /* Starting menu*/ EDT_SubMenu *m_p_oEditSubMenu; EDT_SubMenu *m_p_oEditorSubMenu; EDT_SubMenu *m_p_oToolSubMenu; /*ANNECY Shaitan NewInterface 24/03/98 {*/ EDT_SubMenu *m_p_oLoadSubMenu; EDT_SubMenu *m_p_o3DViewSubMenu; EDT_SubMenu *m_p_oSpecificSubMenu; /*ENDANNECY Shaitan NewInterface }*/ EDT_SubMenu *m_p_oPrefSubMenu; CPA_DialogBar m_oGeneralDialogBar; /* General dialog bar of application*/ CStatusBar m_oStatusBar; BOOL m_bEnableEditors; public: FRMBaseMenu(); ~FRMBaseMenu(); DECLARE_DYNCREATE(FRMBaseMenu) virtual void UpdateStatus(char *, int, int); virtual void fn_vInitGeneralMenuWithContext(void); virtual BOOL OnCommand( WPARAM wParam, LPARAM lParam ); virtual BOOL CreateBase(LPCTSTR, int, int, CPA_MainWorld*); virtual BOOL CreateBase(LPCTSTR, CPA_MainWorld*); virtual void fn_vInitGeneralDialogBarWithContext(void); virtual void mfn_vUpdateDeviceToolBar(void); virtual void fn_vShowGeneralInterface(BOOL); virtual void fn_vEnableEditors(BOOL); void fn_vUpdateCurrentEditor (CPA_EditorBase *pNewCurrentEditor); virtual void fn_vOnActivate(void); virtual BOOL OnCreateClient(LPCREATESTRUCT, CCreateContext *); DEV_MultiDevice * GetMultiDevice() { return (DEV_MultiDevice *) GetActiveView(); } CPA_Interface * GetInterface(); BOOL fn_bCanClose(void); /*Mircea Dunka - Dialog Bar Buttons for Editors*/ protected: void fn_vUpdateEditorButtonsToolbar(void); /*end Mircea Dunka - Dialog Bar Buttons for Editors */ protected: /*{{AFX_MSG(FRMBaseMenu)*/ afx_msg void OnNcLButtonDblClk(UINT, CPoint); afx_msg void OnSysCommand(UINT, LPARAM); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnInitMenu(CMenu *_pMenu); afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu); afx_msg void OnSaveAll(void); afx_msg void OnOptions(void); afx_msg void OnInitMap(void); afx_msg void OnUndo(void); afx_msg void OnRedo(void); afx_msg void OnDrawItem(int, LPDRAWITEMSTRUCT); afx_msg void OnActivate(UINT State, CWnd *pOther, BOOL bMini); afx_msg void OnEnterMenuLoop(BOOL bIsTrackPopupMenu); afx_msg void OnExitMenuLoop(BOOL bIsTrackPopupMenu); afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); /*}}AFX_MSG*/ DECLARE_MESSAGE_MAP() /*Mircea Dunka - I need this function for dialog bar buittons initialization*/ public: BOOL AddItemToPopupMenu(EDT_SubMenu* _pSubMenu, CPA_List* _p_oListOfDLL); /*end Mircea Dunka*/ protected: void fn_vActivateHelp(UINT IDCmdMsg); void fn_vFillHelpMenu(CMenu *pPopupMenu); }; #endif ACTIVE_EDITOR #endif __FRMBSMN_HPP__