home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xmdiserv.h < prev    next >
C/C++ Source or Header  |  1998-03-20  |  2KB  |  57 lines

  1. #ifndef __OOL_MDISERVER_H__
  2. #define __OOL_MDISERVER_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XMDIServer                            */
  8. /*                       derived from: XFrameWindow                          */
  9. /*                        last update: 9/97                                  */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13.  
  14. #include "xfrmwnd.h"
  15.  
  16. class XMDIClient;
  17.  
  18. class _export_ XMDIServer: public XFrameWindow
  19. {     
  20.       friend XMDIClient;
  21.       void SetClientFocus( XMDIClient *);
  22.       void AddWindow( XMDIClient*);
  23.       void RemoveWindow(XMDIClient*);
  24.       void UpdateMenuText( const int, const char*);
  25.       XMDIClient ** windowList;
  26.       XMDIClient * focus;
  27.       SHORT counter;
  28.       LONG ids;
  29.       void Setup(void);
  30.       BOOL max;
  31.    public:
  32.       XMDIServer( const XResource *, const char* s = "", const LONG style = XFrameWindow::defaultStyle | FRM_TASKLIST | FRM_CENTER | FRM_MENU, const XRect& rec=XRect());
  33.       XMDIServer( const ULONG id, const char* s = "", const LONG style = XFrameWindow::defaultStyle | FRM_TASKLIST | FRM_CENTER | FRM_MENU, const XRect& rec=XRect());
  34.       ~XMDIServer();
  35.       void CascadeWindows();
  36.       virtual BOOL DoCommand( LONG command);
  37. //      virtual BOOL DoSysCommand( USHORT command);
  38.       void DoSize( XSize * s);
  39.       void Draw( void );
  40.       USHORT GetClientCount() { return counter; }
  41. //        XMDIClient * GetClientWindow(USHORT index) { return (index > 0 && index < counter ? windowList[index] : NULL); }
  42.       void FocusChanged( BOOL set);
  43.       XMDIClient * GetClientWindow(USHORT index) { return (index < counter ? windowList[index] : NULL); }
  44.       XMDIClient * GetFocusWindow() { return focus; }
  45.       void Init(void);
  46.       void InitMenu( XMenu * menu);
  47.       void NextWindow(void);
  48.       void PrevWindow(void);
  49.       BOOL QueryForClose();
  50.       virtual void SetEmptyMenu( XMenuBar*) {;}
  51.       void ShowClient( XMDIClient *, BOOL canSize = FALSE);
  52.       void TileWindows();
  53. };
  54.  
  55.  
  56. #endif
  57.