Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Editor_VKeyController.h

00001 #ifndef EDITOR_VKEYCONTROLLER_H
00002 #define EDITOR_VKEYCONTROLLER_H
00003 
00004 #include "Panel.h"
00005 #include "AbstractEditor.h"
00006 #include "Panel_VKeyController.h"
00007 #include "GenericKeyIterator.h"
00008 
00009 class VEditor_VKeyController : public VAbstractEditor
00010 {
00011 protected:
00012         VGenericKeyIterator* m_pKeyIterator;
00013         VPanel_VKeyController* m_pPanel;
00014 
00015 public:
00016         VEditor_VKeyController(VGenericKeyIterator* p)
00017         {
00018                 m_pPanel = NULL;
00019                 m_pKeyIterator = p;
00020         }
00021 
00022         ~VEditor_VKeyController()
00023         {
00024                 if (m_pPanel != NULL)
00025                         EndPanel();
00026         }
00027 
00029         void CreatePanel(CWnd* pParent, CRect rcWindowLocation)
00030         {
00031                 if (m_pPanel != NULL) // there already is a panel open
00032                         EndPanel();
00033 
00034                 m_pPanel = new VPanel_VKeyController(pParent);
00035                 if (m_pPanel)
00036                 {
00037                 
00038                         m_pPanel->m_pController = m_pKeyIterator;
00039 
00040                         m_pPanel->Create(IDD_PANEL_KEYCONTROLLER, pParent);
00041                         m_pPanel->EnableWindow(TRUE);
00042 
00043 
00044 
00045                         m_pPanel->ShowWindow(SW_SHOW);
00046                         // move the window to fit the space
00047                         m_pPanel->MoveWindow(rcWindowLocation.left, rcWindowLocation.top, rcWindowLocation.Width(), rcWindowLocation.Height(), FALSE);
00048                 }
00049         }
00050 
00052         void EndPanel()
00053         {
00054                 if (m_pPanel != NULL) { 
00055 
00056                         m_pPanel->DestroyWindow();
00057                         delete m_pPanel;
00058                         m_pPanel = NULL;
00059                 }
00060         }
00061 
00062 };
00063 
00064 
00065 
00066 #endif

Generated at Wed Aug 29 19:58:55 2001 for Pocket Animator by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001