00001 00002 00003 00004 #ifndef MNPANEL_H 00005 #define MNPANEL_H 00006 00007 #include "MNComponent.h" 00008 #include "MNLayout.h" 00009 #include <vector> 00010 00011 using namespace std; 00012 00013 // The debugger can't handle symbols more than 255 characters long. 00014 // STL often creates symbols longer than that. 00015 // When symbols are longer than 255 characters, the warning is disabled. 00016 #pragma warning(disable:4786) 00017 00018 00028 class MNPanel : public MNComponent 00029 { 00030 protected: 00031 vector <MNComponent*> comps; 00032 LAYOUT_INFO info; 00033 RECT area; 00034 00036 RECT (*layout)(MNComponent**, int, LAYOUT_INFO ); 00037 00038 public: 00042 MNPanel( MNComponent *parent, LAYOUT_INFO linfo, 00043 RECT (*l)(MNComponent**, int, LAYOUT_INFO) = NULL ); 00044 00048 RECT Layout(); 00049 00053 void Add( MNComponent* com ); 00054 00058 void SetLayout( RECT (*l)(MNComponent**, int, LAYOUT_INFO ) ); 00059 00063 void SetLayoutInfo( LAYOUT_INFO info ); 00064 00068 LAYOUT_INFO GetLayoutInfo(); 00069 00073 RECT GetPaintArea(); 00074 00075 virtual int GetWidth(); 00076 virtual int GetHeight(); 00077 virtual void SetPosition( int x, int y ); 00078 }; 00079 00080 #endif
1.2.18