/*========================================================================= * * SECTlDias.hpp : lists & dialogs for sector links * * * Version 1.0 * Creation date * Revision date * * Shaitan *=======================================================================*/ #ifndef __SECT_L_DIAS_HPP__ #define __SECT_L_DIAS_HPP__ #include "SECTres.h" class Sector_Interface; class SECT_CustomListBox; /*=========================================================================== * Description: Class for the dialogbox * Creation date: * Author: Shaitan *--------------------------------------------------------------------------- * Revision date: Author: *=========================================================================*/ class SECT_DialogBase : public CFormView { // Construction protected: Sector_Interface *m_pSectorInterface; SECT_ElementBase *m_pSelectedElem; SECT_ListBase *m_pSectorList; tdeTypeList m_eType; BOOL m_bShowListParams; BOOL m_bInitialised; public: // standard constructor SECT_DialogBase (CWnd* pParent = NULL); // get functions Sector_Interface * GetSectorInterface (void) { return m_pSectorInterface; } SECT_ElementBase * GetSelectedElement (void) { return m_pSelectedElem; } SECT_ListBase * GetListBase (void) { return m_pSectorList; } tdeTypeList GetListType (void) { return m_eType; } virtual SECT_CustomListBox * GetSectorList (void) { return NULL; } // Dialog void fn_vInitDialog (Sector_Interface *p_oDLL, CWnd *pParent, const CString csTag, BOOL bShowListParams = FALSE); void fn_vReinitDialog (SECT_ListBase *pSectorList); void fn_vUpdateSelection (CPA_SuperObject *pSector); void fn_vInitSectorList (SECT_ListBase *pSectorList); // custom virtual void fn_vReinitListParams (void) { }; protected: CPA_SuperObject * GetSectorFromName (char *szName); // Dialog Data //{{AFX_DATA(SECT_DialogBase) enum { IDD = SEC_IDD_DIALOGBASE }; CButton m_cSymetric; CListBox m_cListParams; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(SECT_DialogBase) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(SECT_DialogList) afx_msg void OnSelchangeSectorList(); afx_msg void OnDblClkSectorList(); afx_msg void OnSymetric(); afx_msg void OnSize(UINT, int, int); afx_msg void OnDestroy(); afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //################################################################################# // SortedListBox //################################################################################# class SECT_CustomListBox : public CListBox { protected: SECT_DialogBase *m_pDialog; Sector_Interface *m_pSectorInterface; public: SECT_CustomListBox(); ~SECT_CustomListBox() { } void fn_vInitDialogParameters (SECT_DialogBase *pDialogList); void fn_vInitSectorList (SECT_ListBase *pSectorList); int GetCorrespondingIndex (DWORD pElem); virtual void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS) { } afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnRButtonDown(UINT nFlags, CPoint point); BOOL OnCommand(WPARAM wParam, LPARAM lParam); DECLARE_MESSAGE_MAP() }; //################################################################################# // ACTIVITY //################################################################################# class SECT_ActivityListBox : public SECT_CustomListBox { public: SECT_ActivityListBox() { } ~SECT_ActivityListBox() { } void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS); }; /*=========================================================================== *=========================================================================*/ class SECT_DialogActiv : public SECT_DialogBase { protected: SECT_ActivityListBox m_cSectorList; public: SECT_DialogActiv (CWnd* pParent = NULL); ~SECT_DialogActiv() { } SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; } protected: void DoDataExchange (CDataExchange* pDX); }; //################################################################################# // COLLISION //################################################################################# class SECT_CollisionListBox : public SECT_CustomListBox { public: SECT_CollisionListBox() { } ~SECT_CollisionListBox() { } void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS); }; /*=========================================================================== *=========================================================================*/ class SECT_DialogColls : public SECT_DialogBase { protected: SECT_CollisionListBox m_cSectorList; public: SECT_DialogColls (CWnd* pParent = NULL); ~SECT_DialogColls() { } SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; } protected: void DoDataExchange (CDataExchange* pDX); }; //################################################################################# // GRAPHIC //################################################################################# class SECT_GraphicListBox : public SECT_CustomListBox { public: SECT_GraphicListBox() { } ~SECT_GraphicListBox() { } void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS); }; /*=========================================================================== *=========================================================================*/ class SECT_DialogGraph : public SECT_DialogBase { protected: SECT_GraphicListBox m_cSectorList; public: SECT_DialogGraph (CWnd* pParent = NULL); ~SECT_DialogGraph() { } SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; } protected: void DoDataExchange (CDataExchange* pDX); }; //################################################################################# // SOUND //################################################################################# class SECT_SoundListBox : public SECT_CustomListBox { public: SECT_SoundListBox() { } ~SECT_SoundListBox() { } void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS); }; /*=========================================================================== *=========================================================================*/ class SECT_DialogSound : public SECT_DialogBase { protected: SECT_SoundListBox m_cSectorList; public: SECT_DialogSound (CWnd* pParent = NULL); ~SECT_DialogSound() { } SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; } protected: void DoDataExchange (CDataExchange* pDX); }; //################################################################################# // SOUND EVENT //################################################################################# class SECT_SoundEventListBox : public SECT_CustomListBox { public: SECT_SoundEventListBox() { } ~SECT_SoundEventListBox() { } void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS); }; /*=========================================================================== *=========================================================================*/ class SECT_DialogSoundEvent : public SECT_DialogBase { protected: SECT_SoundEventListBox m_cSectorList; public: SECT_DialogSoundEvent (CWnd* pParent = NULL); ~SECT_DialogSoundEvent() { } SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; } void fn_vReinitListParams (void); protected: void DoDataExchange (CDataExchange* pDX); }; #endif //__SECT_L_DIAS_HPP__