home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / e / extralib / !ExtrasLib / h / ExtraPane < prev    next >
Text File  |  1996-03-03  |  4KB  |  89 lines

  1. /* ExtraPane.h
  2.  *
  3.  * Library for coping with n pane windows attached to a main window.
  4.  * The panes are represented by an array of _extrapane_str's associated with
  5.  * the main window, with the first element representing the rearmost pane, and
  6.  * the last the foremost.
  7.  * Panes which are not open have their window handles set to 0.
  8.  */
  9.  
  10. /* ExtrasLib by Peter Hartley 1995-96
  11.  * (K) All Rites Reversed - Copy What You Like
  12.  */
  13.  
  14. #ifndef __xtra_pane_h
  15. #define __xtra_pane_h
  16.  
  17. typedef struct _extrapane_str *ExtraPane;
  18.  
  19. typedef os_error *(*extrapane_OpenProc)(ExtraPane pane, window_openblock *open,
  20.                         window_openblock *oldopen, void *handle );
  21.  
  22. typedef struct _extrapane_str
  23. {
  24.   window_handle handle, oldhandle;
  25.   extrapane_OpenProc openproc;
  26.   void *openhandle;
  27. } ExtraPane_Str;
  28.  
  29.  
  30. /*------------------------------------------*
  31.  * Initialise pane window array to no panes *
  32.  *------------------------------------------*/
  33.  
  34. void ExtraPane_Init( ExtraPane panes, int npanes );
  35.  
  36.  
  37. /*----------------------------------------------------------------------------*
  38.  * Attach/remove a pane.                                                      *
  39.  * After attaching one or more windows, call ExtraPane_OpenWindow() to make   *
  40.  * it take effect. When removing a pane, call this (with w=NULL) and          *
  41.  * close/delete the pane yourself.                                            *
  42.  *----------------------------------------------------------------------------*/
  43.  
  44. void ExtraPane_SetHandle( ExtraPane panes, int index, window_handle w,
  45.                           extrapane_OpenProc openproc, void *handle );
  46.  
  47.  
  48. /*---------------------------------------------------------------------*
  49.  * Open main window plus panes, reducing flicker                       *
  50.  *---------------------------------------------------------------------*/
  51.  
  52. os_error *ExtraPane_OpenWindow( window_openblock *open, ExtraPane panes,
  53.                                 int npanes, void *handle );
  54.  
  55.  
  56. /*-------------------------------------------------------------*
  57.  * Predefined pane opening routines for the most obvious cases *
  58.  *-------------------------------------------------------------*/
  59.  
  60. os_error *ExtraPane_HandlerLeftOut( ExtraPane pane, window_openblock *open,
  61.                                     window_openblock *oldopen,
  62.                                     void *handle ); /* like !Draw */
  63.  
  64. os_error *ExtraPane_HandlerLeftIn( ExtraPane pane, window_openblock *open,
  65.                                    window_openblock *oldopen,
  66.                                    void *handle );  /* like !DataPower */
  67.  
  68. os_error *ExtraPane_HandlerLeftInScrolling( ExtraPane pane,
  69.                                    window_openblock *open,
  70.                                    window_openblock *oldopen,
  71.                                    void *handle );  /* y axis */
  72.  
  73. os_error *ExtraPane_HandlerTopInScrolling( ExtraPane pane,
  74.                                    window_openblock *open,
  75.                                    window_openblock *oldopen,
  76.                                    void *handle );  /* x axis */
  77.  
  78. os_error *ExtraPane_HandlerBottomInScrolling( ExtraPane pane,
  79.                                    window_openblock *open,
  80.                                    window_openblock *oldopen,
  81.                                    void *handle );  /* x axis */
  82.  
  83. os_error *ExtraPane_HandlerBottomOut( ExtraPane pane, window_openblock *open,
  84.                                       window_openblock *oldopen,
  85.                                       void *handle ); /* like Photodesk */
  86.  
  87. #endif
  88.  
  89.