home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / dreamscape / source / Dreamscape / Headers / utils / h / panewindow < prev    next >
Encoding:
Text File  |  1996-08-27  |  1.6 KB  |  61 lines

  1.  
  2. // utils.h.panewindow
  3.  
  4. // Dreamscape - C++ class library for RISC OS
  5. // Copyright (c) 1996 Mark Seaborn <mseaborn@argonet.co.uk>
  6. //
  7. // This library is free software; you can redistribute it and/or
  8. // modify it under the terms of the GNU Library General Public
  9. // License as published by the Free Software Foundation; either
  10. // version 2 of the License, or (at your option) any later version.
  11. // See the Dreamscape documentation for more information.
  12.  
  13. #ifndef dreamscape_panewindow_H
  14. #define dreamscape_panewindow_H
  15.  
  16. #include "window.h"
  17. #include "winhandlers.h"
  18.  
  19. class WindowWithPanes: public BaseWindow, private WindowShower,
  20. private WindowHider {
  21.   class Pane: public WindowShower, public WindowHider {
  22.   public:
  23.     WindowWithPanes *parent;
  24.     Window *window;
  25.     enum { coords, bbox } type;
  26.     WinBBox position;
  27.  
  28.     void show_window(const Position &position);
  29.     void hide_window();
  30.  
  31.     void find_position(const Position &position, Position &wposition) const;
  32.   };
  33.   friend Pane;
  34.   Window *window;
  35.   List<Pane *> panes;
  36.   unsigned owns_window: 1;
  37.   unsigned threaded: 1;
  38.   unsigned pane_threaded: 1;
  39.  
  40.   void init();
  41.   void final();
  42.  
  43.   void show_window(const Position &position);
  44.   void hide_window();
  45.  
  46. public:
  47.   WindowWithPanes(BaseWindow *window);
  48.   WindowWithPanes(const char *name);
  49.   virtual ~WindowWithPanes();
  50.  
  51.   void add_window(BaseWindow *window, const WinCoords &topleft);
  52.   void add_window(BaseWindow *window, const WinBBox &bbox);
  53.   void remove_window(BaseWindow *window);
  54.  
  55.   BaseWindow &get_next_window();
  56.   const BaseWindow &get_next_window() const;
  57.   bool has_next_window() const;
  58. };
  59.  
  60. #endif
  61.